rubykiq 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MWMyOTY2NGFjNWIwOTM5MWY5OWYxMjQ2MTgzZTllOWJhZGY3ZDdkNg==
5
- data.tar.gz: !binary |-
6
- NWE4MzQ1ZmFiNmRhNDkxNmJmNjQ2NzNlMjNkZDU3ZGE5YzMzMTRjMA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MGZhYWEwNzAwODRiZjExZmE4NGVmMjg0OTg2ZjVkOGQzNGY1YjE1NzJjNTk5
10
- YWI0MWQxYzZhYzE4YjVlODUwMGE2ZDY4NWVjNDYyMjI1NjY3OThkNDkzMGQ1
11
- MDdhMzJmOWM5YjcxMGY2NTkyZWJhYzdiYmJhMzhhZTA1ZmE3NTU=
12
- data.tar.gz: !binary |-
13
- Y2VlNmY0OTRiYTIwM2Q0YjU1YmI5YWFkYjJkZDdmMTVmNjVjN2M0MGZiYmM4
14
- MTZlYzIzYzdjYWY1MGJjZWQ3ZTBmN2ZkOTkwNDJhODZjMTc1NmI3NWRiNTA0
15
- Y2ZjODM3NWYwZjE4ODlmMjIwM2ViYjc2ODJiOTkzZTM5YzI2Zjc=
2
+ SHA1:
3
+ metadata.gz: 696749fd11368ecd5319c9bf317c6b0ac04a14bd
4
+ data.tar.gz: fbea254bb5f399512e51992fbf0ada9e4e3d6e3f
5
+ SHA512:
6
+ metadata.gz: 00c6ab314e85af8eb6cfc661fb5e22c1e3b5860a4a58cc33555dc717d60fbe2fc071485d79436aad0842dfcf7cb31505b034925d9d0a870e3dd256d6132975f9
7
+ data.tar.gz: 1f523fa4f43a80f8e7acfce5a3cb2d19b32c0bec3da160de1134744576518625daf47a5a1c3b1230f738e56ba6bc3ced6630c5c799688d96d23898d1a679bafc
data/.gitignore CHANGED
@@ -12,8 +12,7 @@ test/tmp
12
12
  test/version_tmp
13
13
  tmp
14
14
  *.lock
15
-
16
- # YARD artifacts
17
15
  .yardoc
18
16
  _yardoc
19
- doc/
17
+ doc/
18
+ bin
data/.rubocop.yml ADDED
@@ -0,0 +1,24 @@
1
+ AllCops:
2
+ Includes:
3
+ - Rakefile
4
+ - Gemfile
5
+ Excludes:
6
+ - script/**
7
+ - vendor/**
8
+ - bin/**
9
+ LineLength:
10
+ Enabled: false
11
+ MethodLength:
12
+ Enabled: false
13
+ ClassLength:
14
+ Enabled: false
15
+ Documentation:
16
+ Enabled: false
17
+ Encoding:
18
+ Enabled: false
19
+ Blocks:
20
+ Enabled: false
21
+ AlignParameters:
22
+ Enabled: false
23
+ HashSyntax:
24
+ EnforcedStyle: ruby19
data/.travis.yml CHANGED
@@ -1,10 +1,21 @@
1
- bundler_args: --without development
2
1
  language: ruby
2
+ cache: bundler
3
3
  rvm:
4
+ - ruby-head
5
+ - jruby-head
6
+ - 2.1.0
7
+ - 2.0.0
8
+ - 1.9.3
4
9
  - rbx-19mode
5
10
  - jruby-19mode
6
- - 1.9.2
7
- - 1.9.3
8
- - 2.0.0
9
11
  services:
10
- - redis-server
12
+ - redis-server
13
+ matrix:
14
+ fast_finish: true
15
+ allow_failures:
16
+ - rvm: ruby-head
17
+ - rvm: jruby-head
18
+ - rvm: rbx-19mode
19
+ - rvm: jruby-19mode
20
+ notifications:
21
+ email: false
data/CONTRIBUTING.md CHANGED
@@ -36,10 +36,8 @@ Ideally, a bug report should include a pull request with failing specs.
36
36
  4. Run `bundle exec rake spec`. If your specs pass, return to step 3.
37
37
  5. Implement your feature or bug fix.
38
38
  6. Run `bundle exec rake spec`. If your specs fail, return to step 5.
39
- 7. Run `open coverage/index.html`. If your changes are not completely covered
40
- by your tests, return to step 3.
41
- 8. Add, commit, and push your changes.
42
- 9. [Submit a pull request.][pr]
39
+ 7. Add, commit, and push your changes.
40
+ 8. [Submit a pull request.][pr]
43
41
 
44
42
  [fork]: http://help.github.com/fork-a-repo/
45
43
  [branch]: http://learn.github.com/p/branching.html
data/Gemfile CHANGED
@@ -1,33 +1,22 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
- gem "rake", ">= 1.2"
4
- gem "yard"
5
-
6
- # platforms :ruby_18 do
7
- # end
8
- # platforms :ruby, :mswin, :mingw do
9
- # end
10
- # platforms :jruby do
11
- # end
12
-
13
- gem "hiredis", ">= 0.4.5", :require => false
14
- gem "em-synchrony", :require => false
3
+ gem 'yard'
4
+ gem 'rake', '~> 10.0'
5
+ gem 'hiredis', '>= 0.4.5', require: false
6
+ gem 'em-synchrony', require: false
15
7
 
16
8
  group :development do
17
- gem "kramdown", ">= 0.14"
18
- gem "pry"
19
- gem "pry-debugger", :platforms => :mri_19
20
- gem "awesome_print"
9
+ gem 'pry'
10
+ gem 'rubocop'
11
+ gem 'kramdown', '>= 0.14'
21
12
  end
22
13
 
23
14
  group :test do
24
- gem "rspec"
25
- gem "rspec-smart-formatter"
26
- gem "vcr"
27
- gem "timecop"
28
- gem "simplecov", :require => false
29
- gem "coveralls", :require => false
30
- gem "cane", :require => false, :platforms => :ruby_19
15
+ gem 'rspec'
16
+ gem 'timecop'
17
+ gem 'simplecov', require: false
18
+ gem 'coveralls', require: false
19
+ gem 'fakefs', '~> 0.4.3'
31
20
  end
32
21
 
33
- gemspec
22
+ gemspec
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Karl Freeman
1
+ Copyright (c) 2013-2014 Karl Freeman
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,59 +1,78 @@
1
1
  # Rubykiq
2
2
 
3
- [Sidekiq] agnostic enqueuing using Redis.
3
+ [Sidekiq][sidekiq] agnostic enqueuing using Redis.
4
4
 
5
5
  Sidekiq is a fantastic message processing library which has a simple and stable message format. `Rubykiq` aims to be a portable library to push jobs in to Sidekiq with as little overhead as possible whilst having feature parity on `Sidekiq::Client`'s conventions.
6
6
 
7
+ ## Installation
8
+
9
+ ```ruby
10
+ gem 'rubykiq', '~> 0.0.3'
11
+ ```
12
+
13
+ ```ruby
14
+ require 'rubykiq'
15
+ ```
7
16
  ## Features / Usage Examples
8
17
 
9
- * [Redis] has support for [alternative drivers](https://github.com/redis/redis-rb#alternate-drivers), Rubykiq is tested with these in mind. ( eg `:synchrony` )
18
+ * [Redis] has support for [alternative drivers](https://github.com/redis/redis-rb#alternate-drivers), Rubykiq is tested with these in mind. (eg `:synchrony`)
19
+ * the `:class` parameter can be the Class or a String of the Class (eg push jobs to Sidekiq from anywhere, not just where Sidekiq has the classes loaded)
10
20
  * The `:at` parameter supports `Time`, `Date` and any `Time.parse`-able strings.
11
- * Pushing multiple and singular jobs has the same interface ( simply nest args )
12
- * Slightly less gem dependecies, and by that I mean `Sidekiq::Client` without `Celluloid` ( which is already very light! )
21
+ * Pushing multiple and singular jobs has the same interface (simply nest args)
22
+ * Slightly less gem dependecies, and by that I mean `Sidekiq::Client` without `Celluloid` (which is already very light!)
23
+ * Easier configuration (IMO)
13
24
 
14
25
  ```ruby
15
- require "rubykiq"
16
26
 
17
27
  # will also detect REDIS_URL, REDIS_PROVIDER and REDISTOGO_URL ENV variables
18
- Rubykiq.url = "redis://127.0.0.1:6379"
28
+ Rubykiq.url = 'redis://127.0.0.1:6379'
19
29
 
20
30
  # alternative driver support ( :ruby, :hiredis, :synchrony )
21
31
  Rubykiq.driver = :synchrony
22
32
 
23
33
  # defaults to nil
24
- Rubykiq.namespace = "background"
34
+ Rubykiq.namespace = 'background'
25
35
 
26
- # uses "default" queue unless specified
27
- Rubykiq.push(:class => "Worker", :args => ["foo", 1, :bat => "bar"])
36
+ # uses 'default' queue unless specified
37
+ Rubykiq.push(:class => 'Worker', :args => ['foo', 1, :bat => 'bar'])
28
38
 
29
39
  # args are optionally set to empty
30
- Rubykiq.push(:class => "Scheduler", :queue => "scheduler")
40
+ Rubykiq.push(:class => 'Scheduler', :queue => 'scheduler')
31
41
 
32
42
  # will batch up multiple jobs
33
- Rubykiq.push(:class => "Worker", :args => [["foo"], ["bar"]])
43
+ Rubykiq.push(:class => 'Worker', :args => [['foo'], ['bar']])
34
44
 
35
- # at param can be a "Time", "Date" or any "Time.parse"-able strings
36
- Rubykiq.push(:class => "DelayedHourMailer", :at => Time.now + 3600)
37
- Rubykiq.push(:class => "DelayedDayMailer", :at => DateTime.now.next_day)
38
- Rubykiq.push(:class => "DelayedMailer", :at => "2013-01-01T09:00:00Z")
45
+ # at param can be a 'Time', 'Date' or any 'Time.parse'-able strings
46
+ Rubykiq.push(:class => 'DelayedHourMailer', :at => Time.now + 3600)
47
+ Rubykiq.push(:class => 'DelayedDayMailer', :at => DateTime.now.next_day)
48
+ Rubykiq.push(:class => 'DelayedMailer', :at => '2013-01-01T09:00:00Z')
39
49
 
40
50
  # alias based sugar
41
- job = { :class => "Worker" }
51
+ job = { :class => 'Worker' }
42
52
  Rubykiq << job
53
+
54
+ # create multiple Rubykiq clients with their own drivers
55
+ ruby_client = Rubykiq::Client.new
56
+ hiredis_client = Rubykiq::Client.new(:driver => :hiredis)
57
+
58
+ # create multiple Rubykiq clients with their own namespaces
59
+ foo_client = Rubykiq::Client.new(:namespace => 'foo')
60
+ bar_client = Rubykiq::Client.new(:namespace => 'bar')
61
+
43
62
  ```
44
63
 
45
64
  ## Caveats
46
65
 
47
66
  * It's advised that using [Sidekiq::Client's push](https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/client.rb#L36) method when already a dependency is better in most everyday cases
48
- * If you rely on any [Sidekiq Middleware](https://github.com/mperham/sidekiq/wiki/Middleware), Rubykiq is not aware of them so defaults will not be applied to the job hash.
67
+ * If you rely on any [Sidekiq Middleware](https://github.com/mperham/sidekiq/wiki/middleware), Rubykiq is not aware of them so defaults will not be applied to the job hash.
49
68
 
50
69
  ## Build & Dependency Status
51
70
 
52
71
  [![Gem Version](https://badge.fury.io/rb/rubykiq.png)][gem]
53
72
  [![Build Status](https://travis-ci.org/karlfreeman/rubykiq.png)][travis]
54
- [![Dependency Status](https://gemnasium.com/karlfreeman/rubykiq.png?travis)][gemnasium]
55
73
  [![Code Quality](https://codeclimate.com/github/karlfreeman/rubykiq.png)][codeclimate]
56
74
  [![Coverage Status](https://coveralls.io/repos/karlfreeman/rubykiq/badge.png?branch=master)][coveralls]
75
+ [![Gittip](http://img.shields.io/gittip/karlfreeman.png)][gittip]
57
76
 
58
77
  ## Supported Redis Drivers
59
78
 
@@ -62,20 +81,21 @@ Rubykiq << job
62
81
  * [Synchrony](https://github.com/igrigorik/em-synchrony)
63
82
 
64
83
  ## Supported Ruby Versions
84
+
65
85
  This library aims to support and is [tested against][travis] the following Ruby
66
86
  implementations:
67
87
 
68
- * Ruby 1.9.2 (drivers: ruby, hiredis, synchrony)
69
- * Ruby 1.9.3 (drivers: ruby, hiredis, synchrony)
88
+ * Ruby 2.1.0 (drivers: ruby, hiredis, synchrony)
70
89
  * Ruby 2.0.0 (drivers: ruby, hiredis, synchrony)
71
- * [JRuby][] (drivers: ruby)
72
- * [Rubinius][] (drivers: ruby)
90
+ * Ruby 1.9.3 (drivers: ruby, hiredis, synchrony)
91
+ * [JRuby][jruby] (drivers: ruby)
92
+ * [Rubinius][rubinius] (drivers: ruby)
73
93
 
74
94
  # Credits
75
95
 
76
96
  Inspiration:
77
97
 
78
- - [Michael Grosser's Enqueue into Sidkiq post](http://grosser.it/2013/01/17/enqueue-into-sidekiq-via-pure-redis-without-loading-sidekiq/)
98
+ - [Michael Grosser's Enqueue into Sidkiq post](http://grosser.it/2013/01/17/enqueue-into-sidekiq-via-pure-redis-without-loading-sidekiq)
79
99
 
80
100
  Cribbed:
81
101
 
@@ -83,13 +103,13 @@ Cribbed:
83
103
  - [Sidekiq's internal redis class](https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/redis_connection.rb)
84
104
  - [Sidekiq's FAQ](https://github.com/mperham/sidekiq/wiki/FAQ)
85
105
 
86
- [sidekiq]: http://mperham.github.com/sidekiq
87
- [redis]: https://github.com/redis/redis-rb
88
106
  [gem]: https://rubygems.org/gems/rubykiq
89
107
  [travis]: http://travis-ci.org/karlfreeman/rubykiq
90
- [gemnasium]: https://gemnasium.com/karlfreeman/rubykiq
91
108
  [coveralls]: https://coveralls.io/r/karlfreeman/rubykiq
92
109
  [codeclimate]: https://codeclimate.com/github/karlfreeman/rubykiq
110
+ [gittip]: https://www.gittip.com/karlfreeman
93
111
  [jruby]: http://www.jruby.org
94
112
  [rubinius]: http://rubini.us
95
113
 
114
+ [sidekiq]: http://mperham.github.com/sidekiq
115
+ [redis]: https://github.com/redis/redis-rb
data/Rakefile CHANGED
@@ -1,27 +1,17 @@
1
- require "bundler"
1
+ require 'bundler'
2
2
  Bundler.setup
3
3
  Bundler::GemHelper.install_tasks
4
4
 
5
- require "yard"
5
+ require 'yard'
6
6
  YARD::Rake::YardocTask.new
7
7
 
8
- require "rspec/core/rake_task"
9
- desc "Run all examples"
8
+ require 'rspec/core/rake_task'
9
+ desc 'Run all examples'
10
10
  RSpec::Core::RakeTask.new(:spec)
11
11
 
12
- begin
13
- require "cane/rake_task"
14
- namespace :metric do
15
- desc "Analyze for code quality"
16
- Cane::RakeTask.new(:quality) do |cane|
17
- cane.abc_max = 27
18
- cane.no_doc = true
19
- cane.style_measure = 200
20
- end
21
- end
22
- rescue LoadError
23
- warn "Cane is not available, metric:quality task not provided."
24
- end
12
+ require 'rubocop/rake_task'
13
+ desc 'Run rubocop'
14
+ Rubocop::RakeTask.new(:rubocop)
25
15
 
26
- task :default => :spec
27
- task :test => :spec
16
+ task default: :spec
17
+ task test: :spec
data/lib/rubykiq.rb CHANGED
@@ -1,23 +1,22 @@
1
- require "forwardable"
2
- require "rubykiq/client"
3
- require "rubykiq/connection"
1
+ require 'forwardable'
2
+ require 'rubykiq/client'
3
+ require 'rubykiq/connection'
4
4
 
5
5
  module Rubykiq
6
6
  extend SingleForwardable
7
7
 
8
- def_delegators :client, :<<, :push, :connection_pool
8
+ def_delegators :client, :<<, :push, :connection_pool, :connection_pool=
9
9
 
10
10
  # delegate all VALID_OPTIONS_KEYS accessors to the client
11
11
  def_delegators :client, *Rubykiq::Client::VALID_OPTIONS_KEYS
12
12
 
13
13
  # delegate all VALID_OPTIONS_KEYS setters to the client ( hacky I know... )
14
- def_delegators :client, *(Rubykiq::Client::VALID_OPTIONS_KEYS.dup.collect! do |key| "#{key}=".to_sym; end)
14
+ def_delegators :client, *(Rubykiq::Client::VALID_OPTIONS_KEYS.dup.map! do |key| "#{key}=".to_sym; end)
15
15
 
16
16
  # Fetch the Rubykiq::Client
17
17
  #
18
18
  # @return [Rubykiq::Client]
19
- def self.client(options={})
19
+ def self.client(options = {})
20
20
  @client ||= Rubykiq::Client.new(options)
21
21
  end
22
-
23
- end
22
+ end
@@ -1,12 +1,10 @@
1
- require "connection_pool"
2
- require "securerandom"
3
- require "multi_json"
4
- require "time"
1
+ require 'connection_pool'
2
+ require 'securerandom'
3
+ require 'multi_json'
4
+ require 'time'
5
5
 
6
6
  module Rubykiq
7
-
8
7
  class Client
9
-
10
8
  # An array of valid keys in the options hash when configuring a `Rubykiq::Client`
11
9
  VALID_OPTIONS_KEYS = [
12
10
  :redis_pool_size,
@@ -20,13 +18,13 @@ module Rubykiq
20
18
 
21
19
  # A hash of valid options and their default values
22
20
  DEFAULT_OPTIONS = {
23
- :redis_pool_size => 1,
24
- :redis_pool_timeout => 1,
25
- :url => nil,
26
- :namespace => nil,
27
- :driver => :ruby,
28
- :retry => true,
29
- :queue => "default"
21
+ redis_pool_size: 1,
22
+ redis_pool_timeout: 1,
23
+ url: nil,
24
+ namespace: nil,
25
+ driver: :ruby,
26
+ retry: true,
27
+ queue: 'default'
30
28
  }.freeze
31
29
 
32
30
  # Bang open the valid options
@@ -42,13 +40,17 @@ module Rubykiq
42
40
  end
43
41
  end
44
42
 
43
+ def connection_pool=(val)
44
+ @connection_pool = val
45
+ end
46
+
45
47
  # Fetch the ::ConnectionPool of Rubykiq::Connections
46
48
  #
47
49
  # @return [::ConnectionPool]
48
- def connection_pool(options={}, &block)
50
+ def connection_pool(options = {}, &block)
49
51
  options = valid_options.merge(options)
50
52
 
51
- @connection_pool ||= ::ConnectionPool.new(:timeout => redis_pool_timeout, :size => redis_pool_size) do
53
+ @connection_pool ||= ::ConnectionPool.new(timeout: redis_pool_timeout, size: redis_pool_size) do
52
54
  Rubykiq::Connection.new(options)
53
55
  end
54
56
 
@@ -57,13 +59,12 @@ module Rubykiq
57
59
  else
58
60
  return @connection_pool
59
61
  end
60
-
61
62
  end
62
63
 
63
64
  # Push a Sidekiq job to Redis. Accepts a number of options:
64
65
  #
65
66
  # :class - the worker class to call, required.
66
- # :queue - the named queue to use, optional ( default: "default" )
67
+ # :queue - the named queue to use, optional ( default: 'default' )
67
68
  # :args - an array of simple arguments to the perform method, must be JSON-serializable, optional ( default: [] )
68
69
  # :retry - whether to retry this job if it fails, true or false, default true, optional ( default: true )
69
70
  # :at - when the job should be executed. This can be a `Time`, `Date` or any `Time.parse`-able strings, optional.
@@ -72,31 +73,29 @@ module Rubykiq
72
73
  # if multiple jobs are pushed the size of the jobs will be returned
73
74
  #
74
75
  # Example:
75
- # Rubykiq.push(:class => "Worker", :args => ["foo", 1, :bat => "bar"])
76
- # Rubykiq.push(:class => "Scheduler", :queue => "scheduler")
77
- # Rubykiq.push(:class => "DelayedMailer", :at => "2013-01-01T09:00:00Z")
78
- # Rubykiq.push(:class => "Worker", :args => [["foo"], ["bar"]])
76
+ # Rubykiq.push(:class => 'Worker', :args => ['foo', 1, :bat => 'bar'])
77
+ # Rubykiq.push(:class => 'Scheduler', :queue => 'scheduler')
78
+ # Rubykiq.push(:class => 'DelayedMailer', :at => '2013-01-01T09:00:00Z')
79
+ # Rubykiq.push(:class => 'Worker', :args => [['foo'], ['bar']])
79
80
  #
80
81
  # @param items [Array]
81
82
  def push(items)
82
- raise(ArgumentError, "Message must be a Hash") unless items.is_a?(Hash)
83
- raise(ArgumentError, "Message args must be an Array") if items[:args] && !items[:args].is_a?(Array)
83
+ fail(ArgumentError, 'Message must be a Hash') unless items.is_a?(Hash)
84
+ fail(ArgumentError, 'Message args must be an Array') if items[:args] && !items[:args].is_a?(Array)
84
85
 
85
86
  # args are optional
86
87
  items[:args] ||= []
87
88
 
88
89
  # determine if this items arg's is a nested array
89
90
  items[:args].first.is_a?(Array) ? push_many(items) : push_one(items)
90
-
91
91
  end
92
92
  alias_method :<<, :push
93
93
 
94
-
95
94
  private
96
95
 
97
96
  # Create a hash of options and their values
98
97
  def valid_options
99
- VALID_OPTIONS_KEYS.inject({}){|o,k| o.merge!(k => send(k)) }
98
+ VALID_OPTIONS_KEYS.reduce({}) { |o, k| o.merge!(k => send(k)) }
100
99
  end
101
100
 
102
101
  # Create a hash of the default options and their values
@@ -113,7 +112,6 @@ module Rubykiq
113
112
 
114
113
  # when only one item is needed to persisted to redis
115
114
  def push_one(item)
116
-
117
115
  # we're expecting item to be a single item so simply normalize it
118
116
  payload = normalize_item(item)
119
117
 
@@ -121,19 +119,17 @@ module Rubykiq
121
119
  pushed = false
122
120
  pushed = raw_push([payload]) if payload
123
121
  pushed ? payload[:jid] : nil
124
-
125
122
  end
126
123
 
127
124
  # when multiple item's are needing to be persisted to redis
128
125
  def push_many(items)
129
-
130
126
  # we're expecting items to have an nested array of args, lets take each one and correctly normalize them
131
127
  payloads = items[:args].map do |args|
132
- raise ArgumentError, "Bulk arguments must be an Array of Arrays: [[:foo => 'bar'], [:foo => 'foo']]" unless args.is_a?(Array)
133
- # clone the original items ( for :queue, :class, etc.. )
128
+ fail ArgumentError, "Bulk arguments must be an Array of Arrays: [[:foo => 'bar'], [:foo => 'foo']]" unless args.is_a?(Array)
129
+ # clone the original items (for :queue, :class, etc..)
134
130
  item = items.clone
135
- # merge this item's args ( eg the nested `arg` array )
136
- item.merge!(:args => args) unless args.empty?
131
+ # merge this item's args (eg the nested `arg` array)
132
+ item.merge!(args: args) unless args.empty?
137
133
  # normalize this individual item
138
134
  item = normalize_item(item)
139
135
  end.compact
@@ -142,20 +138,19 @@ module Rubykiq
142
138
  pushed = false
143
139
  pushed = raw_push(payloads) unless payloads.empty?
144
140
  pushed ? payloads.size : nil
145
-
146
141
  end
147
142
 
148
143
  # persist the job message(s)
149
144
  def raw_push(payloads)
150
145
  pushed = false
151
- Rubykiq.connection_pool do |connection|
146
+ connection_pool do |connection|
152
147
  if payloads.first[:at]
153
- pushed = connection.zadd("schedule", payloads.map {|item| [ item[:at].to_s, ::MultiJson.encode(item) ]})
148
+ pushed = connection.zadd('schedule', payloads.map { |item| [item[:at].to_s, ::MultiJson.encode(item)] })
154
149
  else
155
150
  q = payloads.first[:queue]
156
151
  to_push = payloads.map { |item| ::MultiJson.encode(item) }
157
152
  _, pushed = connection.multi do
158
- connection.sadd("queues", q)
153
+ connection.sadd('queues', q)
159
154
  connection.lpush("queue:#{q}", to_push)
160
155
  end
161
156
  end
@@ -163,12 +158,11 @@ module Rubykiq
163
158
  pushed
164
159
  end
165
160
 
166
- #
167
161
  def normalize_item(item)
168
- raise(ArgumentError, "Message must be a Hash") unless item.is_a?(Hash)
169
- raise(ArgumentError, "Message must include a class and set of arguments: #{item.inspect}") if !item[:class] || !item[:args]
170
- raise(ArgumentError, "Message args must be an Array") if item[:args] && !item[:args].is_a?(Array)
171
- raise(ArgumentError, "Message class must be a String representation of the class name") unless item[:class].is_a?(String)
162
+ fail(ArgumentError, 'Message must be a Hash') unless item.is_a?(Hash)
163
+ fail(ArgumentError, "Message must include a class and set of arguments: #{item.inspect}") if !item[:class] || !item[:args]
164
+ fail(ArgumentError, 'Message args must be an Array') if item[:args] && !item[:args].is_a?(Array)
165
+ fail(ArgumentError, 'Message class must be a String representation of the class name') unless item[:class].is_a?(String)
172
166
 
173
167
  # normalize the time
174
168
  item[:at] = normalize_time(item[:at]) if item[:at]
@@ -179,19 +173,17 @@ module Rubykiq
179
173
 
180
174
  # apply the default options
181
175
  [:retry, :queue].each do |key|
182
- pre_normalized_item[key] = send("#{key}") unless pre_normalized_item.has_key?(key)
176
+ pre_normalized_item[key] = send("#{key}") unless pre_normalized_item.key?(key)
183
177
  end
184
178
 
185
179
  # provide a job ID
186
180
  pre_normalized_item[:jid] = ::SecureRandom.hex(12)
187
181
 
188
- return pre_normalized_item
189
-
182
+ pre_normalized_item
190
183
  end
191
184
 
192
185
  # Given an object meant to represent time, try to convert it intelligently to a float
193
186
  def normalize_time(time)
194
-
195
187
  # if the time param is a `Date` / `String` convert it to a `Time` object
196
188
  if time.is_a?(Date)
197
189
  normalized_time = time.to_time
@@ -201,13 +193,10 @@ module Rubykiq
201
193
  normalized_time = time
202
194
  end
203
195
 
204
- # convert the `Time` object to a float ( if necessary )
196
+ # convert the `Time` object to a float (if necessary)
205
197
  normalized_time = normalized_time.to_f unless normalized_time.is_a?(Numeric)
206
198
 
207
- return normalized_time
208
-
199
+ normalized_time
209
200
  end
210
-
211
201
  end
212
-
213
- end
202
+ end
@@ -1,10 +1,8 @@
1
- require "redis"
2
- require "redis/namespace"
1
+ require 'redis'
2
+ require 'redis/namespace'
3
3
 
4
4
  module Rubykiq
5
-
6
5
  class Connection
7
-
8
6
  extend Forwardable
9
7
  def_delegators :@redis_connection, :multi, :namespace, :sadd, :zadd, :lpush, :lpop, :lrange, :llen, :zcard, :zrange, :flushdb
10
8
  def_delegators :@redis_client, :host, :port, :db, :password
@@ -18,21 +16,20 @@ module Rubykiq
18
16
  driver = options.delete(:driver)
19
17
  @redis_connection ||= build_conection(url, namespace, driver)
20
18
  @redis_client ||= @redis_connection.client
21
- return @redis_connection
19
+ @redis_connection
22
20
  end
23
21
 
24
22
  private
25
23
 
26
24
  # lets try and fallback to another redis url
27
25
  def determine_redis_provider
28
- ENV["REDISTOGO_URL"] || ENV["REDIS_PROVIDER"] || ENV["REDIS_URL"] || "redis://localhost:6379/0"
26
+ ENV['REDISTOGO_URL'] || ENV['REDIS_PROVIDER'] || ENV['REDIS_URL'] || 'redis://localhost:6379/0'
29
27
  end
30
28
 
31
29
  # construct a namespaced redis connection
32
30
  def build_conection(url, namespace, driver)
33
- client = ::Redis.connect(:url => url, :driver => driver)
34
- return ::Redis::Namespace.new(namespace, :redis => client)
31
+ client = ::Redis.new(url: url, driver: driver)
32
+ ::Redis::Namespace.new(namespace, redis: client)
35
33
  end
36
-
37
34
  end
38
- end
35
+ end
@@ -1,3 +1,3 @@
1
1
  module Rubykiq
2
- VERSION = "0.0.2" unless defined?(Rubykiq::VERSION)
3
- end
2
+ VERSION = '0.0.4' unless defined?(Rubykiq::VERSION)
3
+ end
data/rubykiq.gemspec CHANGED
@@ -1,23 +1,26 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "rubykiq/version"
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'rubykiq/version'
4
5
 
5
- Gem::Specification.new do |gem|
6
- gem.add_dependency "redis", ">= 3.0"
7
- gem.add_dependency "redis-namespace", ">= 1.0"
8
- gem.add_dependency "multi_json", ">= 1.0"
9
- gem.add_dependency "connection_pool", ">= 1.0"
10
- gem.add_development_dependency "bundler", ">= 1.0"
11
- gem.name = "rubykiq"
12
- gem.version = Rubykiq::VERSION
13
- gem.authors = ["Karl Freeman"]
14
- gem.email = ["karlfreeman@gmail.com"]
15
- gem.license = "MIT"
16
- gem.description = %q{Sidekiq agnostic enqueuing using Redis}
17
- gem.summary = %q{Sidekiq agnostic enqueuing using Redis}
18
- gem.homepage = "https://github.com/karlfreeman/rubykiq"
19
- gem.files = `git ls-files`.split("\n")
20
- gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
- gem.require_paths = ["lib"]
22
- gem.required_ruby_version = ">= 1.9.2"
23
- end
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'rubykiq'
8
+ spec.version = Rubykiq::VERSION
9
+ spec.authors = ['Karl Freeman']
10
+ spec.email = ['karlfreeman@gmail.com']
11
+ spec.summary = %q{Sidekiq agnostic enqueuing using Redis}
12
+ spec.description = %q{Sidekiq agnostic enqueuing using Redis}
13
+ spec.homepage = 'https://github.com/karlfreeman/rubykiq'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+ spec.required_ruby_version = '>= 1.9.3'
21
+
22
+ spec.add_dependency 'redis', '>= 3.0'
23
+ spec.add_dependency 'redis-namespace', '>= 1.0'
24
+ spec.add_dependency 'multi_json', '>= 1.0'
25
+ spec.add_dependency 'connection_pool', '>= 1.0'
26
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,44 +1,34 @@
1
- $:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
 
3
- require "bundler"
3
+ require 'bundler'
4
4
  Bundler.setup
5
- begin; require "awesome_print"; rescue LoadError; end
6
5
 
7
- require "rspec"
8
-
9
- require "support/pry"
10
- require "support/timecop"
11
- require "support/simplecov"
6
+ %w(support).each do |dir|
7
+ Dir.glob(File.expand_path("../#{dir}/**/*.rb", __FILE__), &method(:require))
8
+ end
12
9
 
13
- require "rubykiq"
10
+ require 'rubykiq'
14
11
 
15
12
  # used as a stupid mixin class
16
13
  class DummyClass
17
14
  end
18
15
 
19
- #
20
16
  RSpec.configure do |config|
21
17
 
22
- #
23
18
  config.expect_with :rspec do |c|
24
19
  c.syntax = :expect
25
20
  end
26
21
 
27
- #
28
22
  def jruby?
29
23
  defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
30
24
  end
31
25
 
32
- #
33
26
  def wrap_in_synchrony?(driver)
34
-
35
27
  yield unless driver == :synchrony
36
-
37
28
  EM.synchrony do
38
29
  yield if block_given?
39
30
  EM.stop
40
31
  end
41
-
42
32
  end
43
33
 
44
- end
34
+ end
data/spec/support/pry.rb CHANGED
@@ -1,3 +1,3 @@
1
- if !ENV["CI"] && defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby"
2
- require "pry"
3
- end
1
+ if !ENV['CI'] && defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby'
2
+ require 'pry'
3
+ end
@@ -1,15 +1,9 @@
1
- if defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby"
2
-
3
- require "simplecov"
4
-
5
- if ENV["CI"]
6
- require "coveralls"
7
- Coveralls.wear!
8
- SimpleCov.formatter = Coveralls::SimpleCov::Formatter
9
- end
10
-
1
+ if ENV['CI'] && defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby'
2
+ require 'simplecov'
3
+ require 'coveralls'
4
+ Coveralls.wear!
5
+ SimpleCov.formatter = Coveralls::SimpleCov::Formatter
11
6
  SimpleCov.start do
12
- add_filter "vendor"
7
+ add_filter 'vendor'
13
8
  end
14
-
15
- end
9
+ end
@@ -1,2 +1,2 @@
1
- require "timecop"
2
- Timecop.freeze
1
+ require 'timecop'
2
+ Timecop.freeze
@@ -1,6 +1,6 @@
1
- require "spec_helper"
2
- require "hiredis"
3
- require "em-synchrony"
1
+ require 'spec_helper'
2
+ require 'hiredis'
3
+ require 'em-synchrony'
4
4
 
5
5
  describe Rubykiq::Client do
6
6
 
@@ -12,9 +12,9 @@ describe Rubykiq::Client do
12
12
  Timecop.return
13
13
  end
14
14
 
15
- let (:ruby_client) { Rubykiq::Client.new }
16
- let (:hiredis_client) { Rubykiq::Client.new(:driver => :hiredis) }
17
- let (:synchrony_client) { Rubykiq::Client.new(:driver => :synchrony) }
15
+ let (:ruby_client) { Rubykiq::Client.new(driver: :ruby, namespace: :ruby) }
16
+ let (:hiredis_client) { Rubykiq::Client.new(driver: :hiredis, namespace: :hiredis) }
17
+ let (:synchrony_client) { Rubykiq::Client.new(driver: :synchrony, namespace: :synchrony) }
18
18
 
19
19
  # eg with a variety of drivers
20
20
  [:ruby, :hiredis, :synchrony].each do |driver|
@@ -22,53 +22,53 @@ describe Rubykiq::Client do
22
22
  # skip incompatible drivers when running in JRuby
23
23
  next if jruby? && (driver == :hiredis || :synchrony)
24
24
 
25
- context "with #{driver}" do
25
+ context "using driver '#{driver}'" do
26
26
 
27
27
  # make sure the let is the current client being tested
28
- let(:client) { self.send("#{driver}_client") }
28
+ let(:client) { send("#{driver}_client") }
29
29
 
30
30
  describe :defaults do
31
31
  subject { client }
32
- its(:namespace) { should be_nil }
32
+ its(:namespace) { should eq driver }
33
33
  its(:driver) { should be driver }
34
34
  its(:retry) { should be_true }
35
- its(:queue) { should eq "default" }
35
+ its(:queue) { should eq 'default' }
36
36
  end
37
37
 
38
38
  describe :push do
39
39
 
40
40
  context :validations do
41
41
 
42
- context "with an incorrect message type" do
43
- it "raises an ArgumentError" do
44
- expect{ client.push([]) }.to raise_error(ArgumentError, /Message must be a Hash/)
45
- expect{ client.push("{}") }.to raise_error(ArgumentError, /Message must be a Hash/)
46
- expect{ client.push(DummyClass.new) }.to raise_error(ArgumentError, /Message must be a Hash/)
42
+ context 'with an incorrect message type' do
43
+ it 'raises an ArgumentError' do
44
+ expect { client.push([]) }.to raise_error(ArgumentError, /Message must be a Hash/)
45
+ expect { client.push('{}') }.to raise_error(ArgumentError, /Message must be a Hash/)
46
+ expect { client.push(DummyClass.new) }.to raise_error(ArgumentError, /Message must be a Hash/)
47
47
  end
48
48
  end
49
49
 
50
- context "without a class" do
51
- it "raises an ArgumentError" do
52
- expect{ client.push(:args => ['foo', 1, { :bat => "bar" }]) }.to raise_error(ArgumentError, /Message must include a class/)
50
+ context 'without a class' do
51
+ it 'raises an ArgumentError' do
52
+ expect { client.push(args: ['foo', 1, { bat: 'bar' }]) }.to raise_error(ArgumentError, /Message must include a class/)
53
53
  end
54
54
  end
55
55
 
56
- context "with an incorrect args type" do
57
- it "raises an ArgumentError" do
58
- expect{ client.push(:class => "MyWorker", :args => { :bat => "bar" }) }.to raise_error(ArgumentError, /Message args must be an Array/)
56
+ context 'with an incorrect args type' do
57
+ it 'raises an ArgumentError' do
58
+ expect { client.push(class: 'MyWorker', args: { bat: 'bar' }) }.to raise_error(ArgumentError, /Message args must be an Array/)
59
59
  end
60
60
  end
61
61
 
62
- context "with an incorrect class type" do
63
- it "raises an ArgumentError" do
64
- expect{ client.push(:class => DummyClass, :args => ["foo", 1, { :bat => "bar" }]) }.to raise_error(ArgumentError, /Message class must be a String representation of the class name/)
62
+ context 'with an incorrect class type' do
63
+ it 'raises an ArgumentError' do
64
+ expect { client.push(class: DummyClass, args: ['foo', 1, { bat: 'bar' }]) }.to raise_error(ArgumentError, /Message class must be a String representation of the class name/)
65
65
  end
66
66
  end
67
67
 
68
68
  end
69
69
 
70
70
  # eg singular and batch
71
- args = [[{:bat => "bar"}],[[{:bat => "bar"}],[{:bat => "foo"}]]]
71
+ args = [[{ bat: 'bar' }], [[{ bat: 'bar' }], [{ bat: 'foo' }]]]
72
72
  args.each do |args|
73
73
 
74
74
  context "with args #{args}" do
@@ -81,13 +81,13 @@ describe Rubykiq::Client do
81
81
  connection.flushdb
82
82
  end
83
83
 
84
- expect { client.push(:class => "MyWorker", :args => args) }.to change {
85
- client.connection_pool do |connection| connection.llen("queue:default"); end
84
+ expect { client.push(class: 'MyWorker', args: args) }.to change {
85
+ client.connection_pool do |connection| connection.llen('queue:default'); end
86
86
  }.from(0).to(args.length)
87
87
 
88
- raw_jobs = client.connection_pool do |connection| connection.lrange("queue:default", 0, args.length); end
88
+ raw_jobs = client.connection_pool do |connection| connection.lrange('queue:default', 0, args.length); end
89
89
  raw_jobs.each do |job|
90
- job = MultiJson.decode(job, :symbolize_keys => true)
90
+ job = MultiJson.decode(job, symbolize_keys: true)
91
91
  expect(job).to have_key(:jid)
92
92
  end
93
93
 
@@ -96,10 +96,10 @@ describe Rubykiq::Client do
96
96
  end
97
97
 
98
98
  # eg with a variety of different time types
99
- times = [ Time.now, DateTime.now, Time.now.utc.iso8601, Time.now.to_f ]
99
+ times = [Time.now, DateTime.now, Time.now.utc.iso8601, Time.now.to_f]
100
100
  times.each do |time|
101
101
 
102
- context "with time #{time} ( #{time.class} )" do
102
+ context "with time #{time} (#{time.class})" do
103
103
 
104
104
  it "should create #{args.length} job(s)" do
105
105
 
@@ -109,13 +109,13 @@ describe Rubykiq::Client do
109
109
  connection.flushdb
110
110
  end
111
111
 
112
- expect { client.push(:class => "MyWorker", :args => args, :at => time) }.to change {
113
- client.connection_pool do |connection| connection.zcard("schedule"); end
112
+ expect { client.push(class: 'MyWorker', args: args, at: time) }.to change {
113
+ client.connection_pool do |connection| connection.zcard('schedule'); end
114
114
  }.from(0).to(args.length)
115
115
 
116
- raw_jobs = client.connection_pool do |connection| connection.zrange("schedule", 0, args.length); end
116
+ raw_jobs = client.connection_pool do |connection| connection.zrange('schedule', 0, args.length); end
117
117
  raw_jobs.each do |job|
118
- job = MultiJson.decode(job, :symbolize_keys => true)
118
+ job = MultiJson.decode(job, symbolize_keys: true)
119
119
  expect(job).to have_key(:at)
120
120
  expect(job[:at]).to be_within(1).of(Time.now.to_f)
121
121
  end
@@ -138,4 +138,4 @@ describe Rubykiq::Client do
138
138
 
139
139
  end
140
140
 
141
- end
141
+ end
@@ -1,11 +1,11 @@
1
- require "spec_helper"
1
+ require 'spec_helper'
2
2
 
3
3
  describe Rubykiq::Connection do
4
4
 
5
5
  describe :defaults do
6
6
  subject { Rubykiq::Connection.new }
7
7
  its(:namespace) { should be_nil }
8
- its(:host) { should eq "localhost" }
8
+ its(:host) { should eq 'localhost' }
9
9
  its(:port) { should be 6379 }
10
10
  its(:db) { should be 0 }
11
11
  its(:password) { should be_nil }
@@ -14,15 +14,15 @@ describe Rubykiq::Connection do
14
14
  describe :options do
15
15
 
16
16
  context :custom do
17
- subject { Rubykiq::Connection.new(:namespace => "yyy") }
18
- its(:namespace) { should eq "yyy" }
17
+ subject { Rubykiq::Connection.new(namespace: 'yyy') }
18
+ its(:namespace) { should eq 'yyy' }
19
19
  end
20
20
 
21
21
  context :inherited_settings do
22
- it "should work" do
23
- client = Rubykiq::Client.new(:namespace => "xxx")
22
+ it 'should work' do
23
+ client = Rubykiq::Client.new(namespace: 'xxx')
24
24
  client.connection_pool do |connection|
25
- expect(connection.namespace).to eq "xxx"
25
+ expect(connection.namespace).to eq 'xxx'
26
26
  end
27
27
  end
28
28
  end
@@ -32,7 +32,7 @@ describe Rubykiq::Connection do
32
32
  describe :env do
33
33
  subject { Rubykiq::Connection.new }
34
34
 
35
- [{:name => "REDISTOGO_URL", :value => "redistogo"}, {:name => "REDIS_PROVIDER", :value => "redisprovider"}, {:name => "REDIS_URL", :value => "redisurl"} ].each do | test_case |
35
+ [{ name: 'REDISTOGO_URL', value: 'redistogo' }, { name: 'REDIS_PROVIDER', value: 'redisprovider' }, { name: 'REDIS_URL', value: 'redisurl' }].each do | test_case |
36
36
  context "with ENV[#{test_case[:name]}]" do
37
37
  before do
38
38
  ENV[test_case[:name]] = "redis://#{test_case[:value]}:6379/0"
@@ -46,4 +46,4 @@ describe Rubykiq::Connection do
46
46
 
47
47
  end
48
48
 
49
- end
49
+ end
@@ -1,4 +1,4 @@
1
- require "spec_helper"
1
+ require 'spec_helper'
2
2
 
3
3
  describe Rubykiq do
4
4
 
@@ -22,10 +22,10 @@ describe Rubykiq do
22
22
 
23
23
  describe key do
24
24
  subject { Rubykiq }
25
- it {should respond_to key }
26
- it {should respond_to "#{key}=".to_sym }
25
+ it { should respond_to key }
26
+ it { should respond_to "#{key}=".to_sym }
27
27
  end
28
28
 
29
29
  end
30
30
 
31
- end
31
+ end
metadata CHANGED
@@ -1,83 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubykiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Freeman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-04 00:00:00.000000000 Z
11
+ date: 2014-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: redis-namespace
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: multi_json
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: connection_pool
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
67
- - !ruby/object:Gem::Version
68
- version: '1.0'
69
- - !ruby/object:Gem::Dependency
70
- name: bundler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ! '>='
74
- - !ruby/object:Gem::Version
75
- version: '1.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ! '>='
66
+ - - '>='
81
67
  - !ruby/object:Gem::Version
82
68
  version: '1.0'
83
69
  description: Sidekiq agnostic enqueuing using Redis
@@ -89,7 +75,7 @@ extra_rdoc_files: []
89
75
  files:
90
76
  - .document
91
77
  - .gitignore
92
- - .rspec
78
+ - .rubocop.yml
93
79
  - .travis.yml
94
80
  - .yardopts
95
81
  - CHANGELOG.md
@@ -120,17 +106,17 @@ require_paths:
120
106
  - lib
121
107
  required_ruby_version: !ruby/object:Gem::Requirement
122
108
  requirements:
123
- - - ! '>='
109
+ - - '>='
124
110
  - !ruby/object:Gem::Version
125
- version: 1.9.2
111
+ version: 1.9.3
126
112
  required_rubygems_version: !ruby/object:Gem::Requirement
127
113
  requirements:
128
- - - ! '>='
114
+ - - '>='
129
115
  - !ruby/object:Gem::Version
130
116
  version: '0'
131
117
  requirements: []
132
118
  rubyforge_project:
133
- rubygems_version: 2.0.6
119
+ rubygems_version: 2.0.14
134
120
  signing_key:
135
121
  specification_version: 4
136
122
  summary: Sidekiq agnostic enqueuing using Redis
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --color
2
- --order random
3
- --format RSpec::Smart::Formatter