fuci-travis 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +26 -6
- data/bin/fuci +0 -2
- data/fuci-travis.gemspec +1 -1
- data/lib/fuci/travis/build.rb +3 -2
- data/lib/fuci/travis/cli_options.rb +15 -0
- data/lib/fuci/travis/version.rb +1 -1
- data/spec/lib/fuci/travis/build_spec.rb +6 -3
- data/spec/lib/fuci/travis/cli_options_spec.rb +26 -0
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3256a449901907f1fa2e79c9fa83982c98e0fc74
|
4
|
+
data.tar.gz: 53d44425b67a318275afdb00050465c3f4aeee42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 702d35200176a11b07263f05f11a078820da9f23c8bdffae8bf50e9653181405d2eaff573de8a75dbc8d39bf363f79114b6b71bce202527d082e35d394b01c31
|
7
|
+
data.tar.gz: ee49ffb4e29bd6c62c73e46c804f54fcc5f0169fbe24aeda66af06068fa4151d9f01971098804bf14c06be129eaead556f748ed043fbf0ef5f390b763cc4dbe0
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
# Fuci::Travis
|
2
|
+
[![Build Status](https://travis-ci.org/davejachimiak/fuci-travis.png?branch=master)](https://travis-ci.org/davejachimiak/fuci-travis)
|
2
3
|
|
3
|
-
Run Travis failures locally.
|
4
|
+
Run Travis failures locally. A [Fuci](https://github.com/davejachimiak/fuci) server extension.
|
4
5
|
|
5
6
|
## Installation
|
6
7
|
|
7
8
|
Add this line to your application's Gemfile:
|
8
9
|
|
9
|
-
gem 'fuci-travis', '~> 0.
|
10
|
+
gem 'fuci-travis', '~> 0.2'
|
10
11
|
|
11
12
|
And then execute:
|
12
13
|
|
13
14
|
$ bundle
|
14
15
|
|
15
|
-
|
16
|
+
Bundling the binstub is highly recommended:
|
16
17
|
|
17
|
-
$
|
18
|
+
$ bundle binstubs fuci-travis
|
18
19
|
|
19
20
|
## Configuration
|
20
21
|
### Configuration file
|
@@ -94,8 +95,11 @@ end
|
|
94
95
|
|
95
96
|
### Adding custom tester plugins
|
96
97
|
|
97
|
-
Fuci
|
98
|
-
|
98
|
+
Fuci tester plugins should return two things: Whether a failed build has
|
99
|
+
failed with a specific testing framework (e.g. RSpec, Cucumber) and the
|
100
|
+
command-line command that runs those specific failures. As of now, Fuci
|
101
|
+
ships with only an RSpec tester plugin. If you want to add custom
|
102
|
+
testers, add them in the configuration:
|
99
103
|
```ruby
|
100
104
|
Fuci::Travis.configure do |fu|
|
101
105
|
fu.add_testers Fuci::Spec, Fuci::Jasmine
|
@@ -107,6 +111,10 @@ See the base Fuci repo for more information on custom testers.
|
|
107
111
|
|
108
112
|
## Usage
|
109
113
|
|
114
|
+
See the
|
115
|
+
[base Fuci repo](https://github.com/davejachimiak/fuci#native-command-line-options)
|
116
|
+
for command-line options native to Fuci.
|
117
|
+
|
110
118
|
Run your latest ci failures locally:
|
111
119
|
```sh
|
112
120
|
$ fuci
|
@@ -123,6 +131,18 @@ on your local code:
|
|
123
131
|
$ fuci master
|
124
132
|
```
|
125
133
|
|
134
|
+
## Known incompatibilities/weirdnesses
|
135
|
+
* Build configurations with more than one job. Multiple jobs typically
|
136
|
+
mean test runs in different environments. Switching between these
|
137
|
+
environments locally and automatically can be tricky and may not even
|
138
|
+
be desirable.
|
139
|
+
|
140
|
+
## TODO
|
141
|
+
* Run failed tests from last pull request with some command-line option.
|
142
|
+
* Rake task that bootstraps project with gitignore'd config file,
|
143
|
+
complete with access_token and pro flag
|
144
|
+
* Support for multiple jobs per build (?)
|
145
|
+
|
126
146
|
## Contributing
|
127
147
|
|
128
148
|
1. Fork it
|
data/bin/fuci
CHANGED
data/fuci-travis.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency 'fuci', '~> 0.
|
21
|
+
spec.add_dependency 'fuci', '~> 0.2'
|
22
22
|
spec.add_dependency 'travis', '~> 1.4'
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
spec.add_development_dependency "minitest-spec-expect", "~> 0.1"
|
data/lib/fuci/travis/build.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'forwardable'
|
2
2
|
require 'fuci/git'
|
3
|
+
require 'fuci/travis/cli_options'
|
3
4
|
require 'fuci/travis/build/master'
|
4
5
|
|
5
6
|
module Fuci
|
@@ -39,8 +40,8 @@ module Fuci
|
|
39
40
|
|
40
41
|
def self.create
|
41
42
|
branch_name =
|
42
|
-
Fuci.
|
43
|
-
Fuci::Travis.default_branch
|
43
|
+
Fuci::Travis::CliOptions.branch ||
|
44
|
+
Fuci::Travis.default_branch ||
|
44
45
|
current_branch_name
|
45
46
|
|
46
47
|
from_branch_name branch_name
|
data/lib/fuci/travis/version.rb
CHANGED
@@ -2,6 +2,10 @@ require_relative '../../../spec_helper'
|
|
2
2
|
require_relative '../../../../lib/fuci/travis/build'
|
3
3
|
|
4
4
|
stub_class 'Fuci::Travis::Build::Master'
|
5
|
+
stub_class 'Fuci::Travis::CliOptions' do
|
6
|
+
public
|
7
|
+
def branch; end;
|
8
|
+
end
|
5
9
|
|
6
10
|
describe Fuci::Travis::Build do
|
7
11
|
describe '#initialize' do
|
@@ -72,13 +76,14 @@ describe Fuci::Travis::Build do
|
|
72
76
|
|
73
77
|
describe '.create' do
|
74
78
|
before do
|
79
|
+
@branch_from_cli = Fuci::Travis::CliOptions.stubs :branch
|
75
80
|
@expect_from_branch_name = Fuci::Travis::Build.expects :from_branch_name
|
76
81
|
end
|
77
82
|
|
78
83
|
describe 'a branch option is declared from the command line' do
|
79
84
|
before do
|
80
85
|
@branch = 'master'
|
81
|
-
|
86
|
+
@branch_from_cli.returns @branch
|
82
87
|
end
|
83
88
|
|
84
89
|
it 'takes priority' do
|
@@ -88,8 +93,6 @@ describe Fuci::Travis::Build do
|
|
88
93
|
end
|
89
94
|
|
90
95
|
describe 'a branch option is not declared from the command line' do
|
91
|
-
before { Fuci.stubs(:options).returns branch: nil }
|
92
|
-
|
93
96
|
describe 'a default branch is specfied on Fuci::Travis' do
|
94
97
|
before do
|
95
98
|
@branch = 'dj-ci'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require_relative '../../../spec_helper'
|
2
|
+
require_relative '../../../../lib/fuci/travis/cli_options'
|
3
|
+
|
4
|
+
stub_class 'Fuci::CliOptions'
|
5
|
+
|
6
|
+
describe Fuci::Travis::CliOptions do
|
7
|
+
describe '.branch' do
|
8
|
+
it 'returns the first argument to the command line' do
|
9
|
+
branch = 'branch'
|
10
|
+
Fuci::Travis::CliOptions.stubs(:argv).returns [branch]
|
11
|
+
expect(Fuci::Travis::CliOptions.branch).to_equal branch
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'returns nil if argv is empty' do
|
15
|
+
Fuci::Travis::CliOptions.stubs(:argv).returns []
|
16
|
+
expect(Fuci::Travis::CliOptions.branch).to_be_nil
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '.argv' do
|
21
|
+
it 'delegates to Fuci::CliOptions' do
|
22
|
+
Fuci::CliOptions.stubs(:argv).returns argv = mock
|
23
|
+
expect(Fuci::Travis::CliOptions.argv).to_equal argv
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fuci-travis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Jachimiak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fuci
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: travis
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,6 +103,7 @@ extensions: []
|
|
103
103
|
extra_rdoc_files: []
|
104
104
|
files:
|
105
105
|
- .gitignore
|
106
|
+
- CHANGELOG.md
|
106
107
|
- Gemfile
|
107
108
|
- LICENSE.txt
|
108
109
|
- README.md
|
@@ -112,10 +113,12 @@ files:
|
|
112
113
|
- lib/fuci/travis.rb
|
113
114
|
- lib/fuci/travis/build.rb
|
114
115
|
- lib/fuci/travis/build/master.rb
|
116
|
+
- lib/fuci/travis/cli_options.rb
|
115
117
|
- lib/fuci/travis/server.rb
|
116
118
|
- lib/fuci/travis/version.rb
|
117
119
|
- spec/lib/fuci/travis/build/master_spec.rb
|
118
120
|
- spec/lib/fuci/travis/build_spec.rb
|
121
|
+
- spec/lib/fuci/travis/cli_options_spec.rb
|
119
122
|
- spec/lib/fuci/travis/server_spec.rb
|
120
123
|
- spec/lib/fuci/travis_spec.rb
|
121
124
|
- spec/spec_helper.rb
|
@@ -146,6 +149,7 @@ summary: Run failures from your recent Travis builds locally.
|
|
146
149
|
test_files:
|
147
150
|
- spec/lib/fuci/travis/build/master_spec.rb
|
148
151
|
- spec/lib/fuci/travis/build_spec.rb
|
152
|
+
- spec/lib/fuci/travis/cli_options_spec.rb
|
149
153
|
- spec/lib/fuci/travis/server_spec.rb
|
150
154
|
- spec/lib/fuci/travis_spec.rb
|
151
155
|
- spec/spec_helper.rb
|