dapp 0.4.2 → 0.4.3
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 +8 -8
- data/lib/dapp/builder/chef.rb +22 -10
- data/lib/dapp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTU3NmEyYmMxYjg4M2FjNDY0YzEwMmY2YzFkZjJhMmMyZmEwN2Y0Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OWJhNjNiMDUxODkwZWQ5MDdjMjA4YmRmOTk5M2Y4ZjJhMjhkMzUxYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTdiN2YzOTZmYzE3YzA0MzA1OWNiNTYyMjI2NWJmODU2NDIzM2ZkNzBjMTJh
|
10
|
+
MTc4YzNiNGFiMzJiM2VjYTY5MGFiYzNiMDA4ZWE4ODQ3MDQ1YWNhM2M0ZTNl
|
11
|
+
OWY0MDk3ODIxMzk1NzhhMDExMTIxMGM1ZjgyMGM0NWRiMTQzNDA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzgzMDZiMTk5MjAzMjExMDRiZTc2MmFjNTFiNzhjNGI3YTBlNTdjOTE1ZWU4
|
14
|
+
NjE5OGU4NjNlM2I4NzNiODRjNTg2MDA4MDhkZDA2YzdmOWFkY2FhZDMwZGRh
|
15
|
+
YWRlZjU4YzM2YmVmYWRjNjdmNDY2NzY4ZGM3Nzg0ZDViZGJmZmI=
|
data/lib/dapp/builder/chef.rb
CHANGED
@@ -49,6 +49,10 @@ module Dapp
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
+
def enabled_recipes
|
53
|
+
application.config._chef._recipes
|
54
|
+
end
|
55
|
+
|
52
56
|
def project_name
|
53
57
|
cookbook_metadata.name
|
54
58
|
end
|
@@ -210,7 +214,7 @@ module Dapp
|
|
210
214
|
@install_stage_cookbooks[stage] ||= true.tap do
|
211
215
|
common_paths = proc do |cookbook_path|
|
212
216
|
[['metadata.json', 'metadata.json'],
|
213
|
-
[
|
217
|
+
["attributes/#{stage}", 'attributes/default'],
|
214
218
|
["files/#{stage}", 'files/default'],
|
215
219
|
["templates/#{stage}", 'templates/default']
|
216
220
|
].select { |from, _| cookbook_path.join(from).exist? }
|
@@ -226,7 +230,7 @@ module Dapp
|
|
226
230
|
mdapp_enabled = is_mdapp && enabled_modules.include?(mdapp_name)
|
227
231
|
|
228
232
|
paths = if is_project
|
229
|
-
recipe_paths =
|
233
|
+
recipe_paths = enabled_recipes
|
230
234
|
.map { |recipe| ["recipes/#{stage}/#{recipe}.rb", "recipes/#{recipe}.rb"] }
|
231
235
|
.select { |from, _| cookbook_path.join(from).exist? }
|
232
236
|
|
@@ -263,19 +267,27 @@ module Dapp
|
|
263
267
|
|
264
268
|
@stage_cookbooks_runlist ||= {}
|
265
269
|
@stage_cookbooks_runlist[stage] ||= [].tap do |res|
|
266
|
-
|
270
|
+
to_entry = proc { |cookbook, entrypoint| "#{cookbook}::#{entrypoint}" }
|
271
|
+
to_recipe_entry = proc do |cookbook, entrypoint|
|
267
272
|
entrypoint_file = stage_cookbooks_path(stage, cookbook, 'recipes', "#{entrypoint}.rb")
|
268
273
|
next unless entrypoint_file.exist?
|
269
|
-
|
274
|
+
to_entry[cookbook, entrypoint]
|
270
275
|
end
|
271
276
|
|
272
|
-
|
273
|
-
|
274
|
-
|
277
|
+
enabled_recipes
|
278
|
+
.map { |recipe| to_recipe_entry[project_name, recipe] }
|
279
|
+
.compact
|
280
|
+
.tap do |entries|
|
281
|
+
if entries.any?
|
282
|
+
res.concat entries
|
283
|
+
else
|
284
|
+
res << to_entry[project_name, 'void']
|
285
|
+
end
|
286
|
+
end
|
275
287
|
|
276
|
-
|
277
|
-
|
278
|
-
|
288
|
+
enabled_modules
|
289
|
+
.map { |mod| to_recipe_entry["mdapp-#{mod}", stage] || to_entry["mdapp-#{mod}", 'void'] }
|
290
|
+
.tap { |entries| res.concat entries }
|
279
291
|
end
|
280
292
|
end
|
281
293
|
# rubocop:enable Metrics/AbcSize
|
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.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Stolyarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|