travis 1.6.15.travis.566.6 → 1.6.15.travis.580.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +75 -0
- data/lib/travis/cli/command.rb +21 -3
- data/lib/travis/cli.rb +1 -0
- data/lib/travis/client/repository.rb +4 -0
- data/lib/travis/client.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjAxZTQyYThhNjI5MzEzNDFkMjBkM2UyZTE0YWRmYzVjMDM0ZWNkNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTdjZjEwOWQ0NDBlNmNhY2YwYTM5Y2NlNDI5YzA4MWQ2NjMzYTE5NQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzY1MWM0MDliNzBjMWNmYTQ0NTBjZWZkNDc0NmZmZTRlODdhMzY1MTMzZDRm
|
10
|
+
ZTFjMWJlYTg1YzQwODczODRkMTZjNjdkZjliYThhZGI1YWU3ZTQ0MDZjNDlh
|
11
|
+
YjQ0OTMxNzY1YmY4YWU3MGZlNWY3MTBkN2RlZTA4YTI4ODg0YmE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzJkNTdlMjc5ZjNiNjg3ZDM5ODU0Y2NlYmZkYTAwMTNlOTgxNzE5MjZhZmMy
|
14
|
+
ZmY4ODNlMTZmNjg4ZThhYWFjMjVmYmNmOWY5YWMxYzM1YTlhMDVkYjY0MmUz
|
15
|
+
ZmU0Yzk4NzQ0YmY4N2FhMGVlYWVjMDg3MzQ0YzU0ODZlZGIxYTQ=
|
data/README.md
CHANGED
@@ -31,6 +31,7 @@ The [travis gem](https://rubygems.org/gems/travis) includes both a [command line
|
|
31
31
|
* [`disable`](#disable) - disables a project
|
32
32
|
* [`enable`](#enable) - enables a project
|
33
33
|
* [`encrypt`](#encrypt) - encrypts values for the .travis.yml
|
34
|
+
* [`env`](#env) - show or modify build environment variables
|
34
35
|
* [`history`](#history) - displays a projects build history
|
35
36
|
* [`init`](#init) - generates a .travis.yml and enables the project
|
36
37
|
* [`logs`](#logs) - streams test logs
|
@@ -60,6 +61,7 @@ The [travis gem](https://rubygems.org/gems/travis) includes both a [command line
|
|
60
61
|
* [Commits](#commits)
|
61
62
|
* [Caches](#caches)
|
62
63
|
* [Repository Settings](#repository-settings)
|
64
|
+
* [Build Environment Variables](#build-environment-variables)
|
63
65
|
* [Listening for Events](#listening-for-events)
|
64
66
|
* [Dealing with Sessions](#dealing-with-sessions)
|
65
67
|
* [Using Namespaces](#using-namespaces)
|
@@ -658,6 +660,58 @@ There are two ways the client can treat existing values:
|
|
658
660
|
* 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`.
|
659
661
|
* Replace existing value. This is the default behavior for keys that do not start with `env.` and can be enforced with `--override`.
|
660
662
|
|
663
|
+
#### `env`
|
664
|
+
|
665
|
+
Show or modify build environment variables.
|
666
|
+
|
667
|
+
Usage: travis env list [options]
|
668
|
+
travis env set name value [options]
|
669
|
+
travis env unset [names..] [options]
|
670
|
+
travis env copy [names..] [options]
|
671
|
+
|
672
|
+
-h, --help Display help
|
673
|
+
-i, --[no-]interactive be interactive and colorful
|
674
|
+
-E, --[no-]explode don't rescue exceptions
|
675
|
+
--skip-version-check don't check if travis client is up to date
|
676
|
+
--skip-completion-check don't check if auto-completion is set up
|
677
|
+
-e, --api-endpoint URL Travis API server to talk to
|
678
|
+
-I, --[no-]insecure do not verify SSL certificate of API endpoint
|
679
|
+
--pro short-cut for --api-endpoint 'https://api.travis-ci.com/'
|
680
|
+
--org short-cut for --api-endpoint 'https://api.travis-ci.org/'
|
681
|
+
--staging talks to staging system
|
682
|
+
-t, --token [ACCESS_TOKEN] access token to use
|
683
|
+
--debug show API requests
|
684
|
+
-X, --enterprise [NAME] use enterprise setup (optionally takes name for multiple setups)
|
685
|
+
--adapter ADAPTER Faraday adapter to use for HTTP requests
|
686
|
+
--as USER authenticate as given user
|
687
|
+
-r, --repo SLUG repository to use (will try to detect from current git clone)
|
688
|
+
-P, --[no-]public make new values public
|
689
|
+
-p, --[no-]private make new values private
|
690
|
+
-u, --[no-]unescape do not escape values
|
691
|
+
|
692
|
+
You can set, list and unset environment variables, or copy them from the current environment:
|
693
|
+
|
694
|
+
$ travis env set foo bar --public
|
695
|
+
[+] setting environment variable $foo
|
696
|
+
|
697
|
+
$ travis env list
|
698
|
+
# environment variables for travis-ci/travis.rb
|
699
|
+
foo=bar
|
700
|
+
|
701
|
+
$ export foo=foobar
|
702
|
+
$ travis env copy foo bar
|
703
|
+
[+] setting environment variable $foo
|
704
|
+
[+] setting environment variable $bar
|
705
|
+
|
706
|
+
$ travis env list
|
707
|
+
# environment variables for travis-ci/travis.rb
|
708
|
+
foo=foobar
|
709
|
+
bar=[secure]
|
710
|
+
|
711
|
+
$ travis env unset foo bar
|
712
|
+
[x] removing environment variable $foo
|
713
|
+
[x] removing environment variable $bar
|
714
|
+
|
661
715
|
#### `history`
|
662
716
|
|
663
717
|
Displays a projects build history.
|
@@ -1454,6 +1508,21 @@ if settings.build_pushes?
|
|
1454
1508
|
end
|
1455
1509
|
```
|
1456
1510
|
|
1511
|
+
#### Build Environment Variables
|
1512
|
+
|
1513
|
+
You can access environment variables via `Repository#env_vars`:
|
1514
|
+
|
1515
|
+
``` ruby
|
1516
|
+
require 'travis'
|
1517
|
+
|
1518
|
+
Travis.access_token = "MY SECRET TOKEN"
|
1519
|
+
env_vars = Travis::Repository.find('my/repo').env_vars
|
1520
|
+
|
1521
|
+
env_vars['foo'] = 'bar'
|
1522
|
+
env_vars.upsert('foo', 'foobar', public: true)
|
1523
|
+
env_vars.each { |var| var.delete }
|
1524
|
+
```
|
1525
|
+
|
1457
1526
|
### Dealing with Sessions
|
1458
1527
|
|
1459
1528
|
Under the hood the session is where the fun is happening. Most methods on the constants and entities just wrap methods on your session, so you don't have to pass the session around all the time or even see it if you don't want to.
|
@@ -1661,6 +1730,12 @@ If you have the old `travis-cli` gem installed, you should `gem uninstall travis
|
|
1661
1730
|
* Add `travis setup ghc`.
|
1662
1731
|
* Add `Log#delete_body`, `Job#delete_log` and `Build#delete_logs` to Ruby API.
|
1663
1732
|
* Add `--delete`, `--force` and `--no-stream` options to `travis logs`.
|
1733
|
+
* Add `acl` option to `travis setup s3`.
|
1734
|
+
* Add `--set` option to `travis settings`, support non-boolean values.
|
1735
|
+
* Expose `maximum_number_of_builds` setting.
|
1736
|
+
* Give GitHub OAuth token generated by `travis setup releases` a proper description.
|
1737
|
+
* Proper handling for empty or broken config files.
|
1738
|
+
* Reset terminal colors after `travis logs`.
|
1664
1739
|
|
1665
1740
|
**1.6.14** (June 17, 2014)
|
1666
1741
|
|
data/lib/travis/cli/command.rb
CHANGED
@@ -68,6 +68,21 @@ module Travis
|
|
68
68
|
@description ||= ""
|
69
69
|
end
|
70
70
|
|
71
|
+
def self.subcommands(*list)
|
72
|
+
return @subcommands ||= [] if list.empty?
|
73
|
+
@subcommands = list
|
74
|
+
|
75
|
+
define_method :run do |subcommand, *args|
|
76
|
+
error "Unknown subcommand. Available: #{list.join(', ')}." unless list.include? subcommand.to_sym
|
77
|
+
send(subcommand, *args)
|
78
|
+
end
|
79
|
+
|
80
|
+
define_method :usage do
|
81
|
+
usages = list.map { |c| color(usage_for("#{command_name} #{c}", c), :command) }
|
82
|
+
"\nUsage: #{usages.join("\n ")}\n\n"
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
71
86
|
attr_accessor :arguments, :config, :force_interactive, :formatter, :debug
|
72
87
|
attr_reader :input, :output
|
73
88
|
alias_method :debug?, :debug
|
@@ -197,8 +212,12 @@ module Travis
|
|
197
212
|
end
|
198
213
|
|
199
214
|
def usage
|
200
|
-
|
201
|
-
|
215
|
+
"Usage: " << color(usage_for(command_name, :run), :command)
|
216
|
+
end
|
217
|
+
|
218
|
+
def usage_for(prefix, method)
|
219
|
+
usage = "travis #{prefix}"
|
220
|
+
method = method(method)
|
202
221
|
if method.respond_to? :parameters
|
203
222
|
method.parameters.each do |type, name|
|
204
223
|
name = "[#{name}]" if type == :opt
|
@@ -209,7 +228,6 @@ module Travis
|
|
209
228
|
usage << " ..."
|
210
229
|
end
|
211
230
|
usage << " [options]"
|
212
|
-
"Usage: " << color(usage, :command)
|
213
231
|
end
|
214
232
|
|
215
233
|
def help(info = "")
|
data/lib/travis/cli.rb
CHANGED
@@ -25,6 +25,7 @@ module Travis
|
|
25
25
|
autoload :Enable, 'travis/cli/enable'
|
26
26
|
autoload :Encrypt, 'travis/cli/encrypt'
|
27
27
|
autoload :Endpoint, 'travis/cli/endpoint'
|
28
|
+
autoload :Env, 'travis/cli/env'
|
28
29
|
autoload :Help, 'travis/cli/help'
|
29
30
|
autoload :History, 'travis/cli/history'
|
30
31
|
autoload :Init, 'travis/cli/init'
|
data/lib/travis/client.rb
CHANGED
@@ -3,11 +3,13 @@ require 'travis/client/error'
|
|
3
3
|
require 'travis/client/states'
|
4
4
|
require 'travis/client/restartable'
|
5
5
|
require 'travis/client/not_loadable'
|
6
|
+
require 'travis/client/has_uuid'
|
6
7
|
require 'travis/client/methods'
|
7
8
|
require 'travis/client/session'
|
8
9
|
require 'travis/client/entity'
|
9
10
|
require 'travis/client/user'
|
10
11
|
require 'travis/client/repository'
|
12
|
+
require 'travis/client/env_var'
|
11
13
|
require 'travis/client/annotation'
|
12
14
|
require 'travis/client/build'
|
13
15
|
require 'travis/client/artifact'
|
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.6.15.travis.
|
4
|
+
version: 1.6.15.travis.580.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
@@ -39,7 +39,7 @@ authors:
|
|
39
39
|
autorequire:
|
40
40
|
bindir: bin
|
41
41
|
cert_chain: []
|
42
|
-
date: 2014-07-
|
42
|
+
date: 2014-07-17 00:00:00.000000000 Z
|
43
43
|
dependencies:
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: faraday
|