roro 0.3.27 → 0.3.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roro/cli.rb +4 -0
- data/lib/roro/configurators/adventure_picker.rb +6 -3
- data/lib/roro/configurators/configurator.rb +2 -2
- data/lib/roro/configurators/question_asker.rb +10 -4
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/test/stage_one/stage_one_test.rb +8 -3
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/{fatsufodo.yml → sashimi.yml} +0 -0
- data/lib/roro/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19be35517b076c033f63af8c5ce2663976a44c0985ae01e2b385a1e3185ace88
|
4
|
+
data.tar.gz: 363daa801e5edbbb26457cd10dd595a136651354e92a013501d480686e4a372a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a7d48d17152790425c6eb85a18373dca236adb2b9535f41ac32fbb152eb1bcccf6be260bd343a0c52fc8914edf40044bb2e49f5fbd3a7c358a7df8960faf2d5
|
7
|
+
data.tar.gz: 3d34abd1258190792277d4e0a3fb8ddef2cf33aecc48d46d766a8aae411713ce232ee666ffef8b2c834cf73b4400f884530503aa6ed69f992d2fd9964623038f
|
data/lib/roro/cli.rb
CHANGED
@@ -10,6 +10,8 @@ module Roro
|
|
10
10
|
no_commands do
|
11
11
|
def choose_adventure(stack)
|
12
12
|
build_inflection(stack)
|
13
|
+
say("Rolling story on from stack: #{@stack}\n\n")
|
14
|
+
say(@getsome)
|
13
15
|
choice = ask(@inflection)
|
14
16
|
story_name = story_from(choice.to_s)
|
15
17
|
"#{stack}/#{story_name}"
|
@@ -20,7 +22,8 @@ module Roro
|
|
20
22
|
prompt = inflection_prompt
|
21
23
|
options = inflection_options
|
22
24
|
prompt_options = humanize(options)
|
23
|
-
@
|
25
|
+
@getsome = "#{prompt}\n"
|
26
|
+
@inflection = ["#{prompt_options}\n\n", "Choices: [#{set_color(options.keys.map { |k| k.to_i }.join(' '), :blue)}]"]
|
24
27
|
end
|
25
28
|
|
26
29
|
def inflection_prompt
|
@@ -45,9 +48,9 @@ module Roro
|
|
45
48
|
array = []
|
46
49
|
hash.map do |key, value|
|
47
50
|
preface = get_story_preface("#{@stack}/#{value}")
|
48
|
-
array << "
|
51
|
+
array << "#{set_color("(#{key})", :bold)} #{set_color(value, :blue, :bold)}\n\s\s\s\s#{preface}"
|
49
52
|
end
|
50
|
-
array.join
|
53
|
+
array.join("\n\n")
|
51
54
|
end
|
52
55
|
|
53
56
|
def get_story_preface(story)
|
@@ -50,8 +50,8 @@ module Roro
|
|
50
50
|
|
51
51
|
def override_environment_variables
|
52
52
|
@env.each do |e, v| v.each do |k, v|
|
53
|
-
answer = @asker.confirm_default(@builder.override(e, k, v))
|
54
|
-
v[:value] = answer
|
53
|
+
answer = @asker.confirm_default(@builder.override(e, k, v), v)
|
54
|
+
answer.eql?('') ? return : v[:value] = answer
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
@@ -13,15 +13,21 @@ module Roro
|
|
13
13
|
answer.size > 1 ? answer : override_default(question)
|
14
14
|
end
|
15
15
|
|
16
|
-
def confirm_default(question)
|
17
|
-
options = { "y": "yes", "n": "no"}
|
16
|
+
def confirm_default(question, default)
|
17
|
+
options = { "y": "yes", "n": "no", 'a': 'accept all defaults'}
|
18
18
|
humanized_options = options.map {|key, value|
|
19
19
|
"(#{key}) #{value}"
|
20
20
|
}
|
21
21
|
getsome = "Would you like to accept the default value?\n"
|
22
22
|
prompt = [question, getsome, humanized_options, "\n"].join("\n")
|
23
|
-
|
24
|
-
|
23
|
+
case ask(prompt)
|
24
|
+
when 'y'
|
25
|
+
default
|
26
|
+
when 'n'
|
27
|
+
override_default(question)
|
28
|
+
when 'a'
|
29
|
+
''
|
30
|
+
end
|
25
31
|
end
|
26
32
|
end
|
27
33
|
end
|
@@ -7,7 +7,7 @@ describe 'okonomi roll_your_own' do
|
|
7
7
|
|
8
8
|
Given(:rollon) {
|
9
9
|
stub_adventure
|
10
|
-
stub_overrides
|
10
|
+
# stub_overrides
|
11
11
|
stub_run_actions
|
12
12
|
cli.rollon
|
13
13
|
}
|
@@ -19,15 +19,20 @@ describe 'okonomi roll_your_own' do
|
|
19
19
|
# quiet { rollon }
|
20
20
|
}
|
21
21
|
|
22
|
+
describe 'testing cli ask and say' do
|
23
|
+
Given(:adventures) { %w[] }
|
24
|
+
|
25
|
+
Then { }
|
26
|
+
end
|
22
27
|
describe 'must generate' do
|
23
28
|
describe 'templates with stage one' do
|
24
|
-
|
29
|
+
Then { assert_file 'mise/stacks/my_story/templates/stage_one/.keep' }
|
25
30
|
end
|
26
31
|
|
27
32
|
describe 'test' do
|
28
33
|
describe 'with stage one' do
|
29
34
|
describe 'with stage dummy' do
|
30
|
-
|
35
|
+
Then { assert_file 'mise/stacks/my_story/test/stage_one/stage_dummy/.keep' }
|
31
36
|
end
|
32
37
|
end
|
33
38
|
end
|
data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/{fatsufodo.yml → sashimi.yml}
RENAMED
File without changes
|
data/lib/roro/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- schadenfred
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem-release
|
@@ -358,7 +358,7 @@ files:
|
|
358
358
|
- lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one/stage_dummy/.keep
|
359
359
|
- lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one/stage_test.rb
|
360
360
|
- lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/wordpress.yml
|
361
|
-
- lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/
|
361
|
+
- lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/sashimi.yml
|
362
362
|
- lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/django.yml
|
363
363
|
- lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/Dockerfile.tt
|
364
364
|
- lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/docker-compose.yml.tt
|