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 CHANGED
@@ -1,3 +1,7 @@
1
+ Fri May 06 16:55:23 CEST 2011 Flavio Castelli <flavio@castelli.name>
2
+
3
+ * Fixed a method missing error.
4
+
1
5
  Fri May 06 16:46:10 CEST 2011 Flavio Castelli <flavio@castelli.name>
2
6
 
3
7
  * appliance building: ask the user what to do when there's already an
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? 'Do you want to overwrite it? (y/n)'
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
- version = @shell.ask? 'Enter new version number:'
99
+ begin
100
+ version = @shell.ask 'Enter new version number:'
101
+ end until !version.blank?
100
102
  retry
101
103
  end
102
104
  end
@@ -1,5 +1,5 @@
1
1
  module Dister
2
2
 
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
 
5
5
  end
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?).in_sequence(build_sequence).\
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?).in_sequence(build_sequence).\
111
+ @core.shell.expects(:ask).in_sequence(build_sequence).\
112
112
  returns('n')
113
- @core.shell.expects(:ask?).in_sequence(build_sequence).\
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: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Flavio Castelli