travis 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -3
- data/completion/travis.sh +4 -0
- data/lib/travis/cli/console.rb +2 -2
- data/lib/travis/cli/setup.rb +26 -0
- data/lib/travis/cli.rb +16 -0
- data/lib/travis/client.rb +1 -1
- data/lib/travis/version.rb +1 -1
- data/spec/cli/setup_spec.rb +25 -0
- data/travis.gemspec +14 -7
- metadata +17 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59fa585d065c2861f86697dd0f9f7384eedc51c1
|
4
|
+
data.tar.gz: 3e146b3991d09acd99a45f1107d3faacf440be3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 489bace43b9a98d2709a9624dc07280da03dc8947c0c5ffc74e070b29379da95a647a34e89b5345b442e2698b8ed4e0ef63688d62ae9fc1bd38aac3ae3ade1de
|
7
|
+
data.tar.gz: e45008f6a26db5e0513ca7da5751d545b3ec53e6511ba93c880f4229c0a778f6000b0538dccefd1d1bc4628aa4965e35ca45526d0b4343db06eca9312094cc43
|
data/README.md
CHANGED
@@ -609,7 +609,7 @@ Helps you configure Travis addons.
|
|
609
609
|
-r, --repo SLUG repository to use (will try to detect from current git clone)
|
610
610
|
-f, --force override config section if it already exists
|
611
611
|
|
612
|
-
Available services: `heroku`, `nodejitsu`, `openshift`, `rubygems` and `sauce_connect`.
|
612
|
+
Available services: `cloudcontrol`, `engineyard`, `heroku`, `nodejitsu`, `openshift`, `rubygems` and `sauce_connect`.
|
613
613
|
|
614
614
|
Example:
|
615
615
|
|
@@ -1127,12 +1127,12 @@ You can check your Ruby version by running `ruby -v`:
|
|
1127
1127
|
|
1128
1128
|
Then run:
|
1129
1129
|
|
1130
|
-
$ gem install travis -v 1.5.
|
1130
|
+
$ gem install travis -v 1.5.1 --no-rdoc --no-ri
|
1131
1131
|
|
1132
1132
|
Now make sure everything is working:
|
1133
1133
|
|
1134
1134
|
$ travis version
|
1135
|
-
1.5.
|
1135
|
+
1.5.1
|
1136
1136
|
|
1137
1137
|
### Updating your Ruby
|
1138
1138
|
|
@@ -1179,6 +1179,12 @@ If you have the old `travis-cli` gem installed, you should `gem uninstall travis
|
|
1179
1179
|
|
1180
1180
|
## Version History
|
1181
1181
|
|
1182
|
+
**1.5.1** (August 15, 2013)
|
1183
|
+
|
1184
|
+
* Add `travis setup engineyard`.
|
1185
|
+
* Silence warnings when running `travis help` or `travis console`.
|
1186
|
+
* Add `travis setup cloudcontrol`
|
1187
|
+
|
1182
1188
|
**1.5.0** (August 7, 2013)
|
1183
1189
|
|
1184
1190
|
* Add `travis setup rubygems`.
|
data/completion/travis.sh
CHANGED
@@ -471,12 +471,14 @@ completions="--help
|
|
471
471
|
;;
|
472
472
|
setup)
|
473
473
|
completions="heroku
|
474
|
+
engineyard
|
474
475
|
openshift
|
475
476
|
rubygems
|
476
477
|
nodejitsu
|
477
478
|
sauce_connect
|
478
479
|
sauce_labs
|
479
480
|
sauce
|
481
|
+
cloudcontrol
|
480
482
|
--help
|
481
483
|
-h
|
482
484
|
--interactive
|
@@ -1130,12 +1132,14 @@ completions="--help
|
|
1130
1132
|
;;
|
1131
1133
|
setup)
|
1132
1134
|
completions="heroku
|
1135
|
+
engineyard
|
1133
1136
|
openshift
|
1134
1137
|
rubygems
|
1135
1138
|
nodejitsu
|
1136
1139
|
sauce_connect
|
1137
1140
|
sauce_labs
|
1138
1141
|
sauce
|
1142
|
+
cloudcontrol
|
1139
1143
|
--help
|
1140
1144
|
-h
|
1141
1145
|
--interactive
|
data/lib/travis/cli/console.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'travis/cli'
|
2
|
-
require 'pry'
|
2
|
+
Travis::CLI.silent { require 'pry' }
|
3
3
|
|
4
4
|
module Travis
|
5
5
|
module CLI
|
6
6
|
class Console < ApiCommand
|
7
7
|
def run
|
8
8
|
Object.send(:include, Client::Namespace.new(session))
|
9
|
-
binding.pry(:quiet => true, :prompt => Pry::SIMPLE_PROMPT)
|
9
|
+
binding.pry(:quiet => true, :prompt => Pry::SIMPLE_PROMPT, :output => $stdout)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
data/lib/travis/cli/setup.rb
CHANGED
@@ -22,6 +22,20 @@ module Travis
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
def setup_engineyard
|
26
|
+
configure 'deploy', 'provider' => 'engineyard' do |config|
|
27
|
+
eyrc = File.expand_path(".eyrc", Dir.home)
|
28
|
+
config['api_key'] = YAML.load_file(eyrc)["api_token"] if File.exists?(eyrc)
|
29
|
+
config['api_key'] = ask("API token: ") { |q| q.echo = "*" }.to_s unless config['api_key']
|
30
|
+
env = ask("Environment (optional): ").to_s
|
31
|
+
config['environment'] = env unless env.empty?
|
32
|
+
migrate = agree("Run migrations on deploy? ") { |q| q.default = 'yes' }
|
33
|
+
config['migrate'] = ask("Migration command: ") { |q| q.default = "rake db:migrate" } if migrate
|
34
|
+
config['on'] = { 'repo' => repository.slug } if agree("Deploy only from #{repository.slug}? ") { |q| q.default = 'yes' }
|
35
|
+
encrypt(config, 'api_key') if agree("Encrypt API key? ") { |q| q.default = 'yes' }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
25
39
|
def setup_openshift
|
26
40
|
configure 'deploy', 'provider' => 'openshift' do |config|
|
27
41
|
config['user'] = ask("OpenShift user: ").to_s
|
@@ -76,6 +90,18 @@ module Travis
|
|
76
90
|
alias setup_sauce_labs setup_sauce_connect
|
77
91
|
alias setup_sauce setup_sauce_connect
|
78
92
|
|
93
|
+
def setup_cloudcontrol
|
94
|
+
configure 'deploy', 'provider' => 'cloudcontrol' do |config|
|
95
|
+
config['email'] = ask("cloudControl email: ").to_s
|
96
|
+
config['password'] = ask("cloudControl password: ") { |q| q.echo = "*" }.to_s
|
97
|
+
app = ask("cloudControl application: ").to_s
|
98
|
+
dep = ask("cloudControl deployment: ").to_s
|
99
|
+
config['deployment'] = "#{app}/#{dep}"
|
100
|
+
config['on'] = { 'repo' => repository.slug } if agree("Deploy only from #{repository.slug}? ") { |q| q.default = 'yes' }
|
101
|
+
encrypt(config, 'password') if agree("Encrypt password key? ") { |q| q.default = 'yes' }
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
79
105
|
private
|
80
106
|
|
81
107
|
def encrypt(config, key)
|
data/lib/travis/cli.rb
CHANGED
@@ -12,6 +12,8 @@ end
|
|
12
12
|
require 'gh'
|
13
13
|
GH.set(:ssl => Travis::Client::Session::SSL_OPTIONS)
|
14
14
|
|
15
|
+
require 'stringio'
|
16
|
+
|
15
17
|
module Travis
|
16
18
|
module CLI
|
17
19
|
autoload :Token, 'travis/cli/token'
|
@@ -73,8 +75,22 @@ module Travis
|
|
73
75
|
CLI.constants.map { |n| CLI.const_get(n) }.select { |c| command? c }
|
74
76
|
end
|
75
77
|
|
78
|
+
def silent
|
79
|
+
stderr, $stderr = $stderr, dummy_io
|
80
|
+
stdout, $stdout = $stdout, dummy_io
|
81
|
+
yield
|
82
|
+
ensure
|
83
|
+
$stderr = stderr if stderr
|
84
|
+
$stdout = stdout if stdout
|
85
|
+
end
|
86
|
+
|
76
87
|
private
|
77
88
|
|
89
|
+
def dummy_io
|
90
|
+
return StringIO.new unless defined? IO::NULL and IO::NULL
|
91
|
+
File.open(IO::NULL, 'w')
|
92
|
+
end
|
93
|
+
|
78
94
|
def command?(constant)
|
79
95
|
constant and constant < Command and not constant.abstract?
|
80
96
|
end
|
data/lib/travis/client.rb
CHANGED
data/lib/travis/version.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Travis::CLI::Setup do
|
4
|
+
example 'setup cloudcontrol' do
|
5
|
+
run_cli('setup', 'cloudcontrol') { |i|
|
6
|
+
i.puts('email')
|
7
|
+
i.puts('password')
|
8
|
+
i.puts('application')
|
9
|
+
i.puts('deployment')
|
10
|
+
i.puts('yes')
|
11
|
+
i.puts('yes')}.should be_success
|
12
|
+
stdout.should be == "cloudControl email: cloudControl password: ********\ncloudControl application: cloudControl deployment: Deploy only from rails/rails? |yes| Encrypt password key? |yes| "
|
13
|
+
file = File.expand_path('.travis.yml', Dir.pwd.gsub!(/\/spec/, ''))
|
14
|
+
config = YAML.load_file(file)
|
15
|
+
|
16
|
+
config['deploy']['provider'].should eql('cloudcontrol')
|
17
|
+
config['deploy']['email'].should eql('email')
|
18
|
+
config['deploy']['deployment'].should eql('application/deployment')
|
19
|
+
|
20
|
+
config.delete('deploy')
|
21
|
+
yaml = config.to_yaml
|
22
|
+
yaml.gsub! /\A---\s*\n/, ''
|
23
|
+
File.write(file, yaml)
|
24
|
+
end
|
25
|
+
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.5.
|
5
|
+
s.version = "1.5.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"
|
@@ -17,14 +17,17 @@ Gem::Specification.new do |s|
|
|
17
17
|
"Peter Souter",
|
18
18
|
"Max Barnash",
|
19
19
|
"Aaron Hill",
|
20
|
-
"Justin Lambert",
|
21
20
|
"Adrien Brault",
|
22
|
-
"
|
21
|
+
"Justin Lambert",
|
23
22
|
"Daniel Chatfield",
|
23
|
+
"Laurent Petit",
|
24
|
+
"Mario Visic",
|
25
|
+
"Mathias Meyer",
|
26
|
+
"Benjamin Manns",
|
24
27
|
"Piotr Sarnacki",
|
25
28
|
"Rapha\xC3\xABl Pinson",
|
26
|
-
"
|
27
|
-
"
|
29
|
+
"Tobias Wilken",
|
30
|
+
"Jacob Burkhart"
|
28
31
|
]
|
29
32
|
|
30
33
|
# generated from git shortlog -sne
|
@@ -34,14 +37,17 @@ Gem::Specification.new do |s|
|
|
34
37
|
"p.morsou@gmail.com",
|
35
38
|
"i.am@anhero.ru",
|
36
39
|
"aa1ronham@gmail.com",
|
40
|
+
"jlambert@eml.cc",
|
37
41
|
"benmanns@gmail.com",
|
38
42
|
"adrien.brault@gmail.com",
|
39
43
|
"laurent.petit@gmail.com",
|
40
44
|
"chatfielddaniel@gmail.com",
|
45
|
+
"meyer@paperplanes.de",
|
41
46
|
"drogus@gmail.com",
|
42
47
|
"raphael.pinson@camptocamp.com",
|
48
|
+
"tw@cloudcontrol.de",
|
43
49
|
"mario@mariovisic.com",
|
44
|
-
"
|
50
|
+
"jburkhart@engineyard.com"
|
45
51
|
]
|
46
52
|
|
47
53
|
# generated from git ls-files
|
@@ -131,6 +137,7 @@ Gem::Specification.new do |s|
|
|
131
137
|
"spec/cli/logs_spec.rb",
|
132
138
|
"spec/cli/open_spec.rb",
|
133
139
|
"spec/cli/restart_spec.rb",
|
140
|
+
"spec/cli/setup_spec.rb",
|
134
141
|
"spec/cli/show_spec.rb",
|
135
142
|
"spec/cli/status_spec.rb",
|
136
143
|
"spec/cli/token_spec.rb",
|
@@ -158,7 +165,7 @@ Gem::Specification.new do |s|
|
|
158
165
|
]
|
159
166
|
|
160
167
|
# dependencies
|
161
|
-
s.add_dependency "faraday", "~> 0.8"
|
168
|
+
s.add_dependency "faraday", "~> 0.8.7" # FIXME
|
162
169
|
s.add_dependency "faraday_middleware", "~> 0.9"
|
163
170
|
s.add_dependency "highline", "~> 1.6"
|
164
171
|
s.add_dependency "netrc", "~> 0.7"
|
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.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
@@ -9,18 +9,21 @@ authors:
|
|
9
9
|
- Peter Souter
|
10
10
|
- Max Barnash
|
11
11
|
- Aaron Hill
|
12
|
-
- Justin Lambert
|
13
12
|
- Adrien Brault
|
14
|
-
-
|
13
|
+
- Justin Lambert
|
15
14
|
- Daniel Chatfield
|
16
|
-
-
|
17
|
-
- Raphaël Pinson
|
15
|
+
- Laurent Petit
|
18
16
|
- Mario Visic
|
17
|
+
- Mathias Meyer
|
19
18
|
- Benjamin Manns
|
19
|
+
- Piotr Sarnacki
|
20
|
+
- Raphaël Pinson
|
21
|
+
- Tobias Wilken
|
22
|
+
- Jacob Burkhart
|
20
23
|
autorequire:
|
21
24
|
bindir: bin
|
22
25
|
cert_chain: []
|
23
|
-
date: 2013-08-
|
26
|
+
date: 2013-08-15 00:00:00.000000000 Z
|
24
27
|
dependencies:
|
25
28
|
- !ruby/object:Gem::Dependency
|
26
29
|
name: faraday
|
@@ -28,14 +31,14 @@ dependencies:
|
|
28
31
|
requirements:
|
29
32
|
- - ~>
|
30
33
|
- !ruby/object:Gem::Version
|
31
|
-
version:
|
34
|
+
version: 0.8.7
|
32
35
|
type: :runtime
|
33
36
|
prerelease: false
|
34
37
|
version_requirements: !ruby/object:Gem::Requirement
|
35
38
|
requirements:
|
36
39
|
- - ~>
|
37
40
|
- !ruby/object:Gem::Version
|
38
|
-
version:
|
41
|
+
version: 0.8.7
|
39
42
|
- !ruby/object:Gem::Dependency
|
40
43
|
name: faraday_middleware
|
41
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -231,14 +234,17 @@ email:
|
|
231
234
|
- p.morsou@gmail.com
|
232
235
|
- i.am@anhero.ru
|
233
236
|
- aa1ronham@gmail.com
|
237
|
+
- jlambert@eml.cc
|
234
238
|
- benmanns@gmail.com
|
235
239
|
- adrien.brault@gmail.com
|
236
240
|
- laurent.petit@gmail.com
|
237
241
|
- chatfielddaniel@gmail.com
|
242
|
+
- meyer@paperplanes.de
|
238
243
|
- drogus@gmail.com
|
239
244
|
- raphael.pinson@camptocamp.com
|
245
|
+
- tw@cloudcontrol.de
|
240
246
|
- mario@mariovisic.com
|
241
|
-
-
|
247
|
+
- jburkhart@engineyard.com
|
242
248
|
executables:
|
243
249
|
- travis
|
244
250
|
extensions:
|
@@ -330,6 +336,7 @@ files:
|
|
330
336
|
- spec/cli/logs_spec.rb
|
331
337
|
- spec/cli/open_spec.rb
|
332
338
|
- spec/cli/restart_spec.rb
|
339
|
+
- spec/cli/setup_spec.rb
|
333
340
|
- spec/cli/show_spec.rb
|
334
341
|
- spec/cli/status_spec.rb
|
335
342
|
- spec/cli/token_spec.rb
|
@@ -374,9 +381,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
374
381
|
version: '0'
|
375
382
|
requirements: []
|
376
383
|
rubyforge_project:
|
377
|
-
rubygems_version: 2.0.
|
384
|
+
rubygems_version: 2.0.2
|
378
385
|
signing_key:
|
379
386
|
specification_version: 4
|
380
387
|
summary: Travis CI client
|
381
388
|
test_files: []
|
382
|
-
has_rdoc:
|