whisk 0.0.3 → 0.0.4
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 +5 -1
 - data/bin/whisk +7 -1
 - data/lib/whisk/bowl.rb +8 -8
 - data/lib/whisk/flavour/git.rb +1 -1
 - data/lib/whisk/version.rb +1 -1
 - metadata +49 -81
 
    
        data/README.md
    CHANGED
    
    
    
        data/bin/whisk
    CHANGED
    
    | 
         @@ -31,7 +31,13 @@ logger.formatter = Whisk::Log.logger.formatter 
     | 
|
| 
       31 
31 
     | 
    
         
             
            Whisk::Log::Formatter.show_time = false
         
     | 
| 
       32 
32 
     | 
    
         
             
            Whisk::Log.loggers << logger
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
      
 34 
     | 
    
         
            +
            if File.exists?("Whiskfile")
         
     | 
| 
      
 35 
     | 
    
         
            +
              whiskfile = "Whiskfile"
         
     | 
| 
      
 36 
     | 
    
         
            +
            else
         
     | 
| 
      
 37 
     | 
    
         
            +
              whiskfile = File.join(ENV['HOME'], '.chef', 'whisk.rb')
         
     | 
| 
      
 38 
     | 
    
         
            +
            end
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
            Whisk::Log.info "Loading configuration from Whiskfile: #{whiskfile}"
         
     | 
| 
       35 
41 
     | 
    
         | 
| 
       36 
42 
     | 
    
         
             
            Whisk::Config.from_file(whiskfile)
         
     | 
| 
       37 
43 
     | 
    
         | 
    
        data/lib/whisk/bowl.rb
    CHANGED
    
    | 
         @@ -22,11 +22,11 @@ require 'whisk/ingredient' 
     | 
|
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
            class Whisk
         
     | 
| 
       24 
24 
     | 
    
         
             
              class Bowl
         
     | 
| 
       25 
     | 
    
         
            -
                attr_accessor :name, : 
     | 
| 
      
 25 
     | 
    
         
            +
                attr_accessor :name, :ingredients
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
                def initialize(name, path=nil, &block)
         
     | 
| 
       28 
28 
     | 
    
         
             
                  @name = name
         
     | 
| 
       29 
     | 
    
         
            -
                  @path =  
     | 
| 
      
 29 
     | 
    
         
            +
                  @path = File.join(Dir.getwd, name)
         
     | 
| 
       30 
30 
     | 
    
         
             
                  @ingredients = {}
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
       32 
32 
     | 
    
         
             
                  instance_eval(&block) if block_given?
         
     | 
| 
         @@ -52,8 +52,8 @@ class Whisk 
     | 
|
| 
       52 
52 
     | 
    
         
             
                  end
         
     | 
| 
       53 
53 
     | 
    
         
             
                end
         
     | 
| 
       54 
54 
     | 
    
         | 
| 
       55 
     | 
    
         
            -
                def create
         
     | 
| 
       56 
     | 
    
         
            -
                   
     | 
| 
      
 55 
     | 
    
         
            +
                def create!
         
     | 
| 
      
 56 
     | 
    
         
            +
                  if not path.nil? and Dir.exists? path
         
     | 
| 
       57 
57 
     | 
    
         
             
                    begin
         
     | 
| 
       58 
58 
     | 
    
         
             
                      Whisk::Log.info "creating bowl '#{name}' with path #{path}"
         
     | 
| 
       59 
59 
     | 
    
         
             
                      ::FileUtils.mkdir_p path
         
     | 
| 
         @@ -64,16 +64,16 @@ class Whisk 
     | 
|
| 
       64 
64 
     | 
    
         
             
                end
         
     | 
| 
       65 
65 
     | 
    
         | 
| 
       66 
66 
     | 
    
         
             
                def prepare
         
     | 
| 
       67 
     | 
    
         
            -
                  self.create 
     | 
| 
      
 67 
     | 
    
         
            +
                  self.create!
         
     | 
| 
       68 
68 
     | 
    
         
             
                  ::Dir.chdir path
         
     | 
| 
       69 
69 
     | 
    
         | 
| 
       70 
70 
     | 
    
         
             
                  Whisk::Log.info "preparing bowl '#{name}' with path #{path}"
         
     | 
| 
       71 
71 
     | 
    
         | 
| 
       72 
     | 
    
         
            -
                  ingredients. 
     | 
| 
      
 72 
     | 
    
         
            +
                  ingredients.each do |name, ingredient|
         
     | 
| 
       73 
73 
     | 
    
         
             
                    begin
         
     | 
| 
       74 
     | 
    
         
            -
                       
     | 
| 
      
 74 
     | 
    
         
            +
                      ingredient.prepare
         
     | 
| 
       75 
75 
     | 
    
         
             
                    rescue Exception => e
         
     | 
| 
       76 
     | 
    
         
            -
                      Whisk::Log.error "failed fetching ingredient #{ 
     | 
| 
      
 76 
     | 
    
         
            +
                      Whisk::Log.error "failed fetching ingredient #{name}! bailing"
         
     | 
| 
       77 
77 
     | 
    
         
             
                      raise
         
     | 
| 
       78 
78 
     | 
    
         
             
                      exit 1
         
     | 
| 
       79 
79 
     | 
    
         
             
                    end
         
     | 
    
        data/lib/whisk/flavour/git.rb
    CHANGED
    
    
    
        data/lib/whisk/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,123 +1,91 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            --- !ruby/object:Gem::Specification 
     | 
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: whisk
         
     | 
| 
       3 
     | 
    
         
            -
            version: !ruby/object:Gem::Version 
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.4
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
     | 
    
         
            -
              segments: 
         
     | 
| 
       7 
     | 
    
         
            -
              - 0
         
     | 
| 
       8 
     | 
    
         
            -
              - 0
         
     | 
| 
       9 
     | 
    
         
            -
              - 3
         
     | 
| 
       10 
     | 
    
         
            -
              version: 0.0.3
         
     | 
| 
       11 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       12 
     | 
    
         
            -
            authors: 
     | 
| 
      
 7 
     | 
    
         
            +
            authors:
         
     | 
| 
       13 
8 
     | 
    
         
             
            - Mathieu Sauve-Frankel
         
     | 
| 
       14 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       15 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       16 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2012-06-07 00:00:00.000000000 Z
         
     | 
| 
      
 13 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 14 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
       21 
15 
     | 
    
         
             
              name: mixlib-log
         
     | 
| 
       22 
     | 
    
         
            -
               
     | 
| 
       23 
     | 
    
         
            -
              requirement: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 16 
     | 
    
         
            +
              requirement: &7955580 !ruby/object:Gem::Requirement
         
     | 
| 
       24 
17 
     | 
    
         
             
                none: false
         
     | 
| 
       25 
     | 
    
         
            -
                requirements: 
     | 
| 
       26 
     | 
    
         
            -
                - -  
     | 
| 
       27 
     | 
    
         
            -
                  - !ruby/object:Gem::Version 
     | 
| 
       28 
     | 
    
         
            -
                    hash: 27
         
     | 
| 
       29 
     | 
    
         
            -
                    segments: 
         
     | 
| 
       30 
     | 
    
         
            -
                    - 1
         
     | 
| 
       31 
     | 
    
         
            -
                    - 3
         
     | 
| 
       32 
     | 
    
         
            -
                    - 0
         
     | 
| 
      
 18 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 19 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 20 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
       33 
21 
     | 
    
         
             
                    version: 1.3.0
         
     | 
| 
       34 
22 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       35 
     | 
    
         
            -
              version_requirements: *id001
         
     | 
| 
       36 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       37 
     | 
    
         
            -
              name: mixlib-shellout
         
     | 
| 
       38 
23 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       39 
     | 
    
         
            -
               
     | 
| 
      
 24 
     | 
    
         
            +
              version_requirements: *7955580
         
     | 
| 
      
 25 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 26 
     | 
    
         
            +
              name: mixlib-shellout
         
     | 
| 
      
 27 
     | 
    
         
            +
              requirement: &7954280 !ruby/object:Gem::Requirement
         
     | 
| 
       40 
28 
     | 
    
         
             
                none: false
         
     | 
| 
       41 
     | 
    
         
            -
                requirements: 
     | 
| 
       42 
     | 
    
         
            -
                - -  
     | 
| 
       43 
     | 
    
         
            -
                  - !ruby/object:Gem::Version 
     | 
| 
       44 
     | 
    
         
            -
                     
     | 
| 
       45 
     | 
    
         
            -
                    segments: 
         
     | 
| 
       46 
     | 
    
         
            -
                    - 1
         
     | 
| 
       47 
     | 
    
         
            -
                    - 0
         
     | 
| 
       48 
     | 
    
         
            -
                    - 0
         
     | 
| 
       49 
     | 
    
         
            -
                    - rc
         
     | 
| 
       50 
     | 
    
         
            -
                    - 1
         
     | 
| 
       51 
     | 
    
         
            -
                    version: 1.0.0.rc.1
         
     | 
| 
      
 29 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 30 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 31 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 32 
     | 
    
         
            +
                    version: 1.0.0
         
     | 
| 
       52 
33 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       53 
     | 
    
         
            -
              version_requirements: *id002
         
     | 
| 
       54 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       55 
     | 
    
         
            -
              name: rspec
         
     | 
| 
       56 
34 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       57 
     | 
    
         
            -
               
     | 
| 
      
 35 
     | 
    
         
            +
              version_requirements: *7954280
         
     | 
| 
      
 36 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 37 
     | 
    
         
            +
              name: rspec
         
     | 
| 
      
 38 
     | 
    
         
            +
              requirement: &7951860 !ruby/object:Gem::Requirement
         
     | 
| 
       58 
39 
     | 
    
         
             
                none: false
         
     | 
| 
       59 
     | 
    
         
            -
                requirements: 
     | 
| 
       60 
     | 
    
         
            -
                - -  
     | 
| 
       61 
     | 
    
         
            -
                  - !ruby/object:Gem::Version 
     | 
| 
       62 
     | 
    
         
            -
                     
     | 
| 
       63 
     | 
    
         
            -
                    segments: 
         
     | 
| 
       64 
     | 
    
         
            -
                    - 0
         
     | 
| 
       65 
     | 
    
         
            -
                    version: "0"
         
     | 
| 
      
 40 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 41 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 42 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 43 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       66 
44 
     | 
    
         
             
              type: :development
         
     | 
| 
       67 
     | 
    
         
            -
               
     | 
| 
      
 45 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 46 
     | 
    
         
            +
              version_requirements: *7951860
         
     | 
| 
       68 
47 
     | 
    
         
             
            description: A simple Chef cookbook dependency manager
         
     | 
| 
       69 
48 
     | 
    
         
             
            email: msf@kisoku.net
         
     | 
| 
       70 
     | 
    
         
            -
            executables: 
     | 
| 
      
 49 
     | 
    
         
            +
            executables:
         
     | 
| 
       71 
50 
     | 
    
         
             
            - whisk
         
     | 
| 
       72 
51 
     | 
    
         
             
            extensions: []
         
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
52 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
            files: 
         
     | 
| 
      
 53 
     | 
    
         
            +
            files:
         
     | 
| 
       77 
54 
     | 
    
         
             
            - LICENSE
         
     | 
| 
       78 
55 
     | 
    
         
             
            - README.md
         
     | 
| 
       79 
     | 
    
         
            -
            - lib/whisk.rb
         
     | 
| 
      
 56 
     | 
    
         
            +
            - lib/whisk/version.rb
         
     | 
| 
      
 57 
     | 
    
         
            +
            - lib/whisk/bowl.rb
         
     | 
| 
      
 58 
     | 
    
         
            +
            - lib/whisk/ingredient.rb
         
     | 
| 
       80 
59 
     | 
    
         
             
            - lib/whisk/mixin/shellout.rb
         
     | 
| 
       81 
     | 
    
         
            -
            - lib/whisk/config.rb
         
     | 
| 
       82 
60 
     | 
    
         
             
            - lib/whisk/flavour/git.rb
         
     | 
| 
       83 
     | 
    
         
            -
            - lib/whisk/bowl.rb
         
     | 
| 
       84 
61 
     | 
    
         
             
            - lib/whisk/flavours.rb
         
     | 
| 
      
 62 
     | 
    
         
            +
            - lib/whisk/config.rb
         
     | 
| 
       85 
63 
     | 
    
         
             
            - lib/whisk/log.rb
         
     | 
| 
       86 
     | 
    
         
            -
            - lib/whisk 
     | 
| 
       87 
     | 
    
         
            -
            - lib/whisk/ingredient.rb
         
     | 
| 
      
 64 
     | 
    
         
            +
            - lib/whisk.rb
         
     | 
| 
       88 
65 
     | 
    
         
             
            - bin/whisk
         
     | 
| 
       89 
66 
     | 
    
         
             
            homepage: http://github.com/kisoku/whisk
         
     | 
| 
       90 
67 
     | 
    
         
             
            licenses: []
         
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
68 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       93 
69 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
     | 
    
         
            -
            require_paths: 
         
     | 
| 
      
 70 
     | 
    
         
            +
            require_paths:
         
     | 
| 
       96 
71 
     | 
    
         
             
            - lib
         
     | 
| 
       97 
     | 
    
         
            -
            required_ruby_version: !ruby/object:Gem::Requirement 
     | 
| 
      
 72 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       98 
73 
     | 
    
         
             
              none: false
         
     | 
| 
       99 
     | 
    
         
            -
              requirements: 
     | 
| 
       100 
     | 
    
         
            -
              - -  
     | 
| 
       101 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
     | 
| 
       102 
     | 
    
         
            -
                   
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
                  - 0
         
     | 
| 
       105 
     | 
    
         
            -
                  version: "0"
         
     | 
| 
       106 
     | 
    
         
            -
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 74 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 75 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 76 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 77 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 78 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       107 
79 
     | 
    
         
             
              none: false
         
     | 
| 
       108 
     | 
    
         
            -
              requirements: 
     | 
| 
       109 
     | 
    
         
            -
              - -  
     | 
| 
       110 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
     | 
| 
       111 
     | 
    
         
            -
                   
     | 
| 
       112 
     | 
    
         
            -
                  segments: 
         
     | 
| 
       113 
     | 
    
         
            -
                  - 0
         
     | 
| 
       114 
     | 
    
         
            -
                  version: "0"
         
     | 
| 
      
 80 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 81 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 82 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 83 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
       115 
84 
     | 
    
         
             
            requirements: []
         
     | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
       117 
85 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       118 
     | 
    
         
            -
            rubygems_version: 1.8. 
     | 
| 
      
 86 
     | 
    
         
            +
            rubygems_version: 1.8.15
         
     | 
| 
       119 
87 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       120 
88 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       121 
89 
     | 
    
         
             
            summary: A simple Chef cookbook dependency manager
         
     | 
| 
       122 
90 
     | 
    
         
             
            test_files: []
         
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
      
 91 
     | 
    
         
            +
            has_rdoc: 
         
     |