hansolo 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 505adb6131677e260940473632054933505f69e5
4
- data.tar.gz: ece50f1e52ab3efd2b6b45e85d328e94ed4874bc
3
+ metadata.gz: ca20af294048508c5a7b377be0dec607fb18f971
4
+ data.tar.gz: 45723316304d1c66e72246d1455a9af9951394a1
5
5
  SHA512:
6
- metadata.gz: 10c903cbd9a45ff8b6aa13660a16592ff56f149ac4af4e6f684406f4c118a10974890105455f8f846893eb12d72bb26b8d05d1c4cb520d4ad237e2e1407aa609
7
- data.tar.gz: d53e12dcdd642092ba3e84f7e06900f8af26f12370e44742994d8edd3662fba89e309722d17d404b9333275758cb85e015274aae7d4bca97ccf5885f1b98bf0f
6
+ metadata.gz: 31a1ee39e3e8245fbe2bd1658bebc268c326ba069704bed76b0bd3b46bb904910cd20a5aa51131771cda16e8cb348f9afada615bcf8f1bbc65936e3ee591f6f0
7
+ data.tar.gz: 49d965a15e31f88902b201ff62766a64a1815d1018647602583ea3b96dbf416d4855f3fb0b980265f621c9ea5835493a7409e336e9b480ad82cf0a991736ac0c
@@ -1,28 +1,27 @@
1
1
  module Hansolo::Providers::AWS
2
2
  module Solo
3
3
  def sync_data_bags
4
- threads = hosts.map do |host|
5
- Thread.new do
6
- ssh = connect(host)
4
+ items = bucket.objects.with_prefix(Hansolo.app)
7
5
 
8
- command = data_bag_items.inject([]) do |cmd, object|
9
- key = object.key.sub("#{Hansolo.app}/", '')
10
- path = Pathname.new('/tmp/data_bags').join(key)
6
+ command = items.inject([]) do |cmd, object|
7
+ key = object.key.sub("#{Hansolo.app}/", '')
8
+ path = Pathname.new('/tmp/data_bags').join(key)
9
+
10
+ cmd << "mkdir -p #{path.dirname}"
11
+ cmd << "echo '#{object.read}' > #{path}"
12
+ end
11
13
 
12
- cmd << "mkdir -p #{path.dirname}"
13
- cmd << "echo '#{object.read}' > #{path}"
14
- end
14
+ command = command.join('; ')
15
15
 
16
- ssh.exec! command.join('; ')
16
+ threads = hosts.map do |host|
17
+ Thread.new do
18
+ ssh = connect(host)
19
+ ssh.exec! command
17
20
  ssh.close
18
21
  end
19
22
  end
20
23
 
21
24
  threads.map(&:join)
22
25
  end
23
-
24
- def data_bag_items
25
- bucket.objects.with_prefix(Hansolo.app)
26
- end
27
26
  end
28
27
  end
@@ -1,3 +1,3 @@
1
1
  module Hansolo
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hansolo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Kaney
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-23 00:00:00.000000000 Z
11
+ date: 2013-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk