Commit 1c7cb82a686991dd04dacae3a9f90d04ee87f54f

Authored by Stephen Crosby
2 parents 06569f9d ed97fdfe
Exists in master and in 1 other branch production

Merge pull request #979 from rud/chore/rubocop-newline-fixes

Chore/rubocop newline fixes
Showing 64 changed files with 34 additions and 162 deletions   Show diff stats
@@ -8,3 +8,9 @@ AllCops: @@ -8,3 +8,9 @@ AllCops:
8 # returns nil 8 # returns nil
9 Rails/FindBy: 9 Rails/FindBy:
10 Enabled: false 10 Enabled: false
  11 +
  12 +Style/EmptyLineBetweenDefs:
  13 + AllowAdjacentOneLineDefs: true
  14 +
  15 +Style/ExtraSpacing:
  16 + AllowForAlignment: true
.rubocop_todo.yml
@@ -147,67 +147,6 @@ Style/EachWithObject: @@ -147,67 +147,6 @@ Style/EachWithObject:
147 - 'app/models/notice_fingerprinter.rb' 147 - 'app/models/notice_fingerprinter.rb'
148 - 'lib/recurse.rb' 148 - 'lib/recurse.rb'
149 149
150 -# Offense count: 14  
151 -# Cop supports --auto-correct.  
152 -# Configuration parameters: AllowAdjacentOneLineDefs.  
153 -Style/EmptyLineBetweenDefs:  
154 - Exclude:  
155 - - 'app/controllers/apps_controller.rb'  
156 - - 'app/controllers/users_controller.rb'  
157 - - 'app/models/notification_service.rb'  
158 - - 'spec/decorators/issue_tracker_decorator_spec.rb'  
159 - - 'spec/decorators/issue_tracker_type_decorator_spec.rb'  
160 - - 'spec/views/problems/show.html.haml_spec.rb'  
161 -  
162 -# Offense count: 12  
163 -# Cop supports --auto-correct.  
164 -Style/EmptyLines:  
165 - Exclude:  
166 - - 'app/controllers/api/v1/stats_controller.rb'  
167 - - 'app/decorators/issue_tracker_field_decorator.rb'  
168 - - 'app/models/app.rb'  
169 - - 'app/models/problem.rb'  
170 - - 'config/deploy/production.example.rb'  
171 - - 'lib/tasks/errbit/demo.rake'  
172 - - 'script/rspec-queue-mongoid.rb'  
173 - - 'spec/acceptance/app_regenerate_api_key_spec.rb'  
174 -  
175 -# Offense count: 28  
176 -# Cop supports --auto-correct.  
177 -# Configuration parameters: EnforcedStyle, SupportedStyles.  
178 -Style/EmptyLinesAroundBlockBody:  
179 - Enabled: false  
180 -  
181 -# Offense count: 26  
182 -# Cop supports --auto-correct.  
183 -# Configuration parameters: EnforcedStyle, SupportedStyles.  
184 -Style/EmptyLinesAroundClassBody:  
185 - Enabled: false  
186 -  
187 -# Offense count: 2  
188 -# Cop supports --auto-correct.  
189 -Style/EmptyLinesAroundMethodBody:  
190 - Exclude:  
191 - - 'app/models/notification_services/hoiio_service.rb'  
192 - - 'app/models/notification_services/pushover_service.rb'  
193 -  
194 -# Offense count: 9  
195 -# Cop supports --auto-correct.  
196 -# Configuration parameters: EnforcedStyle, SupportedStyles.  
197 -Style/EmptyLinesAroundModuleBody:  
198 - Exclude:  
199 - - 'app/helpers/application_helper.rb'  
200 - - 'app/helpers/form_helper.rb'  
201 - - 'app/helpers/hash_helper.rb'  
202 - - 'app/helpers/navigation_helper.rb'  
203 - - 'app/helpers/sort_helper.rb'  
204 -  
205 -# Offense count: 22  
206 -# Cop supports --auto-correct.  
207 -# Configuration parameters: AllowForAlignment.  
208 -Style/ExtraSpacing:  
209 - Enabled: false  
210 -  
211 # Offense count: 2 150 # Offense count: 2
212 # Configuration parameters: Exclude. 151 # Configuration parameters: Exclude.
213 Style/FileName: 152 Style/FileName:
@@ -29,7 +29,7 @@ gem 'htmlentities' @@ -29,7 +29,7 @@ gem 'htmlentities'
29 gem 'kaminari', '>= 0.14.1' 29 gem 'kaminari', '>= 0.14.1'
30 gem 'mongoid', '5.0.0' 30 gem 'mongoid', '5.0.0'
31 gem 'mongoid_rails_migrations' 31 gem 'mongoid_rails_migrations'
32 -gem 'rack-ssl', :require => 'rack/ssl' # force SSL 32 +gem 'rack-ssl', :require => 'rack/ssl' # force SSL
33 gem 'rack-ssl-enforcer', :require => false 33 gem 'rack-ssl-enforcer', :require => false
34 gem 'rails_autolink' 34 gem 'rails_autolink'
35 gem 'useragent' 35 gem 'useragent'
@@ -104,7 +104,7 @@ group :heroku, :production do @@ -104,7 +104,7 @@ group :heroku, :production do
104 gem 'unicorn', require: false, platform: 'ruby' 104 gem 'unicorn', require: false, platform: 'ruby'
105 end 105 end
106 106
107 -gem 'therubyracer', :platform => :ruby # C Ruby (MRI) or Rubinius, but NOT Windows 107 +gem 'therubyracer', :platform => :ruby # C Ruby (MRI) or Rubinius, but NOT Windows
108 gem 'sass-rails' 108 gem 'sass-rails'
109 gem 'uglifier' 109 gem 'uglifier'
110 # We can't upgrade because not compatible to jquery >= 1.9. 110 # We can't upgrade because not compatible to jquery >= 1.9.
app/controllers/api/v1/notices_controller.rb
@@ -17,8 +17,7 @@ class Api::V1::NoticesController < ApplicationController @@ -17,8 +17,7 @@ class Api::V1::NoticesController < ApplicationController
17 17
18 respond_to do |format| 18 respond_to do |format|
19 format.any(:html, :json) { render :json => JSON.dump(results) } # render JSON if no extension specified on path 19 format.any(:html, :json) { render :json => JSON.dump(results) } # render JSON if no extension specified on path
20 - format.xml { render :xml => results } 20 + format.xml { render :xml => results }
21 end 21 end
22 end 22 end
23 -  
24 end 23 end
app/controllers/api/v1/problems_controller.rb
@@ -14,7 +14,7 @@ class Api::V1::ProblemsController < ApplicationController @@ -14,7 +14,7 @@ class Api::V1::ProblemsController < ApplicationController
14 14
15 respond_to do |format| 15 respond_to do |format|
16 format.any(:html, :json) { render :json => result } # render JSON if no extension specified on path 16 format.any(:html, :json) { render :json => result } # render JSON if no extension specified on path
17 - format.xml { render :xml => result } 17 + format.xml { render :xml => result }
18 end 18 end
19 end 19 end
20 20
@@ -33,8 +33,7 @@ class Api::V1::ProblemsController < ApplicationController @@ -33,8 +33,7 @@ class Api::V1::ProblemsController < ApplicationController
33 33
34 respond_to do |format| 34 respond_to do |format|
35 format.any(:html, :json) { render :json => JSON.dump(results) } # render JSON if no extension specified on path 35 format.any(:html, :json) { render :json => JSON.dump(results) } # render JSON if no extension specified on path
36 - format.xml { render :xml => results } 36 + format.xml { render :xml => results }
37 end 37 end
38 end 38 end
39 -  
40 end 39 end
app/controllers/api/v1/stats_controller.rb
@@ -19,11 +19,10 @@ class Api::V1::StatsController < ApplicationController @@ -19,11 +19,10 @@ class Api::V1::StatsController < ApplicationController
19 19
20 respond_to do |format| 20 respond_to do |format|
21 format.any(:html, :json) { render :json => JSON.dump(stats) } # render JSON if no extension specified on path 21 format.any(:html, :json) { render :json => JSON.dump(stats) } # render JSON if no extension specified on path
22 - format.xml { render :xml => stats } 22 + format.xml { render :xml => stats }
23 end 23 end
24 end 24 end
25 25
26 -  
27 protected 26 protected
28 27
29 def require_api_key_or_authenticate_user! 28 def require_api_key_or_authenticate_user!
@@ -35,5 +34,4 @@ class Api::V1::StatsController < ApplicationController @@ -35,5 +34,4 @@ class Api::V1::StatsController < ApplicationController
35 34
36 authenticate_user! 35 authenticate_user!
37 end 36 end
38 -  
39 end 37 end
app/controllers/apps_controller.rb
1 class AppsController < ApplicationController 1 class AppsController < ApplicationController
2 -  
3 include ProblemsSearcher 2 include ProblemsSearcher
4 3
5 before_action :require_admin!, :except => [:index, :show] 4 before_action :require_admin!, :except => [:index, :show]
@@ -44,6 +43,7 @@ class AppsController &lt; ApplicationController @@ -44,6 +43,7 @@ class AppsController &lt; ApplicationController
44 } 43 }
45 44
46 def index; end 45 def index; end
  46 +
47 def show 47 def show
48 app 48 app
49 end 49 end
app/controllers/deploys_controller.rb
1 class DeploysController < ApplicationController 1 class DeploysController < ApplicationController
2 -  
3 protect_from_forgery :except => :create 2 protect_from_forgery :except => :create
4 3
5 skip_before_action :verify_authenticity_token, :only => :create 4 skip_before_action :verify_authenticity_token, :only => :create
@@ -40,6 +39,5 @@ class DeploysController &lt; ApplicationController @@ -40,6 +39,5 @@ class DeploysController &lt; ApplicationController
40 :revision => params[:head], 39 :revision => params[:head],
41 } 40 }
42 end 41 end
43 -  
44 end 42 end
45 43
app/controllers/notices_controller.rb
1 class NoticesController < ApplicationController 1 class NoticesController < ApplicationController
2 -  
3 class ParamsError < StandardError; end 2 class ParamsError < StandardError; end
4 3
5 skip_before_action :authenticate_user!, only: :create 4 skip_before_action :authenticate_user!, only: :create
@@ -48,5 +47,4 @@ class NoticesController &lt; ApplicationController @@ -48,5 +47,4 @@ class NoticesController &lt; ApplicationController
48 def bad_params(exception) 47 def bad_params(exception)
49 render :text => exception.message, :status => :bad_request 48 render :text => exception.message, :status => :bad_request
50 end 49 end
51 -  
52 end 50 end
app/controllers/problems_controller.rb
@@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@
5 # MEMBER => :show, :edit, :update, :create, :destroy, :resolve, :unresolve, :create_issue, :unlink_issue 5 # MEMBER => :show, :edit, :update, :create, :destroy, :resolve, :unresolve, :create_issue, :unlink_issue
6 # COLLECTION => :index, :all, :destroy_several, :resolve_several, :unresolve_several, :merge_several, :unmerge_several, :search 6 # COLLECTION => :index, :all, :destroy_several, :resolve_several, :unresolve_several, :merge_several, :unmerge_several, :search
7 class ProblemsController < ApplicationController 7 class ProblemsController < ApplicationController
8 -  
9 include ProblemsSearcher 8 include ProblemsSearcher
10 9
11 before_action :need_selected_problem, :only => [ 10 before_action :need_selected_problem, :only => [
app/controllers/problems_searcher.rb
@@ -5,7 +5,6 @@ module ProblemsSearcher @@ -5,7 +5,6 @@ module ProblemsSearcher
5 extend ActiveSupport::Concern 5 extend ActiveSupport::Concern
6 6
7 included do 7 included do
8 -  
9 expose(:params_sort) { 8 expose(:params_sort) {
10 unless %w{app message last_notice_at last_deploy_at count}.member?(params[:sort]) 9 unless %w{app message last_notice_at last_deploy_at count}.member?(params[:sort])
11 "last_notice_at" 10 "last_notice_at"
@@ -29,6 +28,5 @@ module ProblemsSearcher @@ -29,6 +28,5 @@ module ProblemsSearcher
29 expose(:err_ids) { 28 expose(:err_ids) {
30 (params[:problems] || []).compact 29 (params[:problems] || []).compact
31 } 30 }
32 -  
33 end 31 end
34 end 32 end
app/controllers/users_controller.rb
@@ -72,6 +72,5 @@ class UsersController &lt; ApplicationController @@ -72,6 +72,5 @@ class UsersController &lt; ApplicationController
72 def user_password_params 72 def user_password_params
73 @user_password_params ||= params[:user] ? params.require(:user).permit(:password, :password_confirmation) : {} 73 @user_password_params ||= params[:user] ? params.require(:user).permit(:password, :password_confirmation) : {}
74 end 74 end
75 -  
76 end 75 end
77 76
app/decorators/app_decorator.rb
1 class AppDecorator < Draper::Decorator 1 class AppDecorator < Draper::Decorator
2 -  
3 decorates_association :watchers 2 decorates_association :watchers
4 decorates_association :issue_tracker, :with => IssueTrackerDecorator 3 decorates_association :issue_tracker, :with => IssueTrackerDecorator
5 delegate_all 4 delegate_all
@@ -15,5 +14,4 @@ class AppDecorator &lt; Draper::Decorator @@ -15,5 +14,4 @@ class AppDecorator &lt; Draper::Decorator
15 def notify_err_display 14 def notify_err_display
16 object.notify_on_errs ? '' : 'display: none;' 15 object.notify_on_errs ? '' : 'display: none;'
17 end 16 end
18 -  
19 end 17 end
app/decorators/issue_tracker_field_decorator.rb
1 class IssueTrackerFieldDecorator < Draper::Decorator 1 class IssueTrackerFieldDecorator < Draper::Decorator
2 -  
3 def initialize(field, field_info) 2 def initialize(field, field_info)
4 @object = field 3 @object = field
5 @field_info = field_info 4 @field_info = field_info
@@ -12,7 +11,6 @@ class IssueTrackerFieldDecorator &lt; Draper::Decorator @@ -12,7 +11,6 @@ class IssueTrackerFieldDecorator &lt; Draper::Decorator
12 field_info[:label] || object.to_s.titleize 11 field_info[:label] || object.to_s.titleize
13 end 12 end
14 13
15 -  
16 def input(form, issue_tracker) 14 def input(form, issue_tracker)
17 form.send(input_field, key.to_s, 15 form.send(input_field, key.to_s,
18 :placeholder => field_info[:placeholder], 16 :placeholder => field_info[:placeholder],
app/decorators/watcher_decorator.rb
1 class WatcherDecorator < Draper::Decorator 1 class WatcherDecorator < Draper::Decorator
2 -  
3 delegate_all 2 delegate_all
4 3
5 def email_choosen 4 def email_choosen
6 object.email.blank? ? 'chosen' : '' 5 object.email.blank? ? 'chosen' : ''
7 end 6 end
8 -  
9 end 7 end
app/helpers/application_helper.rb
@@ -84,5 +84,4 @@ module ApplicationHelper @@ -84,5 +84,4 @@ module ApplicationHelper
84 def head_size 84 def head_size
85 4 85 4
86 end 86 end
87 -  
88 end 87 end
app/helpers/apps_helper.rb
@@ -42,10 +42,10 @@ module AppsHelper @@ -42,10 +42,10 @@ module AppsHelper
42 @any_github_repos = @any_issue_trackers = @any_deploys = @any_bitbucket_repos = @any_notification_services = false 42 @any_github_repos = @any_issue_trackers = @any_deploys = @any_bitbucket_repos = @any_notification_services = false
43 43
44 apps.each do |app| 44 apps.each do |app|
45 - @any_github_repos ||= app.github_repo?  
46 - @any_bitbucket_repos ||= app.bitbucket_repo?  
47 - @any_issue_trackers ||= app.issue_tracker_configured?  
48 - @any_deploys ||= app.last_deploy_at.present? 45 + @any_github_repos ||= app.github_repo?
  46 + @any_bitbucket_repos ||= app.bitbucket_repo?
  47 + @any_issue_trackers ||= app.issue_tracker_configured?
  48 + @any_deploys ||= app.last_deploy_at.present?
49 @any_notification_services ||= app.notification_service_configured? 49 @any_notification_services ||= app.notification_service_configured?
50 end 50 end
51 end 51 end
app/helpers/form_helper.rb
1 module FormHelper 1 module FormHelper
2 -  
3 def errors_for(document) 2 def errors_for(document)
4 return unless document.errors.any? 3 return unless document.errors.any?
5 4
6 content_tag(:div, :class => 'error-messages') do 5 content_tag(:div, :class => 'error-messages') do
7 - body = content_tag(:h2, 'Dang. The following errors are keeping this from being a success.') 6 + body = content_tag(:h2, 'Dang. The following errors are keeping this from being a success.')
8 body + content_tag(:ul) do 7 body + content_tag(:ul) do
9 document.errors.full_messages.inject('') {|errs, msg| errs + content_tag(:li, h(msg)) }.html_safe 8 document.errors.full_messages.inject('') {|errs, msg| errs + content_tag(:li, h(msg)) }.html_safe
10 end 9 end
@@ -14,5 +13,4 @@ module FormHelper @@ -14,5 +13,4 @@ module FormHelper
14 def label_for_attr(builder, field) 13 def label_for_attr(builder, field)
15 (builder.object_name + field).gsub(/[\[\]]/,'_').squeeze('_') 14 (builder.object_name + field).gsub(/[\[\]]/,'_').squeeze('_')
16 end 15 end
17 -  
18 end 16 end
app/helpers/hash_helper.rb
1 module HashHelper 1 module HashHelper
2 -  
3 def pretty_hash(hash, nesting = 0) 2 def pretty_hash(hash, nesting = 0)
4 return '{}' if hash.empty? 3 return '{}' if hash.empty?
5 4
@@ -13,10 +12,8 @@ module HashHelper @@ -13,10 +12,8 @@ module HashHelper
13 pretty += "\n#{' '*nesting*tab_size}" 12 pretty += "\n#{' '*nesting*tab_size}"
14 pretty += "#{key.inspect} => #{val}" 13 pretty += "#{key.inspect} => #{val}"
15 pretty += "," unless key == sorted_keys.last 14 pretty += "," unless key == sorted_keys.last
16 -  
17 end 15 end
18 nesting -= 1 16 nesting -= 1
19 pretty += "\n#{' '*nesting*tab_size}}" 17 pretty += "\n#{' '*nesting*tab_size}}"
20 end 18 end
21 -  
22 end 19 end
app/helpers/navigation_helper.rb
1 module NavigationHelper 1 module NavigationHelper
2 -  
3 # Returns ' active' if you are on a given controller 2 # Returns ' active' if you are on a given controller
4 # - active_if_here(:users) => ' active' if users controller 3 # - active_if_here(:users) => ' active' if users controller
5 # Or on one of a list of controllers 4 # Or on one of a list of controllers
@@ -44,5 +43,4 @@ module NavigationHelper @@ -44,5 +43,4 @@ module NavigationHelper
44 def page_count_from_end(current_page, total_pages) 43 def page_count_from_end(current_page, total_pages)
45 (total_pages.to_i - current_page.to_i) + 1 44 (total_pages.to_i - current_page.to_i) + 1
46 end 45 end
47 -  
48 end 46 end
app/helpers/sort_helper.rb
1 # encoding: utf-8 1 # encoding: utf-8
2 module SortHelper 2 module SortHelper
3 -  
4 def link_for_sort(name, field=nil) 3 def link_for_sort(name, field=nil)
5 field ||= name.underscore 4 field ||= name.underscore
6 current = (params_sort == field) 5 current = (params_sort == field)
@@ -10,5 +9,4 @@ module SortHelper @@ -10,5 +9,4 @@ module SortHelper
10 options.merge!(:class => "current #{order}") if current 9 options.merge!(:class => "current #{order}") if current
11 link_to(name, url, options) 10 link_to(name, url, options)
12 end 11 end
13 -  
14 end 12 end
app/interactors/problem_destroy.rb
1 class ProblemDestroy 1 class ProblemDestroy
2 -  
3 attr_reader :problem 2 attr_reader :problem
4 3
5 def initialize(problem) 4 def initialize(problem)
@@ -44,5 +43,4 @@ class ProblemDestroy @@ -44,5 +43,4 @@ class ProblemDestroy
44 def delete_comments 43 def delete_comments
45 Comment.delete_all(:_id => { '$in' => comments_id }) 44 Comment.delete_all(:_id => { '$in' => comments_id })
46 end 45 end
47 -  
48 end 46 end
app/interactors/resolved_problem_clearer.rb
1 require 'problem_destroy' 1 require 'problem_destroy'
2 2
3 class ResolvedProblemClearer 3 class ResolvedProblemClearer
4 -  
5 ## 4 ##
6 # Clear all problem already resolved 5 # Clear all problem already resolved
7 # 6 #
app/mailers/mailer.rb
@@ -28,8 +28,8 @@ class Mailer &lt; ActionMailer::Base @@ -28,8 +28,8 @@ class Mailer &lt; ActionMailer::Base
28 end 28 end
29 29
30 def deploy_notification(deploy) 30 def deploy_notification(deploy)
31 - @deploy = deploy  
32 - @app = AppDecorator.new deploy.app 31 + @deploy = deploy
  32 + @app = AppDecorator.new deploy.app
33 33
34 errbit_headers 'App' => @app.name, 34 errbit_headers 'App' => @app.name,
35 'Environment' => @deploy.environment, 35 'Environment' => @deploy.environment,
app/models/app.rb
@@ -89,7 +89,6 @@ class App @@ -89,7 +89,6 @@ class App
89 (last_deploy = deploys.last) && last_deploy.created_at 89 (last_deploy = deploys.last) && last_deploy.created_at
90 end 90 end
91 91
92 -  
93 # Legacy apps don't have notify_on_errs and notify_on_deploys params 92 # Legacy apps don't have notify_on_errs and notify_on_deploys params
94 def notify_on_errs 93 def notify_on_errs
95 !(super == false) 94 !(super == false)
@@ -133,7 +132,6 @@ class App @@ -133,7 +132,6 @@ class App
133 "#{bitbucket_url}/src/#{repo_branch}/#{file}" 132 "#{bitbucket_url}/src/#{repo_branch}/#{file}"
134 end 133 end
135 134
136 -  
137 def issue_tracker_configured? 135 def issue_tracker_configured?
138 issue_tracker.present? && issue_tracker.configured? 136 issue_tracker.present? && issue_tracker.configured?
139 end 137 end
@@ -143,7 +141,6 @@ class App @@ -143,7 +141,6 @@ class App
143 notification_service.configured? 141 notification_service.configured?
144 end 142 end
145 143
146 -  
147 def notification_recipients 144 def notification_recipients
148 if notify_all_users 145 if notify_all_users
149 (User.all.map(&:email).reject(&:blank?) + watchers.map(&:address)).uniq 146 (User.all.map(&:email).reject(&:blank?) + watchers.map(&:address)).uniq
@@ -220,6 +217,5 @@ class App @@ -220,6 +217,5 @@ class App
220 github_repo.sub!(/(git@|https?:\/\/)#{github_host}(\/|:)/, '') 217 github_repo.sub!(/(git@|https?:\/\/)#{github_host}(\/|:)/, '')
221 github_repo.sub!(/\.git$/, '') 218 github_repo.sub!(/\.git$/, '')
222 end 219 end
223 -  
224 end 220 end
225 221
app/models/comment.rb
@@ -37,5 +37,4 @@ class Comment @@ -37,5 +37,4 @@ class Comment
37 def decrease_counter_cache 37 def decrease_counter_cache
38 err.inc(comments_count: -1) if err 38 err.inc(comments_count: -1) if err
39 end 39 end
40 -  
41 end 40 end
app/models/deploy.rb
@@ -43,6 +43,5 @@ class Deploy @@ -43,6 +43,5 @@ class Deploy
43 Mailer.deploy_notification(self).deliver_now 43 Mailer.deploy_notification(self).deliver_now
44 end 44 end
45 end 45 end
46 -  
47 end 46 end
48 47
app/models/err.rb
@@ -17,5 +17,4 @@ class Err @@ -17,5 +17,4 @@ class Err
17 validates_presence_of :problem_id, :fingerprint 17 validates_presence_of :problem_id, :fingerprint
18 18
19 delegate :app, :resolved?, :to => :problem 19 delegate :app, :resolved?, :to => :problem
20 -  
21 end 20 end
app/models/issue_tracker.rb
@@ -22,7 +22,7 @@ class IssueTracker @@ -22,7 +22,7 @@ class IssueTracker
22 end 22 end
23 23
24 def type_tracker 24 def type_tracker
25 - attributes['type_tracker'] ? attributes['type_tracker'] : 'none' 25 + attributes['type_tracker'] ? attributes['type_tracker'] : 'none'
26 end 26 end
27 27
28 # Allow the tracker to validate its own params 28 # Allow the tracker to validate its own params
app/models/notification_services/gtalk_service.rb
@@ -46,7 +46,7 @@ class NotificationServices::GtalkService &lt; NotificationService @@ -46,7 +46,7 @@ class NotificationServices::GtalkService &lt; NotificationService
46 client.auth(api_token) 46 client.auth(api_token)
47 47
48 #has to look like this to be formatted properly in the client 48 #has to look like this to be formatted properly in the client
49 - message = """#{problem.app.name} 49 + message = """#{problem.app.name}
50 #{Errbit::Config.protocol}://#{Errbit::Config.host}/apps/#{problem.app.id} 50 #{Errbit::Config.protocol}://#{Errbit::Config.host}/apps/#{problem.app.id}
51 #{notification_description problem}""" 51 #{notification_description problem}"""
52 52
app/models/notification_services/hoiio_service.rb
@@ -37,6 +37,5 @@ class NotificationServices::HoiioService &lt; NotificationService @@ -37,6 +37,5 @@ class NotificationServices::HoiioService &lt; NotificationService
37 room_id.split(',').each do |number| 37 room_id.split(',').each do |number|
38 sms.send :dest => number, :msg => "#{Errbit::Config.protocol}://#{Errbit::Config.host}/apps/#{problem.app.id} #{notification_description problem}" 38 sms.send :dest => number, :msg => "#{Errbit::Config.protocol}://#{Errbit::Config.host}/apps/#{problem.app.id} #{notification_description problem}"
39 end 39 end
40 -  
41 end 40 end
42 end 41 end
app/models/notification_services/pushover_service.rb
@@ -27,6 +27,5 @@ class NotificationServices::PushoverService &lt; NotificationService @@ -27,6 +27,5 @@ class NotificationServices::PushoverService &lt; NotificationService
27 27
28 # send push notification to pushover 28 # send push notification to pushover
29 notification.notify(api_token, "#{notification_description problem}", :priority => 1, :title => "Errbit Notification", :url => "#{Errbit::Config.protocol}://#{Errbit::Config.host}/apps/#{problem.app.id}", :url_title => "Link to error") 29 notification.notify(api_token, "#{notification_description problem}", :priority => 1, :title => "Errbit Notification", :url => "#{Errbit::Config.protocol}://#{Errbit::Config.host}/apps/#{problem.app.id}", :url_title => "Link to error")
30 -  
31 end 30 end
32 end 31 end
app/models/problem.rb
@@ -12,7 +12,6 @@ class Problem @@ -12,7 +12,6 @@ class Problem
12 user_agents: :user_agent_string 12 user_agents: :user_agent_string
13 }.freeze 13 }.freeze
14 14
15 -  
16 field :last_notice_at, :type => ActiveSupport::TimeWithZone, :default => Proc.new { Time.zone.now } 15 field :last_notice_at, :type => ActiveSupport::TimeWithZone, :default => Proc.new { Time.zone.now }
17 field :first_notice_at, :type => ActiveSupport::TimeWithZone, :default => Proc.new { Time.zone.now } 16 field :first_notice_at, :type => ActiveSupport::TimeWithZone, :default => Proc.new { Time.zone.now }
18 field :last_deploy_at, :type => Time 17 field :last_deploy_at, :type => Time
@@ -186,7 +185,6 @@ class Problem @@ -186,7 +185,6 @@ class Problem
186 !resolved? 185 !resolved?
187 end 186 end
188 187
189 -  
190 def self.merge!(*problems) 188 def self.merge!(*problems)
191 ProblemMerge.new(problems).merge 189 ProblemMerge.new(problems).merge
192 end 190 end
app/models/watcher.rb
@@ -39,6 +39,5 @@ class Watcher @@ -39,6 +39,5 @@ class Watcher
39 self.user = self.user_id = nil 39 self.user = self.user_id = nil
40 end 40 end
41 end 41 end
42 -  
43 end 42 end
44 43
1 #!/usr/bin/env ruby 1 #!/usr/bin/env ruby
2 # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. 2 # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3 3
4 -APP_PATH = File.expand_path('../../config/application', __FILE__)  
5 -require File.expand_path('../../config/boot', __FILE__) 4 +APP_PATH = File.expand_path('../../config/application', __FILE__)
  5 +require File.expand_path('../../config/boot', __FILE__)
6 require 'rails/commands' 6 require 'rails/commands'
1 # This file is used by Rack-based servers to start the application. 1 # This file is used by Rack-based servers to start the application.
2 2
3 -require ::File.expand_path('../config/environment', __FILE__) 3 +require ::File.expand_path('../config/environment', __FILE__)
4 use Rack::Deflater 4 use Rack::Deflater
5 run Rails.application 5 run Rails.application
config/deploy/production.example.rb
@@ -8,7 +8,6 @@ role :app, %w(deploy@example.com) @@ -8,7 +8,6 @@ role :app, %w(deploy@example.com)
8 role :web, %w(deploy@example.com) 8 role :web, %w(deploy@example.com)
9 role :db, %w(deploy@example.com) 9 role :db, %w(deploy@example.com)
10 10
11 -  
12 # Extended Server Syntax 11 # Extended Server Syntax
13 # ====================== 12 # ======================
14 # This can be used to drop a more detailed server definition into the 13 # This can be used to drop a more detailed server definition into the
@@ -17,7 +16,6 @@ role :db, %w(deploy@example.com) @@ -17,7 +16,6 @@ role :db, %w(deploy@example.com)
17 16
18 server 'example.com', user: 'deploy', roles: %w(web app), my_property: :my_value 17 server 'example.com', user: 'deploy', roles: %w(web app), my_property: :my_value
19 18
20 -  
21 # Custom SSH Options 19 # Custom SSH Options
22 # ================== 20 # ==================
23 # You may pass any option but keep in mind that net/ssh understands a 21 # You may pass any option but keep in mind that net/ssh understands a
config/routes.rb
1 Rails.application.routes.draw do 1 Rails.application.routes.draw do
2 -  
3 devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } 2 devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
4 3
5 # Hoptoad Notifier Routes 4 # Hoptoad Notifier Routes
@@ -21,7 +20,7 @@ Rails.application.routes.draw do @@ -21,7 +20,7 @@ Rails.application.routes.draw do
21 end 20 end
22 end 21 end
23 22
24 - resources :problems, :only => [:index] do 23 + resources :problems, :only => [:index] do
25 collection do 24 collection do
26 post :destroy_several 25 post :destroy_several
27 post :resolve_several 26 post :resolve_several
lib/configurator.rb
@@ -4,7 +4,6 @@ require &#39;ostruct&#39; @@ -4,7 +4,6 @@ require &#39;ostruct&#39;
4 # order to provide a consistent way to use configuration throughout your 4 # order to provide a consistent way to use configuration throughout your
5 # application 5 # application
6 class Configurator 6 class Configurator
7 -  
8 # Run the configurator and return the processed values 7 # Run the configurator and return the processed values
9 # 8 #
10 # @example Simple mapping 9 # @example Simple mapping
lib/hoptoad.rb
@@ -18,7 +18,7 @@ module Hoptoad @@ -18,7 +18,7 @@ module Hoptoad
18 def self.get_version_processor(version) 18 def self.get_version_processor(version)
19 case version 19 case version
20 when /2\.[01234]/ then Hoptoad::V2 20 when /2\.[01234]/ then Hoptoad::V2
21 - else; raise ApiVersionError 21 + else; raise ApiVersionError
22 end 22 end
23 end 23 end
24 end 24 end
lib/recurse.rb
1 class Hash 1 class Hash
2 -  
3 # Apply a block to hash, and recursively apply that block 2 # Apply a block to hash, and recursively apply that block
4 # to each sub-hash or +types+. 3 # to each sub-hash or +types+.
5 # 4 #
@@ -20,6 +19,5 @@ class Hash @@ -20,6 +19,5 @@ class Hash
20 end 19 end
21 yield h 20 yield h
22 end 21 end
23 -  
24 end 22 end
25 23
lib/tasks/errbit/demo.rake
@@ -64,7 +64,6 @@ namespace :errbit do @@ -64,7 +64,6 @@ namespace :errbit do
64 end 64 end
65 end 65 end
66 66
67 -  
68 Fabricate(:notice, :err => Fabricate(:err, :problem => Fabricate(:problem, :app => app))) 67 Fabricate(:notice, :err => Fabricate(:err, :problem => Fabricate(:problem, :app => app)))
69 puts "=== Created demo app: '#{app.name}', with example errors." 68 puts "=== Created demo app: '#{app.name}', with example errors."
70 end 69 end
script/rspec-queue-mongoid.rb
@@ -5,7 +5,6 @@ require &#39;bundler&#39; @@ -5,7 +5,6 @@ require &#39;bundler&#39;
5 Bundler.setup(:default, :development, :test) 5 Bundler.setup(:default, :development, :test)
6 require 'test_queue/runner/rspec' 6 require 'test_queue/runner/rspec'
7 7
8 -  
9 class MongoidRspecRunner < TestQueue::Runner::RSpec 8 class MongoidRspecRunner < TestQueue::Runner::RSpec
10 def after_fork(num) 9 def after_fork(num)
11 super 10 super
spec/acceptance/app_regenerate_api_key_spec.rb
@@ -35,7 +35,6 @@ feature &quot;Regeneration api_Key&quot; do @@ -35,7 +35,6 @@ feature &quot;Regeneration api_Key&quot; do
35 end 35 end
36 36
37 feature "Create an application" do 37 feature "Create an application" do
38 -  
39 let(:admin) { Fabricate(:admin) } 38 let(:admin) { Fabricate(:admin) }
40 let(:user) { 39 let(:user) {
41 Fabricate(:user_watcher, :app => app).user 40 Fabricate(:user_watcher, :app => app).user
@@ -55,7 +54,6 @@ feature &quot;Create an application&quot; do @@ -55,7 +54,6 @@ feature &quot;Create an application&quot; do
55 expect(App.where(:name => 'My new app').count).to eq 1 54 expect(App.where(:name => 'My new app').count).to eq 1
56 expect(App.where(:name => 'My new app 2').count).to eq 0 55 expect(App.where(:name => 'My new app 2').count).to eq 0
57 56
58 -  
59 click_on I18n.t('shared.navigation.apps') 57 click_on I18n.t('shared.navigation.apps')
60 click_on 'My new app' 58 click_on 'My new app'
61 click_link I18n.t('apps.show.edit') 59 click_link I18n.t('apps.show.edit')
@@ -64,7 +62,6 @@ feature &quot;Create an application&quot; do @@ -64,7 +62,6 @@ feature &quot;Create an application&quot; do
64 page.has_content?(I18n.t('controllers.apps.flash.update.success')) 62 page.has_content?(I18n.t('controllers.apps.flash.update.success'))
65 expect(App.where(:name => 'My new app').count).to eq 0 63 expect(App.where(:name => 'My new app').count).to eq 0
66 expect(App.where(:name => 'My new app 2').count).to eq 1 64 expect(App.where(:name => 'My new app 2').count).to eq 1
67 -  
68 end 65 end
69 66
70 scenario "create an apps with issue tracker and edit it", :js => true do 67 scenario "create an apps with issue tracker and edit it", :js => true do
spec/acceptance/sign_in_with_github_spec.rb
1 require 'acceptance/acceptance_helper' 1 require 'acceptance/acceptance_helper'
2 2
3 feature 'Sign in with GitHub' do 3 feature 'Sign in with GitHub' do
4 -  
5 background do 4 background do
6 allow(Errbit::Config).to receive(:github_authentication).and_return(true) 5 allow(Errbit::Config).to receive(:github_authentication).and_return(true)
7 Fabricate(:user, :github_login => 'nashby') 6 Fabricate(:user, :github_login => 'nashby')
spec/controllers/api/v1/notices_controller_spec.rb
@@ -28,14 +28,12 @@ describe Api::V1::NoticesController, type: &#39;controller&#39; do @@ -28,14 +28,12 @@ describe Api::V1::NoticesController, type: &#39;controller&#39; do
28 end 28 end
29 29
30 describe "given a date range" do 30 describe "given a date range" do
31 -  
32 it "should return only the notices created during the date range" do 31 it "should return only the notices created during the date range" do
33 get :index, {:auth_token => @user.authentication_token, :start_date => "2012-08-01", :end_date => "2012-08-27"} 32 get :index, {:auth_token => @user.authentication_token, :start_date => "2012-08-01", :end_date => "2012-08-27"}
34 expect(response).to be_success 33 expect(response).to be_success
35 notices = JSON.load response.body 34 notices = JSON.load response.body
36 expect(notices.length).to eq 3 35 expect(notices.length).to eq 3
37 end 36 end
38 -  
39 end 37 end
40 38
41 it "should return all notices" do 39 it "should return all notices" do
@@ -44,7 +42,6 @@ describe Api::V1::NoticesController, type: &#39;controller&#39; do @@ -44,7 +42,6 @@ describe Api::V1::NoticesController, type: &#39;controller&#39; do
44 notices = JSON.load response.body 42 notices = JSON.load response.body
45 expect(notices.length).to eq 4 43 expect(notices.length).to eq 4
46 end 44 end
47 -  
48 end 45 end
49 end 46 end
50 end 47 end
spec/controllers/apps_controller_spec.rb
@@ -330,7 +330,6 @@ describe AppsController, type: &#39;controller&#39; do @@ -330,7 +330,6 @@ describe AppsController, type: &#39;controller&#39; do
330 end 330 end
331 331
332 describe "POST /apps/:id/regenerate_api_key" do 332 describe "POST /apps/:id/regenerate_api_key" do
333 -  
334 context "like watcher" do 333 context "like watcher" do
335 before do 334 before do
336 sign_in watcher.user 335 sign_in watcher.user
@@ -340,7 +339,6 @@ describe AppsController, type: &#39;controller&#39; do @@ -340,7 +339,6 @@ describe AppsController, type: &#39;controller&#39; do
340 post :regenerate_api_key, :id => 'foo' 339 post :regenerate_api_key, :id => 'foo'
341 expect(request).to redirect_to root_path 340 expect(request).to redirect_to root_path
342 end 341 end
343 -  
344 end 342 end
345 343
346 context "like admin" do 344 context "like admin" do
spec/controllers/notices_controller_spec.rb
@@ -34,7 +34,6 @@ describe NoticesController, type: &#39;controller&#39; do @@ -34,7 +34,6 @@ describe NoticesController, type: &#39;controller&#39; do
34 expect(response.body).to match(%r{<id[^>]*>#{notice.id}</id>}) 34 expect(response.body).to match(%r{<id[^>]*>#{notice.id}</id>})
35 expect(response.body).to match(%r{<url[^>]*>(.+)#{locate_path(notice.id)}</url>}) 35 expect(response.body).to match(%r{<url[^>]*>(.+)#{locate_path(notice.id)}</url>})
36 end 36 end
37 -  
38 end 37 end
39 38
40 it "generates a notice from xml in a data param [POST]" do 39 it "generates a notice from xml in a data param [POST]" do
spec/controllers/problems_controller_spec.rb
@@ -318,7 +318,6 @@ describe ProblemsController, type: &#39;controller&#39; do @@ -318,7 +318,6 @@ describe ProblemsController, type: &#39;controller&#39; do
318 end 318 end
319 319
320 context "POST /problems/unmerge_several" do 320 context "POST /problems/unmerge_several" do
321 -  
322 it "should require at least one problem" do 321 it "should require at least one problem" do
323 post :unmerge_several, :problems => [] 322 post :unmerge_several, :problems => []
324 expect(request.flash[:notice]).to eql I18n.t('controllers.problems.flash.no_select_problem') 323 expect(request.flash[:notice]).to eql I18n.t('controllers.problems.flash.no_select_problem')
@@ -332,11 +331,9 @@ describe ProblemsController, type: &#39;controller&#39; do @@ -332,11 +331,9 @@ describe ProblemsController, type: &#39;controller&#39; do
332 expect(merged_problem.reload.errs.length).to eq 1 331 expect(merged_problem.reload.errs.length).to eq 1
333 }.to change(Problem, :count).by(1) 332 }.to change(Problem, :count).by(1)
334 end 333 end
335 -  
336 end 334 end
337 335
338 context "POST /problems/resolve_several" do 336 context "POST /problems/resolve_several" do
339 -  
340 it "should require at least one problem" do 337 it "should require at least one problem" do
341 post :resolve_several, :problems => [] 338 post :resolve_several, :problems => []
342 expect(request.flash[:notice]).to eql I18n.t('controllers.problems.flash.no_select_problem') 339 expect(request.flash[:notice]).to eql I18n.t('controllers.problems.flash.no_select_problem')
@@ -360,7 +357,6 @@ describe ProblemsController, type: &#39;controller&#39; do @@ -360,7 +357,6 @@ describe ProblemsController, type: &#39;controller&#39; do
360 end 357 end
361 358
362 context "POST /problems/unresolve_several" do 359 context "POST /problems/unresolve_several" do
363 -  
364 it "should require at least one problem" do 360 it "should require at least one problem" do
365 post :unresolve_several, :problems => [] 361 post :unresolve_several, :problems => []
366 expect(request.flash[:notice]).to eql I18n.t('controllers.problems.flash.no_select_problem') 362 expect(request.flash[:notice]).to eql I18n.t('controllers.problems.flash.no_select_problem')
spec/controllers/users_controller_spec.rb
@@ -34,7 +34,6 @@ describe UsersController, type: &#39;controller&#39; do @@ -34,7 +34,6 @@ describe UsersController, type: &#39;controller&#39; do
34 expect(controller.user).to eq(user) 34 expect(controller.user).to eq(user)
35 expect(response).to render_template 'edit' 35 expect(response).to render_template 'edit'
36 end 36 end
37 -  
38 end 37 end
39 38
40 context "PUT /users/:other_id" do 39 context "PUT /users/:other_id" do
@@ -188,7 +187,6 @@ describe UsersController, type: &#39;controller&#39; do @@ -188,7 +187,6 @@ describe UsersController, type: &#39;controller&#39; do
188 end 187 end
189 end 188 end
190 context "when the update is unsuccessful" do 189 context "when the update is unsuccessful" do
191 -  
192 it "renders the edit page" do 190 it "renders the edit page" do
193 put :update, :id => user.to_param, :user => {:name => nil} 191 put :update, :id => user.to_param, :user => {:name => nil}
194 expect(response).to render_template(:edit) 192 expect(response).to render_template(:edit)
spec/decorators/issue_tracker_decorator_spec.rb
@@ -3,6 +3,7 @@ describe IssueTrackerDecorator do @@ -3,6 +3,7 @@ describe IssueTrackerDecorator do
3 klass = Class.new(ErrbitPlugin::IssueTracker) { 3 klass = Class.new(ErrbitPlugin::IssueTracker) {
4 def self.label; 'fake'; end 4 def self.label; 'fake'; end
5 def self.note; 'a note'; end 5 def self.note; 'a note'; end
  6 +
6 def self.fields 7 def self.fields
7 { 8 {
8 :foo => {:label => 'foo'}, 9 :foo => {:label => 'foo'},
spec/decorators/issue_tracker_type_decorator_spec.rb
@@ -3,12 +3,14 @@ describe IssueTrackerDecorator do @@ -3,12 +3,14 @@ describe IssueTrackerDecorator do
3 klass = Class.new(ErrbitPlugin::IssueTracker) do 3 klass = Class.new(ErrbitPlugin::IssueTracker) do
4 def self.label; 'fake'; end 4 def self.label; 'fake'; end
5 def self.note; 'a note'; end 5 def self.note; 'a note'; end
  6 +
6 def self.fields 7 def self.fields
7 { 8 {
8 :foo => {:label => 'foo'}, 9 :foo => {:label => 'foo'},
9 :bar => {:label => 'bar'} 10 :bar => {:label => 'bar'}
10 } 11 }
11 end 12 end
  13 +
12 def self.icons 14 def self.icons
13 { 15 {
14 one: ['text/plain', 'all your base are belong to us'], 16 one: ['text/plain', 'all your base are belong to us'],
spec/fabricators/app_fabricator.rb
@@ -12,7 +12,7 @@ end @@ -12,7 +12,7 @@ end
12 Fabricator(:watcher) do 12 Fabricator(:watcher) do
13 app 13 app
14 watcher_type 'email' 14 watcher_type 'email'
15 - email { sequence(:email){|n| "email#{n}@example.com"} } 15 + email { sequence(:email){|n| "email#{n}@example.com"} }
16 end 16 end
17 17
18 Fabricator(:user_watcher, :from => :watcher) do 18 Fabricator(:user_watcher, :from => :watcher) do
spec/fabricators/comment_fabricator.rb
1 Fabricator :comment do 1 Fabricator :comment do
2 user 2 user
3 - body 'Test comment' 3 + body 'Test comment'
4 err(:fabricator => :problem) 4 err(:fabricator => :problem)
5 end 5 end
6 6
spec/fabricators/notification_service_fabricator.rb
1 -Fabricator :notification_service do 1 +Fabricator :notification_service do
2 app 2 app
3 room_id { sequence :word } 3 room_id { sequence :word }
4 api_token { sequence :word } 4 api_token { sequence :word }
spec/interactors/problem_destroy_spec.rb
@@ -44,7 +44,6 @@ describe ProblemDestroy do @@ -44,7 +44,6 @@ describe ProblemDestroy do
44 problem_destroy.execute 44 problem_destroy.execute
45 end 45 end
46 end 46 end
47 -  
48 end 47 end
49 48
50 context "in integration way" do 49 context "in integration way" do
spec/mailers/mailer_spec.rb
@@ -51,7 +51,7 @@ describe Mailer do @@ -51,7 +51,7 @@ describe Mailer do
51 p.notices_count = 3 51 p.notices_count = 3
52 p 52 p
53 end 53 end
54 - let!(:user) { Fabricate(:admin) } 54 + let!(:user) { Fabricate(:admin) }
55 let(:error_report) do 55 let(:error_report) do
56 instance_double( 56 instance_double(
57 'ErrorReport', 57 'ErrorReport',
spec/models/error_report_spec.rb
@@ -292,7 +292,6 @@ describe ErrorReport do @@ -292,7 +292,6 @@ describe ErrorReport do
292 it 'return the notice' do 292 it 'return the notice' do
293 expect(error_report.notice).to be_a Notice 293 expect(error_report.notice).to be_a Notice
294 end 294 end
295 -  
296 end 295 end
297 end 296 end
298 297
spec/models/notice_observer_spec.rb
@@ -129,7 +129,6 @@ describe &quot;Callback on Notice&quot;, type: &#39;model&#39; do @@ -129,7 +129,6 @@ describe &quot;Callback on Notice&quot;, type: &#39;model&#39; do
129 129
130 describe 'should not send a notification if a notification service is not' \ 130 describe 'should not send a notification if a notification service is not' \
131 'configured' do 131 'configured' do
132 -  
133 let(:notification_service) { Fabricate(:notification_service) } 132 let(:notification_service) { Fabricate(:notification_service) }
134 let(:app) { Fabricate(:app, notification_service: notification_service )} 133 let(:app) { Fabricate(:app, notification_service: notification_service )}
135 let(:notice_attrs) { notice_attrs_for.call(app.api_key) } 134 let(:notice_attrs) { notice_attrs_for.call(app.api_key) }
spec/models/notification_service/gtalk_service_spec.rb
@@ -88,7 +88,6 @@ describe NotificationServices::GtalkService, type: &#39;model&#39; do @@ -88,7 +88,6 @@ describe NotificationServices::GtalkService, type: &#39;model&#39; do
88 @notification_service.room_id = "" 88 @notification_service.room_id = ""
89 @notification_service.create_notification(@problem) 89 @notification_service.create_notification(@problem)
90 end 90 end
91 -  
92 end 91 end
93 92
94 it "it should send a notification to room only" do 93 it "it should send a notification to room only" do
spec/models/notification_service/notification_service_spec.rb
1 describe NotificationServices, type: 'model' do 1 describe NotificationServices, type: 'model' do
2 -  
3 let(:notice) { Fabricate :notice } 2 let(:notice) { Fabricate :notice }
4 let(:notification_service) { Fabricate :notification_service, :app => notice.app } 3 let(:notification_service) { Fabricate :notification_service, :app => notice.app }
5 let(:problem) { notice.problem } 4 let(:problem) { notice.problem }
spec/views/apps/new.html.haml_spec.rb
@@ -18,7 +18,6 @@ describe &quot;apps/new.html.haml&quot;, type: &#39;view&#39; do @@ -18,7 +18,6 @@ describe &quot;apps/new.html.haml&quot;, type: &#39;view&#39; do
18 18
19 expect(action_bar).to have_selector('a.button', :text => 'cancel') 19 expect(action_bar).to have_selector('a.button', :text => 'cancel')
20 end 20 end
21 -  
22 end 21 end
23 22
24 context "with unvalid app" do 23 context "with unvalid app" do
spec/views/problems/show.html.haml_spec.rb
@@ -104,7 +104,6 @@ describe &quot;problems/show.html.haml&quot;, type: &#39;view&#39; do @@ -104,7 +104,6 @@ describe &quot;problems/show.html.haml&quot;, type: &#39;view&#39; do
104 render 104 render
105 expect(view.content_for(:action_bar)).to_not match(/create issue/) 105 expect(view.content_for(:action_bar)).to_not match(/create issue/)
106 end 106 end
107 -  
108 end 107 end
109 108
110 context "with tracker associate on app" do 109 context "with tracker associate on app" do
@@ -138,7 +137,6 @@ describe &quot;problems/show.html.haml&quot;, type: &#39;view&#39; do @@ -138,7 +137,6 @@ describe &quot;problems/show.html.haml&quot;, type: &#39;view&#39; do
138 render 137 render
139 expect(view.content_for(:action_bar)).to match(/create issue/) 138 expect(view.content_for(:action_bar)).to match(/create issue/)
140 end 139 end
141 -  
142 end 140 end
143 141
144 context "with problem with issue link" do 142 context "with problem with issue link" do
spec/views/users/show.html.haml_spec.rb
@@ -55,7 +55,6 @@ describe &#39;users/show.html.haml&#39;, type: &#39;view&#39; do @@ -55,7 +55,6 @@ describe &#39;users/show.html.haml&#39;, type: &#39;view&#39; do
55 render 55 render
56 expect(view.content_for(:action_bar)).to have_selector('a.delete[data-confirm="%s"]' % I18n.t('.users.confirm_delete')) 56 expect(view.content_for(:action_bar)).to have_selector('a.delete[data-confirm="%s"]' % I18n.t('.users.confirm_delete'))
57 end 57 end
58 -  
59 end 58 end
60 end 59 end
61 end 60 end