travis 1.8.14.travis.1195.9 → 1.8.14.travis.1197.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/travis/cli/setup/service.rb +2 -0
- data/spec/cli/setup/service_spec.rb +53 -0
- data/spec/client/auto_login_spec.rb +1 -1
- data/travis.gemspec +3 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7838b20273870db6e467f340dfb931bf04e9049efa6fe212b648c4d220edf4e
|
4
|
+
data.tar.gz: 7a6fafbd1a95c9155742286ff786d1ac0752d7571462e536069a9b3770ae40a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30a66f17a080b4c94cec4ae5f221bc3c707e90a5d3f9c877de16a3ff7c4eae6177a778da4afafd271d73c4a19728051de88e39ad90bf246a362b20c00908cd51
|
7
|
+
data.tar.gz: 8f013a79cd23ed3658ef4130617760dbe7d5c9cfdca9c0e7d0c12b90d73ae19657adca1749e8ba89cbdd27d429adf970c2dfffcf970626786b4acfa56569c3a3
|
@@ -63,6 +63,8 @@ module Travis
|
|
63
63
|
on("#{verb.capitalize} only from #{repository.slug}? ", config, 'repo' => repository.slug)
|
64
64
|
on("#{verb.capitalize} from #{branch} branch? ", config, 'branch' => branch) if branch != 'master' and branch != 'HEAD'
|
65
65
|
|
66
|
+
config['skip_cleanup'] = 'true' if not ( config.has_key?('skip_cleanup') or config.fetch('edge', 'false') != 'false' )
|
67
|
+
|
66
68
|
encrypt(config, 'password') if config['password'] and agree("Encrypt Password? ") { |q| q.default = 'yes' }
|
67
69
|
encrypt(config, 'api_key') if config['api_key'] and agree("Encrypt API key? ") { |q| q.default = 'yes' }
|
68
70
|
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Travis::CLI::Setup::Service do
|
4
|
+
subject :service do
|
5
|
+
repository = double('repository',{:slug => 'test_slug'})
|
6
|
+
setup = double('Setup', :repository => repository)
|
7
|
+
described_class.new(setup)
|
8
|
+
end
|
9
|
+
|
10
|
+
describe '#deploy' do
|
11
|
+
|
12
|
+
subject :deploy_config do
|
13
|
+
{'provider' => 'dummy'}
|
14
|
+
end
|
15
|
+
|
16
|
+
before do
|
17
|
+
allow(service).to receive(:configure).and_yield(deploy_config)
|
18
|
+
allow(service).to receive(:on).and_return(nil)
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'with no existing deploy section' do
|
22
|
+
|
23
|
+
it 'creates section contents without optional items' do
|
24
|
+
service.send(:deploy, 'dummy') { |_| }
|
25
|
+
expect(deploy_config).to include(
|
26
|
+
'provider' => 'dummy',
|
27
|
+
'skip_cleanup' => 'true'
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'with existing deploy section' do
|
33
|
+
it 'doesn\'t overwrite existing skip_cleanup' do
|
34
|
+
deploy_config['skip_cleanup']='false'
|
35
|
+
service.send(:deploy, 'dummy') { |_| }
|
36
|
+
expect(deploy_config).to include('skip_cleanup' => 'false')
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'doesn\'t set skip_cleanup for v2' do
|
40
|
+
deploy_config['edge']='true'
|
41
|
+
service.send(:deploy, 'dummy') { |_| }
|
42
|
+
expect(deploy_config).not_to include('skip_cleanup')
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'sets skip_cleanup for explicit v1' do
|
46
|
+
deploy_config['edge']='false'
|
47
|
+
service.send(:deploy, 'dummy') { |_| }
|
48
|
+
expect(deploy_config).to include('skip_cleanup' => 'true')
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
@@ -9,7 +9,7 @@ describe Travis::Client::AutoLogin do
|
|
9
9
|
context "authenticate" do
|
10
10
|
context "when user has a token in cli config" do
|
11
11
|
it "does not call Tools::Github#with_token" do
|
12
|
-
|
12
|
+
expect_any_instance_of(Travis::Tools::Github).to_not receive(:with_token)
|
13
13
|
auto_login_with_token.authenticate
|
14
14
|
end
|
15
15
|
end
|
data/travis.gemspec
CHANGED
@@ -38,6 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
"Eugene",
|
39
39
|
"Eugene Shubin",
|
40
40
|
"Igor Wiedler",
|
41
|
+
"Ivan Pozdeev",
|
41
42
|
"Joep van Delft",
|
42
43
|
"Stefan Nordhausen",
|
43
44
|
"Tobias Bieniek",
|
@@ -107,6 +108,7 @@ Gem::Specification.new do |s|
|
|
107
108
|
"eugene@travis-ci.org",
|
108
109
|
"51701929+eugene-travis@users.noreply.github.com",
|
109
110
|
"igor@travis-ci.org",
|
111
|
+
"vano@mail.mipt.ru",
|
110
112
|
"stefan.nordhausen@immobilienscout24.de",
|
111
113
|
"tobias.bieniek@gmail.com",
|
112
114
|
"j@zatigo.com",
|
@@ -311,6 +313,7 @@ Gem::Specification.new do |s|
|
|
311
313
|
"spec/cli/open_spec.rb",
|
312
314
|
"spec/cli/repo_command_spec.rb",
|
313
315
|
"spec/cli/restart_spec.rb",
|
316
|
+
"spec/cli/setup/service_spec.rb",
|
314
317
|
"spec/cli/setup_spec.rb",
|
315
318
|
"spec/cli/show_spec.rb",
|
316
319
|
"spec/cli/status_spec.rb",
|
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.8.14.travis.
|
4
|
+
version: 1.8.14.travis.1197.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiro Asari
|
@@ -30,6 +30,7 @@ authors:
|
|
30
30
|
- Eugene
|
31
31
|
- Eugene Shubin
|
32
32
|
- Igor Wiedler
|
33
|
+
- Ivan Pozdeev
|
33
34
|
- Joep van Delft
|
34
35
|
- Stefan Nordhausen
|
35
36
|
- Tobias Bieniek
|
@@ -71,7 +72,7 @@ authors:
|
|
71
72
|
autorequire:
|
72
73
|
bindir: bin
|
73
74
|
cert_chain: []
|
74
|
-
date: 2020-04-
|
75
|
+
date: 2020-04-24 00:00:00.000000000 Z
|
75
76
|
dependencies:
|
76
77
|
- !ruby/object:Gem::Dependency
|
77
78
|
name: faraday
|
@@ -276,6 +277,7 @@ email:
|
|
276
277
|
- eugene@travis-ci.org
|
277
278
|
- 51701929+eugene-travis@users.noreply.github.com
|
278
279
|
- igor@travis-ci.org
|
280
|
+
- vano@mail.mipt.ru
|
279
281
|
- stefan.nordhausen@immobilienscout24.de
|
280
282
|
- tobias.bieniek@gmail.com
|
281
283
|
- j@zatigo.com
|
@@ -481,6 +483,7 @@ files:
|
|
481
483
|
- spec/cli/open_spec.rb
|
482
484
|
- spec/cli/repo_command_spec.rb
|
483
485
|
- spec/cli/restart_spec.rb
|
486
|
+
- spec/cli/setup/service_spec.rb
|
484
487
|
- spec/cli/setup_spec.rb
|
485
488
|
- spec/cli/show_spec.rb
|
486
489
|
- spec/cli/status_spec.rb
|