dapp 0.1.2 → 0.1.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 +12 -11
- data/lib/dapp/builder/chef/berksfile.rb +2 -0
- data/lib/dapp/builder/chef/cookbook_metadata.rb +5 -0
- 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
|
+
MmJjZGYxOTIyMWIwYTRiMTlkOTk5NTBlMDdiMjQ3NGY1ZTM1YmMxMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2VlYTUxMWU1MGMwYTIzZDM2NWRiNGI3YzczYTM1NTZjMDUyMTBjOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmEwYmU2YjEzMmViNGEwYmM2MzFhNmMxM2Q2OTdmMDg4NThkMjVhY2M5Njhh
|
10
|
+
NzRjOGJkYzE3ZWEzYzEzZDI3YmFiZWEyMTg2Y2NiYjVlZDQwYzRiZDIxMDk2
|
11
|
+
YTRlNzJjZDU3NzkyZTU2MjBkN2I3ZTQ3YmY4N2I0MTI3M2M5ZTE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzUzZmRmNzMwYjE5NTg1MTI2NTVlMjg1ZWYwOWRlOGUyZGYzOThlM2FlN2Y1
|
14
|
+
MGEwZDE1YzhiNzAxYmVmODQ0YWVhY2JiM2ZmNjVmNzg3M2QwZTVkYWI5Njdl
|
15
|
+
ZDg4ZmNkZDEyYWJjNDVhN2QyZDUxOGVlOTY3M2Y3MTlhZjRlMTY=
|
data/lib/dapp/builder/chef.rb
CHANGED
@@ -9,6 +9,7 @@ module Dapp
|
|
9
9
|
).freeze
|
10
10
|
|
11
11
|
STAGE_LOCAL_COOKBOOK_PATTERNS = %w(
|
12
|
+
metadata.json
|
12
13
|
recipes/%{stage}.rb
|
13
14
|
recipes/*_%{stage}.rb
|
14
15
|
files/%{stage}/*
|
@@ -87,17 +88,17 @@ module Dapp
|
|
87
88
|
|
88
89
|
def local_cookbook_paths
|
89
90
|
@local_cookbook_paths ||= berksfile.local_cookbooks
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
91
|
+
.values
|
92
|
+
.map { |cookbook| cookbook[:path] }
|
93
|
+
.product(LOCAL_COOKBOOK_PATTERNS)
|
94
|
+
.map { |cb, dir| Dir[cb.join(dir)] }
|
95
|
+
.flatten
|
96
|
+
.map(&Pathname.method(:new))
|
96
97
|
end
|
97
98
|
|
98
99
|
def stage_cookbooks_vendored_paths(stage, with_files: false)
|
99
100
|
Dir[cookbooks_vendor_path('*')]
|
100
|
-
.map do|cookbook_path|
|
101
|
+
.map do |cookbook_path|
|
101
102
|
if ['mdapp-*', project_name].any? { |pattern| File.fnmatch(pattern, File.basename(cookbook_path)) }
|
102
103
|
STAGE_LOCAL_COOKBOOK_PATTERNS.map do |pattern|
|
103
104
|
Dir[File.join(cookbook_path, pattern % { stage: stage })]
|
@@ -124,7 +125,7 @@ module Dapp
|
|
124
125
|
|
125
126
|
application.hashsum([_paths_checksum(stage_cookbooks_vendored_paths(stage, with_files: true)),
|
126
127
|
*application.config._chef._modules,
|
127
|
-
|
128
|
+
stage == :infra_install ? chefdk_image : nil].compact).tap do |checksum|
|
128
129
|
stage_cookbooks_checksum_path(stage).write "#{checksum}\n"
|
129
130
|
end
|
130
131
|
end
|
@@ -148,7 +149,7 @@ module Dapp
|
|
148
149
|
|
149
150
|
def chefdk_container
|
150
151
|
@chefdk_container ||= begin
|
151
|
-
if application.shellout("docker inspect #{chefdk_container_name}").exitstatus
|
152
|
+
if application.shellout("docker inspect #{chefdk_container_name}").exitstatus.nonzero?
|
152
153
|
application.log_secondary_process(application.t(code: 'process.chefdk_loading'), short: true) do
|
153
154
|
application.shellout(
|
154
155
|
['docker run',
|
@@ -251,8 +252,8 @@ module Dapp
|
|
251
252
|
application.hashsum [
|
252
253
|
*paths.map(&:to_s).sort,
|
253
254
|
*paths.reject(&:directory?)
|
254
|
-
|
255
|
-
|
255
|
+
.sort
|
256
|
+
.reduce(nil) { |a, e| application.hashsum [a, e.read].compact }
|
256
257
|
]
|
257
258
|
end
|
258
259
|
end
|
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.1.
|
4
|
+
version: 0.1.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-07-
|
11
|
+
date: 2016-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|