Commit 2baa030278c4260c4718804482622160280889f0

Authored by Ryan Jones
1 parent cddda56d
Exists in master and in 1 other branch production

add image to front to show notification service and type

Gemfile
... ... @@ -49,7 +49,6 @@ group :development, :test do
49 49 gem 'webmock', :require => false
50 50 unless ENV["CI"]
51 51 gem 'ruby-debug', :platform => :mri_18
52   - gem (RUBY_VERSION >= "1.9.2" ? 'ruby-debug19' : 'debugger'), :platform => :mri_19
53 52 end
54 53 # gem 'rpm_contrib', :git => "git://github.com/bensymonds/rpm_contrib.git", :branch => "mongo-1.4.0_update"
55 54 end
... ...
Gemfile.lock
... ... @@ -34,7 +34,6 @@ GEM
34 34 i18n (~> 0.6)
35 35 multi_json (~> 1.0)
36 36 addressable (2.2.8)
37   - archive-tar-minitar (0.5.2)
38 37 arel (3.0.2)
39 38 bcrypt-ruby (3.0.1)
40 39 bson (1.3.1)
... ... @@ -108,8 +107,6 @@ GEM
108 107 activesupport (>= 3.0.0)
109 108 linecache (0.46)
110 109 rbx-require-relative (> 0.0.4)
111   - linecache19 (0.5.13)
112   - ruby_core_source (>= 0.1.4)
113 110 mail (2.4.4)
114 111 i18n (>= 0.4.0)
115 112 mime-types (~> 1.16)
... ... @@ -217,18 +214,8 @@ GEM
217 214 ruby-debug-base (~> 0.10.4.0)
218 215 ruby-debug-base (0.10.4)
219 216 linecache (>= 0.3)
220   - ruby-debug-base19 (0.11.25)
221   - columnize (>= 0.3.1)
222   - linecache19 (>= 0.5.11)
223   - ruby_core_source (>= 0.1.4)
224   - ruby-debug19 (0.11.6)
225   - columnize (>= 0.3.1)
226   - linecache19 (>= 0.5.11)
227   - ruby-debug-base19 (>= 0.11.19)
228 217 ruby-fogbugz (0.1.1)
229 218 crack
230   - ruby_core_source (0.1.5)
231   - archive-tar-minitar (>= 0.5.2)
232 219 rubyzip (0.9.8)
233 220 selenium-webdriver (2.21.2)
234 221 childprocess (>= 0.2.5)
... ... @@ -308,7 +295,6 @@ DEPENDENCIES
308 295 rspec (~> 2.6)
309 296 rspec-rails (~> 2.6)
310 297 ruby-debug
311   - ruby-debug19
312 298 ruby-fogbugz
313 299 therubyracer
314 300 thin
... ...
app/helpers/apps_helper.rb
... ... @@ -16,6 +16,11 @@ module AppsHelper
16 16 @any_github_repos
17 17 end
18 18  
  19 + def any_notification_services?
  20 + detect_any_apps_with_attributes unless @any_notification_services
  21 + @any_notification_services
  22 + end
  23 +
19 24 def any_issue_trackers?
20 25 detect_any_apps_with_attributes unless @any_issue_trackers
21 26 @any_issue_trackers
... ... @@ -29,11 +34,12 @@ module AppsHelper
29 34 private
30 35  
31 36 def detect_any_apps_with_attributes
32   - @any_github_repos = @any_issue_trackers = @any_deploys = false
  37 + @any_github_repos = @any_issue_trackers = @any_deploys = @any_notification_services = false
33 38 @apps.each do |app|
34 39 @any_github_repos ||= app.github_repo?
35 40 @any_issue_trackers ||= app.issue_tracker_configured?
36 41 @any_deploys ||= !!app.last_deploy_at
  42 + @any_notification_services ||= app.notification_service_configured?
37 43 end
38 44 end
39 45 end
... ...
app/views/apps/index.html.haml
... ... @@ -8,6 +8,8 @@
8 8 %th Name
9 9 - if any_github_repos?
10 10 %th GitHub Repo
  11 + - if any_notification_services?
  12 + %th Notification Service
11 13 - if any_issue_trackers?
12 14 %th Tracker
13 15 - if any_deploys?
... ... @@ -21,6 +23,10 @@
21 23 %td.github_repo
22 24 - if app.github_repo?
23 25 = link_to(app.github_repo, app.github_url, :target => '_blank')
  26 + - if any_notification_services?
  27 + %td.notification_service
  28 + - if app.notification_service_configured?
  29 + = image_tag("#{app.notification_service.label}_goto.png")
24 30 - if any_issue_trackers?
25 31 %td.issue_tracker
26 32 - if app.issue_tracker_configured?
... ...