houston-core 0.7.0 → 0.8.0.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +45 -45
  3. data/app/assets/javascripts/houston/app/models/ticket.coffee +7 -5
  4. data/app/assets/javascripts/houston/app/views/new_ticket_view.coffee +1 -21
  5. data/app/assets/javascripts/houston/core/handlebars_helpers.coffee +0 -6
  6. data/app/assets/stylesheets/houston/application/commit.scss +16 -0
  7. data/app/assets/stylesheets/houston/application/navigation.scss +1 -0
  8. data/app/assets/stylesheets/houston/application/new_ticket_view.scss +0 -4
  9. data/app/assets/stylesheets/houston/application/projects.css.scss +0 -14
  10. data/app/assets/stylesheets/houston/application/release_form.scss +1 -1
  11. data/app/assets/stylesheets/houston/application/teams.scss +68 -0
  12. data/app/assets/templates/tickets/index.hbs +0 -1
  13. data/app/controllers/github/pulls_controller.rb +1 -0
  14. data/app/controllers/project_tickets_controller.rb +1 -5
  15. data/app/controllers/projects_controller.rb +10 -12
  16. data/app/controllers/teams_controller.rb +60 -0
  17. data/app/controllers/users_controller.rb +12 -12
  18. data/app/helpers/commit_helper.rb +3 -5
  19. data/app/helpers/exposure_helper.rb +1 -1
  20. data/app/helpers/ticket_helper.rb +0 -13
  21. data/app/interactors/ticket_report.rb +0 -7
  22. data/app/mailers/project_notification.rb +2 -23
  23. data/app/mailers/view_mailer.rb +0 -1
  24. data/app/models/ability.rb +28 -19
  25. data/app/models/commit.rb +0 -4
  26. data/app/models/project.rb +14 -29
  27. data/app/models/release.rb +0 -18
  28. data/app/models/role.rb +0 -22
  29. data/app/models/team.rb +43 -0
  30. data/app/models/team_user.rb +68 -0
  31. data/app/models/ticket.rb +2 -22
  32. data/app/models/user.rb +21 -30
  33. data/app/views/devise/sessions/new.html.erb +9 -7
  34. data/app/views/layouts/_mobile_navigation.html.erb +5 -3
  35. data/app/views/layouts/_navigation.html.erb +11 -10
  36. data/app/views/layouts/_tester_bar.html.erb +1 -1
  37. data/app/views/layouts/application.html.erb +1 -2
  38. data/app/views/project_tickets/_tickets.html.erb +0 -1
  39. data/app/views/project_tickets/index.xls.erb +0 -35
  40. data/app/views/project_tickets/new.html.erb +1 -2
  41. data/app/views/projects/_form.html.erb +7 -12
  42. data/app/views/projects/index.html.erb +10 -17
  43. data/app/views/releases/_changelog.html.erb +11 -14
  44. data/app/views/teams/_form.html.erb +45 -0
  45. data/app/views/teams/edit.html.erb +8 -0
  46. data/app/views/teams/index.html.erb +62 -0
  47. data/app/views/teams/new.html.erb +7 -0
  48. data/app/views/users/_form.html.erb +2 -11
  49. data/app/views/users/index.html.erb +8 -20
  50. data/app/views/users/new.html.erb +1 -1
  51. data/config/initializers/inflections.rb +7 -6
  52. data/config/routes.rb +19 -17
  53. data/db/migrate/20160812233255_repurpose_users_role.rb +16 -0
  54. data/db/migrate/20160813001242_create_teams.rb +42 -0
  55. data/db/structure.sql +110 -116
  56. data/lib/houston/boot.rb +0 -1
  57. data/lib/houston/boot/configuration.rb +26 -11
  58. data/lib/houston/boot/events.rb +0 -4
  59. data/lib/houston/version.rb +1 -1
  60. data/templates/new-instance/config/abilities.rb +68 -51
  61. data/templates/new-instance/config/conversations/mentions/unfurl_tasks.rb +1 -1
  62. data/templates/new-instance/config/events/deploy/notify_deployer_when_finished.rb +24 -16
  63. data/templates/new-instance/config/events/tests/email_when_completed.rb +11 -0
  64. data/templates/new-instance/config/integrations/ldap.rb +4 -0
  65. data/templates/new-instance/config/main.rb +10 -17
  66. data/templates/new-module/test/fixtures/users.yml +1 -2
  67. data/test/acceptance/creating_a_release_test.rb +1 -1
  68. data/test/factories/project_factory.rb +1 -0
  69. data/test/factories/user_factory.rb +3 -1
  70. data/test/fixtures/teams.yml +2 -0
  71. data/test/fixtures/teams_users.yml +5 -0
  72. data/test/fixtures/users.yml +1 -2
  73. data/test/integration/ci_integration_test.rb +2 -2
  74. data/test/support/config.rb +3 -5
  75. data/test/unit/controllers/deploys_controller_test.rb +11 -5
  76. data/test/unit/controllers/users_controller_test.rb +46 -0
  77. data/test/unit/models/release_test.rb +0 -9
  78. data/test/unit/models/serializer_test.rb +0 -8
  79. data/test/unit/models/ticket_test.rb +0 -32
  80. metadata +21 -24
  81. data/app/assets/javascripts/houston/app/table_row_expander.coffee +0 -52
  82. data/app/assets/javascripts/houston/app/views/problems_view.coffee +0 -114
  83. data/app/assets/stylesheets/houston/application/follow_up.scss +0 -44
  84. data/app/controllers/project_exceptions_controller.rb +0 -36
  85. data/app/controllers/project_pretickets_controller.rb +0 -27
  86. data/app/mailers/deploy_notification.rb +0 -33
  87. data/app/models/antecedent.rb +0 -15
  88. data/app/models/ticket_antecedent.rb +0 -39
  89. data/app/models/value_statement.rb +0 -9
  90. data/app/presenters/problem_presenter.rb +0 -49
  91. data/app/presenters/tester_presenter.rb +0 -15
  92. data/app/views/project_notification/follow_up.html.erb +0 -26
  93. data/app/views/project_pretickets/show.html.erb +0 -49
  94. data/app/views/releases/_antecedents.html.erb +0 -12
  95. data/config/initializers/hard_coded_knowledge.rb +0 -141
  96. data/db/migrate/20130427223925_create_project_quotas.rb +0 -14
  97. data/db/migrate/20140506035755_create_value_statements.rb +0 -9
  98. data/lib/houston/boot/ticket_antecedent_serializer.rb +0 -21
  99. data/test/unit/models/ticket_antecedents_test.rb +0 -38
@@ -1,12 +0,0 @@
1
- <div class="release-detail-section release-antecedents">
2
- <h5>Antecedents</h5>
3
- <% if antecedents.any? %>
4
- <ul class="antecedents">
5
- <% antecedents.each do |antecedent| %>
6
- <li><%= format_antecedent(antecedent) %></li>
7
- <% end %>
8
- </ul>
9
- <% else %>
10
- <p class="no-items">No antecedents were associated with this release.</p>
11
- <% end %>
12
- </div>
@@ -1,141 +0,0 @@
1
- # Eventually we should get rid of this, of course.
2
- # But, for now, this file documents a few things
3
- # we've scattered throughout the code base and need
4
- # to abstract.
5
- module Houston
6
- module TMI
7
-
8
- FIELD_USED_FOR_LDAP_LOGIN = "samaccountname"
9
- INSTRUCTIONS_FOR_LOGIN = "You can log in with your CPH domain account"
10
- TICKET_LABELS_FOR_MEMBERS = [
11
- 'Admin',
12
- 'Global',
13
- 'What\'s New',
14
- 'Help',
15
- 'Feedback',
16
- 'Overview',
17
- 'Overview / Upcoming Events',
18
- 'Overview / Notifcations',
19
- 'Overview / Data Health',
20
- 'Overview / Recent Attendance',
21
- 'Reports',
22
- 'Reports / Annual Report',
23
- 'Trends',
24
- 'Trends / Export',
25
- 'Trends / Print',
26
- 'Trends Detail',
27
- 'Trends Detail / Export',
28
- 'Trends Detail / Print',
29
- 'People',
30
- 'People / Export',
31
- 'People / Print',
32
- 'Profile',
33
- 'Profile / Photo',
34
- 'Profile / General',
35
- 'Profile / Family',
36
- 'Profile / Attendance',
37
- 'Profile / Offering',
38
- 'Profile / Notes',
39
- 'Profile / Pastoral Visits',
40
- 'Profile / Export',
41
- 'Mailing Labels',
42
- 'Church Directory',
43
- 'Add/Remove Tags',
44
- 'Send Email',
45
- 'Contribution Statements',
46
- 'Households',
47
- 'Households / Export',
48
- 'Households / Print',
49
- 'Household',
50
- 'Household / Photo',
51
- 'Household / General',
52
- 'Household / Members',
53
- 'Household / Notes',
54
- 'Household / Pastoral Visits',
55
- 'Smart Groups',
56
- 'Tags',
57
- 'Pastoral Visits',
58
- 'New Person',
59
- 'New Person / vCard',
60
- 'Events',
61
- 'Events / Print',
62
- 'Event',
63
- 'Event / Anniversary',
64
- 'Calendars',
65
- 'Enter Attendance',
66
- 'Enter Offerings',
67
- 'Enter Offerings / Export',
68
- 'Envelopes',
69
- 'Funds',
70
- 'Pledges',
71
- 'Settings',
72
- 'Logins',
73
- 'Permisssions',
74
- 'Sunday School',
75
- 'SS Import'
76
- ].freeze
77
- TICKET_LABELS_FOR_UNITE = [
78
- 'Global',
79
- 'Admin Bar',
80
- 'Setup',
81
- 'Help',
82
- 'Search',
83
- 'Feedback',
84
- 'Login',
85
- 'Pages',
86
- 'Pages / New Page',
87
- 'Page / Settings',
88
- 'Page / Layouts',
89
- 'Page / Edit Mode',
90
- 'Feed',
91
- 'Feed / Settings',
92
- 'Feed / Post',
93
- 'Posts',
94
- 'Comments',
95
- 'Members',
96
- 'Users',
97
- 'Users / Invite',
98
- 'Users / Edit',
99
- 'User / Settings',
100
- 'User / Profile',
101
- 'Profile',
102
- 'Profile / Portrait',
103
- 'Profile / Edit',
104
- 'Profile / Groups',
105
- 'Profile / Recent Activity',
106
- 'Calendar',
107
- 'Event',
108
- 'Event / New',
109
- 'Event / Edit',
110
- 'Event / Discussion',
111
- 'Event / Participants',
112
- 'Groups',
113
- 'Group / New',
114
- 'Group / Discussion',
115
- 'Group / Events',
116
- 'Group / Members',
117
- 'Group / Edit',
118
- 'Group / Settings',
119
- 'Themes / Browse',
120
- 'Themes / Customize',
121
- 'Themes / Advanced',
122
- 'Themes / All',
123
- 'Theme / Earthtones',
124
- 'Theme / Heritage',
125
- 'Theme / Minimal',
126
- 'Theme / Modern',
127
- 'Theme / Ribbon',
128
- 'Theme / Swatch',
129
- 'Theme / Urban',
130
- 'Theme / Vertical',
131
- 'Settings / Account',
132
- 'Settings / Calendar',
133
- 'Settings / Domain',
134
- 'Settings / Google Analytics',
135
- 'Settings / Integration',
136
- 'New Feature',
137
- 'CKEditor',
138
- ].freeze
139
-
140
- end
141
- end
@@ -1,14 +0,0 @@
1
- class CreateProjectQuotas < ActiveRecord::Migration
2
- def change
3
- create_table :project_quotas do |t|
4
- t.integer :project_id, null: false
5
- t.date :week, null: false
6
- t.integer :value, null: false
7
-
8
- t.timestamps
9
- end
10
-
11
- add_index :project_quotas, [:project_id, :week], unique: true
12
- add_index :project_quotas, :week
13
- end
14
- end
@@ -1,9 +0,0 @@
1
- class CreateValueStatements < ActiveRecord::Migration
2
- def change
3
- create_table :value_statements do |t|
4
- t.integer :project_id, null: false
5
- t.float :weight, null: false
6
- t.string :text, null: false
7
- end
8
- end
9
- end
@@ -1,21 +0,0 @@
1
- module Houston
2
- class TicketAntecedentSerializer
3
-
4
- def applies_to?(object)
5
- object.is_a?(TicketAntecedent)
6
- end
7
-
8
- def pack(antecedent)
9
- { "ticket_or_commit" => antecedent.ticket_or_commit,
10
- "kind" => antecedent.kind,
11
- "id" => antecedent.id }
12
- end
13
-
14
- def unpack(object)
15
- TicketAntecedent.new *object.values_at("ticket_or_commit", "kind", "id")
16
- end
17
-
18
- end
19
- end
20
-
21
- Houston.add_serializer Houston::TicketAntecedentSerializer.new
@@ -1,38 +0,0 @@
1
- require "test_helper"
2
-
3
- class TicketAntecedentsTest < ActiveSupport::TestCase
4
- attr_reader :antecedent
5
-
6
- setup do
7
- @antecedent = TicketAntecedent.new(nil, "Gollum", 45)
8
- end
9
-
10
-
11
-
12
- context "#released!" do
13
- should "raise the release event" do
14
- assert_triggered "antecedent:gollum:released" do
15
- antecedent.released!
16
- end
17
- end
18
- end
19
-
20
- context "#resolve!" do
21
- should "raise the release event" do
22
- assert_triggered "antecedent:gollum:resolved" do
23
- antecedent.resolve!
24
- end
25
- end
26
- end
27
-
28
- context "#close!" do
29
- should "raise the release event" do
30
- assert_triggered "antecedent:gollum:closed" do
31
- antecedent.close!
32
- end
33
- end
34
- end
35
-
36
-
37
-
38
- end