Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Commit

Permalink
Merge pull request #41 from square/rob.rest-client-bump
Browse files Browse the repository at this point in the history
rest-client bump
  • Loading branch information
robolson committed Apr 17, 2015
2 parents fc3555a + 2e3497b commit 997b973
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
@@ -1 +1 @@
2.1.0
2.2
6 changes: 6 additions & 0 deletions .travis.yml
@@ -0,0 +1,6 @@
language: ruby
rvm:
- 2.1
- 2.2
script:
- bundle exec rspec
16 changes: 12 additions & 4 deletions Gemfile.lock
Expand Up @@ -7,7 +7,7 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.6)
addressable (2.3.8)
capistrano (3.2.1)
i18n
rake (>= 10.0.0)
Expand All @@ -26,6 +26,10 @@ GEM
crack (0.4.2)
safe_yaml (~> 1.0.0)
diff-lcs (1.2.5)
domain_name (0.5.24)
unf (>= 0.0.5, < 1.0.0)
http-cookie (1.0.2)
domain_name (~> 0.5)
i18n (0.7.0)
json (1.8.2)
mime-types (2.4.3)
Expand All @@ -49,7 +53,8 @@ GEM
redis-namespace (~> 1.3)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
rest-client (1.7.3)
rest-client (1.8.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rspec (3.2.0)
Expand All @@ -65,7 +70,7 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-support (3.2.2)
safe_yaml (1.0.3)
safe_yaml (1.0.4)
sinatra (1.4.5)
rack (~> 1.4)
rack-protection (~> 1.4)
Expand All @@ -78,9 +83,12 @@ GEM
tilt (1.4.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
vegas (0.1.11)
rack (>= 1.0.0)
webmock (1.18.0)
webmock (1.21.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)

Expand Down
4 changes: 2 additions & 2 deletions spec/jobs/build_attempt_job_spec.rb
Expand Up @@ -83,7 +83,7 @@ class FakeTestError < StandardError; end
it "sets the build attempt state to errored" do
stub_request(:post, "#{master_host}/build_attempts/#{build_attempt_id}/start").to_return(:body => {'build_attempt' => {'state' => 'running'}}.to_json)
stub_request(:post, "#{master_host}/build_attempts/#{build_attempt_id}/build_artifacts")
stub_request(:post, "#{master_host}/build_attempts/#{build_attempt_id}/finish").to_return(:head => :ok)
stub_request(:post, "#{master_host}/build_attempts/#{build_attempt_id}/finish")

expect(subject).to receive(:run_tests).and_raise(FakeTestError.new('something went wrong'))
expect(BuildAttemptJob).to receive(:new).and_return(subject)
Expand All @@ -102,7 +102,7 @@ class FakeTestError < StandardError; end
it "sets the build attempt state to aborted" do
stub_request(:post, "#{master_host}/build_attempts/#{build_attempt_id}/start").to_return(:body => {'build_attempt' => {'state' => 'running'}}.to_json)
stub_request(:post, "#{master_host}/build_attempts/#{build_attempt_id}/build_artifacts")
stub_request(:post, "#{master_host}/build_attempts/#{build_attempt_id}/finish").to_return(:head => :ok)
stub_request(:post, "#{master_host}/build_attempts/#{build_attempt_id}/finish")

expect(subject).to receive(:run_tests).and_raise(Kochiku::Worker::GitRepo::RefNotFoundError.new)
expect(BuildAttemptJob).to receive(:new).and_return(subject)
Expand Down

0 comments on commit 997b973

Please sign in to comment.