dister 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog +4 -0
- data/lib/dister/core.rb +4 -2
- data/lib/dister/version.rb +1 -1
- data/test/core_test.rb +3 -3
- metadata +3 -3
data/Changelog
CHANGED
data/lib/dister/core.rb
CHANGED
@@ -91,12 +91,14 @@ module Dister
|
|
91
91
|
build = StudioApi::RunningBuild.create(params)
|
92
92
|
rescue StudioApi::ImageAlreadyExists
|
93
93
|
@shell.say 'An image with the same version already exists'
|
94
|
-
overwrite = @shell.ask
|
94
|
+
overwrite = @shell.ask 'Do you want to overwrite it? (y/n)'
|
95
95
|
if overwrite == 'y'
|
96
96
|
force = true
|
97
97
|
retry
|
98
98
|
else
|
99
|
-
|
99
|
+
begin
|
100
|
+
version = @shell.ask 'Enter new version number:'
|
101
|
+
end until !version.blank?
|
100
102
|
retry
|
101
103
|
end
|
102
104
|
end
|
data/lib/dister/version.rb
CHANGED
data/test/core_test.rb
CHANGED
@@ -82,7 +82,7 @@ class CoreTest < Test::Unit::TestCase
|
|
82
82
|
raises(StudioApi::ImageAlreadyExists).\
|
83
83
|
in_sequence(build_sequence)
|
84
84
|
@core.shell.expects(:say).in_sequence(build_sequence)
|
85
|
-
@core.shell.expects(:ask
|
85
|
+
@core.shell.expects(:ask).in_sequence(build_sequence).\
|
86
86
|
returns('y')
|
87
87
|
fake_build = mock()
|
88
88
|
StudioApi::RunningBuild.expects(:create).\
|
@@ -108,9 +108,9 @@ class CoreTest < Test::Unit::TestCase
|
|
108
108
|
raises(StudioApi::ImageAlreadyExists).\
|
109
109
|
in_sequence(build_sequence)
|
110
110
|
@core.shell.expects(:say).in_sequence(build_sequence)
|
111
|
-
@core.shell.expects(:ask
|
111
|
+
@core.shell.expects(:ask).in_sequence(build_sequence).\
|
112
112
|
returns('n')
|
113
|
-
@core.shell.expects(:ask
|
113
|
+
@core.shell.expects(:ask).in_sequence(build_sequence).\
|
114
114
|
returns(new_version)
|
115
115
|
fake_build = mock()
|
116
116
|
StudioApi::RunningBuild.expects(:create).\
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dister
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Flavio Castelli
|