dry-stack 0.0.43 → 0.0.45
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/lib/dry-stack/stack.rb +8 -6
- data/lib/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 06d182fe5a8bdb71b11f21207c2fca1b245daf9b91822a75070ed9c1e1f8fc6d
         | 
| 4 | 
            +
              data.tar.gz: d5d4fca3aaf82510188b269f4b724b64b90e201f93a8058000d4260f14d94588
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 156865ed2e32eb35abb0737a7a2ac7446125f02ef7c6f0e748740f5964f6c7ebd8bb50040acc069ccc07e4b0ee943cb7539d25892297100d161c707fed7bf641
         | 
| 7 | 
            +
              data.tar.gz: 9f21c0dbd86f2eb08ea7a479c2461a853f80a3b3f157cf11d0ee8c4caeecd068578ee93b2df75235f48c5541e5e33730be52593d23bef71f72751114dcdff1c1
         | 
    
        data/lib/dry-stack/stack.rb
    CHANGED
    
    | @@ -1,6 +1,7 @@ | |
| 1 1 | 
             
            # frozen_string_literal: true
         | 
| 2 2 | 
             
            require 'yaml'
         | 
| 3 3 | 
             
            require 'optparse'
         | 
| 4 | 
            +
            require 'digest'
         | 
| 4 5 |  | 
| 5 6 | 
             
            module Dry
         | 
| 6 7 |  | 
| @@ -169,9 +170,10 @@ module Dry | |
| 169 170 |  | 
| 170 171 | 
             
                  compose[:configs].update(compose[:configs]) do |name, config|
         | 
| 171 172 | 
             
                    if config[:file_content]
         | 
| 172 | 
            -
                       | 
| 173 | 
            +
                      md5 = Digest::MD5.hexdigest config[:file_content]
         | 
| 174 | 
            +
                      fname = "./#{@name}.config(md5:#{md5}).#{name}"
         | 
| 173 175 | 
             
                      File.write fname, config[:file_content]
         | 
| 174 | 
            -
                      {file: fname}.merge config.except(:file_content)
         | 
| 176 | 
            +
                      {name: "#{name}-#{md5}", file: fname}.merge config.except(:file_content)
         | 
| 175 177 | 
             
                    else
         | 
| 176 178 | 
             
                      config
         | 
| 177 179 | 
             
                    end
         | 
| @@ -202,10 +204,6 @@ module Dry | |
| 202 204 | 
             
                  @description = string
         | 
| 203 205 | 
             
                end
         | 
| 204 206 |  | 
| 205 | 
            -
                def Config(name, opts)
         | 
| 206 | 
            -
                  @configs[name] = opts
         | 
| 207 | 
            -
                end
         | 
| 208 | 
            -
             | 
| 209 207 | 
             
                def Options(opts)
         | 
| 210 208 | 
             
                  warn 'WARN: Options command is used for testing purpose.\
         | 
| 211 209 | 
             
                        Not recommended in real life configurations.' unless $0 =~ /rspec/
         | 
| @@ -220,6 +218,10 @@ module Dry | |
| 220 218 | 
             
                  @ingress.merge! services
         | 
| 221 219 | 
             
                end
         | 
| 222 220 |  | 
| 221 | 
            +
                def Config(name, opts)
         | 
| 222 | 
            +
                  @configs[name] = opts
         | 
| 223 | 
            +
                end
         | 
| 224 | 
            +
             | 
| 223 225 | 
             
                def Deploy(services)
         | 
| 224 226 | 
             
                  @deploy.merge! expand_hash(services)
         | 
| 225 227 | 
             
                end
         | 
    
        data/lib/version.rb
    CHANGED