filey-diff 1.2.1 → 1.2.2

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: ba4ae040f41db6cdd1961ba07104e6d2a06934da
4
- data.tar.gz: a27e219df60ba06eec12835610baac8d181f210d
3
+ metadata.gz: 47c72a8f409e6259b8e477bfab6367164f433feb
4
+ data.tar.gz: 11a0a59733aabaed1c83d1bbc2d59965f257b919
5
5
  SHA512:
6
- metadata.gz: b515c0d55fd854cbbfe55260a3359c2293e01215d7bc50aa134659b03085b1934ac626b771dc924234cd31a80a4bce49aaa5870eed7c9b62e1fb227b916416e9
7
- data.tar.gz: 4cf9a66141a590496a286ed3aa8875f65e005d170dc249287782e545eb75f2f50281e081aadf1fc49d4f6493c98da49000d7cd81949897e7c6e48873ca4c5f5c
6
+ metadata.gz: 1c68b67b49f876f3e532834fc765f9abe323c515fff0862dd4280d45e98805ef4c5cc1fd161f92fb72a48b7c63d9d01aac3461e2a1a9193136629e9dd869e59e
7
+ data.tar.gz: 95ac9a4c7c740c3b824176a4951f6d2f2f1ff68840c3f446334860801ea45e9ffc0543e805f8223df56541631380403322bcd25746a823bcbca1c7771345170b
data/changelog.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  This project is [Semantically Versioned](http://semver.org).
4
4
 
5
+ ## 1.2.2
6
+
7
+ * AwsSdkS3 data source: load S3 objects in slices of 100 when concurrency is
8
+ enabled
9
+
5
10
  ## 1.2.1
6
11
 
7
12
  * Allow disabling of parallel processing with `ENV['disable_parallel_processing'] = 'true'`
data/filey-diff.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'filey-diff'
3
- s.version = '1.2.1'
3
+ s.version = '1.2.2'
4
4
 
5
5
  s.summary = "Compare two data sources that contain file-like objects"
6
6
  s.description =
@@ -17,17 +17,22 @@ module Filey
17
17
  end
18
18
 
19
19
  def in_parallel_or_sequentially(map_to_filey)
20
- if ENV['disable_parallel_processing']
21
- @s3_bucket.objects.each do |s3_object|
20
+ jobs = @s3_bucket.objects.map { |s3_object|
21
+ lambda {
22
22
  map_to_filey.call s3_object
23
- end
23
+ }
24
+ }
25
+ if ENV['disable_parallel_processing']
26
+ jobs.each(&:call)
24
27
  else
25
- threads = @s3_bucket.objects.map { |s3_object|
26
- Thread.new(s3_object) {
27
- map_to_filey.call s3_object
28
+ jobs.each_slice(100) { |jobs|
29
+ threads = jobs.map { |job|
30
+ Thread.new {
31
+ job.call
32
+ }
28
33
  }
34
+ threads.each(&:join)
29
35
  }
30
- threads.each { |thread| thread.join }
31
36
  end
32
37
  end
33
38
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filey-diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lauri Lehmijoki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-22 00:00:00.000000000 Z
11
+ date: 2013-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake