cliprompt 0.0.6 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/cliprompt/version.rb +1 -1
- data/spec/lib/cliprompt/optionset_spec.rb +19 -19
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2c39aedd67c12a2734f38e679d32c7b1ae6c8f6
|
4
|
+
data.tar.gz: 5e604e2d805ee1d616458b95f63223eb46d0151c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 610a45749b91f060bdf845e8a076cafb9c28adb0cd9532583d6045b870ac20654f654d19082bf67bc9bc52bf9635a224833dcd96878839627d58ffbc02de591f
|
7
|
+
data.tar.gz: f4b5741a5b759afccb146d7496d8e0870abf888bbffe9a064ff6ee9374843732f0f94bc44530da6839614b48b44687bf54a34d0173829ce184e92f71bb77d758
|
data/CHANGELOG.md
CHANGED
data/lib/cliprompt/version.rb
CHANGED
@@ -22,7 +22,7 @@ describe Cliprompt::Optionset do
|
|
22
22
|
When(:default) { set.default }
|
23
23
|
When(:display) { set.display }
|
24
24
|
Then { expect(choices).to eq options }
|
25
|
-
Then { expect(default).to
|
25
|
+
Then { expect(default).to be_falsey }
|
26
26
|
Then { expect(set.display).to eq '(xxx / yyy / zzz) ' }
|
27
27
|
end
|
28
28
|
|
@@ -45,7 +45,7 @@ describe Cliprompt::Optionset do
|
|
45
45
|
When(:default) { set.default }
|
46
46
|
When(:display) { set.display }
|
47
47
|
Then { expect(choices).to eq options.map(&:to_s) }
|
48
|
-
Then { expect(default).to
|
48
|
+
Then { expect(default).to be_falsey }
|
49
49
|
Then { expect(display).to eq '(22 / yyy / zzz) ' }
|
50
50
|
end
|
51
51
|
end
|
@@ -82,8 +82,8 @@ describe Cliprompt::Optionset do
|
|
82
82
|
When(:default) { set.default }
|
83
83
|
When(:display) { set.display }
|
84
84
|
When(:boolean) { set.boolean }
|
85
|
-
Then { expect(default).to
|
86
|
-
Then { expect(boolean).to
|
85
|
+
Then { expect(default).to be_truthy }
|
86
|
+
Then { expect(boolean).to be_truthy }
|
87
87
|
Then { expect(display).to eq '[Y/n] ' }
|
88
88
|
end
|
89
89
|
context 'when default is given as true, default booean is Y,' do
|
@@ -92,8 +92,8 @@ describe Cliprompt::Optionset do
|
|
92
92
|
When(:default) { set.default }
|
93
93
|
When(:display) { set.display }
|
94
94
|
When(:boolean) { set.boolean }
|
95
|
-
Then { expect(default).to
|
96
|
-
Then { expect(boolean).to
|
95
|
+
Then { expect(default).to be_truthy }
|
96
|
+
Then { expect(boolean).to be_truthy }
|
97
97
|
Then { expect(display).to eq '[Y/n] ' }
|
98
98
|
end
|
99
99
|
context 'when default is given as false, default boolean is N,' do
|
@@ -102,8 +102,8 @@ describe Cliprompt::Optionset do
|
|
102
102
|
When(:default) { set.default }
|
103
103
|
When(:display) { set.display }
|
104
104
|
When(:boolean) { set.boolean }
|
105
|
-
Then { expect(default).to
|
106
|
-
Then { expect(boolean).to
|
105
|
+
Then { expect(default).to be_falsey }
|
106
|
+
Then { expect(boolean).to be_truthy }
|
107
107
|
Then { expect(display).to eq '[y/N] ' }
|
108
108
|
end
|
109
109
|
end
|
@@ -141,8 +141,8 @@ describe Cliprompt::Optionset do
|
|
141
141
|
When(:default) { set.default }
|
142
142
|
When(:display) { set.display }
|
143
143
|
When(:boolean) { set.boolean }
|
144
|
-
Then { expect(default).to
|
145
|
-
Then { expect(boolean).to
|
144
|
+
Then { expect(default).to be_truthy }
|
145
|
+
Then { expect(boolean).to be_truthy }
|
146
146
|
Then { expect(display).to eq '[Y/n] ' }
|
147
147
|
end
|
148
148
|
context 'when using yn,' do
|
@@ -150,7 +150,7 @@ describe Cliprompt::Optionset do
|
|
150
150
|
Given(:set) { Cliprompt::Optionset.new(options) }
|
151
151
|
When(:default) { set.default }
|
152
152
|
When(:display) { set.display }
|
153
|
-
Then { expect(default).to
|
153
|
+
Then { expect(default).to be_truthy }
|
154
154
|
Then { expect(display).to eq '[Y/n] ' }
|
155
155
|
end
|
156
156
|
context 'when using YN,' do
|
@@ -158,7 +158,7 @@ describe Cliprompt::Optionset do
|
|
158
158
|
Given(:set) { Cliprompt::Optionset.new(options) }
|
159
159
|
When(:default) { set.default }
|
160
160
|
When(:display) { set.display }
|
161
|
-
Then { expect(default).to
|
161
|
+
Then { expect(default).to be_truthy }
|
162
162
|
Then { expect(display).to eq '[Y/n] ' }
|
163
163
|
end
|
164
164
|
context 'when using yesNo,' do
|
@@ -166,7 +166,7 @@ describe Cliprompt::Optionset do
|
|
166
166
|
Given(:set) { Cliprompt::Optionset.new(options) }
|
167
167
|
When(:default) { set.default }
|
168
168
|
When(:display) { set.display }
|
169
|
-
Then { expect(default).to
|
169
|
+
Then { expect(default).to be_falsey }
|
170
170
|
Then { expect(display).to eq '[y/N] ' }
|
171
171
|
end
|
172
172
|
context 'when using yN,' do
|
@@ -174,7 +174,7 @@ describe Cliprompt::Optionset do
|
|
174
174
|
Given(:set) { Cliprompt::Optionset.new(options) }
|
175
175
|
When(:default) { set.default }
|
176
176
|
When(:display) { set.display }
|
177
|
-
Then { expect(default).to
|
177
|
+
Then { expect(default).to be_falsey }
|
178
178
|
Then { expect(display).to eq '[y/N] ' }
|
179
179
|
end
|
180
180
|
context 'when using y/N,' do
|
@@ -182,7 +182,7 @@ describe Cliprompt::Optionset do
|
|
182
182
|
Given(:set) { Cliprompt::Optionset.new(options) }
|
183
183
|
When(:default) { set.default }
|
184
184
|
When(:display) { set.display }
|
185
|
-
Then { expect(default).to
|
185
|
+
Then { expect(default).to be_falsey }
|
186
186
|
Then { expect(display).to eq '[y/N] ' }
|
187
187
|
end
|
188
188
|
end
|
@@ -249,19 +249,19 @@ describe Cliprompt::Optionset do
|
|
249
249
|
end
|
250
250
|
context 'when a no answer is given,' do
|
251
251
|
When(:input) { 'no' }
|
252
|
-
Then { expect(set.check_boolean(question, input)).to
|
252
|
+
Then { expect(set.check_boolean(question, input)).to be_falsey }
|
253
253
|
end
|
254
254
|
context 'when a N answer is given,' do
|
255
255
|
When(:input) { 'N' }
|
256
|
-
Then { expect(set.check_boolean(question, input)).to
|
256
|
+
Then { expect(set.check_boolean(question, input)).to be_falsey }
|
257
257
|
end
|
258
258
|
context 'when a yes answer is given,' do
|
259
259
|
When(:input) { 'yes' }
|
260
|
-
Then { expect(set.check_boolean(question, input)).to
|
260
|
+
Then { expect(set.check_boolean(question, input)).to be_truthy }
|
261
261
|
end
|
262
262
|
context 'when a Y answer is given,' do
|
263
263
|
When(:input) { 'Y' }
|
264
|
-
Then { expect(set.check_boolean(question, input)).to
|
264
|
+
Then { expect(set.check_boolean(question, input)).to be_truthy }
|
265
265
|
end
|
266
266
|
end
|
267
267
|
|