dapp 0.13.21 → 0.13.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c6fe51938164442f3a4d1c70c954505de2a819b2
4
- data.tar.gz: 301499af3fb80b51c4a059134a897be3ea966e6c
3
+ metadata.gz: 328339d676470a5b9dde9b652176c9832d2d9b5f
4
+ data.tar.gz: 6cb726ff189d3a830ed5a7a5951106df4f325c53
5
5
  SHA512:
6
- metadata.gz: ec4a97af9ac3c47067e8fc3ca2cea6b17b1beb309fe778a7ff4ed150c4ee1d2034dbaf4cb0e5ce24bd68d6bfb9f056f7f49a864564bf19f44acd4b35a1d45519
7
- data.tar.gz: d045312a3c0b9292bfa1dd930ac9ce0b0ed1c5759aefeadc05211933ffe3903857728ac91ca8962553a2e25ad2de12a5f79ed8e5034c174f5f69ebcbe4e8b567
6
+ metadata.gz: 6f60a9c036e8c459ff91738d1412bfe4477162357fa81765e71a253068291ec2dbca7102f82cea8aee3d8878b9d69081f10ee727216af8900f09f33ede304795
7
+ data.tar.gz: f3051c94f5b2b4f9ca13fec239e8ce8d44c2996f17752f742b3460074a2cd47b9ce9d3f67e1f831256ff04efd49e36b4479e789e9c140121d9b0a20a552f6879
@@ -9,10 +9,6 @@ module Dapp
9
9
  !!@_dev_mode
10
10
  end
11
11
 
12
- def after_parsing!
13
- do_all!('_after_parsing!')
14
- end
15
-
16
12
  def validate!
17
13
  do_all!('_validate!')
18
14
  end
@@ -33,7 +33,6 @@ module Dapp
33
33
  ::Dapp::Config::Config.new(dapp: self).tap do |config|
34
34
  begin
35
35
  config.instance_eval File.read(dappfile_path), dappfile_path
36
- config.after_parsing!
37
36
  config.validate!
38
37
  rescue SyntaxError, StandardError => e
39
38
  backtrace = e.backtrace.find { |line| line.start_with?(dappfile_path) }
@@ -8,10 +8,6 @@ module Dapp
8
8
 
9
9
  protected
10
10
 
11
- def dimg_after_parsing!
12
- _dimg.each(&:artifacts_after_parsing!)
13
- end
14
-
15
11
  def dimg_config_validate!
16
12
  raise Error::Config, code: :dimg_name_required if _dimg.any? { |dimg| dimg._name.nil? } && _dimg.size > 1
17
13
  _dimg.each(&:validate!)
@@ -130,10 +130,6 @@ module Dapp
130
130
  end
131
131
  end
132
132
 
133
- def artifacts_after_parsing!
134
- _artifacts_auto_excluding!
135
- end
136
-
137
133
  protected
138
134
 
139
135
  def builder(type)
@@ -144,42 +140,6 @@ module Dapp
144
140
  def passed_directives
145
141
  [:@_chef, :@_shell, :@_docker, :@_git_artifact, :@_mount, :@_artifact_groups, :@_builder]
146
142
  end
147
-
148
- def _artifacts_auto_excluding!
149
- path_to_relative = proc { |path| path.reverse.chomp('/').reverse }
150
-
151
- all_artifacts.reduce({}) do |hash, artifact|
152
- unless artifact._to.nil?
153
- to_common = artifact._to[/^\/[^\/]*/]
154
- hash[to_common] ||= []
155
- hash[to_common] << artifact
156
- end
157
- hash
158
- end.each do |to_common, artifacts|
159
- include_paths_common = artifacts.reduce([]) do |arr, artifact|
160
- arr << artifact._to.sub(to_common, '')
161
- arr.concat(artifact._include_paths.map { |path| File.join(artifact._to.sub(to_common, ''), path) } )
162
- arr
163
- end.map(&path_to_relative).uniq
164
-
165
- artifacts.each do |artifact|
166
- artifact_include_shift = path_to_relative.call(artifact._to.sub(to_common, ''))
167
-
168
- include_paths_common.each do |path|
169
- next if artifact_include_shift.start_with? path
170
-
171
- path = path_to_relative.call(path.sub(artifact_include_shift, ''))
172
- unless artifact._exclude_paths.any? { |epath| path.start_with? epath }
173
- artifact._exclude_paths << path
174
- end
175
- end
176
- end
177
- end
178
- end
179
-
180
- def all_artifacts
181
- _artifact + _git_artifact._local + _git_artifact._remote
182
- end
183
143
  end # InstanceMethods
184
144
  # rubocop:enable Metrics/ModuleLength
185
145
  end # Dimg
@@ -67,7 +67,7 @@ module Dapp
67
67
  end
68
68
 
69
69
  def validate_artifacts!
70
- artifacts = validate_artifact_format(all_artifacts)
70
+ artifacts = validate_artifact_format(validated_artifacts)
71
71
  loop do
72
72
  break if artifacts.empty?
73
73
  verifiable_artifact = artifacts.shift
@@ -133,6 +133,10 @@ module Dapp
133
133
  !(art._before.nil? && art._after.nil?)
134
134
  end
135
135
  end
136
+
137
+ def validated_artifacts
138
+ _artifact + _git_artifact._local + _git_artifact._remote
139
+ end
136
140
  end # Validation
137
141
  # rubocop:enable Metrics/ModuleLength
138
142
  end # Dimg
@@ -1,4 +1,4 @@
1
1
  module Dapp
2
- VERSION = '0.13.21'.freeze
3
- BUILD_CACHE_VERSION = 17
2
+ VERSION = '0.13.22'.freeze
3
+ BUILD_CACHE_VERSION = 18
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.21
4
+ version: 0.13.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Stolyarov