Commit c00f1ebe5ba072f01fa866e2adf37ca6eee79f7b
Exists in
master
and in
1 other branch
Merge pull request #299 from lest/patch-1
Cleanup code
Showing
3 changed files
with
4 additions
and
6 deletions
Show diff stats
app/controllers/apps_controller.rb
| ... | ... | @@ -80,7 +80,7 @@ class AppsController < InheritedResources::Base |
| 80 | 80 | end |
| 81 | 81 | end |
| 82 | 82 | |
| 83 | - def initialize_subclassed_notification_service | |
| 83 | + def initialize_subclassed_notification_service | |
| 84 | 84 | # set the app's notification service |
| 85 | 85 | if params[:app][:notification_service_attributes] && notification_type = params[:app][:notification_service_attributes][:type] |
| 86 | 86 | if NotificationService.subclasses.map(&:name).concat(["NotificationService"]).include?(notification_type) | ... | ... |
app/models/issue_trackers/github_issues_tracker.rb
| ... | ... | @@ -35,7 +35,7 @@ if defined? Octokit |
| 35 | 35 | end |
| 36 | 36 | |
| 37 | 37 | begin |
| 38 | - issue = client.create_issue(project_id, issue_title(problem), body_template.result(binding).unpack('C*').pack('U*'), options = {}) | |
| 38 | + issue = client.create_issue(project_id, issue_title(problem), body_template.result(binding).unpack('C*').pack('U*')) | |
| 39 | 39 | problem.update_attributes( |
| 40 | 40 | :issue_link => issue.html_url, |
| 41 | 41 | :issue_type => Label |
| ... | ... | @@ -54,4 +54,4 @@ if defined? Octokit |
| 54 | 54 | "https://github.com/#{project_id}/issues" |
| 55 | 55 | end |
| 56 | 56 | end |
| 57 | -end | |
| 58 | 57 | \ No newline at end of file |
| 58 | +end | ... | ... |
app/models/notice.rb
| ... | ... | @@ -13,7 +13,7 @@ class Notice |
| 13 | 13 | field :current_user, :type => Hash |
| 14 | 14 | field :error_class |
| 15 | 15 | delegate :lines, :to => :backtrace, :prefix => true |
| 16 | - delegate :app, :to => :err | |
| 16 | + delegate :app, :problem, :to => :err | |
| 17 | 17 | |
| 18 | 18 | belongs_to :err |
| 19 | 19 | belongs_to :backtrace, :index => true |
| ... | ... | @@ -36,8 +36,6 @@ class Notice |
| 36 | 36 | scope :reverse_ordered, order_by(:created_at.desc) |
| 37 | 37 | scope :for_errs, lambda {|errs| where(:err_id.in => errs.all.map(&:id))} |
| 38 | 38 | |
| 39 | - delegate :app, :problem, :to => :err | |
| 40 | - | |
| 41 | 39 | def user_agent |
| 42 | 40 | agent_string = env_vars['HTTP_USER_AGENT'] |
| 43 | 41 | agent_string.blank? ? nil : UserAgent.parse(agent_string) | ... | ... |