whisk 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/whisk +6 -1
- data/lib/whisk/bowl.rb +4 -2
- data/lib/whisk/config.rb +21 -0
- data/lib/whisk/flavour/git.rb +2 -2
- data/lib/whisk/version.rb +1 -1
- metadata +7 -7
data/bin/whisk
CHANGED
@@ -24,7 +24,12 @@ require 'logger'
|
|
24
24
|
require 'whisk/config'
|
25
25
|
require 'whisk/log'
|
26
26
|
|
27
|
-
|
27
|
+
# borrowed from chef/chef/lib/chef/application.rb
|
28
|
+
logger = Logger.new(STDOUT)
|
29
|
+
STDOUT.sync = true
|
30
|
+
logger.formatter = Whisk::Log.logger.formatter
|
31
|
+
Whisk::Log::Formatter.show_time = false
|
32
|
+
Whisk::Log.loggers << logger
|
28
33
|
|
29
34
|
whiskfile = File.join(ENV['HOME'], '.chef', 'whisk.rb')
|
30
35
|
|
data/lib/whisk/bowl.rb
CHANGED
@@ -42,7 +42,7 @@ class Whisk
|
|
42
42
|
|
43
43
|
def ingredient(iname, opts = {})
|
44
44
|
if ingredients.has_key? iname
|
45
|
-
raise ArgumentError "ingredient #{iname} has already added to bowl #{name}"
|
45
|
+
raise ArgumentError "ingredient '#{iname}' has already added to bowl '#{name}'"
|
46
46
|
else
|
47
47
|
source = opts.delete :source
|
48
48
|
flavour = opts.delete :flavour
|
@@ -55,7 +55,7 @@ class Whisk
|
|
55
55
|
def create
|
56
56
|
unless File.exists? path
|
57
57
|
begin
|
58
|
-
Whisk::Log.info "
|
58
|
+
Whisk::Log.info "creating bowl '#{name}' with path #{path}"
|
59
59
|
::FileUtils.mkdir_p path
|
60
60
|
rescue Exception => e
|
61
61
|
puts "#{e.backtrace} #{e.message}"
|
@@ -67,6 +67,8 @@ class Whisk
|
|
67
67
|
self.create unless File.exists? path
|
68
68
|
::Dir.chdir path
|
69
69
|
|
70
|
+
Whisk::Log.info "preparing bowl '#{name}' with path #{path}"
|
71
|
+
|
70
72
|
ingredients.keys.each do |i|
|
71
73
|
begin
|
72
74
|
ingredients[i].prepare
|
data/lib/whisk/config.rb
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Adam Jacob (<adam@opscode.com>)
|
3
|
+
# Author:: Mathieu Sauve-Frankel <msf@kisoku.net>
|
4
|
+
# Copyright:: Copyright (c) 2008 Opscode, Inc.
|
5
|
+
# Copyright:: Copyright (c) 2012 Mathieu Sauve-Frankel
|
6
|
+
# License:: Apache License, Version 2.0
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
# from_file is derived from chef/chef/lib/chef/mixin/from_file.rb
|
21
|
+
|
1
22
|
require 'whisk/bowl'
|
2
23
|
|
3
24
|
class Whisk
|
data/lib/whisk/flavour/git.rb
CHANGED
@@ -33,7 +33,7 @@ class Whisk
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def checkout(ref="master")
|
36
|
-
Whisk::Log.info "checking out ref #{ref} for ingredient #{self.name}"
|
36
|
+
Whisk::Log.info "checking out ref '#{ref}' for ingredient #{self.name}"
|
37
37
|
shell_out("git checkout #{ref}")
|
38
38
|
end
|
39
39
|
|
@@ -43,7 +43,7 @@ class Whisk
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def fetch
|
46
|
-
Whisk::Log.info "fetching ingredient #{self.name}, from git url #{self.source}"
|
46
|
+
Whisk::Log.info "fetching ingredient '#{self.name}', from git url #{self.source}"
|
47
47
|
shell_out("git fetch --all")
|
48
48
|
end
|
49
49
|
|
data/lib/whisk/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whisk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mathieu Sauve-Frankel
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-02-
|
18
|
+
date: 2012-02-10 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: mixlib-log
|
@@ -41,14 +41,14 @@ dependencies:
|
|
41
41
|
requirements:
|
42
42
|
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
hash:
|
44
|
+
hash: 15424055
|
45
45
|
segments:
|
46
46
|
- 1
|
47
47
|
- 0
|
48
|
-
-
|
48
|
+
- 0
|
49
49
|
- rc
|
50
50
|
- 1
|
51
|
-
version: 1.0.
|
51
|
+
version: 1.0.0.rc.1
|
52
52
|
type: :runtime
|
53
53
|
version_requirements: *id002
|
54
54
|
- !ruby/object:Gem::Dependency
|