houston-core 0.5.6 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +94 -69
  3. data/app/adapters/houston/adapters/deployment/engineyard.rb +4 -3
  4. data/app/adapters/houston/adapters/version_control/git_adapter.rb +36 -42
  5. data/app/adapters/houston/adapters/version_control/git_adapter/github_repo.rb +2 -2
  6. data/app/adapters/houston/adapters/version_control/git_adapter/remote_repo.rb +23 -11
  7. data/app/adapters/houston/adapters/version_control/git_adapter/repo.rb +18 -8
  8. data/app/adapters/houston/adapters/version_control/null_repo.rb +8 -0
  9. data/app/assets/javascripts/core/handlebars_helpers.coffee +3 -3
  10. data/app/assets/stylesheets/application/github_repos.scss +77 -0
  11. data/app/assets/stylesheets/application/navigation.scss +2 -0
  12. data/app/assets/stylesheets/application/pull_requests.scss +44 -58
  13. data/app/assets/stylesheets/core/avatars.scss +5 -0
  14. data/app/assets/stylesheets/core/colors.scss.erb +10 -7
  15. data/app/concerns/commit_synchronizer.rb +3 -0
  16. data/app/controllers/github/pulls_controller.rb +12 -0
  17. data/app/controllers/project_tests_controller.rb +3 -3
  18. data/app/controllers/projects_controller.rb +45 -1
  19. data/app/controllers/releases_controller.rb +42 -26
  20. data/app/helpers/application_helper.rb +8 -0
  21. data/app/helpers/avatar_helper.rb +2 -2
  22. data/app/helpers/commit_helper.rb +2 -2
  23. data/app/helpers/oembed_helper.rb +8 -0
  24. data/app/helpers/project_helper.rb +4 -5
  25. data/app/helpers/release_helper.rb +11 -0
  26. data/app/helpers/timeline_helper.rb +1 -1
  27. data/app/helpers/url_helper.rb +0 -18
  28. data/app/interactors/cache_key_dependencies.rb +28 -0
  29. data/app/jobs/sync_all_tickets_job.rb +1 -0
  30. data/app/mailers/view_mailer.rb +0 -1
  31. data/app/models/commit.rb +1 -1
  32. data/app/models/github/pull_request.rb +82 -26
  33. data/app/models/github/pull_request_event.rb +2 -2
  34. data/app/models/milestone.rb +1 -0
  35. data/app/models/project.rb +14 -0
  36. data/app/models/project_dependencies.rb +5 -3
  37. data/app/models/task.rb +1 -1
  38. data/app/models/user.rb +41 -0
  39. data/app/views/commits/show.html.erb +9 -1
  40. data/app/views/github/pulls/index.html.erb +102 -0
  41. data/app/views/project_notification/new_release.html.erb +6 -0
  42. data/app/views/project_tickets/index.xls.erb +0 -7
  43. data/app/views/projects/_form.html.erb +29 -17
  44. data/app/views/projects/index.html.erb +3 -3
  45. data/app/views/projects/new_from_github.html.erb +67 -0
  46. data/app/views/releases/_commits.html.erb +1 -1
  47. data/app/views/releases/show.html.erb +9 -0
  48. data/app/views/users/_form.html.erb +35 -19
  49. data/config/application.rb +12 -0
  50. data/config/initializers/mime_types.rb +1 -0
  51. data/config/routes.rb +17 -3
  52. data/db/migrate/20151201042126_require_projects_to_have_name_and_slug.rb +6 -0
  53. data/db/migrate/20151202005557_add_head_sha_to_projects.rb +24 -0
  54. data/db/migrate/20151202011812_require_projects_to_have_color.rb +13 -0
  55. data/db/migrate/20151205204922_require_project_slugs_to_be_unique.rb +5 -0
  56. data/db/migrate/20151205214647_add_avatar_url_to_pull_requests.rb +5 -0
  57. data/db/migrate/20151209004458_add_json_labels_to_pull_requests.rb +5 -0
  58. data/db/migrate/20151209030113_add_timestamps_to_pull_requests.rb +6 -0
  59. data/db/structure.sql +31 -5
  60. data/houston.gemspec +7 -7
  61. data/lib/configuration.rb +3 -2
  62. data/lib/houston/version.rb +1 -1
  63. data/lib/rack/oembed.rb +23 -0
  64. data/templates/new-instance/config/jobs/cache_key_dependencies.rb +3 -0
  65. data/templates/new-instance/config/triggers/tests/slack_when_analyzed.rb +1 -4
  66. data/templates/new-instance/config/triggers/tests/slack_when_completed.rb +1 -1
  67. data/templates/new-instance/lib/slack_helpers.rb +1 -1
  68. data/test/integration/ticket_tasks_api_test.rb +1 -1
  69. data/test/unit/adapters/git_adapter_test.rb +29 -8
  70. data/test/unit/adapters/version_control_adapters_api_test.rb +2 -0
  71. data/test/unit/controllers/hooks_controller_test.rb +4 -4
  72. data/test/unit/models/commit_test.rb +2 -2
  73. data/test/unit/models/project_test.rb +2 -2
  74. data/test/unit/models/pull_request_test.rb +9 -4
  75. data/test/unit/models/task_test.rb +1 -1
  76. data/test/unit/models/ticket_test.rb +1 -1
  77. metadata +31 -16
@@ -7,7 +7,7 @@
7
7
  <% end %>
8
8
  </h5>
9
9
  <ul class="commits">
10
- <% commits.each do |commit| %>
10
+ <% commits.each do |commit|; commit.project = @project %>
11
11
  <%= content_tag :li, :id => "commit_#{commit.id}" do %>
12
12
  <%= link_to_commit(commit) if github_url?(@project) && !for_email? && can?(:read, commit) %>
13
13
  <%= format_commit(commit) %>
@@ -1,3 +1,12 @@
1
+ <% content_for :meta do %>
2
+ <%= link_to_oembed release_url(@release) %>
3
+ <%= tag "meta", property: "og:type", content: "website" %>
4
+ <%= tag "meta", property: "og:site_name", content: "#{@project.slug} / #{@release.environment_name}" %>
5
+ <%= tag "meta", property: "og:title", content: format_release_subject(@release) %>
6
+ <%= tag "meta", property: "og:description", content: format_release_description(@release) %>
7
+ <%= tag "meta", property: "og:url", content: release_url(@release) %>
8
+ <% end %>
9
+
1
10
  <%= render partial: "projects/header", locals: {project: @project, subtitle: "Release of"} %>
2
11
 
3
12
  <%= render partial: "releases/changelog" %>
@@ -1,55 +1,55 @@
1
- <%= form_for @user, :html => { :class => 'form-horizontal' } do |f| %>
1
+ <%= form_for @user, :html => { :class => "form-horizontal" } do |f| %>
2
2
  <fieldset>
3
3
 
4
4
  <div class="control-group">
5
- <%= f.label :first_name, :class => 'control-label' %>
5
+ <%= f.label :first_name, :class => "control-label" %>
6
6
  <div class="controls">
7
- <%= f.text_field :first_name, :class => 'text_field' %>
7
+ <%= f.text_field :first_name, :class => "text_field" %>
8
8
  </div>
9
9
  </div>
10
10
 
11
11
  <div class="control-group">
12
- <%= f.label :last_name, :class => 'control-label' %>
12
+ <%= f.label :last_name, :class => "control-label" %>
13
13
  <div class="controls">
14
- <%= f.text_field :last_name, :class => 'text_field' %>
14
+ <%= f.text_field :last_name, :class => "text_field" %>
15
15
  </div>
16
16
  </div>
17
17
 
18
18
  <div class="control-group">
19
- <%= f.label :nickname, "Nickname", :class => 'control-label' %>
19
+ <%= f.label :nickname, "Nickname", :class => "control-label" %>
20
20
  <div class="controls">
21
- <%= f.text_field :nickname, :class => 'text_field' %>
21
+ <%= f.text_field :nickname, :class => "text_field" %>
22
22
  </div>
23
23
  </div>
24
24
 
25
25
  <div class="control-group">
26
- <%= f.label :email, "Primary Email Address", :class => 'control-label' %>
26
+ <%= f.label :email, "Primary Email Address", :class => "control-label" %>
27
27
  <div class="controls">
28
- <%= f.text_field :email, :class => 'text_field' %>
28
+ <%= f.text_field :email, :class => "text_field" %>
29
29
  </div>
30
30
  </div>
31
31
 
32
32
  <div class="control-group">
33
- <%= f.label :alias_emails, "Other Email Addresses", :class => 'control-label' %>
33
+ <%= f.label :alias_emails, "Other Email Addresses", :class => "control-label" %>
34
34
  <div class="controls">
35
- <%= f.text_area :alias_emails, :class => 'text_field', rows: 3, value: @user.alias_emails.join("\n") %>
35
+ <%= f.text_area :alias_emails, :class => "text_field", rows: 3, value: @user.alias_emails.join("\n") %>
36
36
  </div>
37
37
  </div>
38
38
 
39
39
  <% if can?(:manage, @user) %>
40
40
  <div class="control-group">
41
- <%= f.label :role, :class => 'control-label' %>
41
+ <%= f.label :role, :class => "control-label" %>
42
42
  <div class="controls">
43
- <%= f.select :role, Houston.config.roles, :class => 'select_field' %>
43
+ <%= f.select :role, Houston.config.roles, :class => "select_field" %>
44
44
  </div>
45
45
  </div>
46
46
  <% end %>
47
47
 
48
48
  <% if can?(:manage, @user) %>
49
49
  <div class="control-group">
50
- <%= f.label :administrator, :class => 'control-label' %>
50
+ <%= f.label :administrator, :class => "control-label" %>
51
51
  <div class="controls">
52
- <%= f.check_box :administrator, :class => 'checkbox' %>
52
+ <%= f.check_box :administrator, :class => "checkbox" %>
53
53
  </div>
54
54
  </div>
55
55
  <% end %>
@@ -105,11 +105,27 @@
105
105
  <% end %>
106
106
 
107
107
  <div class="form-actions">
108
- <%= f.submit nil, :class => 'btn btn-primary' %>
109
- <%= link_to 'Invite', invite_user_path(@user), :method => 'post', :class => 'btn btn-primary' if @user.persisted? && @user.encrypted_password.blank? && !@user.invited? && can?(:create, User) %>
110
- <%= link_to 'Cancel', users_path, :class => 'btn' %>
111
- <%= link_to 'Delete', user_path(@user), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger btn-delete' if @user.persisted? && can?(:destroy, @user) %>
108
+ <%= f.submit nil, :class => "btn btn-primary" %>
109
+ <%= link_to "Invite", invite_user_path(@user), :method => "post", :class => "btn btn-primary" if @user.persisted? && @user.encrypted_password.blank? && !@user.invited? && can?(:create, User) %>
110
+ <%= link_to "Cancel", users_path, :class => "btn" %>
111
+
112
+ <% if @user.persisted? && can?(:destroy, @user) %>
113
+ <button class="btn btn-delete btn-danger" id="retire_user_button">Retire</button>
114
+ <% end %>
112
115
  </div>
113
116
 
114
117
  </fieldset>
115
118
  <% end %>
119
+
120
+ <% content_for :javascripts do %>
121
+ <script type="text/javascript">
122
+ $(function() {
123
+ $('#retire_user_button').click(function(e) {
124
+ e.preventDefault();
125
+ $.destroy('<%= user_path(@user) %>')
126
+ .success(function() { window.location = '/users'; })
127
+ .error(function() { console.log(arguments); });
128
+ });
129
+ });
130
+ </script>
131
+ <% end %>
@@ -82,8 +82,20 @@ module Houston
82
82
  # Automatically compress responses that accept gzip encoding
83
83
  config.middleware.use Rack::Deflater
84
84
 
85
+ # Support the oEmbed protocol
86
+ require "rack/oembed"
87
+ config.middleware.use Rack::Oembed, path: "oembed/1.0"
88
+
85
89
  # Respond with a 400 when requests are malformed
86
90
  # http://stackoverflow.com/a/24727310/731300
87
91
  config.middleware.insert 0, Rack::UTF8Sanitizer
92
+
93
+ # DEPRECATION WARNING: Currently, Active Record suppresses errors raised within
94
+ # `after_rollback`/`after_commit` callbacks and only print them to the logs.
95
+ # In the next version, these errors will no longer be suppressed. Instead, the
96
+ # errors will propagate normally just like in other Active Record callbacks.
97
+ #
98
+ # You can opt into the new behavior and remove this warning by setting:
99
+ config.active_record.raise_in_transactional_callbacks = true
88
100
  end
89
101
  end
@@ -3,3 +3,4 @@
3
3
  # Add new mime types for use in respond_to blocks:
4
4
  Mime::Type.register "application/vnd.ms-excel", :xls
5
5
  Mime::Type.register "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", :xlsx
6
+ Mime::Type.register "application/json+oembed", :oembed
@@ -73,6 +73,9 @@ Rails.application.routes.draw do
73
73
  post "deploy/:environment", to: "deploys#create"
74
74
  end
75
75
 
76
+ get "projects/new/github", to: "projects#new_from_github", as: :add_github_projects
77
+ post "projects/new/github", to: "projects#create_from_github"
78
+
76
79
 
77
80
 
78
81
  # Web Hooks
@@ -92,12 +95,21 @@ Rails.application.routes.draw do
92
95
  # Releases
93
96
 
94
97
  scope "projects/:project_id" do
95
- get "releases", to: "releases#index"
98
+ get "releases", to: "releases#index", as: :releases
99
+
96
100
  scope "environments/:environment" do
97
- resources :releases
101
+ get "releases", to: "releases#index"
102
+ post "releases", to: "releases#create"
103
+ get "releases/new", to: "releases#new", as: :new_release
104
+ get "releases/:id", to: "releases#show"
98
105
  end
99
106
  end
100
107
 
108
+ get "releases/:id", to: "releases#show", as: :release
109
+ get "releases/:id/edit", to: "releases#edit", as: :edit_release
110
+ put "releases/:id", to: "releases#update"
111
+ delete "releases/:id", to: "releases#destroy"
112
+
101
113
 
102
114
 
103
115
  # Teammates
@@ -173,7 +185,7 @@ Rails.application.routes.draw do
173
185
  get "commits", to: "commits#self"
174
186
  end
175
187
 
176
- get "commits/:sha", to: "commits#show"
188
+ get "commits/:sha", to: "commits#show", as: :commit
177
189
 
178
190
  namespace "api" do
179
191
  namespace "v1" do
@@ -248,6 +260,8 @@ Rails.application.routes.draw do
248
260
 
249
261
  get "sprint/reports", to: "reports#sprint"
250
262
 
263
+ get "pulls", to: "github/pulls#index"
264
+
251
265
  # Tester Bar
252
266
  match "tester_bar/:action", :controller => "tester_bar", via: [:get, :post] if Rails.env.development?
253
267
 
@@ -0,0 +1,6 @@
1
+ class RequireProjectsToHaveNameAndSlug < ActiveRecord::Migration
2
+ def change
3
+ change_column_null :projects, :name, false
4
+ change_column_null :projects, :slug, false
5
+ end
6
+ end
@@ -0,0 +1,24 @@
1
+ require "progressbar"
2
+
3
+ class AddHeadShaToProjects < ActiveRecord::Migration
4
+ def up
5
+ add_column :projects, :head_sha, :string
6
+
7
+ projects = Project.unretired
8
+ pbar = ProgressBar.new "projects", projects.count
9
+
10
+ projects.find_each do |project|
11
+ pbar.inc
12
+ next unless project.repo.exists?
13
+
14
+ sha = project.repo.branch("master")
15
+ project.update_column :head_sha, sha
16
+ end
17
+
18
+ pbar.finish
19
+ end
20
+
21
+ def down
22
+ remove_column :projects, :head_sha
23
+ end
24
+ end
@@ -0,0 +1,13 @@
1
+ class RequireProjectsToHaveColor < ActiveRecord::Migration
2
+ def up
3
+ execute "UPDATE projects SET color='default' WHERE color IS NULL"
4
+ change_column_default :projects, :color, "default"
5
+ change_column_null :projects, :color, false
6
+ end
7
+
8
+ def down
9
+ change_column_null :projects, :color, true
10
+ change_column_default :projects, :color, nil
11
+ execute "UPDATE projects SET color=NULL WHERE color='default'"
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ class RequireProjectSlugsToBeUnique < ActiveRecord::Migration
2
+ def change
3
+ add_index :projects, :slug, unique: true
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddAvatarUrlToPullRequests < ActiveRecord::Migration
2
+ def change
3
+ add_column :pull_requests, :avatar_url, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddJsonLabelsToPullRequests < ActiveRecord::Migration
2
+ def change
3
+ add_column :pull_requests, :json_labels, :jsonb, default: "[]"
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddTimestampsToPullRequests < ActiveRecord::Migration
2
+ def change
3
+ add_column :pull_requests, :created_at, :timestamp
4
+ add_column :pull_requests, :updated_at, :timestamp
5
+ end
6
+ end
@@ -365,11 +365,11 @@ ALTER SEQUENCE project_quotas_id_seq OWNED BY project_quotas.id;
365
365
 
366
366
  CREATE TABLE projects (
367
367
  id integer NOT NULL,
368
- name character varying(255),
369
- slug character varying(255),
368
+ name character varying(255) NOT NULL,
369
+ slug character varying(255) NOT NULL,
370
370
  created_at timestamp without time zone,
371
371
  updated_at timestamp without time zone,
372
- color character varying(255),
372
+ color character varying(255) DEFAULT 'default'::character varying NOT NULL,
373
373
  retired_at timestamp without time zone,
374
374
  category character varying(255),
375
375
  version_control_name character varying(255) DEFAULT 'None'::character varying NOT NULL,
@@ -384,7 +384,8 @@ CREATE TABLE projects (
384
384
  view_options hstore DEFAULT ''::hstore NOT NULL,
385
385
  gemnasium_slug character varying(255),
386
386
  feature_states hstore DEFAULT ''::hstore NOT NULL,
387
- selected_features text[]
387
+ selected_features text[],
388
+ head_sha character varying(255)
388
389
  );
389
390
 
390
391
 
@@ -427,7 +428,11 @@ CREATE TABLE pull_requests (
427
428
  old_labels text DEFAULT ''::text NOT NULL,
428
429
  labels text[] DEFAULT '{}'::text[],
429
430
  body text,
430
- props jsonb DEFAULT '{}'::jsonb
431
+ props jsonb DEFAULT '{}'::jsonb,
432
+ avatar_url character varying(255),
433
+ json_labels jsonb DEFAULT '[]'::jsonb,
434
+ created_at timestamp without time zone,
435
+ updated_at timestamp without time zone
431
436
  );
432
437
 
433
438
 
@@ -1631,6 +1636,13 @@ CREATE UNIQUE INDEX index_project_quotas_on_project_id_and_week ON project_quota
1631
1636
  CREATE INDEX index_project_quotas_on_week ON project_quotas USING btree (week);
1632
1637
 
1633
1638
 
1639
+ --
1640
+ -- Name: index_projects_on_slug; Type: INDEX; Schema: public; Owner: -; Tablespace:
1641
+ --
1642
+
1643
+ CREATE UNIQUE INDEX index_projects_on_slug ON projects USING btree (slug);
1644
+
1645
+
1634
1646
  --
1635
1647
  -- Name: index_pull_requests_on_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1636
1648
  --
@@ -2289,3 +2301,17 @@ INSERT INTO schema_migrations (version) VALUES ('20151108223154');
2289
2301
 
2290
2302
  INSERT INTO schema_migrations (version) VALUES ('20151108233510');
2291
2303
 
2304
+ INSERT INTO schema_migrations (version) VALUES ('20151201042126');
2305
+
2306
+ INSERT INTO schema_migrations (version) VALUES ('20151202005557');
2307
+
2308
+ INSERT INTO schema_migrations (version) VALUES ('20151202011812');
2309
+
2310
+ INSERT INTO schema_migrations (version) VALUES ('20151205204922');
2311
+
2312
+ INSERT INTO schema_migrations (version) VALUES ('20151205214647');
2313
+
2314
+ INSERT INTO schema_migrations (version) VALUES ('20151209004458');
2315
+
2316
+ INSERT INTO schema_migrations (version) VALUES ('20151209030113');
2317
+
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
 
22
22
  # For Houston as a Web Application
23
- spec.add_dependency "rails", "~> 4.1.13"
23
+ spec.add_dependency "rails", "~> 4.2.5"
24
24
  spec.add_dependency "sprockets", "~> 2.8" # update this when updating Rails
25
25
  spec.add_dependency "pg", "~> 0.18.3"
26
26
  # --------------------------------
@@ -29,9 +29,9 @@ Gem::Specification.new do |spec|
29
29
  spec.add_dependency "addressable"
30
30
  spec.add_dependency "browser"
31
31
  spec.add_dependency "cancan", "~> 1.6.10"
32
- spec.add_dependency "default_value_for", "3.0.0.1"
33
- spec.add_dependency "devise", "~> 3.0.0"
34
- spec.add_dependency "devise_invitable", "~> 1.2.1"
32
+ spec.add_dependency "default_value_for", "3.0.1"
33
+ spec.add_dependency "devise", "~> 3.5.0"
34
+ spec.add_dependency "devise_invitable", "~> 1.5.3"
35
35
  spec.add_dependency "houston-devise_ldap_authenticatable"
36
36
  spec.add_dependency "faraday", "~> 0.8.10"
37
37
  spec.add_dependency "faraday-http-cache", "~> 1.2.2"
@@ -55,9 +55,9 @@ Gem::Specification.new do |spec|
55
55
  spec.add_dependency "houston-vestal_versions"
56
56
 
57
57
  # The Asset Pipeline
58
- spec.add_dependency "sass-rails", "~> 4.0.0"
59
- spec.add_dependency "uglifier", ">= 1.3.0"
60
- spec.add_dependency "coffee-rails", "~> 4.0.0"
58
+ spec.add_dependency "sass-rails", "~> 5.0"
59
+ spec.add_dependency "uglifier", ">= 2.7.2"
60
+ spec.add_dependency "coffee-rails", "~> 4.1.0"
61
61
 
62
62
  # Houston's background jobs daemon
63
63
  spec.add_dependency "rufus-scheduler", "~> 3.1.7"
@@ -187,7 +187,7 @@ module Houston
187
187
 
188
188
  def project_colors(*args)
189
189
  @project_colors = args.first.each_with_object({}) { |(key, hex), hash| hash[key] = ColorValue.new(hex) } if args.any?
190
- @project_colors ||= []
190
+ @project_colors ||= {}
191
191
  end
192
192
 
193
193
  def environments(*args)
@@ -264,7 +264,7 @@ module Houston
264
264
  # :timeoutable,
265
265
  # :omniauthable
266
266
 
267
- configuration = [:database_authenticatable, :token_authenticatable]
267
+ configuration = [:database_authenticatable]
268
268
  unless Rails.env.test? # <-- !todo: control when custom strategies are employed in the test suite
269
269
  configuration << :ldap_authenticatable if authentication_strategy == :ldap
270
270
  end
@@ -655,6 +655,7 @@ module Houston
655
655
  Faraday::HTTP::ServerError,
656
656
  Rugged::NetworkError,
657
657
  Unfuddle::ConnectionError,
658
+ Octokit::BadGateway,
658
659
  exceptions_wrapping(PG::ConnectionBad)
659
660
  Rails.logger.error "\e[31m[#{tag}] #{$!.class}: #{$!.message} [ignored]\e[0m"
660
661
  rescue Exception # rescues StandardError by default; but we want to rescue and report all errors
@@ -1,3 +1,3 @@
1
1
  module Houston
2
- VERSION = "0.5.6"
2
+ VERSION = "0.6.0"
3
3
  end
@@ -0,0 +1,23 @@
1
+ module Rack
2
+ class Oembed
3
+ attr_reader :app, :oembed_path
4
+
5
+ def initialize(app, options={})
6
+ @app = app
7
+ @oembed_path = options.fetch :path
8
+ @oembed_path = "/#{oembed_path}" unless oembed_path.starts_with? "/"
9
+ end
10
+
11
+ def call(env)
12
+ if env["REQUEST_METHOD"] == "GET" && env["PATH_INFO"] == oembed_path
13
+ url = Rack::Request.new(env).params.fetch("url")
14
+ path = Addressable::URI.parse(url).path
15
+ env["PATH_INFO"] = path
16
+ env["HTTP_ACCEPT"] = "application/json+oembed"
17
+ end
18
+
19
+ app.call(env)
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,3 @@
1
+ Houston.config.every "3h", "cache:key-dependencies" do
2
+ CacheKeyDependencies.for Project.unretired
3
+ end
@@ -17,10 +17,7 @@ Houston.config do
17
17
 
18
18
  project_channel = "##{test_run.project.slug}"
19
19
  channels = [project_channel] if Houston::Slack.connection.channels.include? project_channel
20
- channels ||= test_run.commit.committers
21
- .pluck(:email)
22
- .map { |email| SLACK_USERNAME_FOR_USER[email] }
23
- .reject(&:nil?)
20
+ channels ||= test_run.commit.committers.map(&:slack_username)
24
21
  channels = %w{general} if Array(channel).empty?
25
22
 
26
23
  channels.each do |channel|