diff --git a/.ruby-version b/.ruby-version index 7ec1d6d..8bbe6cf 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.1.0 +2.2 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..13b25f2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: ruby +rvm: + - 2.1 + - 2.2 +script: + - bundle exec rspec diff --git a/Gemfile.lock b/Gemfile.lock index 0d2e9f2..7da6e24 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) diff --git a/spec/jobs/build_attempt_job_spec.rb b/spec/jobs/build_attempt_job_spec.rb index 4dd8814..e82ebf9 100644 --- a/spec/jobs/build_attempt_job_spec.rb +++ b/spec/jobs/build_attempt_job_spec.rb @@ -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) @@ -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)