whisk 0.2.0 → 0.2.1
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.
- data/README.md +16 -2
- data/lib/whisk/cli.rb +12 -0
- data/lib/whisk/provider/bowl.rb +8 -0
- data/lib/whisk/resource/bowl.rb +1 -1
- data/lib/whisk/resource.rb +1 -1
- data/lib/whisk/version.rb +1 -1
- data/lib/whisk/whiskfile.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -36,17 +36,31 @@ Whiskfile.
|
|
36
36
|
|
37
37
|
ingredient "ntp" do
|
38
38
|
source github % "ntp"
|
39
|
-
|
39
|
+
ref 'develop'
|
40
40
|
end
|
41
41
|
|
42
42
|
ingredient "ssh" do
|
43
43
|
source github % "ssh"
|
44
|
-
|
44
|
+
ref 'develop'
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
48
|
# Commands #
|
49
49
|
|
50
|
+
## whisk list ##
|
51
|
+
|
52
|
+
The list subcommand will list the short name of all of the configured
|
53
|
+
ingredients. This short name consists of the bowl and ingredient names
|
54
|
+
separated by a forward slash. These short names maybe be used as filters for
|
55
|
+
most other subcommands
|
56
|
+
|
57
|
+
$ whisk list
|
58
|
+
production/ntp
|
59
|
+
production/ssh
|
60
|
+
development/ntp
|
61
|
+
development/ssh
|
62
|
+
|
63
|
+
|
50
64
|
## whisk prepare ##
|
51
65
|
|
52
66
|
The prepare subcommand allows you to clone your ingredients and optional
|
data/lib/whisk/cli.rb
CHANGED
@@ -46,6 +46,18 @@ class Whisk
|
|
46
46
|
runner.run('diff')
|
47
47
|
end
|
48
48
|
|
49
|
+
method_option :whiskfile,
|
50
|
+
type: :string,
|
51
|
+
default: File.join(Dir.pwd, Whisk::DEFAULT_FILENAME),
|
52
|
+
desc: "Path to a Whiskfile to operate off of.",
|
53
|
+
aliases: "-w",
|
54
|
+
banner: "PATH"
|
55
|
+
desc "list", "list the configured bowls and ingredients"
|
56
|
+
def list(filter=nil)
|
57
|
+
runner = Whisk::Runner.new(options[:whiskfile], filter)
|
58
|
+
runner.run('list')
|
59
|
+
end
|
60
|
+
|
49
61
|
method_option :whiskfile,
|
50
62
|
type: :string,
|
51
63
|
default: File.join(Dir.pwd, Whisk::DEFAULT_FILENAME),
|
data/lib/whisk/provider/bowl.rb
CHANGED
@@ -47,6 +47,14 @@ class Whisk
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
+
def action_list
|
51
|
+
if self.exist?
|
52
|
+
resource.ingredients.each do |name, ingredient|
|
53
|
+
Whisk.ui.info("#{resource.name}/#{ingredient.name}")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
50
58
|
def action_prepare
|
51
59
|
self.create unless self.exist?
|
52
60
|
::Dir.chdir resource.path
|
data/lib/whisk/resource/bowl.rb
CHANGED
@@ -35,7 +35,7 @@ class Whisk
|
|
35
35
|
|
36
36
|
def ingredient(iname, &block)
|
37
37
|
if ingredients.has_key? iname
|
38
|
-
raise ArgumentError "Ingredient '#{iname}' has already added to bowl '#{name}'"
|
38
|
+
raise ArgumentError, "Ingredient '#{iname}' has already added to bowl '#{name}'"
|
39
39
|
else
|
40
40
|
ingredients[iname] = Whisk::Resource::Ingredient.new(iname, &block)
|
41
41
|
end
|
data/lib/whisk/resource.rb
CHANGED
@@ -38,7 +38,7 @@ class Whisk
|
|
38
38
|
|
39
39
|
def provider(arg=nil)
|
40
40
|
klass = if arg.kind_of?(String) || arg.kind_of?(Symbol)
|
41
|
-
raise ArgumentError "must
|
41
|
+
raise ArgumentError, "must provide provider by klass"
|
42
42
|
# lookup_provider_constant(arg)
|
43
43
|
else
|
44
44
|
arg
|
data/lib/whisk/version.rb
CHANGED
data/lib/whisk/whiskfile.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whisk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chef
|