quick_utils 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,11 @@ module QuickUtils
5
5
  threads = []
6
6
  count = dataset.size
7
7
  nthreads = 1 if count < nthreads
8
- bin_size = count / nthreads
8
+ bin_size = (count / nthreads.to_f).ceil
9
9
  puts "Dividing #{count} items into sizes of #{bin_size} for #{nthreads} threads."
10
10
  t = 0
11
11
  while t < nthreads do
12
- subset = dataset[t*bin_size..t*bin_size+bin_size - 1]
12
+ subset = dataset[(t*bin_size)..(t*bin_size+bin_size - 1)]
13
13
  threads << Thread.new(subset) do |cs|
14
14
  yield cs
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module QuickUtils
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quick_utils
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease:
4
+ prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 2
9
- - 1
10
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
11
10
  platform: ruby
12
11
  authors:
13
12
  - Alan Graham
@@ -15,17 +14,16 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2012-07-10 00:00:00 Z
17
+ date: 2012-07-26 00:00:00 -04:00
18
+ default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: daemons
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
24
  requirements:
26
25
  - - ">="
27
26
  - !ruby/object:Gem::Version
28
- hash: 3
29
27
  segments:
30
28
  - 0
31
29
  version: "0"
@@ -35,11 +33,9 @@ dependencies:
35
33
  name: activesupport
36
34
  prerelease: false
37
35
  requirement: &id002 !ruby/object:Gem::Requirement
38
- none: false
39
36
  requirements:
40
37
  - - ">="
41
38
  - !ruby/object:Gem::Version
42
- hash: 3
43
39
  segments:
44
40
  - 0
45
41
  version: "0"
@@ -66,6 +62,7 @@ files:
66
62
  - lib/quick_utils/version.rb
67
63
  - lib/quick_utils/watcher.rb
68
64
  - quick_utils.gemspec
65
+ has_rdoc: true
69
66
  homepage: ""
70
67
  licenses: []
71
68
 
@@ -75,27 +72,23 @@ rdoc_options: []
75
72
  require_paths:
76
73
  - lib
77
74
  required_ruby_version: !ruby/object:Gem::Requirement
78
- none: false
79
75
  requirements:
80
76
  - - ">="
81
77
  - !ruby/object:Gem::Version
82
- hash: 3
83
78
  segments:
84
79
  - 0
85
80
  version: "0"
86
81
  required_rubygems_version: !ruby/object:Gem::Requirement
87
- none: false
88
82
  requirements:
89
83
  - - ">="
90
84
  - !ruby/object:Gem::Version
91
- hash: 3
92
85
  segments:
93
86
  - 0
94
87
  version: "0"
95
88
  requirements: []
96
89
 
97
90
  rubyforge_project: quick_utils
98
- rubygems_version: 1.8.17
91
+ rubygems_version: 1.3.6
99
92
  signing_key:
100
93
  specification_version: 3
101
94
  summary: Utility classes for a rails-deployed application