diff --git a/Gemfile b/Gemfile index 32c5305..03b24b5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,10 +1,15 @@ -source 'http://rubygems.org' +source 'https://rubygems.org' -gem 'rails', '~> 3.2.13' -gem 'mongoid', '~> 3.1.4' +RAILS_VERSION = '~> 3.2.14' -gem 'mongoid_rails_migrations', '~> 1.0.1' -gem 'devise' +gem 'actionmailer', RAILS_VERSION +gem 'actionpack', RAILS_VERSION +gem 'railties', RAILS_VERSION + +gem 'mongoid' + +gem 'mongoid_rails_migrations' +gem 'devise', '~> 2.2.1' gem 'haml' gem 'htmlentities' gem 'rack-ssl', :require => 'rack/ssl' # force SSL @@ -37,7 +42,7 @@ gem 'pivotal-tracker' # Fogbugz gem 'ruby-fogbugz', :require => 'fogbugz' # Github Issues -gem 'octokit' +gem 'octokit', '~> 1.18' # Gitlab gem 'gitlab', :git => 'https://github.com/NARKOZ/gitlab.git' diff --git a/Gemfile.lock b/Gemfile.lock index 7a2335c..a197490 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,18 +6,18 @@ GIT httparty GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: - actionmailer (3.2.13) - actionpack (= 3.2.13) - mail (~> 2.5.3) + actionmailer (3.2.14) + actionpack (= 3.2.14) + mail (~> 2.5.4) actionmailer_inline_css (1.5.3) actionmailer (>= 3.0.0) nokogiri (>= 1.4.4) premailer (>= 1.7.1) - actionpack (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) + actionpack (3.2.14) + activemodel (= 3.2.14) + activesupport (= 3.2.14) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) @@ -25,35 +25,35 @@ GEM rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) - activemodel (3.2.13) - activesupport (= 3.2.13) + activemodel (3.2.14) + activesupport (= 3.2.14) builder (~> 3.0.0) - activerecord (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) + activerecord (3.2.14) + activemodel (= 3.2.14) + activesupport (= 3.2.14) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - activesupport (3.2.13) - i18n (= 0.6.1) + activeresource (3.2.14) + activemodel (= 3.2.14) + activesupport (= 3.2.14) + activesupport (3.2.14) + i18n (~> 0.6, >= 0.6.4) multi_json (~> 1.0) addressable (2.3.5) - airbrake (3.1.13) + airbrake (3.1.14) builder json arel (3.0.2) - bcrypt-ruby (3.1.1) - better_errors (0.9.0) + bcrypt-ruby (3.1.2) + better_errors (1.0.1) coderay (>= 1.0.0) erubis (>= 2.6.6) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) - bitbucket_rest_api (0.1.2) + bitbucket_rest_api (0.1.4) faraday (~> 0.8.1) - faraday_middleware (~> 0.8.1) - hashie (~> 1.2.0) + faraday_middleware (~> 0.9.0) + hashie (~> 2.0.5) multi_json (~> 1.3) nokogiri (~> 1.5.2) simple_oauth @@ -77,44 +77,42 @@ GEM childprocess (0.3.9) ffi (~> 1.0, >= 1.0.11) coderay (1.0.9) - colorize (0.5.8) columnize (0.3.6) - coveralls (0.6.7) - colorize + coveralls (0.7.0) multi_json (~> 1.3) rest-client simplecov (>= 0.7) + term-ansicolor thor crack (0.4.1) safe_yaml (~> 0.9.0) - css_parser (1.3.4) + css_parser (1.3.5) addressable database_cleaner (0.9.1) debug_inspector (0.0.2) - debugger (1.6.1) + debugger (1.6.2) columnize (>= 0.3.1) debugger-linecache (~> 1.2.0) debugger-ruby_core_source (~> 1.2.3) debugger-linecache (1.2.0) debugger-ruby_core_source (1.2.3) - decent_exposure (2.2.1) + decent_exposure (2.3.0) devise (2.2.7) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.1) railties (~> 3.1) warden (~> 1.2.1) diff-lcs (1.2.4) - dotenv (0.8.0) + dotenv (0.9.0) email_spec (1.5.0) launchy (~> 2.1) mail (~> 2.2) erubis (2.7.0) - execjs (1.4.0) - multi_json (~> 1.0) + execjs (2.0.1) fabrication (1.3.2) faraday (0.8.8) multipart-post (~> 1.2.0) - faraday_middleware (0.8.8) + faraday_middleware (0.9.0) faraday (>= 0.7.4, < 0.9) ffi (1.9.0) flowdock (0.3.1) @@ -127,10 +125,10 @@ GEM tilt happymapper (0.4.0) libxml-ruby (~> 2.0) - hashie (1.2.0) + hashie (2.0.5) highline (1.6.19) hike (1.2.3) - hipchat (0.11.0) + hipchat (0.12.0) httparty hoi (0.0.6) httparty (> 0.6.0) @@ -143,7 +141,7 @@ GEM multi_json (~> 1.0) multi_xml (>= 0.5.2) httpauth (0.2.0) - i18n (0.6.1) + i18n (0.6.5) jira-ruby (0.1.2) activesupport oauth @@ -158,7 +156,7 @@ GEM kaminari (0.14.1) actionpack (>= 3.0.0) activesupport (>= 3.0.0) - kgio (2.8.0) + kgio (2.8.1) launchy (2.3.0) addressable (~> 2.3) libv8 (3.16.14.3) @@ -176,12 +174,12 @@ GEM rack-contrib railties method_source (0.8.2) - mime-types (1.24) - mongoid (3.1.4) + mime-types (1.25) + mongoid (3.1.5) activemodel (~> 3.2) moped (~> 1.4) origin (~> 1.0) - tzinfo (~> 0.3.22) + tzinfo (~> 0.3.29) mongoid-rspec (1.9.0) mongoid (>= 3.0.1) rake @@ -192,16 +190,17 @@ GEM rails (>= 3.2.0) railties (>= 3.2.0) moped (1.5.1) - multi_json (1.7.9) + multi_json (1.8.0) multi_xml (0.5.5) multipart-post (1.2.0) net-scp (1.1.2) net-ssh (>= 2.6.5) net-sftp (2.1.2) net-ssh (>= 2.6.5) - net-ssh (2.6.8) + net-ssh (2.7.0) net-ssh-gateway (1.2.0) net-ssh (>= 2.6.5) + netrc (0.7.7) nokogiri (1.5.10) nokogiri-happymapper (0.5.7) nokogiri (~> 1.5) @@ -212,12 +211,13 @@ GEM jwt (~> 0.1.4) multi_json (~> 1.0) rack (~> 1.2) - octokit (1.18.0) + octokit (1.25.0) addressable (~> 2.2) faraday (~> 0.8) - faraday_middleware (~> 0.8) - hashie (~> 1.2) + faraday_middleware (~> 0.9) + hashie (~> 2.0) multi_json (~> 1.3) + netrc (~> 0.7.7) omniauth (1.1.4) hashie (>= 1.2, < 3) rack @@ -231,7 +231,8 @@ GEM orm_adapter (0.4.0) oruen_redmine_client (0.0.1) activeresource (>= 2.3.0) - pivotal-tracker (0.5.10) + pivotal-tracker (0.5.12) + builder builder crack happymapper (>= 0.3.2) @@ -239,6 +240,7 @@ GEM nokogiri (>= 1.5.5) nokogiri-happymapper (>= 0.5.4) rest-client (~> 1.6.0) + rest-client (~> 1.6.0) pjax_rails (0.3.4) jquery-rails polyglot (0.3.3) @@ -262,27 +264,27 @@ GEM rack (>= 0.9.1) rack-ssl (1.3.3) rack - rack-ssl-enforcer (0.2.5) + rack-ssl-enforcer (0.2.6) rack-test (0.6.2) rack (>= 1.0) - rails (3.2.13) - actionmailer (= 3.2.13) - actionpack (= 3.2.13) - activerecord (= 3.2.13) - activeresource (= 3.2.13) - activesupport (= 3.2.13) + rails (3.2.14) + actionmailer (= 3.2.14) + actionpack (= 3.2.14) + activerecord (= 3.2.14) + activeresource (= 3.2.14) + activesupport (= 3.2.14) bundler (~> 1.0) - railties (= 3.2.13) - rails_autolink (1.1.0) + railties (= 3.2.14) + rails_autolink (1.1.4) rails (> 3.1) - railties (3.2.13) - actionpack (= 3.2.13) - activesupport (= 3.2.13) + railties (3.2.14) + actionpack (= 3.2.14) + activesupport (= 3.2.14) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - raindrops (0.11.0) + raindrops (0.12.0) rake (10.1.0) rbx-require-relative (0.0.9) rdoc (3.12.2) @@ -296,7 +298,7 @@ GEM rspec-expectations (~> 2.14.0) rspec-mocks (~> 2.14.0) rspec-core (2.14.5) - rspec-expectations (2.14.2) + rspec-expectations (2.14.3) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.14.3) rspec-rails (2.14.0) @@ -317,11 +319,11 @@ GEM rushover (0.3.0) json rest-client - safe_yaml (0.9.5) - selenium-webdriver (2.35.0) + safe_yaml (0.9.7) + selenium-webdriver (2.35.1) childprocess (>= 0.2.5) multi_json (~> 1.0) - rubyzip + rubyzip (< 1.0.0) websocket (~> 1.0.4) simple_oauth (0.2.0) simplecov (0.7.1) @@ -338,27 +340,30 @@ GEM actionpack (~> 3.0) activemodel (~> 3.0) railties (~> 3.0) - taskmapper (0.8.0) + taskmapper (0.8.1) activeresource (~> 3.0) activesupport (~> 3.0) - hashie (~> 1.2) + hashie (~> 2.0) taskmapper-unfuddle (0.7.0) addressable (~> 2.2) taskmapper (~> 0.8) + term-ansicolor (1.2.2) + tins (~> 0.8) therubyracer (0.12.0) libv8 (~> 3.16.14.0) ref thor (0.18.1) tilt (1.4.1) timecop (0.6.1) + tins (0.10.0) treetop (1.4.15) polyglot polyglot (>= 0.3.1) - turbo-sprockets-rails3 (0.3.9) + turbo-sprockets-rails3 (0.3.10) railties (> 3.2.8, < 4.0.0) sprockets (>= 2.0.0) tzinfo (0.3.37) - uglifier (2.1.2) + uglifier (2.2.1) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) underscore-rails (1.5.1) @@ -366,7 +371,7 @@ GEM kgio (~> 2.6) rack raindrops (~> 0.7) - useragent (0.6.0) + useragent (0.7.0) warden (1.2.3) rack (>= 1.0) webmock (1.13.0) @@ -382,7 +387,9 @@ PLATFORMS ruby DEPENDENCIES + actionmailer (~> 3.2.14) actionmailer_inline_css + actionpack (~> 3.2.14) airbrake better_errors binding_of_caller @@ -394,7 +401,7 @@ DEPENDENCIES database_cleaner (~> 0.9.0) debugger decent_exposure - devise + devise (~> 2.2.1) email_spec execjs fabrication (~> 1.3.0) @@ -413,10 +420,10 @@ DEPENDENCIES launchy lighthouse-api meta_request - mongoid (~> 3.1.4) + mongoid mongoid-rspec - mongoid_rails_migrations (~> 1.0.1) - octokit + mongoid_rails_migrations + octokit (~> 1.18) omniauth-github oruen_redmine_client pivotal-tracker @@ -426,8 +433,8 @@ DEPENDENCIES quiet_assets rack-ssl rack-ssl-enforcer - rails (~> 3.2.13) rails_autolink + railties (~> 3.2.14) ri_cal rspec-rails (~> 2.6) ruby-debug diff --git a/app/models/issue_trackers/github_issues_tracker.rb b/app/models/issue_trackers/github_issues_tracker.rb index e03ec50..c9aa0a5 100644 --- a/app/models/issue_trackers/github_issues_tracker.rb +++ b/app/models/issue_trackers/github_issues_tracker.rb @@ -35,7 +35,11 @@ if defined? Octokit end begin - issue = client.create_issue(project_id, issue_title(problem), body_template.result(binding).unpack('C*').pack('U*')) + issue = client.create_issue( + project_id, + issue_title(problem), + body_template.result(binding).unpack('C*').pack('U*') + ) problem.update_attributes( :issue_link => issue.html_url, :issue_type => Label diff --git a/spec/models/error_report_spec.rb b/spec/models/error_report_spec.rb index c58acf6..6778d22 100644 --- a/spec/models/error_report_spec.rb +++ b/spec/models/error_report_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' require 'airbrake/version' require 'airbrake/backtrace' require 'airbrake/notice' +require 'airbrake/utils/params_cleaner' # MonkeyPatch to instanciate a Airbrake::Notice without configure # Airbrake @@ -141,9 +142,9 @@ describe ErrorReport do it 'find the correct err for the notice' do err = Fabricate(:err, :problem => Fabricate(:problem, :resolved => true)) - + ErrorReport.any_instance.stub(:fingerprint).and_return(err.fingerprint) - + expect { error_report.generate_notice! }.to change { diff --git a/spec/models/issue_trackers/github_issues_tracker_spec.rb b/spec/models/issue_trackers/github_issues_tracker_spec.rb index 6221d77..6e81830 100644 --- a/spec/models/issue_trackers/github_issues_tracker_spec.rb +++ b/spec/models/issue_trackers/github_issues_tracker_spec.rb @@ -25,8 +25,14 @@ describe IssueTrackers::GithubIssuesTracker do } EOF - stub_request(:post, "https://#{tracker.username}:#{tracker.password}@api.github.com/repos/#{repo}/issues"). - to_return(:status => 201, :headers => {'Location' => @issue_link}, :body => body ) + stub_request(:post, + "https://#{tracker.username}:#{tracker.password}@api.github.com/repos/#{repo}/issues"). + to_return(:status => 201, + :headers => { + 'Location' => @issue_link, + 'Content-Type' => 'application/json', + }, + :body => body ) problem.app.issue_tracker.create_issue(problem) problem.reload -- libgit2 0.21.2