chef-flavor-flay 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f079d980eef92521cd03d0c927afa918d856f6f
|
4
|
+
data.tar.gz: 8f012e3247d68a05ee0e697ef020f6c18a57ea4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06f2f667988e80583a76c0442eb65538fa87521a46e75c768617bd35e812f06d08aeaa20014e791c57be5ece079cd90d9bd519ac8f303eee97f817b46d4c1e25
|
7
|
+
data.tar.gz: 79f9aa69916bab25d696ca20df4b6362e9681851220e878fee571f0e7b085d25e00e4b4145d9b4cede1f06bc46a367c78354982a9d1b08dd94d9aa0c13fc44ac
|
data/exe/flay
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
3
|
+
require "open3"
|
4
4
|
|
5
|
-
|
6
|
-
`chef generate cookbook #{name} #{ARGS}`
|
7
|
-
end
|
5
|
+
ARGS = "-C sweeper.io -m developers@sweeper.io -I mit".freeze
|
8
6
|
|
9
|
-
def
|
10
|
-
|
7
|
+
def run_generator(type, name)
|
8
|
+
command = "chef generate #{type} #{name} #{ARGS}"
|
9
|
+
output, err, status = Open3.capture3(command)
|
10
|
+
puts output
|
11
|
+
puts err if status != 0
|
11
12
|
end
|
12
13
|
|
13
14
|
def usage
|
@@ -22,8 +23,8 @@ usage if ARGV.size != 2
|
|
22
23
|
usage if type.nil? || name.nil?
|
23
24
|
|
24
25
|
case type
|
25
|
-
when "cookbook" then cookbook
|
26
|
-
when "recipe" then recipe
|
26
|
+
when "cookbook" then run_generator("cookbook", name)
|
27
|
+
when "recipe" then run_generator("recipe", name)
|
27
28
|
else
|
28
29
|
usage
|
29
30
|
end
|
data/flay.gemspec
CHANGED
data/lib/chef_gen/flavor/flay.rb
CHANGED