travis 1.5.9.travis.358.4 → 1.5.9.travis.360.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +43 -1
- data/bin/travis +6 -2
- data/lib/travis/cli/command.rb +26 -4
- data/lib/travis/cli.rb +1 -0
- data/lib/travis/tools/system.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzhjYzU1NGE5NzM2N2Y0MzgzOWI5YzFhMTU1ODU1NzEyZTYyNjUwYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGMyODliMzkwZTk2ZDEwNGY0YjFlZjEwOTI2Y2FkMjQzZTY2Y2MxMg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTQ3MDQxNTRiMDdjMjczOWIzOWI1YjJjMzA4MTE2OThiMjc5NTk4NzQ3ZjVh
|
10
|
+
YmFhNjY0OWRlMTgwMzdkZGFkM2Q3NzVjY2FmMGNkMzEyN2I3YWFiNWJjMjU0
|
11
|
+
ODNjYzExYWZjOTE5MjE5YWVmMDEyNDY5Y2I5OThjMzRkNTYyMGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODgxNTkyZTZkMTBkZTViMmUwN2RiOTAxMTQ4MmZlODQxYTI2NDVmMTE2NGE1
|
14
|
+
N2Y5ZGY5YjQ0NTc3MTFhZTk0MTUzZDU1YmNhY2Q4NTBjZTAxMTgwNWJlMTJk
|
15
|
+
MGMxMDc2NmZhYjE0ODQ3ZWUzNWYwYjJkYjNiZTBhM2M2OGY5MGY=
|
data/README.md
CHANGED
@@ -17,6 +17,7 @@ The [travis gem](https://rubygems.org/gems/travis) includes both a [command line
|
|
17
17
|
* [`login`](#login)
|
18
18
|
* [`monitor`](#monitor)
|
19
19
|
* [`raw`](#raw)
|
20
|
+
* [`report`](#report)
|
20
21
|
* [`sync`](#sync)
|
21
22
|
* [`token`](#token)
|
22
23
|
* [`whatsup`](#whatsup)
|
@@ -268,7 +269,44 @@ This is really helpful both when working on this client and when exploring the [
|
|
268
269
|
|
269
270
|
Use `--json` if you'd rather prefer the output to be JSON.
|
270
271
|
|
271
|
-
|
272
|
+
#### `report`
|
273
|
+
|
274
|
+
When inspecting a bug or reporting an issue, it can be handy to include a report about the system and configuration used for running a command.
|
275
|
+
|
276
|
+
$ travis report --pro
|
277
|
+
System
|
278
|
+
Ruby: Ruby 2.0.0-p195
|
279
|
+
Operating System: Mac OS X 10.8.5
|
280
|
+
RubyGems: RubyGems 2.0.7
|
281
|
+
|
282
|
+
CLI
|
283
|
+
Version: 1.5.8
|
284
|
+
Plugins: "travis-as-user", "travis-build", "travis-cli-pr"
|
285
|
+
Auto-Completion: yes
|
286
|
+
Last Version Check: 2013-11-02 16:25:03 +0100
|
287
|
+
|
288
|
+
Session
|
289
|
+
API Endpoint: https://api.travis-ci.com/
|
290
|
+
Logged In: as "rkh"
|
291
|
+
Verify SSL: yes
|
292
|
+
Enterprise: no
|
293
|
+
|
294
|
+
Endpoints
|
295
|
+
pro: https://api.travis-ci.com/ (access token, current)
|
296
|
+
org: https://api.travis-ci.org/ (access token)
|
297
|
+
|
298
|
+
Last Exception
|
299
|
+
An error occurred running `travis whoami --pro`:
|
300
|
+
Travis::Client::Error: access denied
|
301
|
+
from ...
|
302
|
+
|
303
|
+
|
304
|
+
For issues with the command line tool, please visit https://github.com/travis-ci/travis/issues.
|
305
|
+
For Travis CI in general, go to https://github.com/travis-ci/travis-ci/issues or email support@travis-ci.com.
|
306
|
+
|
307
|
+
This command can also list all known repos and the endpoint to use for them via the `--known-repos` option.
|
308
|
+
|
309
|
+
#### `sync`
|
272
310
|
|
273
311
|
Usage: travis sync [options]
|
274
312
|
-h, --help Display help
|
@@ -1316,6 +1354,10 @@ If you have the old `travis-cli` gem installed, you should `gem uninstall travis
|
|
1316
1354
|
|
1317
1355
|
## Version History
|
1318
1356
|
|
1357
|
+
**1.5.9** (not yet released)
|
1358
|
+
|
1359
|
+
* Add `travis report` to give a report of the system, endpoint, configuration and last exception.
|
1360
|
+
|
1319
1361
|
**1.5.8** (October 24, 2013)
|
1320
1362
|
|
1321
1363
|
* Fix bug in completion code that stopped command line client from running.
|
data/bin/travis
CHANGED
@@ -8,8 +8,12 @@ Encoding.default_external = Encoding::UTF_8 if defined? Encoding
|
|
8
8
|
require 'travis/cli'
|
9
9
|
|
10
10
|
# load plugins
|
11
|
-
|
12
|
-
|
11
|
+
TRAVIS_PLUGINS = []
|
12
|
+
config_path = ENV.fetch('TRAVIS_CONFIG_PATH') { File.expand_path('.travis', Dir.home) }
|
13
|
+
Dir.glob(File.expand_path('*/init.rb', config_path)) do |file|
|
14
|
+
TRAVIS_PLUGINS << file.sub(config_path + '/', '').sub(/\/init\.rb$/, '')
|
15
|
+
load(file)
|
16
|
+
end
|
13
17
|
|
14
18
|
# and off we go then
|
15
19
|
Travis::CLI.run(ARGV)
|
data/lib/travis/cli/command.rb
CHANGED
@@ -54,8 +54,8 @@ module Travis
|
|
54
54
|
@@abstract << self
|
55
55
|
end
|
56
56
|
|
57
|
-
def self.skip(
|
58
|
-
define_method(
|
57
|
+
def self.skip(*names)
|
58
|
+
names.each { |n| define_method(n) {} }
|
59
59
|
end
|
60
60
|
|
61
61
|
def self.description(description = nil)
|
@@ -157,12 +157,15 @@ module Travis
|
|
157
157
|
check_completion
|
158
158
|
setup
|
159
159
|
run(*arguments)
|
160
|
+
clear_error
|
160
161
|
store_config
|
161
162
|
rescue StandardError => e
|
162
163
|
raise(e) if explode?
|
163
164
|
message = e.message
|
164
|
-
message += " -
|
165
|
-
error
|
165
|
+
message += " - try running #{command("login#{endpoint_option}")}" if Travis::Client::Error === e and message == 'access denied'
|
166
|
+
message += color("\nfor a full error report, run #{command("report#{endpoint_option}")}", :error) if interactive?
|
167
|
+
store_error(e)
|
168
|
+
error(message)
|
166
169
|
end
|
167
170
|
|
168
171
|
def command_name
|
@@ -212,6 +215,16 @@ module Travis
|
|
212
215
|
|
213
216
|
private
|
214
217
|
|
218
|
+
def store_error(exception)
|
219
|
+
message = "An error occurred running `travis %s%s`:\n %p: %s\n" % [command_name, endpoint_option, exception.class, exception.message]
|
220
|
+
exception.backtrace.each { |l| message << " from #{l}\n" }
|
221
|
+
save_file("error.log", message)
|
222
|
+
end
|
223
|
+
|
224
|
+
def clear_error
|
225
|
+
delete_file("error.log")
|
226
|
+
end
|
227
|
+
|
215
228
|
def setup_trap
|
216
229
|
[:INT, :TERM].each do |signal|
|
217
230
|
trap signal do
|
@@ -278,6 +291,11 @@ module Travis
|
|
278
291
|
File.exist?(path) ? File.read(path) : default
|
279
292
|
end
|
280
293
|
|
294
|
+
def delete_file(name)
|
295
|
+
path = config_path(name)
|
296
|
+
File.delete(path) if File.exist?(path)
|
297
|
+
end
|
298
|
+
|
281
299
|
def save_file(name, content)
|
282
300
|
File.write(config_path(name), content.to_s)
|
283
301
|
end
|
@@ -305,6 +323,10 @@ module Travis
|
|
305
323
|
say help
|
306
324
|
end
|
307
325
|
end
|
326
|
+
|
327
|
+
def endpoint_option
|
328
|
+
""
|
329
|
+
end
|
308
330
|
end
|
309
331
|
end
|
310
332
|
end
|
data/lib/travis/cli.rb
CHANGED
@@ -36,6 +36,7 @@ module Travis
|
|
36
36
|
autoload :Pubkey, 'travis/cli/pubkey'
|
37
37
|
autoload :Raw, 'travis/cli/raw'
|
38
38
|
autoload :RepoCommand, 'travis/cli/repo_command'
|
39
|
+
autoload :Report, 'travis/cli/report'
|
39
40
|
autoload :Restart, 'travis/cli/restart'
|
40
41
|
autoload :Setup, 'travis/cli/setup'
|
41
42
|
autoload :Show, 'travis/cli/show'
|
data/lib/travis/tools/system.rb
CHANGED
@@ -19,6 +19,10 @@ module Travis
|
|
19
19
|
@os ||= windows? ? "Windows" : `uname`.chomp
|
20
20
|
end
|
21
21
|
|
22
|
+
def full_os
|
23
|
+
@full_os ||= mac? ? "#{`sw_vers -productName`.chomp} #{`sw_vers -productVersion`.chomp}" : os
|
24
|
+
end
|
25
|
+
|
22
26
|
def ruby_engine
|
23
27
|
defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
|
24
28
|
end
|
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.9.travis.
|
4
|
+
version: 1.5.9.travis.360.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
@@ -28,7 +28,7 @@ authors:
|
|
28
28
|
autorequire:
|
29
29
|
bindir: bin
|
30
30
|
cert_chain: []
|
31
|
-
date: 2013-
|
31
|
+
date: 2013-11-02 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: faraday
|