travis 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43bd32ce16eb549066ab5484c7da1736b64f60ff
4
- data.tar.gz: 999f1b38a292b48c210df8046d798852880e12dc
3
+ metadata.gz: 5e9ba04f7bc2ce5298cc1449e4d2835b26539b2f
4
+ data.tar.gz: 3dc663c0c3726335d2e5393023ddf1ba4c187bb4
5
5
  SHA512:
6
- metadata.gz: 1927ceed3d07a753e7ccde4dd7e952daded43bb974c069a59d88efbf71d5d604c789bfbfd2325b213e854cbb1b71252a9194ec72e5f9ac2a8303a0797bd49f89
7
- data.tar.gz: 64ab6d079c38d482810cfebdba22e9b3a5c7fe3cc546252d336e57c4188e9a4f9df1772e052dfe887ca82e301cd5575a9c821959cfb95544731a08dd09368db4
6
+ metadata.gz: d08eecff707521d33acd5466764e151cb7e687fe4b191ffa12ee5ea2cb481ec9aa9aed8a4cef5b80b544757c97b97bbdded7c03daeffd86a4a0e0b3423b5d326
7
+ data.tar.gz: 70f7ea86abb1f3260ccae4d34d337d61d00f7ba7579507d2be669e149fc9c6c2bb0e9fffcff91e1c6f2f16c87393ba3829fd1065a2c77a0ae0327f10ba78714e
data/README.md CHANGED
@@ -233,6 +233,18 @@ It's just a tiny feature, but it allows you to take a look at repositories that
233
233
  qcubed/framework failed: #21
234
234
  ...
235
235
 
236
+ If you only want to see what happened in your repositories, add the `--my-repos` flag (short: `-m`):
237
+
238
+ $ travis whatsup -m
239
+ travis-ci/travis passed: #169
240
+ rkh/dpl passed: #50
241
+ rubinius/rubinius passed: #3235
242
+ sinatra/sinatra errored: #619
243
+ rtomayko/tilt failed: #162
244
+ ruby-no-kai/rubykaigi2013 passed: #50
245
+ rack/rack passed: #519
246
+ ...
247
+
236
248
  #### `whoami`
237
249
 
238
250
  This command is useful to verify that you're in fact logged in:
@@ -304,18 +316,23 @@ If you don't want the sync to be triggered, use `--skip-sync`.
304
316
 
305
317
  #### `encrypt`
306
318
 
307
- Usage: travis encrypt [args..] [options]
319
+ Usage: bin/travis encrypt [args..] [options]
308
320
  -h, --help Display help
309
321
  -i, --[no-]interactive be interactive and colorful
310
322
  -E, --[no-]explode don't rescue exceptions
323
+ --skip-version-check don't check if travis client is up to date
311
324
  -e, --api-endpoint URL Travis API server to talk to
312
325
  --pro short-cut for --api-endpoint 'https://api.travis-ci.com/'
313
326
  --org short-cut for --api-endpoint 'https://api.travis-ci.org/'
327
+ --staging talks to staging system
314
328
  -t, --token [ACCESS_TOKEN] access token to use
315
329
  --debug show API requests
316
- -r, --repo SLUG
317
- --add [KEY] adds it to .travis.yml under KEY (default: env.global)
330
+ --adapter ADAPTER Faraday adapter to use for HTTP requests
331
+ -r, --repo SLUG repository to use (will try to detect from current git clone)
332
+ -a, --add [KEY] adds it to .travis.yml under KEY (default: env.global)
318
333
  -s, --[no-]split treat each line as a separate input
334
+ -p, --append don't override existing values, instead treat as list
335
+ -x, --override override existing value
319
336
 
320
337
  This command is useful to encrypt [environment variables](http://about.travis-ci.org/docs/user/encryption-keys/) or deploy keys for private dependencies.
321
338
 
@@ -348,6 +365,11 @@ This will by default add it as global variables for every job. You can also add
348
365
 
349
366
  $ travis encrypt FOO=bar --add env.matrix
350
367
 
368
+ There are two ways the client can treat existing values:
369
+
370
+ * Turn existing value into a list if it isn't already, append new value to that list. This is the default behavior for keys that start with `env.` and can be enforced with `--append`.
371
+ * Replace existing value. This is the default behavior for keys that do not start with `env.` and can be enforced with `--override`.
372
+
351
373
  #### `history`
352
374
 
353
375
  Usage: travis history [options]
@@ -974,7 +996,7 @@ MyTravis::Repository.find('rails/rails')
974
996
 
975
997
  ## Installation
976
998
 
977
- Make sure you have at least [Ruby](http://www.ruby-lang.org/en/downloads/) 1.8.7 (1.9.3 recommended) installed. Then run:
999
+ Make sure you have at least [Ruby](http://www.ruby-lang.org/en/downloads/) 1.8.7 (2.0.0 recommended) installed. Then run:
978
1000
 
979
1001
  $ gem install travis --no-rdoc --no-ri
980
1002
 
@@ -984,6 +1006,13 @@ If you have the old `travis-cli` gem installed, you should `gem uninstall travis
984
1006
 
985
1007
  ## Version History
986
1008
 
1009
+ **1.3.1** (July 21, 2013)
1010
+
1011
+ * Add `travis whatsup --my-repos`, which corresponds to the "My Repositories" tab in the web interface
1012
+ * It is now recommended to use Ruby 2.0, any Ruby version prior to 1.9.3 will lead to a warning being displayed. Disable with `--skip-version-check`.
1013
+ * Add `--override` and `--append` to `travis encrypt`, make default behavior depend on key.
1014
+ * Add shorthand for `travis encrypt --add`.
1015
+
987
1016
  **1.3.0** (July 20, 2013)
988
1017
 
989
1018
  * Add `travis setup [heroku|openshift|nodejitsu|sauce_connect]`
@@ -118,7 +118,13 @@ module Travis
118
118
  rescue Timeout::Error, Faraday::Error::ClientError
119
119
  end
120
120
 
121
+ def check_ruby
122
+ return if RUBY_VERSION > '1.9.2' or skip_version_check?
123
+ warn "Your Ruby version is outdated, please consider upgrading, as we will drop support for #{RUBY_VERSION} soon!"
124
+ end
125
+
121
126
  def execute
127
+ check_ruby
122
128
  check_arity(method(:run), *arguments)
123
129
  load_config
124
130
  check_version
@@ -6,13 +6,20 @@ module Travis
6
6
  class Encrypt < RepoCommand
7
7
  attr_accessor :config_key
8
8
 
9
- on('--add [KEY]', 'adds it to .travis.yml under KEY (default: env.global)') do |c, value|
9
+ on('-a', '--add [KEY]', 'adds it to .travis.yml under KEY (default: env.global)') do |c, value|
10
10
  c.config_key = value || 'env.global'
11
11
  end
12
12
 
13
- on('-s', '--[no-]split', 'treat each line as a separate input')
13
+ on('-s', '--[no-]split', "treat each line as a separate input")
14
+ on('-p', '--append', "don't override existing values, instead treat as list")
15
+ on('-x', '--override', "override existing value")
14
16
 
15
17
  def run(*args)
18
+ error "cannot combine --override and --append" if append? and override?
19
+ error "--append without --add makes no sense" if append? and not add?
20
+ error "--override without --add makes no sense" if override? and not add?
21
+ self.override |= !config_key.start_with?('env.') if add? and not append?
22
+
16
23
  if args.first =~ %r{\w+/\w+}
17
24
  warn "WARNING: The name of the repository is now passed to the command with the -r option:"
18
25
  warn " #{command("encrypt [...] -r #{args.first}")}"
@@ -41,12 +48,16 @@ module Travis
41
48
 
42
49
  private
43
50
 
51
+ def add?
52
+ !!config_key
53
+ end
54
+
44
55
  def set_config(result)
45
56
  parent_config[last_key] = merge_config(result)
46
57
  end
47
58
 
48
59
  def merge_config(result)
49
- case subconfig = parent_config[last_key]
60
+ case subconfig = (parent_config[last_key] unless override?)
50
61
  when nil then result.size == 1 ? result.first : result
51
62
  when Array then subconfig + result
52
63
  else result.unshift(subconfig)
@@ -3,14 +3,23 @@ require 'travis/cli'
3
3
  module Travis
4
4
  module CLI
5
5
  class Whatsup < ApiCommand
6
+ on('-m', '--my-repos')
7
+
6
8
  def run
7
- repos.each do |repo|
9
+ recent.each do |repo|
8
10
  say [
9
11
  color(repo.slug, [:bold, repo.color]),
10
12
  color("#{repo.last_build.state}: ##{repo.last_build.number}", repo.color)
11
13
  ].join(" ")
12
14
  end
13
15
  end
16
+
17
+ private
18
+
19
+ def recent
20
+ return repos unless my_repos
21
+ repos(:member => user.login)
22
+ end
14
23
  end
15
24
  end
16
25
  end
@@ -1,3 +1,3 @@
1
1
  module Travis
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
data/travis.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  # general infos
4
4
  s.name = "travis"
5
- s.version = "1.3.0"
5
+ s.version = "1.3.1"
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"
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.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
@@ -16,7 +16,7 @@ authors:
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2013-07-20 00:00:00.000000000 Z
19
+ date: 2013-07-21 00:00:00.000000000 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: faraday