travis 1.5.3 → 1.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Travis
2
- VERSION = '1.5.3'
2
+ VERSION = '1.5.4'
3
3
  end
@@ -22,6 +22,11 @@ describe Travis::CLI::Endpoint do
22
22
  stdout.should be == "http://localhost:3000/\n"
23
23
  end
24
24
 
25
+ example "travis endpoint --github" do
26
+ run_cli('endpoint', '--github').should be_success
27
+ stdout.should be == "https://api.github.com\n"
28
+ end
29
+
25
30
  example "travis endpoint -i" do
26
31
  run_cli('endpoint', '-i').should be_success
27
32
  stdout.should be == "API endpoint: https://api.travis-ci.org/\n"
@@ -1,26 +1,28 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Travis::CLI::Init do
4
+ old_path = Dir.pwd
5
+ tmp_path = File.expand_path('travis-spec-init', Dir.tmpdir)
6
+
4
7
  before(:each) do
5
- FileUtils.mkdir_p "spec/tmp"
6
- Dir.chdir "spec/tmp"
8
+ FileUtils.mkdir_p(tmp_path)
9
+ Dir.chdir(tmp_path)
7
10
  FileUtils.rm('.travis.yml') if File.exist?('.travis.yml')
8
11
  end
9
12
 
10
13
  after(:each) do
11
- Dir.chdir ".."
12
- FileUtils.rm('spec/tmp/.travis.yml') if File.exist?('spec/tmp/.travis.yml')
14
+ Dir.chdir(old_path)
13
15
  end
14
16
 
15
17
  example "travis init fakelanguage" do
16
- run_cli('init', 'fakelanguage', '--skip-enable').should_not be_success
18
+ run_cli('init', 'fakelanguage', '--skip-enable', '-r', 'travis-ci/travis').should_not be_success
17
19
  stderr.should be == "unknown language fakelanguage\n"
18
20
  end
19
21
 
20
22
  shared_examples_for 'travis init' do |language|
21
23
  example "travis init #{language} (empty directory)" do
22
24
  File.exist?('.travis.yml').should be_false
23
- run_cli('init', language, '--skip-enable').should be_success
25
+ run_cli('init', language, '--skip-enable', '-r', 'travis-ci/travis').should be_success
24
26
  stdout.should be == ".travis.yml file created!\n"
25
27
  File.exist?('.travis.yml').should be_true
26
28
  File.read('.travis.yml').should include("language: #{language}")
@@ -28,14 +30,14 @@ describe Travis::CLI::Init do
28
30
 
29
31
  example "travis init #{language} (.travis.yml already exists, using --force)" do
30
32
  File.open(".travis.yml", "w") { |f| f << "old file" }
31
- run_cli('init', language, '--force', '--skip-enable').should be_success
33
+ run_cli('init', language, '--force', '--skip-enable', '-r', 'travis-ci/travis').should be_success
32
34
  stdout.should be == ".travis.yml file created!\n"
33
35
  File.read(".travis.yml").should_not be == "old file"
34
36
  end
35
37
 
36
38
  example "travis init #{language} (.travis.yml already exists, not using --force)" do
37
39
  File.open(".travis.yml", "w") { |f| f << "old file" }
38
- run_cli('init', language, '--skip-enable').should_not be_success
40
+ run_cli('init', language, '--skip-enable', '-r', 'travis-ci/travis').should_not be_success
39
41
  stderr.should be == ".travis.yml already exists, use --force to override\n"
40
42
  File.read('.travis.yml').should be == "old file"
41
43
  end
@@ -45,7 +47,7 @@ describe Travis::CLI::Init do
45
47
  it_should_behave_like 'travis init', 'c'
46
48
 
47
49
  let :result do
48
- run_cli('init', 'c', '--skip-enable')
50
+ run_cli('init', 'c', '--skip-enable', '-r', 'travis-ci/travis')
49
51
  YAML.load_file('.travis.yml')
50
52
  end
51
53
 
@@ -64,7 +66,7 @@ describe Travis::CLI::Init do
64
66
  it_should_behave_like 'travis init', 'cpp'
65
67
 
66
68
  let :result do
67
- run_cli('init', 'cpp', '--skip-enable')
69
+ run_cli('init', 'cpp', '--skip-enable', '-r', 'travis-ci/travis')
68
70
  YAML.load_file('.travis.yml')
69
71
  end
70
72
 
@@ -79,7 +81,7 @@ describe Travis::CLI::Init do
79
81
  it_should_behave_like 'travis init', 'erlang'
80
82
 
81
83
  let :result do
82
- run_cli('init', 'erlang', '--skip-enable')
84
+ run_cli('init', 'erlang', '--skip-enable', '-r', 'travis-ci/travis')
83
85
  YAML.load_file('.travis.yml')
84
86
  end
85
87
 
@@ -93,7 +95,7 @@ describe Travis::CLI::Init do
93
95
  it_should_behave_like 'travis init', 'go'
94
96
 
95
97
  let :result do
96
- run_cli('init', 'go', '--skip-enable')
98
+ run_cli('init', 'go', '--skip-enable', '-r', 'travis-ci/travis')
97
99
  YAML.load_file('.travis.yml')
98
100
  end
99
101
 
@@ -116,7 +118,7 @@ describe Travis::CLI::Init do
116
118
  it_should_behave_like 'travis init', 'java'
117
119
 
118
120
  let :result do
119
- run_cli('init', 'java', '--skip-enable')
121
+ run_cli('init', 'java', '--skip-enable', '-r', 'travis-ci/travis')
120
122
  YAML.load_file('.travis.yml')
121
123
  end
122
124
 
@@ -131,7 +133,7 @@ describe Travis::CLI::Init do
131
133
  it_should_behave_like 'travis init', 'node_js'
132
134
 
133
135
  let :result do
134
- run_cli('init', 'node_js', '--skip-enable')
136
+ run_cli('init', 'node_js', '--skip-enable', '-r', 'travis-ci/travis')
135
137
  YAML.load_file('.travis.yml')
136
138
  end
137
139
 
@@ -150,7 +152,7 @@ describe Travis::CLI::Init do
150
152
  it_should_behave_like 'travis init', 'perl'
151
153
 
152
154
  let :result do
153
- run_cli('init', 'perl', '--skip-enable')
155
+ run_cli('init', 'perl', '--skip-enable', '-r', 'travis-ci/travis')
154
156
  YAML.load_file('.travis.yml')
155
157
  end
156
158
 
@@ -165,7 +167,7 @@ describe Travis::CLI::Init do
165
167
  it_should_behave_like 'travis init', 'php'
166
168
 
167
169
  let :result do
168
- run_cli('init', 'php', '--skip-enable')
170
+ run_cli('init', 'php', '--skip-enable', '-r', 'travis-ci/travis')
169
171
  YAML.load_file('.travis.yml')
170
172
  end
171
173
 
@@ -180,7 +182,7 @@ describe Travis::CLI::Init do
180
182
  it_should_behave_like 'travis init', 'python'
181
183
 
182
184
  let :result do
183
- run_cli('init', 'python', '--skip-enable')
185
+ run_cli('init', 'python', '--skip-enable', '-r', 'travis-ci/travis')
184
186
  YAML.load_file('.travis.yml')
185
187
  end
186
188
 
@@ -195,7 +197,7 @@ describe Travis::CLI::Init do
195
197
  it_should_behave_like 'travis init', 'ruby'
196
198
 
197
199
  let :result do
198
- run_cli('init', 'ruby', '--skip-enable')
200
+ run_cli('init', 'ruby', '--skip-enable', '-r', 'travis-ci/travis')
199
201
  YAML.load_file('.travis.yml')
200
202
  end
201
203
 
@@ -211,7 +213,7 @@ describe Travis::CLI::Init do
211
213
  it_should_behave_like 'travis init', 'scala'
212
214
 
213
215
  let :result do
214
- run_cli('init', 'scala', '--skip-enable')
216
+ run_cli('init', 'scala', '--skip-enable', '-r', 'travis-ci/travis')
215
217
  YAML.load_file('.travis.yml')
216
218
  end
217
219
 
@@ -14,6 +14,7 @@ describe Travis::Client::Repository do
14
14
  its(:key) { should be_a(Travis::Client::Repository::Key) }
15
15
  its(:last_build) { should be_a(Travis::Client::Build) }
16
16
  its(:color) { should be == 'red' }
17
+ its(:github_language) { should be == 'Ruby' }
17
18
 
18
19
  it { should_not be_pending }
19
20
  it { should be_started }
@@ -54,6 +54,22 @@ describe Travis::Client::Session do
54
54
  Travis::Client::Session.new(:headers => {'foo' => 'bar'}, :uri => 'http://localhost:3000/').
55
55
  connection.headers['foo'].should be == 'bar'
56
56
  end
57
+
58
+ it 'sets a User-Agent' do
59
+ subject.headers['User-Agent'].should include("Travis/#{Travis::VERSION}")
60
+ subject.headers['User-Agent'].should include("Faraday/#{Faraday::VERSION}")
61
+ subject.headers['User-Agent'].should include("Rack/#{Rack.version}")
62
+ subject.headers['User-Agent'].should include("Ruby #{RUBY_VERSION}")
63
+ end
64
+
65
+ it 'allows adding custom infos to the User-Agent' do
66
+ subject.agent_info = "foo"
67
+ subject.headers['User-Agent'].should include("foo")
68
+ subject.headers['User-Agent'].should include("Travis/#{Travis::VERSION}")
69
+ subject.headers['User-Agent'].should include("Faraday/#{Faraday::VERSION}")
70
+ subject.headers['User-Agent'].should include("Rack/#{Rack.version}")
71
+ subject.headers['User-Agent'].should include("Ruby #{RUBY_VERSION}")
72
+ end
57
73
  end
58
74
 
59
75
  describe "find_one" do
@@ -678,7 +678,8 @@ module Travis
678
678
  "last_build_duration"=>5019,
679
679
  "last_build_language"=>nil,
680
680
  "last_build_started_at"=>"2013-01-13T15:55:17Z",
681
- "last_build_finished_at"=>nil}}.to_json
681
+ "last_build_finished_at"=>nil,
682
+ "github_language"=>"Ruby"}}.to_json
682
683
  end
683
684
 
684
685
  get '/repos/891/key' do
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  # general infos
4
4
  s.name = "travis"
5
- s.version = "1.5.3"
5
+ s.version = "1.5.4"
6
6
  s.description = "CLI and Ruby client library for Travis CI"
7
7
  s.homepage = "https://github.com/travis-ci/travis"
8
8
  s.summary = "Travis CI client"
@@ -18,17 +18,18 @@ Gem::Specification.new do |s|
18
18
  "Max Barnash",
19
19
  "Aaron Hill",
20
20
  "Mathias Meyer",
21
+ "Jacob Burkhart",
21
22
  "Josh Kalderimis",
22
23
  "Justin Lambert",
23
- "Adrien Brault",
24
- "Laurent Petit",
25
- "Daniel Chatfield",
24
+ "Adam Lavin",
25
+ "Benjamin Manns",
26
+ "Mario Visic",
26
27
  "Piotr Sarnacki",
27
28
  "Rapha\xC3\xABl Pinson",
28
29
  "Tobias Wilken",
29
- "Mario Visic",
30
- "Benjamin Manns",
31
- "Jacob Burkhart"
30
+ "Laurent Petit",
31
+ "Daniel Chatfield",
32
+ "Adrien Brault"
32
33
  ]
33
34
 
34
35
  # generated from git shortlog -sne
@@ -39,17 +40,18 @@ Gem::Specification.new do |s|
39
40
  "i.am@anhero.ru",
40
41
  "aa1ronham@gmail.com",
41
42
  "meyer@paperplanes.de",
43
+ "josh.kalderimis@gmail.com",
42
44
  "jlambert@eml.cc",
43
- "benmanns@gmail.com",
44
45
  "adrien.brault@gmail.com",
45
- "laurent.petit@gmail.com",
46
+ "adam@lavoaster.co.uk",
46
47
  "chatfielddaniel@gmail.com",
48
+ "mario@mariovisic.com",
47
49
  "drogus@gmail.com",
48
50
  "raphael.pinson@camptocamp.com",
49
51
  "tw@cloudcontrol.de",
50
- "mario@mariovisic.com",
51
- "jburkhart@engineyard.com",
52
- "josh.kalderimis@gmail.com"
52
+ "laurent.petit@gmail.com",
53
+ "benmanns@gmail.com",
54
+ "jburkhart@engineyard.com"
53
55
  ]
54
56
 
55
57
  # generated from git ls-files
@@ -60,6 +62,7 @@ Gem::Specification.new do |s|
60
62
  "bin/travis",
61
63
  "completion/extconf.rb",
62
64
  "completion/travis.sh",
65
+ "completion/travis.sh.erb",
63
66
  "example/org_overview.rb",
64
67
  "lib/travis.rb",
65
68
  "lib/travis/cacert.pem",
@@ -102,6 +105,15 @@ Gem::Specification.new do |s|
102
105
  "lib/travis/cli/repo_command.rb",
103
106
  "lib/travis/cli/restart.rb",
104
107
  "lib/travis/cli/setup.rb",
108
+ "lib/travis/cli/setup/cloud_control.rb",
109
+ "lib/travis/cli/setup/cloud_foundry.rb",
110
+ "lib/travis/cli/setup/engine_yard.rb",
111
+ "lib/travis/cli/setup/heroku.rb",
112
+ "lib/travis/cli/setup/nodejitsu.rb",
113
+ "lib/travis/cli/setup/open_shift.rb",
114
+ "lib/travis/cli/setup/ruby_gems.rb",
115
+ "lib/travis/cli/setup/sauce_connect.rb",
116
+ "lib/travis/cli/setup/service.rb",
105
117
  "lib/travis/cli/show.rb",
106
118
  "lib/travis/cli/status.rb",
107
119
  "lib/travis/cli/sync.rb",
@@ -129,6 +141,7 @@ Gem::Specification.new do |s|
129
141
  "lib/travis/client/worker.rb",
130
142
  "lib/travis/pro.rb",
131
143
  "lib/travis/tools/formatter.rb",
144
+ "lib/travis/tools/notification.rb",
132
145
  "lib/travis/tools/safe_string.rb",
133
146
  "lib/travis/tools/system.rb",
134
147
  "lib/travis/tools/token_finder.rb",
@@ -176,11 +189,12 @@ Gem::Specification.new do |s|
176
189
  s.add_dependency "highline", "~> 1.6"
177
190
  s.add_dependency "netrc", "~> 0.7"
178
191
  s.add_dependency "backports"
179
- s.add_dependency "gh"
192
+ s.add_dependency "gh", "~> 0.13"
180
193
  s.add_dependency "launchy", "~> 2.1"
181
194
  s.add_dependency "pry", "~> 0.9"
182
- s.add_dependency "typhoeus", "~> 0.5"
195
+ s.add_dependency "typhoeus", "~> 0.6"
183
196
  s.add_dependency "pusher-client", "~> 0.3", ">= 0.3.1"
197
+ s.add_dependency "terminal-notifier", ">= 1.4.2"
184
198
  s.add_development_dependency "rspec", "~> 2.12"
185
199
  s.add_development_dependency "sinatra", "~> 1.3"
186
200
  s.add_development_dependency "rack-test", "~> 0.6"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: travis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
@@ -10,21 +10,22 @@ authors:
10
10
  - Max Barnash
11
11
  - Aaron Hill
12
12
  - Mathias Meyer
13
+ - Jacob Burkhart
13
14
  - Josh Kalderimis
14
15
  - Justin Lambert
15
- - Adrien Brault
16
- - Laurent Petit
17
- - Daniel Chatfield
16
+ - Adam Lavin
17
+ - Benjamin Manns
18
+ - Mario Visic
18
19
  - Piotr Sarnacki
19
20
  - Raphaël Pinson
20
21
  - Tobias Wilken
21
- - Mario Visic
22
- - Benjamin Manns
23
- - Jacob Burkhart
22
+ - Laurent Petit
23
+ - Daniel Chatfield
24
+ - Adrien Brault
24
25
  autorequire:
25
26
  bindir: bin
26
27
  cert_chain: []
27
- date: 2013-08-22 00:00:00.000000000 Z
28
+ date: 2013-09-07 00:00:00.000000000 Z
28
29
  dependencies:
29
30
  - !ruby/object:Gem::Dependency
30
31
  name: faraday
@@ -100,16 +101,16 @@ dependencies:
100
101
  name: gh
101
102
  requirement: !ruby/object:Gem::Requirement
102
103
  requirements:
103
- - - '>='
104
+ - - ~>
104
105
  - !ruby/object:Gem::Version
105
- version: '0'
106
+ version: '0.13'
106
107
  type: :runtime
107
108
  prerelease: false
108
109
  version_requirements: !ruby/object:Gem::Requirement
109
110
  requirements:
110
- - - '>='
111
+ - - ~>
111
112
  - !ruby/object:Gem::Version
112
- version: '0'
113
+ version: '0.13'
113
114
  - !ruby/object:Gem::Dependency
114
115
  name: launchy
115
116
  requirement: !ruby/object:Gem::Requirement
@@ -144,14 +145,14 @@ dependencies:
144
145
  requirements:
145
146
  - - ~>
146
147
  - !ruby/object:Gem::Version
147
- version: '0.5'
148
+ version: '0.6'
148
149
  type: :runtime
149
150
  prerelease: false
150
151
  version_requirements: !ruby/object:Gem::Requirement
151
152
  requirements:
152
153
  - - ~>
153
154
  - !ruby/object:Gem::Version
154
- version: '0.5'
155
+ version: '0.6'
155
156
  - !ruby/object:Gem::Dependency
156
157
  name: pusher-client
157
158
  requirement: !ruby/object:Gem::Requirement
@@ -172,6 +173,20 @@ dependencies:
172
173
  - - '>='
173
174
  - !ruby/object:Gem::Version
174
175
  version: 0.3.1
176
+ - !ruby/object:Gem::Dependency
177
+ name: terminal-notifier
178
+ requirement: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - '>='
181
+ - !ruby/object:Gem::Version
182
+ version: 1.4.2
183
+ type: :runtime
184
+ prerelease: false
185
+ version_requirements: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - '>='
188
+ - !ruby/object:Gem::Version
189
+ version: 1.4.2
175
190
  - !ruby/object:Gem::Dependency
176
191
  name: rspec
177
192
  requirement: !ruby/object:Gem::Requirement
@@ -222,17 +237,18 @@ email:
222
237
  - i.am@anhero.ru
223
238
  - aa1ronham@gmail.com
224
239
  - meyer@paperplanes.de
240
+ - josh.kalderimis@gmail.com
225
241
  - jlambert@eml.cc
226
- - benmanns@gmail.com
227
242
  - adrien.brault@gmail.com
228
- - laurent.petit@gmail.com
243
+ - adam@lavoaster.co.uk
229
244
  - chatfielddaniel@gmail.com
245
+ - mario@mariovisic.com
230
246
  - drogus@gmail.com
231
247
  - raphael.pinson@camptocamp.com
232
248
  - tw@cloudcontrol.de
233
- - mario@mariovisic.com
249
+ - laurent.petit@gmail.com
250
+ - benmanns@gmail.com
234
251
  - jburkhart@engineyard.com
235
- - josh.kalderimis@gmail.com
236
252
  executables:
237
253
  - travis
238
254
  extensions:
@@ -245,6 +261,7 @@ files:
245
261
  - bin/travis
246
262
  - completion/extconf.rb
247
263
  - completion/travis.sh
264
+ - completion/travis.sh.erb
248
265
  - example/org_overview.rb
249
266
  - lib/travis.rb
250
267
  - lib/travis/cacert.pem
@@ -287,6 +304,15 @@ files:
287
304
  - lib/travis/cli/repo_command.rb
288
305
  - lib/travis/cli/restart.rb
289
306
  - lib/travis/cli/setup.rb
307
+ - lib/travis/cli/setup/cloud_control.rb
308
+ - lib/travis/cli/setup/cloud_foundry.rb
309
+ - lib/travis/cli/setup/engine_yard.rb
310
+ - lib/travis/cli/setup/heroku.rb
311
+ - lib/travis/cli/setup/nodejitsu.rb
312
+ - lib/travis/cli/setup/open_shift.rb
313
+ - lib/travis/cli/setup/ruby_gems.rb
314
+ - lib/travis/cli/setup/sauce_connect.rb
315
+ - lib/travis/cli/setup/service.rb
290
316
  - lib/travis/cli/show.rb
291
317
  - lib/travis/cli/status.rb
292
318
  - lib/travis/cli/sync.rb
@@ -314,6 +340,7 @@ files:
314
340
  - lib/travis/client/worker.rb
315
341
  - lib/travis/pro.rb
316
342
  - lib/travis/tools/formatter.rb
343
+ - lib/travis/tools/notification.rb
317
344
  - lib/travis/tools/safe_string.rb
318
345
  - lib/travis/tools/system.rb
319
346
  - lib/travis/tools/token_finder.rb
@@ -373,7 +400,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
373
400
  version: '0'
374
401
  requirements: []
375
402
  rubyforge_project:
376
- rubygems_version: 2.0.5
403
+ rubygems_version: 2.0.7
377
404
  signing_key:
378
405
  specification_version: 4
379
406
  summary: Travis CI client