batali 0.1.20 → 0.1.22
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +6 -0
- data/lib/batali/b_file.rb +11 -0
- data/lib/batali/command/install.rb +6 -5
- data/lib/batali/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: dbea03b20a8f3a778cf33c5419052e6287d03fa6
         | 
| 4 | 
            +
              data.tar.gz: 31cb700a57303625a7b153d7cd337d697ddbcaff
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 8cb20016cc7b46f91cc629020b50e5661c16ad0c81ebdb56beeb64d9bbef012973937e9bb8844197278a819b75a52072cc38db4f96f831bea0a12b79bbbc1ded
         | 
| 7 | 
            +
              data.tar.gz: 78b4188b71cbeaaccf38a244ecc2c31ec134485aca8974bbf527d15f747c15a96da8a02a31adaba58fd07a427f53207edc0eb1b15432ed4beffaf6f1c9230ecf
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -194,6 +194,12 @@ $ batali resolve --infrastructure | |
| 194 194 |  | 
| 195 195 | 
             
            _NOTE: Depending on constraints defined within the Batali file, this can be a very large manifest_
         | 
| 196 196 |  | 
| 197 | 
            +
            ## Test Kitchen
         | 
| 198 | 
            +
             | 
| 199 | 
            +
            Batali can be used with [Test Kitchen](https://github.com/test-kitchen/test-kitchen):
         | 
| 200 | 
            +
             | 
| 201 | 
            +
            * https://github.com/hw-labs/batali-tk
         | 
| 202 | 
            +
             | 
| 197 203 | 
             
            # Info
         | 
| 198 204 |  | 
| 199 205 | 
             
            * Repository: https://github.com/hw-labs/batali
         | 
    
        data/lib/batali/b_file.rb
    CHANGED
    
    | @@ -31,6 +31,10 @@ module Batali | |
| 31 31 | 
             
                  self
         | 
| 32 32 | 
             
                end
         | 
| 33 33 |  | 
| 34 | 
            +
                def metadata(*args)
         | 
| 35 | 
            +
                  set!(:metadata, *(args.empty? ? [true] : args))
         | 
| 36 | 
            +
                end
         | 
| 37 | 
            +
             | 
| 34 38 | 
             
              end
         | 
| 35 39 |  | 
| 36 40 | 
             
              # Create a new file
         | 
| @@ -92,6 +96,13 @@ module Batali | |
| 92 96 | 
             
                }
         | 
| 93 97 | 
             
                attribute :group, Group, :multiple => true, :coerce => lambda{|v| Group.new()}
         | 
| 94 98 | 
             
                attribute :cookbook, Cookbook, :multiple => true, :coerce => BFile.cookbook_coerce, :default => []
         | 
| 99 | 
            +
                attribute :metadata, Cookbook, :coerce => lambda{ |v, b_file|
         | 
| 100 | 
            +
                  dir = File.dirname(b_file.path)
         | 
| 101 | 
            +
                  m_unit = Origin::Path.new(:name => 'metadata', :path => dir).units.first
         | 
| 102 | 
            +
                  ckbk = Cookbook.new(:name => m_unit.name, :version => m_unit.version, :path => dir)
         | 
| 103 | 
            +
                  b_file.cookbook.push ckbk
         | 
| 104 | 
            +
                  ckbk
         | 
| 105 | 
            +
                }
         | 
| 95 106 |  | 
| 96 107 | 
             
              end
         | 
| 97 108 |  | 
| @@ -10,7 +10,7 @@ module Batali | |
| 10 10 | 
             
                  # Install cookbooks
         | 
| 11 11 | 
             
                  def execute!
         | 
| 12 12 | 
             
                    dry_run('Cookbook installation') do
         | 
| 13 | 
            -
                      install_path =  | 
| 13 | 
            +
                      install_path = config.fetch(:path, 'cookbooks')
         | 
| 14 14 | 
             
                      run_action('Readying installation destination') do
         | 
| 15 15 | 
             
                        FileUtils.rm_rf(install_path)
         | 
| 16 16 | 
             
                        FileUtils.mkdir_p(install_path)
         | 
| @@ -27,13 +27,14 @@ module Batali | |
| 27 27 | 
             
                              )
         | 
| 28 28 | 
             
                            end
         | 
| 29 29 | 
             
                            asset_path = unit.source.asset
         | 
| 30 | 
            +
                            final_path = File.join(install_path, unit.name)
         | 
| 31 | 
            +
                            if(config[:infrastructure])
         | 
| 32 | 
            +
                              final_path << "-#{unit.version}"
         | 
| 33 | 
            +
                            end
         | 
| 30 34 | 
             
                            begin
         | 
| 31 35 | 
             
                              FileUtils.cp_r(
         | 
| 32 36 | 
             
                                File.join(asset_path, '.'),
         | 
| 33 | 
            -
                                 | 
| 34 | 
            -
                                  install_path,
         | 
| 35 | 
            -
                                  "#{unit.name}-#{unit.version}"
         | 
| 36 | 
            -
                                )
         | 
| 37 | 
            +
                                final_path
         | 
| 37 38 | 
             
                              )
         | 
| 38 39 | 
             
                            ensure
         | 
| 39 40 | 
             
                              unit.source.clean_asset(asset_path)
         | 
    
        data/lib/batali/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: batali
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.22
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Chris Roberts
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2015-03- | 
| 11 | 
            +
            date: 2015-03-30 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: attribute_struct
         |