capistrano-ci 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.travis.yml +14 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +76 -0
- data/Rakefile +11 -0
- data/capistrano-ci.gemspec +31 -0
- data/lib/capistrano/ci/client.rb +37 -0
- data/lib/capistrano/ci/clients/base.rb +34 -0
- data/lib/capistrano/ci/clients/travis.rb +36 -0
- data/lib/capistrano/ci/clients/travis_pro.rb +15 -0
- data/lib/capistrano/ci/recipes.rb +19 -0
- data/lib/capistrano/ci/version.rb +5 -0
- data/lib/capistrano/ci.rb +5 -0
- data/spec/capistrano/ci/client_spec.rb +81 -0
- data/spec/capistrano/ci/clients/base_spec.rb +15 -0
- data/spec/capistrano/ci/clients/travis_pro_spec.rb +46 -0
- data/spec/capistrano/ci/clients/travis_spec.rb +43 -0
- data/spec/spec_helper.rb +25 -0
- data/spec/vcr/Capistrano_CI_Clients_Travis/_passed_/when_failed/.yml +122 -0
- data/spec/vcr/Capistrano_CI_Clients_Travis/_passed_/when_passed/.yml +126 -0
- data/spec/vcr/Capistrano_CI_Clients_Travis/_state/when_failed/.yml +122 -0
- data/spec/vcr/Capistrano_CI_Clients_Travis/_state/when_passed/.yml +126 -0
- data/spec/vcr/Capistrano_CI_Clients_Travis/_state/when_repository_was_not_found/.yml +50 -0
- data/spec/vcr/Capistrano_CI_Clients_TravisPro/_passed_/when_not_passed/.yml +114 -0
- data/spec/vcr/Capistrano_CI_Clients_TravisPro/_passed_/when_passed/.yml +115 -0
- data/spec/vcr/Capistrano_CI_Clients_TravisPro/_state/when_not_passed/.yml +114 -0
- data/spec/vcr/Capistrano_CI_Clients_TravisPro/_state/when_passed/.yml +115 -0
- data/spec/vcr/Capistrano_CI_Clients_TravisPro/_state/when_repository_was_not_found/.yml +42 -0
- metadata +200 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a4bb2f3e598f26beed767fa2053561d13f87924f
|
4
|
+
data.tar.gz: 51f561d4c7e7353439e07062cdeb1038fd4d3911
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 35753365238dae3e5dc0764da0b78798d85ee9ad52ffdbd86f7751e74128904417ee18c14c5b4f8058251ee3fbe429da5d2604a7dde35aab6f40e8ba9c7dde5a
|
7
|
+
data.tar.gz: 287ea3753b4b0560dbe4256669d6c62799bc4d27fa4b2bc2cd08baaf2e431776fa280a0952202b8c958403ea9c6822402c1c220845b730233f87d6446fd0d652
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Railsware LLC
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Capistrano::Ci
|
2
|
+
[![Build Status](https://travis-ci.org/railsware/capistrano-ci.png)](https://travis-ci.org/railsware/capistrano-ci)
|
3
|
+
|
4
|
+
|
5
|
+
## Introduction
|
6
|
+
|
7
|
+
capistrano-ci is extension for capistrano that allows you to check status of your repository before deployment. Currently it supports:
|
8
|
+
|
9
|
+
* travis-ci: Open Source and Pro versions ([https://travis-ci.org](https://travis-ci.org) or [https://travis-ci.com](https://travis-ci.com))
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Add this line to your application's Gemfile:
|
14
|
+
|
15
|
+
gem 'capistrano-ci'
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install capistrano-ci
|
24
|
+
|
25
|
+
Add to your Capfile:
|
26
|
+
|
27
|
+
require 'capistrano/ci/recipies'
|
28
|
+
|
29
|
+
## Configuration
|
30
|
+
|
31
|
+
Variables list:
|
32
|
+
|
33
|
+
* :ci_client (required) - supports 'travis' or 'travis_pro';
|
34
|
+
* :ci_repository (required) - organization or user name and repository name on github;
|
35
|
+
* :ci_access_token(required only for 'travis_pro' ci client) - access token for Pro account on Travis-CI.
|
36
|
+
|
37
|
+
### Open Source Projects
|
38
|
+
|
39
|
+
Setup ci_client and ci_repository variables in your deployment script:
|
40
|
+
|
41
|
+
set(:ci_client){ "travis" }
|
42
|
+
set(:ci_repository){ "organisation-or-user/repository-name" }
|
43
|
+
|
44
|
+
### Pro Account of Travis-CI:
|
45
|
+
|
46
|
+
Additional to ci_client and ci_repository setup ci_access_token:
|
47
|
+
|
48
|
+
set(:ci_client){ "travis_pro" }
|
49
|
+
set(:ci_repository){ "organisation-or-user/repository-name" }
|
50
|
+
set(:ci_access_token){ "your-pro-access-token" }
|
51
|
+
|
52
|
+
Read explaination [how to obtain Travis-CI access token](http://railsware.com/blog/2013/09/10/capistrano-recipe-for-checking-travis-ci-build-status/). To have more information about Travis-CI access token follow [this blog post](http://about.travis-ci.org/blog/2013-01-28-token-token-token).
|
53
|
+
|
54
|
+
### Enable ci:verify task:
|
55
|
+
|
56
|
+
before 'deploy' do
|
57
|
+
ci.verify
|
58
|
+
end
|
59
|
+
|
60
|
+
# or in case of using capistrano-patch:
|
61
|
+
before 'patch:create' do
|
62
|
+
ci.verify
|
63
|
+
end
|
64
|
+
|
65
|
+
## Contributing
|
66
|
+
|
67
|
+
1. Fork it
|
68
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
69
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
70
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
71
|
+
5. Create new Pull Request
|
72
|
+
|
73
|
+
## Copyright
|
74
|
+
|
75
|
+
Copyright (c) 2013 Railsware LLC. See LICENSE.txt for
|
76
|
+
further details.
|
data/Rakefile
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'capistrano/ci/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "capistrano-ci"
|
8
|
+
spec.version = Capistrano::Ci::VERSION
|
9
|
+
spec.authors = ["paladiy"]
|
10
|
+
spec.email = ["olexanderpaladiy@gmail.com"]
|
11
|
+
spec.description = %q{Capistrano recipe for checking CI build status}
|
12
|
+
spec.summary = %q{Capistrano recipe for checking CI build status of your repo}
|
13
|
+
spec.homepage = "https://github.com/railsware/capistrano-ci"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec", "2.14.1"
|
24
|
+
spec.add_development_dependency "simplecov", "~> 0.7.1"
|
25
|
+
spec.add_development_dependency "vcr", "~> 2.6.0"
|
26
|
+
spec.add_development_dependency "webmock", "~> 1.14.0"
|
27
|
+
|
28
|
+
spec.add_runtime_dependency "capistrano", ">=2.5.5"
|
29
|
+
spec.add_runtime_dependency "httparty"
|
30
|
+
|
31
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Capistrano
|
2
|
+
module CI
|
3
|
+
class Client
|
4
|
+
SETTINGS = [:ci_client, :ci_repository, :ci_access_token]
|
5
|
+
|
6
|
+
class NotFound < StandardError; end
|
7
|
+
|
8
|
+
def initialize(config)
|
9
|
+
@config = SETTINGS.inject({}) do |result, key|
|
10
|
+
result[key] = config[key] if config.exists?(key)
|
11
|
+
result
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def state(branch)
|
16
|
+
client.state(branch)
|
17
|
+
end
|
18
|
+
|
19
|
+
def passed?(branch)
|
20
|
+
client.passed?(branch)
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def client
|
26
|
+
@client ||= case @config[:ci_client]
|
27
|
+
when "travis"
|
28
|
+
Capistrano::CI::Clients::Travis.new @config[:ci_repository]
|
29
|
+
when "travis_pro"
|
30
|
+
Capistrano::CI::Clients::TravisPro.new @config[:ci_repository], @config[:ci_access_token]
|
31
|
+
else
|
32
|
+
raise NotFound, "can't find CI client with name '#{@config[:ci_client]}'"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require "httparty"
|
2
|
+
|
3
|
+
module Capistrano
|
4
|
+
module CI
|
5
|
+
module Clients
|
6
|
+
class ResponseError < StandardError; end
|
7
|
+
|
8
|
+
class Base
|
9
|
+
include HTTParty
|
10
|
+
|
11
|
+
def passed?(branch)
|
12
|
+
raise NotImplementedError
|
13
|
+
end
|
14
|
+
|
15
|
+
def state(branch)
|
16
|
+
raise NotImplementedError
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def get(url)
|
22
|
+
response = self.class.get(url)
|
23
|
+
|
24
|
+
if response.response.code == "200"
|
25
|
+
response.parsed_response
|
26
|
+
else
|
27
|
+
raise Capistrano::CI::Clients::ResponseError
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Capistrano
|
2
|
+
module CI
|
3
|
+
module Clients
|
4
|
+
class Travis < Base
|
5
|
+
base_uri 'https://api.travis-ci.org'
|
6
|
+
|
7
|
+
attr_reader :repository_name
|
8
|
+
|
9
|
+
def initialize(repository_name)
|
10
|
+
self.class.headers 'Accept' => 'application/json; version=2'
|
11
|
+
|
12
|
+
@repository_name = repository_name
|
13
|
+
end
|
14
|
+
|
15
|
+
def passed?(branch)
|
16
|
+
state(branch) == "passed"
|
17
|
+
end
|
18
|
+
|
19
|
+
def state(branch)
|
20
|
+
branch(branch)["state"]
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def repository
|
26
|
+
@repository ||= get("/repos/#{@repository_name}")["repo"]
|
27
|
+
end
|
28
|
+
|
29
|
+
def branch(branch_name)
|
30
|
+
@branches ||= {}
|
31
|
+
@branches[branch_name] ||= get("/repos/#{repository["id"]}/branches/#{branch_name}")["branch"]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Capistrano
|
2
|
+
module CI
|
3
|
+
module Clients
|
4
|
+
class TravisPro < Travis
|
5
|
+
base_uri 'https://api.travis-ci.com'
|
6
|
+
|
7
|
+
def initialize(repository_name, api_token)
|
8
|
+
@repository_name = repository_name
|
9
|
+
|
10
|
+
self.class.headers 'Accept' => 'application/json; version=2', "Authorization" => "token #{api_token}"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'capistrano/ci'
|
2
|
+
|
3
|
+
Capistrano::Configuration.instance(true).load do
|
4
|
+
namespace :ci do
|
5
|
+
desc "verification of branch build status on CI"
|
6
|
+
task :verify do
|
7
|
+
begin
|
8
|
+
client = Capistrano::CI::Client.new self
|
9
|
+
|
10
|
+
unless client.passed?(branch)
|
11
|
+
Capistrano::CLI.ui.say "Your '#{branch}' branch has '#{client.state(branch)}' state on CI."
|
12
|
+
Capistrano::CLI.ui.ask("Continue anyway? (y/N)") == 'y' or abort
|
13
|
+
end
|
14
|
+
rescue => e
|
15
|
+
Capistrano::CLI.ui.say "#{e.class.name}: #{e.message}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
class CIConfig < Hash
|
4
|
+
alias_method :exists?, :key?
|
5
|
+
end
|
6
|
+
|
7
|
+
describe Capistrano::CI::Client do
|
8
|
+
let(:config) do
|
9
|
+
config = CIConfig.new
|
10
|
+
config[:ci_client] = ci_client
|
11
|
+
config[:ci_repository] = "rails/rails"
|
12
|
+
config[:ci_access_token] = "token"
|
13
|
+
config
|
14
|
+
end
|
15
|
+
|
16
|
+
let(:client){ described_class.new(config) }
|
17
|
+
|
18
|
+
describe "#state" do
|
19
|
+
|
20
|
+
subject{ client.state("master") }
|
21
|
+
|
22
|
+
context "when travis" do
|
23
|
+
let(:ci_client){ "travis" }
|
24
|
+
let(:travis_client){ double(state: "passed") }
|
25
|
+
|
26
|
+
before do
|
27
|
+
Capistrano::CI::Clients::Travis.should_receive(:new).with("rails/rails").and_return(travis_client)
|
28
|
+
end
|
29
|
+
|
30
|
+
it{ should == "passed" }
|
31
|
+
end
|
32
|
+
|
33
|
+
context "when travis pro" do
|
34
|
+
let(:ci_client){ "travis_pro" }
|
35
|
+
let(:travis_client){ double(state: "passed") }
|
36
|
+
|
37
|
+
before do
|
38
|
+
Capistrano::CI::Clients::TravisPro.should_receive(:new).with("rails/rails","token").and_return(travis_client)
|
39
|
+
end
|
40
|
+
|
41
|
+
it{ should == "passed" }
|
42
|
+
end
|
43
|
+
|
44
|
+
context "when unsupported" do
|
45
|
+
let(:ci_client){ "unsupported" }
|
46
|
+
|
47
|
+
it{ expect{ subject }.to raise_error(Capistrano::CI::Client::NotFound) }
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "#passed?" do
|
52
|
+
subject{ client.passed?("master") }
|
53
|
+
|
54
|
+
context "when travis" do
|
55
|
+
let(:ci_client){ "travis" }
|
56
|
+
let(:travis_client){ double(passed?: true) }
|
57
|
+
|
58
|
+
before do
|
59
|
+
Capistrano::CI::Clients::Travis.should_receive(:new).with("rails/rails").and_return(travis_client)
|
60
|
+
end
|
61
|
+
|
62
|
+
it{ should == true }
|
63
|
+
end
|
64
|
+
|
65
|
+
context "when travis pro" do
|
66
|
+
let(:ci_client){ "travis_pro" }
|
67
|
+
let(:travis_client){ double(passed?: true) }
|
68
|
+
|
69
|
+
before do
|
70
|
+
Capistrano::CI::Clients::Travis.should_receive(:new).with("rails/rails","token").and_return(travis_client)
|
71
|
+
end
|
72
|
+
|
73
|
+
it{ should == true }
|
74
|
+
end
|
75
|
+
context "when unsupported" do
|
76
|
+
let(:ci_client){ "unsupported" }
|
77
|
+
|
78
|
+
it{ expect{ subject }.to raise_error(Capistrano::CI::Client::NotFound) }
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Capistrano::CI::Clients::Base do
|
4
|
+
describe "#passed?" do
|
5
|
+
subject{ described_class.new.passed?("master") }
|
6
|
+
|
7
|
+
it{ ->{ subject }.should raise_error(NotImplementedError) }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "#state" do
|
11
|
+
subject{ described_class.new.state("master") }
|
12
|
+
|
13
|
+
it{ ->{ subject }.should raise_error(NotImplementedError) }
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Capistrano::CI::Clients::TravisPro, :vcr do
|
4
|
+
let(:client){ described_class.new("rails/rails-private", "secret_token") }
|
5
|
+
|
6
|
+
describe "#passed?" do
|
7
|
+
subject{ client.passed?(branch_name) }
|
8
|
+
|
9
|
+
context "when passed" do
|
10
|
+
let(:branch_name){ "master" }
|
11
|
+
|
12
|
+
it{ should == true }
|
13
|
+
end
|
14
|
+
|
15
|
+
context "when not passed" do
|
16
|
+
let(:branch_name){ "events-framework" }
|
17
|
+
|
18
|
+
it{ should == false }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "#state" do
|
23
|
+
|
24
|
+
subject{ client.state(branch_name) }
|
25
|
+
|
26
|
+
context "when passed" do
|
27
|
+
let(:branch_name){ "master" }
|
28
|
+
|
29
|
+
it{ should == "passed" }
|
30
|
+
end
|
31
|
+
|
32
|
+
context "when not passed" do
|
33
|
+
let(:branch_name){ "events-framework" }
|
34
|
+
|
35
|
+
it{ should == "started" }
|
36
|
+
end
|
37
|
+
|
38
|
+
context "when repository was not found" do
|
39
|
+
let(:client){ described_class.new("rails/some_strange_repo", "secret_token") }
|
40
|
+
|
41
|
+
let(:branch_name){ "master" }
|
42
|
+
|
43
|
+
it{ expect{ subject }.to raise_error(Capistrano::CI::Clients::ResponseError) }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Capistrano::CI::Clients::Travis, :vcr do
|
4
|
+
describe "#passed?" do
|
5
|
+
subject{ client.passed?("master") }
|
6
|
+
|
7
|
+
context "when passed" do
|
8
|
+
let(:client){ described_class.new("rails/rails") }
|
9
|
+
|
10
|
+
it{ should == true }
|
11
|
+
end
|
12
|
+
|
13
|
+
context "when failed" do
|
14
|
+
let(:client){ described_class.new("railsware/zero_deploy") }
|
15
|
+
|
16
|
+
it{ should == false }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "#state" do
|
21
|
+
|
22
|
+
subject{ client.state("master") }
|
23
|
+
|
24
|
+
|
25
|
+
context "when passed" do
|
26
|
+
let(:client){ described_class.new("rails/rails") }
|
27
|
+
|
28
|
+
it{ should == "passed" }
|
29
|
+
end
|
30
|
+
|
31
|
+
context "when failed" do
|
32
|
+
let(:client){ described_class.new("railsware/zero_deploy") }
|
33
|
+
|
34
|
+
it{ should == "failed" }
|
35
|
+
end
|
36
|
+
|
37
|
+
context "when repository was not found" do
|
38
|
+
let(:client){ described_class.new("rails/some_strange_repo") }
|
39
|
+
|
40
|
+
it{ expect{ subject }.to raise_error(Capistrano::CI::Clients::ResponseError) }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
require 'vcr'
|
3
|
+
|
4
|
+
SimpleCov.start do
|
5
|
+
add_filter '/spec/'
|
6
|
+
|
7
|
+
add_group 'Libraries', '/lib/'
|
8
|
+
end
|
9
|
+
|
10
|
+
VCR.configure do |c|
|
11
|
+
c.cassette_library_dir = "spec/vcr"
|
12
|
+
c.hook_into :webmock
|
13
|
+
c.configure_rspec_metadata!
|
14
|
+
c.ignore_localhost = true
|
15
|
+
end
|
16
|
+
|
17
|
+
RSpec.configure do |config|
|
18
|
+
require "capistrano/ci"
|
19
|
+
|
20
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
21
|
+
config.run_all_when_everything_filtered = true
|
22
|
+
config.filter_run :focus
|
23
|
+
|
24
|
+
config.order = 'random'
|
25
|
+
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.travis-ci.org/repos/railsware/zero_deploy
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json; version=2
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Access-Control-Allow-Credentials:
|
18
|
+
- 'true'
|
19
|
+
Access-Control-Allow-Origin:
|
20
|
+
- ! '*'
|
21
|
+
Access-Control-Expose-Headers:
|
22
|
+
- Content-Type, Cache-Control, Expires, Etag, Last-Modified
|
23
|
+
Age:
|
24
|
+
- '0'
|
25
|
+
Cache-Control:
|
26
|
+
- no-cache
|
27
|
+
Content-Type:
|
28
|
+
- application/json;charset=utf-8
|
29
|
+
Date:
|
30
|
+
- Sat, 19 Oct 2013 08:57:28 GMT
|
31
|
+
Etag:
|
32
|
+
- ! '"239eb3427e8c413b25e58cba9ffe5b3d"'
|
33
|
+
Server:
|
34
|
+
- nginx/1.5.2
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Strict-Transport-Security:
|
38
|
+
- max-age=31536000
|
39
|
+
Vary:
|
40
|
+
- Accept,Accept-Encoding
|
41
|
+
X-Accepted-Oauth-Scopes:
|
42
|
+
- public
|
43
|
+
X-Content-Digest:
|
44
|
+
- 1683464301ae074e6fed5351396dda29178dc27f
|
45
|
+
X-Endpoint:
|
46
|
+
- Travis::Api::App::Endpoint::Repos
|
47
|
+
X-Oauth-Scopes:
|
48
|
+
- public
|
49
|
+
X-Pattern:
|
50
|
+
- /:owner_name/:name
|
51
|
+
X-Rack-Cache:
|
52
|
+
- miss, store
|
53
|
+
Content-Length:
|
54
|
+
- '318'
|
55
|
+
Connection:
|
56
|
+
- keep-alive
|
57
|
+
body:
|
58
|
+
encoding: US-ASCII
|
59
|
+
string: ! '{"repo":{"id":544757,"slug":"railsware/zero_deploy","description":"","last_build_id":5983202,"last_build_number":"2","last_build_state":"failed","last_build_duration":31,"last_build_language":null,"last_build_started_at":"2013-04-02T11:13:13Z","last_build_finished_at":"2013-04-02T11:13:30Z","github_language":"Ruby"}}'
|
60
|
+
http_version:
|
61
|
+
recorded_at: Sat, 19 Oct 2013 08:57:33 GMT
|
62
|
+
- request:
|
63
|
+
method: get
|
64
|
+
uri: https://api.travis-ci.org/repos/544757/branches/master
|
65
|
+
body:
|
66
|
+
encoding: US-ASCII
|
67
|
+
string: ''
|
68
|
+
headers:
|
69
|
+
Accept:
|
70
|
+
- application/json; version=2
|
71
|
+
response:
|
72
|
+
status:
|
73
|
+
code: 200
|
74
|
+
message: OK
|
75
|
+
headers:
|
76
|
+
Access-Control-Allow-Credentials:
|
77
|
+
- 'true'
|
78
|
+
Access-Control-Allow-Origin:
|
79
|
+
- ! '*'
|
80
|
+
Access-Control-Expose-Headers:
|
81
|
+
- Content-Type, Cache-Control, Expires, Etag, Last-Modified
|
82
|
+
Age:
|
83
|
+
- '0'
|
84
|
+
Cache-Control:
|
85
|
+
- no-cache
|
86
|
+
Content-Type:
|
87
|
+
- application/json;charset=utf-8
|
88
|
+
Date:
|
89
|
+
- Sat, 19 Oct 2013 08:57:29 GMT
|
90
|
+
Etag:
|
91
|
+
- ! '"8112a97fe15ce9bfbe1191c9368b5ae1"'
|
92
|
+
Server:
|
93
|
+
- nginx/1.5.2
|
94
|
+
Status:
|
95
|
+
- 200 OK
|
96
|
+
Strict-Transport-Security:
|
97
|
+
- max-age=31536000
|
98
|
+
Vary:
|
99
|
+
- Accept,Accept-Encoding
|
100
|
+
X-Accepted-Oauth-Scopes:
|
101
|
+
- public
|
102
|
+
X-Content-Digest:
|
103
|
+
- 9899e89a9ea15351cbc404d88f816de9910373b0
|
104
|
+
X-Endpoint:
|
105
|
+
- Travis::Api::App::Endpoint::Repos
|
106
|
+
X-Oauth-Scopes:
|
107
|
+
- public
|
108
|
+
X-Pattern:
|
109
|
+
- /:repository_id/branches/:branch
|
110
|
+
X-Rack-Cache:
|
111
|
+
- miss, store
|
112
|
+
Content-Length:
|
113
|
+
- '700'
|
114
|
+
Connection:
|
115
|
+
- keep-alive
|
116
|
+
body:
|
117
|
+
encoding: US-ASCII
|
118
|
+
string: ! '{"branch":{"id":5983202,"repository_id":544757,"commit_id":1766529,"number":"2","config":{"language":"ruby","rvm":["1.9.3","2.0.0"],".result":"configured"},"state":"failed","started_at":"2013-04-02T11:13:13Z","finished_at":"2013-04-02T11:13:30Z","duration":31,"job_ids":[5983203,5983204],"pull_request":false},"commit":{"id":1766529,"sha":"ef87117a529b2e20a34d9ddbdee82c6baf906abd","branch":"master","message":"CI
|
119
|
+
status added","committed_at":"2013-04-02T11:10:49Z","author_name":"gregolsen","author_email":"anotheroneman@yahoo.com","committer_name":"gregolsen","committer_email":"anotheroneman@yahoo.com","compare_url":"https://github.com/railsware/zero_deploy/compare/0a2aaa3d7050...ef87117a529b"}}'
|
120
|
+
http_version:
|
121
|
+
recorded_at: Sat, 19 Oct 2013 08:57:33 GMT
|
122
|
+
recorded_with: VCR 2.6.0
|