Commit 2baa030278c4260c4718804482622160280889f0
1 parent
cddda56d
Exists in
master
and in
1 other branch
add image to front to show notification service and type
Showing
4 changed files
with
13 additions
and
16 deletions
Show diff stats
Gemfile
@@ -49,7 +49,6 @@ group :development, :test do | @@ -49,7 +49,6 @@ group :development, :test do | ||
49 | gem 'webmock', :require => false | 49 | gem 'webmock', :require => false |
50 | unless ENV["CI"] | 50 | unless ENV["CI"] |
51 | gem 'ruby-debug', :platform => :mri_18 | 51 | gem 'ruby-debug', :platform => :mri_18 |
52 | - gem (RUBY_VERSION >= "1.9.2" ? 'ruby-debug19' : 'debugger'), :platform => :mri_19 | ||
53 | end | 52 | end |
54 | # gem 'rpm_contrib', :git => "git://github.com/bensymonds/rpm_contrib.git", :branch => "mongo-1.4.0_update" | 53 | # gem 'rpm_contrib', :git => "git://github.com/bensymonds/rpm_contrib.git", :branch => "mongo-1.4.0_update" |
55 | end | 54 | end |
Gemfile.lock
@@ -34,7 +34,6 @@ GEM | @@ -34,7 +34,6 @@ GEM | ||
34 | i18n (~> 0.6) | 34 | i18n (~> 0.6) |
35 | multi_json (~> 1.0) | 35 | multi_json (~> 1.0) |
36 | addressable (2.2.8) | 36 | addressable (2.2.8) |
37 | - archive-tar-minitar (0.5.2) | ||
38 | arel (3.0.2) | 37 | arel (3.0.2) |
39 | bcrypt-ruby (3.0.1) | 38 | bcrypt-ruby (3.0.1) |
40 | bson (1.3.1) | 39 | bson (1.3.1) |
@@ -108,8 +107,6 @@ GEM | @@ -108,8 +107,6 @@ GEM | ||
108 | activesupport (>= 3.0.0) | 107 | activesupport (>= 3.0.0) |
109 | linecache (0.46) | 108 | linecache (0.46) |
110 | rbx-require-relative (> 0.0.4) | 109 | rbx-require-relative (> 0.0.4) |
111 | - linecache19 (0.5.13) | ||
112 | - ruby_core_source (>= 0.1.4) | ||
113 | mail (2.4.4) | 110 | mail (2.4.4) |
114 | i18n (>= 0.4.0) | 111 | i18n (>= 0.4.0) |
115 | mime-types (~> 1.16) | 112 | mime-types (~> 1.16) |
@@ -217,18 +214,8 @@ GEM | @@ -217,18 +214,8 @@ GEM | ||
217 | ruby-debug-base (~> 0.10.4.0) | 214 | ruby-debug-base (~> 0.10.4.0) |
218 | ruby-debug-base (0.10.4) | 215 | ruby-debug-base (0.10.4) |
219 | linecache (>= 0.3) | 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 | ruby-fogbugz (0.1.1) | 217 | ruby-fogbugz (0.1.1) |
229 | crack | 218 | crack |
230 | - ruby_core_source (0.1.5) | ||
231 | - archive-tar-minitar (>= 0.5.2) | ||
232 | rubyzip (0.9.8) | 219 | rubyzip (0.9.8) |
233 | selenium-webdriver (2.21.2) | 220 | selenium-webdriver (2.21.2) |
234 | childprocess (>= 0.2.5) | 221 | childprocess (>= 0.2.5) |
@@ -308,7 +295,6 @@ DEPENDENCIES | @@ -308,7 +295,6 @@ DEPENDENCIES | ||
308 | rspec (~> 2.6) | 295 | rspec (~> 2.6) |
309 | rspec-rails (~> 2.6) | 296 | rspec-rails (~> 2.6) |
310 | ruby-debug | 297 | ruby-debug |
311 | - ruby-debug19 | ||
312 | ruby-fogbugz | 298 | ruby-fogbugz |
313 | therubyracer | 299 | therubyracer |
314 | thin | 300 | thin |
app/helpers/apps_helper.rb
@@ -16,6 +16,11 @@ module AppsHelper | @@ -16,6 +16,11 @@ module AppsHelper | ||
16 | @any_github_repos | 16 | @any_github_repos |
17 | end | 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 | def any_issue_trackers? | 24 | def any_issue_trackers? |
20 | detect_any_apps_with_attributes unless @any_issue_trackers | 25 | detect_any_apps_with_attributes unless @any_issue_trackers |
21 | @any_issue_trackers | 26 | @any_issue_trackers |
@@ -29,11 +34,12 @@ module AppsHelper | @@ -29,11 +34,12 @@ module AppsHelper | ||
29 | private | 34 | private |
30 | 35 | ||
31 | def detect_any_apps_with_attributes | 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 | @apps.each do |app| | 38 | @apps.each do |app| |
34 | @any_github_repos ||= app.github_repo? | 39 | @any_github_repos ||= app.github_repo? |
35 | @any_issue_trackers ||= app.issue_tracker_configured? | 40 | @any_issue_trackers ||= app.issue_tracker_configured? |
36 | @any_deploys ||= !!app.last_deploy_at | 41 | @any_deploys ||= !!app.last_deploy_at |
42 | + @any_notification_services ||= app.notification_service_configured? | ||
37 | end | 43 | end |
38 | end | 44 | end |
39 | end | 45 | end |
app/views/apps/index.html.haml
@@ -8,6 +8,8 @@ | @@ -8,6 +8,8 @@ | ||
8 | %th Name | 8 | %th Name |
9 | - if any_github_repos? | 9 | - if any_github_repos? |
10 | %th GitHub Repo | 10 | %th GitHub Repo |
11 | + - if any_notification_services? | ||
12 | + %th Notification Service | ||
11 | - if any_issue_trackers? | 13 | - if any_issue_trackers? |
12 | %th Tracker | 14 | %th Tracker |
13 | - if any_deploys? | 15 | - if any_deploys? |
@@ -21,6 +23,10 @@ | @@ -21,6 +23,10 @@ | ||
21 | %td.github_repo | 23 | %td.github_repo |
22 | - if app.github_repo? | 24 | - if app.github_repo? |
23 | = link_to(app.github_repo, app.github_url, :target => '_blank') | 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 | - if any_issue_trackers? | 30 | - if any_issue_trackers? |
25 | %td.issue_tracker | 31 | %td.issue_tracker |
26 | - if app.issue_tracker_configured? | 32 | - if app.issue_tracker_configured? |