batali 0.3.12 → 0.3.14

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: 011f26a3e8a17db988eb207d7fc79cbdc51e1306
4
- data.tar.gz: e0bd881f9cf5be081f73c315e6be9ee50a206ff7
3
+ metadata.gz: 56e09e21e418f24e83792d17a8c9498c0b46a2df
4
+ data.tar.gz: 0590ade5cc488326df250797dcffc72820c49245
5
5
  SHA512:
6
- metadata.gz: dc6e7955b3163d94389ee1b71b61ce63651ea760f39e4061682f8fbb91505642129159252e95d851e3ae6cae6b6600d1bebf9f580adad9613e358ed1ef082abb
7
- data.tar.gz: fa4b45f0b1c202a9ada821e6d64456c78316b21b52e969281f7ef6fbc07a9395aec2209dea78b724035430445f9b9498ea0c39ec657a0805d389be7af31811d3
6
+ metadata.gz: f82d8b530f540eeed8436fef0f84f84dadbdea515ef757516a6f50f5c6ed64964ebed25293a5babd6895a2bb3e881b6e82e72e0b8d50201af202f58b27e973c1
7
+ data.tar.gz: 9d322ab00a9088b89b5f78c2bf0745588f8ff294676b03a9737df32d1eeb97df560e3efb74d6d265acb6201a6a90b6a7f8a6224f3cd916b3f93751c7c566dd87
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v0.3.14
2
+ * [enhancement] Use threads when installing cookbooks (#72 thanks @sawanoboly!)
3
+
1
4
  # v0.3.12
2
5
  * [feature] Support multiple sources for single cookbook in infra-mode
3
6
  * [fix] Make cache directory usage consistent in all commands
@@ -20,25 +20,29 @@ module Batali
20
20
  ui.error 'No cookbooks defined within manifest! Try resolving first. (`batali resolve`)'
21
21
  else
22
22
  run_action('Installing cookbooks') do
23
- manifest.cookbook.each do |unit|
24
- if(unit.source.respond_to?(:cache_path))
25
- unit.source.cache_path = cache_directory(
26
- Bogo::Utility.snake(unit.source.class.name.split('::').last)
27
- )
28
- end
29
- asset_path = unit.source.asset
30
- final_path = File.join(install_path, unit.name)
31
- if(infrastructure?)
32
- final_path << "-#{unit.version}"
33
- end
34
- begin
35
- FileUtils.cp_r(
36
- File.join(asset_path, '.'),
37
- final_path
38
- )
39
- ensure
40
- unit.source.clean_asset(asset_path)
41
- end
23
+ manifest.cookbook.each_slice(100) do |units_slice|
24
+ units_slice.map do |unit|
25
+ Thread.new do
26
+ if(unit.source.respond_to?(:cache_path))
27
+ unit.source.cache_path = cache_directory(
28
+ Bogo::Utility.snake(unit.source.class.name.split('::').last)
29
+ )
30
+ end
31
+ asset_path = unit.source.asset
32
+ final_path = File.join(install_path, unit.name)
33
+ if(infrastructure?)
34
+ final_path << "-#{unit.version}"
35
+ end
36
+ begin
37
+ FileUtils.cp_r(
38
+ File.join(asset_path, '.'),
39
+ final_path
40
+ )
41
+ ensure
42
+ unit.source.clean_asset(asset_path)
43
+ end
44
+ end
45
+ end.map(&:join)
42
46
  end
43
47
  nil
44
48
  end
@@ -1,5 +1,5 @@
1
1
  # Batali namespace
2
2
  module Batali
3
3
  # Current version
4
- VERSION = Gem::Version.new('0.3.12')
4
+ VERSION = Gem::Version.new('0.3.14')
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: batali
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-29 00:00:00.000000000 Z
11
+ date: 2016-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: attribute_struct