dapp 0.25.4 → 0.25.5
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
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: d74d1fab60b30763f46d622690469bb1d8c6e5f8
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: b5ec340a6983661f871768b0165011ad5917d949
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 079d63476a6cdd1fb18b250c5f5d70be7bf407b189f04b7ef75e3db816e0912e192288a2b038fc17e4dcbc27e1f25b8d8c56df120a3abd5382cc2dba8b5fe86a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 56103601183838829b6fa8297f9dd7d3572201a7e4800aef8c55ed696b18951c4839d07970192966be288a9f2e77a5c3b5e3b53181e6a6a994578265bf1a15c4
         
     | 
| 
         @@ -4,6 +4,8 @@ module Dapp 
     | 
|
| 
       4 
4 
     | 
    
         
             
                  module Directive
         
     | 
| 
       5 
5 
     | 
    
         
             
                    class Dimg < Base
         
     | 
| 
       6 
6 
     | 
    
         
             
                      module Validation
         
     | 
| 
      
 7 
     | 
    
         
            +
                        include Helper::Trivia
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       7 
9 
     | 
    
         
             
                        def validate!
         
     | 
| 
       8 
10 
     | 
    
         
             
                          directives_validate!
         
     | 
| 
       9 
11 
     | 
    
         
             
                          validate_scratch!
         
     | 
| 
         @@ -138,29 +140,13 @@ module Dapp 
     | 
|
| 
       138 
140 
     | 
    
         
             
                        end
         
     | 
| 
       139 
141 
     | 
    
         | 
| 
       140 
142 
     | 
    
         
             
                        def validate_artifact!(verifiable_artifact, artifact)
         
     | 
| 
       141 
     | 
    
         
            -
                           
     | 
| 
       142 
     | 
    
         
            -
             
     | 
| 
       143 
     | 
    
         
            -
                             
     | 
| 
       144 
     | 
    
         
            -
                          end
         
     | 
| 
       145 
     | 
    
         
            -
             
     | 
| 
       146 
     | 
    
         
            -
                          if verifiable_artifact[:include_paths].empty?
         
     | 
| 
       147 
     | 
    
         
            -
                            if artifact[:include_paths].empty? || verifiable_artifact[:exclude_paths].empty?
         
     | 
| 
       148 
     | 
    
         
            -
                              raise ::Dapp::Error::Config, code: :artifact_conflict
         
     | 
| 
       149 
     | 
    
         
            -
                            else
         
     | 
| 
       150 
     | 
    
         
            -
                              validate_artifact_path!(verifiable_artifact, artifact[:include_paths])
         
     | 
| 
       151 
     | 
    
         
            -
                            end
         
     | 
| 
      
 143 
     | 
    
         
            +
                          cases = []
         
     | 
| 
      
 144 
     | 
    
         
            +
                          cases << verifiable_artifact[:include_paths].any? do |verifiable_path|
         
     | 
| 
      
 145 
     | 
    
         
            +
                            !ignore_path?(verifiable_path, paths: artifact[:include_paths], exclude_paths: artifact[:exclude_paths])
         
     | 
| 
       152 
146 
     | 
    
         
             
                          end
         
     | 
| 
       153 
     | 
    
         
            -
             
     | 
| 
      
 147 
     | 
    
         
            +
                          cases << verifiable_artifact[:include_paths].empty? && artifact[:include_paths].empty?
         
     | 
| 
       154 
148 
     | 
    
         | 
| 
       155 
     | 
    
         
            -
             
     | 
| 
       156 
     | 
    
         
            -
                          raise ::Dapp::Error::Config, code: :artifact_conflict unless begin
         
     | 
| 
       157 
     | 
    
         
            -
                            potential_conflicts.all? do |path|
         
     | 
| 
       158 
     | 
    
         
            -
                              loop do
         
     | 
| 
       159 
     | 
    
         
            -
                                break if verifiable_artifact[:exclude_paths].include?(path) || ((path = File.dirname(path)) == '.')
         
     | 
| 
       160 
     | 
    
         
            -
                              end
         
     | 
| 
       161 
     | 
    
         
            -
                              verifiable_artifact[:exclude_paths].include?(path)
         
     | 
| 
       162 
     | 
    
         
            -
                            end
         
     | 
| 
       163 
     | 
    
         
            -
                          end
         
     | 
| 
      
 149 
     | 
    
         
            +
                          raise ::Dapp::Error::Config, code: :artifact_conflict if cases.any?
         
     | 
| 
       164 
150 
     | 
    
         
             
                        end
         
     | 
| 
       165 
151 
     | 
    
         | 
| 
       166 
152 
     | 
    
         
             
                        def _associated_artifacts
         
     | 
| 
         @@ -121,7 +121,7 @@ module Dapp 
     | 
|
| 
       121 
121 
     | 
    
         
             
                      last_part_path = path_parts.shift
         
     | 
| 
       122 
122 
     | 
    
         
             
                      test_path      = [test_path, last_part_path].compact.join('/')
         
     | 
| 
       123 
123 
     | 
    
         | 
| 
       124 
     | 
    
         
            -
                      non_match    = !File.fnmatch(test_path, embedded_rel_path, File::FNM_PATHNAME)
         
     | 
| 
      
 124 
     | 
    
         
            +
                      non_match    = !File.fnmatch(test_path, embedded_rel_path, File::FNM_PATHNAME|File::FNM_DOTMATCH)
         
     | 
| 
       125 
125 
     | 
    
         
             
                      part_for_all = (last_part_path == '**')
         
     | 
| 
       126 
126 
     | 
    
         | 
| 
       127 
127 
     | 
    
         
             
                      if non_match || part_for_all
         
     | 
| 
         @@ -227,22 +227,6 @@ module Dapp 
     | 
|
| 
       227 
227 
     | 
    
         
             
                        paths.empty? || paths.any? { |p| check_path?(path, p) || check_subpath?(path, p) }
         
     | 
| 
       228 
228 
     | 
    
         
             
                      end
         
     | 
| 
       229 
229 
     | 
    
         
             
                    end
         
     | 
| 
       230 
     | 
    
         
            -
             
     | 
| 
       231 
     | 
    
         
            -
                    def ignore_path?(path, paths: [], exclude_paths: [])
         
     | 
| 
       232 
     | 
    
         
            -
                      ignore_path_base(path, exclude_paths: exclude_paths) do
         
     | 
| 
       233 
     | 
    
         
            -
                        paths.empty? ||
         
     | 
| 
       234 
     | 
    
         
            -
                          paths.any? do |p|
         
     | 
| 
       235 
     | 
    
         
            -
                            File.fnmatch?(p, path, File::FNM_PATHNAME) ||
         
     | 
| 
       236 
     | 
    
         
            -
                              File.fnmatch?(File.join(p, '**', '*'), path, File::FNM_PATHNAME)
         
     | 
| 
       237 
     | 
    
         
            -
                          end
         
     | 
| 
       238 
     | 
    
         
            -
                      end
         
     | 
| 
       239 
     | 
    
         
            -
                    end
         
     | 
| 
       240 
     | 
    
         
            -
             
     | 
| 
       241 
     | 
    
         
            -
                    def ignore_path_base(path, exclude_paths: [])
         
     | 
| 
       242 
     | 
    
         
            -
                      is_exclude_path = exclude_paths.any? { |p| check_path?(path, p) }
         
     | 
| 
       243 
     | 
    
         
            -
                      is_include_path = yield
         
     | 
| 
       244 
     | 
    
         
            -
                      is_exclude_path || !is_include_path
         
     | 
| 
       245 
     | 
    
         
            -
                    end
         
     | 
| 
       246 
230 
     | 
    
         
             
                  end
         
     | 
| 
       247 
231 
     | 
    
         
             
                end
         
     | 
| 
       248 
232 
     | 
    
         
             
              end
         
     | 
    
        data/lib/dapp/helper/trivia.rb
    CHANGED
    
    | 
         @@ -28,12 +28,28 @@ module Dapp 
     | 
|
| 
       28 
28 
     | 
    
         
             
                    Pathname.new(File.join(base.to_s, *path.compact.map(&:to_s)))
         
     | 
| 
       29 
29 
     | 
    
         
             
                  end
         
     | 
| 
       30 
30 
     | 
    
         | 
| 
      
 31 
     | 
    
         
            +
                  def ignore_path?(path, paths: [], exclude_paths: [])
         
     | 
| 
      
 32 
     | 
    
         
            +
                    ignore_path_base(path, exclude_paths: exclude_paths) do
         
     | 
| 
      
 33 
     | 
    
         
            +
                      paths.empty? ||
         
     | 
| 
      
 34 
     | 
    
         
            +
                        paths.any? do |p|
         
     | 
| 
      
 35 
     | 
    
         
            +
                          File.fnmatch?(p, path, File::FNM_PATHNAME|File::FNM_DOTMATCH) ||
         
     | 
| 
      
 36 
     | 
    
         
            +
                            File.fnmatch?(File.join(p, '**', '*'), path, File::FNM_PATHNAME|File::FNM_DOTMATCH)
         
     | 
| 
      
 37 
     | 
    
         
            +
                        end
         
     | 
| 
      
 38 
     | 
    
         
            +
                    end
         
     | 
| 
      
 39 
     | 
    
         
            +
                  end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                  def ignore_path_base(path, exclude_paths: [])
         
     | 
| 
      
 42 
     | 
    
         
            +
                    is_exclude_path = exclude_paths.any? { |p| check_path?(path, p) }
         
     | 
| 
      
 43 
     | 
    
         
            +
                    is_include_path = yield
         
     | 
| 
      
 44 
     | 
    
         
            +
                    is_exclude_path || !is_include_path
         
     | 
| 
      
 45 
     | 
    
         
            +
                  end
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
       31 
47 
     | 
    
         
             
                  def check_path?(path, format)
         
     | 
| 
       32 
     | 
    
         
            -
                    path_checker(path) { |checking_path| File.fnmatch(format, checking_path, File::FNM_PATHNAME) }
         
     | 
| 
      
 48 
     | 
    
         
            +
                    path_checker(path) { |checking_path| File.fnmatch(format, checking_path, File::FNM_PATHNAME|File::FNM_DOTMATCH) }
         
     | 
| 
       33 
49 
     | 
    
         
             
                  end
         
     | 
| 
       34 
50 
     | 
    
         | 
| 
       35 
51 
     | 
    
         
             
                  def check_subpath?(path, format)
         
     | 
| 
       36 
     | 
    
         
            -
                    path_checker(format) { |checking_path| File.fnmatch(checking_path, path, File::FNM_PATHNAME) }
         
     | 
| 
      
 52 
     | 
    
         
            +
                    path_checker(format) { |checking_path| File.fnmatch(checking_path, path, File::FNM_PATHNAME|File::FNM_DOTMATCH) }
         
     | 
| 
       37 
53 
     | 
    
         
             
                  end
         
     | 
| 
       38 
54 
     | 
    
         | 
| 
       39 
55 
     | 
    
         
             
                  def path_checker(path)
         
     | 
| 
         @@ -13,8 +13,8 @@ module Dapp 
     | 
|
| 
       13 
13 
     | 
    
         
             
                                  template_relative_path_pattern = Pathname(File.expand_path(template_path_pattern)).subpath_of(path('.helm'))
         
     | 
| 
       14 
14 
     | 
    
         
             
                                  template_relative_path_pattern ||= template_path_pattern
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
     | 
    
         
            -
                                  File.fnmatch?(template_relative_path_pattern, template_path_without_chart_name, File::FNM_PATHNAME) ||
         
     | 
| 
       17 
     | 
    
         
            -
                                    File.fnmatch?(template_relative_path_pattern, template_path, File::FNM_PATHNAME)
         
     | 
| 
      
 16 
     | 
    
         
            +
                                  File.fnmatch?(template_relative_path_pattern, template_path_without_chart_name, File::FNM_PATHNAME|File::FNM_DOTMATCH) ||
         
     | 
| 
      
 17 
     | 
    
         
            +
                                    File.fnmatch?(template_relative_path_pattern, template_path, File::FNM_PATHNAME|File::FNM_DOTMATCH)
         
     | 
| 
       18 
18 
     | 
    
         
             
                                end
         
     | 
| 
       19 
19 
     | 
    
         
             
                              end
         
     | 
| 
       20 
20 
     | 
    
         
             
                            else
         
     | 
    
        data/lib/dapp/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: dapp
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.25. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.25.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Dmitry Stolyarov
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2018-02- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2018-02-21 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: mixlib-shellout
         
     |