Skip to content

Commit

Permalink
feat: add flag on deployments that a retrospective was prompted
Browse files Browse the repository at this point in the history
The flag should be set when an instructor is prompted to post a teaching
retrospective in CaseLog
  • Loading branch information
cbothner committed Jan 23, 2018
1 parent 89cc33a commit a68de3e
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Layout/ClassStructure:
- attr_writer
- attr_accessor
- alias_attribute
- time_for_a_boolean
- translates
associations:
- has_one
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gem 'redis', '~> 3.0'
gem 'acts_as_list'
gem 'kaminari'
gem 'memoist'
gem 'time_for_a_boolean', git: 'https://github.com/calebthompson/time_for_a_boolean'
gem 'time_for_a_boolean', '~> 0.2.0'
gem 'virtus'

# Authentication and Authorization
Expand Down
13 changes: 4 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ GIT
user_agent_parser
uuidtools

GIT
remote: https://github.com/calebthompson/time_for_a_boolean
revision: 636a4c6b4645f9888402ff49b40b7f42c270d946
specs:
time_for_a_boolean (0.1.0)
activerecord
railties

GIT
remote: https://github.com/cbothner/omniauth-lti
revision: 578245b0cabb755a209221ce1682667d9154ac4d
Expand Down Expand Up @@ -395,6 +387,9 @@ GEM
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.8)
time_for_a_boolean (0.2.0)
activerecord
railties
tzinfo (1.2.3)
thread_safe (~> 0.1)
uglifier (3.2.0)
Expand Down Expand Up @@ -487,7 +482,7 @@ DEPENDENCIES
spring-commands-rspec
spring-watcher-listen (~> 2.0.0)
table_print
time_for_a_boolean!
time_for_a_boolean (~> 0.2.0)
uglifier (>= 1.3.0)
virtus
web-console
Expand Down
5 changes: 5 additions & 0 deletions app/models/deployment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@
# - 0 means no quiz (and assumes quiz == nil)
# @attr key [String] a random URL safe string used as the hard-to-guess
# identifier that allows the {MagicLink} to work
# @attr retrospective_prompt_sent_at [DateTime] at most once after a professor
# has deployed a case, we want to prompt them to write up their experience
# teaching with the case as a post in CaseLog
#
# @see GenericDeployment GenericDeployment: this model’s null object
class Deployment < ApplicationRecord
include Authority::Abilities

time_for_a_boolean :retrospective_prompt_sent

belongs_to :case
belongs_to :group
belongs_to :quiz
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddRetrospectivePromptSentAtToDeployments < ActiveRecord::Migration[5.1]
def change
add_column :deployments, :retrospective_prompt_sent_at, :timestamp
end
end
6 changes: 4 additions & 2 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ CREATE TABLE deployments (
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
answers_needed integer DEFAULT 1,
key character varying
key character varying,
retrospective_prompt_sent_at timestamp without time zone
);


Expand Down Expand Up @@ -2308,6 +2309,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20171031161433'),
('20171113192541'),
('20171220165301'),
('20180119170858');
('20180119170858'),
('20180123150723');


0 comments on commit a68de3e

Please sign in to comment.