sidekiq-middleware 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.md ADDED
@@ -0,0 +1,19 @@
1
+ 0.0.4
2
+ -----------
3
+
4
+ - Fixed Hash#slice (bnorton)
5
+
6
+ 0.0.3
7
+ -----------
8
+
9
+ - Refactored and simplified the UniqueJobs middleware server and client as well as only enforcing the uniqueness of the payload across the keys for class, queue, args, and at (bnorton)
10
+
11
+ 0.0.2
12
+ -----------
13
+
14
+ - Added tests
15
+
16
+ Initial release!
17
+ -----------
18
+
19
+ - UniqueJobs
@@ -4,8 +4,8 @@ class Hash
4
4
 
5
5
  {}.tap do |hash|
6
6
  items.each do |item|
7
- hash[item] = self[item] if self[item]
7
+ hash[item] = self[item] if self.key?(item)
8
8
  end
9
9
  end
10
- end
11
- end
10
+ end unless new.respond_to?(:slice)
11
+ end
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Middleware
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -20,6 +20,12 @@ class TestCoreExt < MiniTest::Unit::TestCase
20
20
  end
21
21
  end
22
22
 
23
+ describe 'for keys in the hash' do
24
+ it 'should be the attributes' do
25
+ assert_equal({:foo => nil}, {:foo => nil, :foobar => "baz"}.slice(:foo))
26
+ end
27
+ end
28
+
23
29
  describe 'when all items are in the hash' do
24
30
  it 'should be the hash' do
25
31
  assert_equal({:foo => "bar", :foobar => "baz"}, {:foo => "bar", :foobar => "baz"}.slice(:foo, :foobar))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-middleware
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-13 00:00:00.000000000 Z
12
+ date: 2012-10-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq
@@ -68,6 +68,7 @@ extra_rdoc_files: []
68
68
  files:
69
69
  - .gitignore
70
70
  - .travis.yml
71
+ - CHANGES.md
71
72
  - Gemfile
72
73
  - LICENSE
73
74
  - README.md
@@ -96,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
97
  version: '0'
97
98
  segments:
98
99
  - 0
99
- hash: 4144828327274564708
100
+ hash: 4591254816435035913
100
101
  required_rubygems_version: !ruby/object:Gem::Requirement
101
102
  none: false
102
103
  requirements:
@@ -105,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
106
  version: '0'
106
107
  segments:
107
108
  - 0
108
- hash: 4144828327274564708
109
+ hash: 4591254816435035913
109
110
  requirements: []
110
111
  rubyforge_project:
111
112
  rubygems_version: 1.8.24