rubykiq 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWIyYTZlNTdiMjRmZDEyMmM0ZDAyZjAxNDg0MThjMzhkZWJhMGEzYQ==
4
+ MWMyOTY2NGFjNWIwOTM5MWY5OWYxMjQ2MTgzZTllOWJhZGY3ZDdkNg==
5
5
  data.tar.gz: !binary |-
6
- NmFjNWNjY2MzNjBlZTFjYTRiN2ZhYTc1N2EwMGExMzJmYmY3NTdjOQ==
6
+ NWE4MzQ1ZmFiNmRhNDkxNmJmNjQ2NzNlMjNkZDU3ZGE5YzMzMTRjMA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YjA2NmU0YjZhMzZmM2M4MTc1YWYyOTg1NmYxNGUyNWMzMGRkMDVmNzMzNDQw
10
- NmZiZGM4NmViMGI0YjMzOGRmOWIyMTNjYjczMmViMjYzNTJiODQ1YzY3MDU0
11
- YzUzYTc3Nzg1MzJhZGY2ZDViMzNjM2RlOWNkOGFlMzI4Y2M0ZjU=
9
+ MGZhYWEwNzAwODRiZjExZmE4NGVmMjg0OTg2ZjVkOGQzNGY1YjE1NzJjNTk5
10
+ YWI0MWQxYzZhYzE4YjVlODUwMGE2ZDY4NWVjNDYyMjI1NjY3OThkNDkzMGQ1
11
+ MDdhMzJmOWM5YjcxMGY2NTkyZWJhYzdiYmJhMzhhZTA1ZmE3NTU=
12
12
  data.tar.gz: !binary |-
13
- NzE1NTkwODZmMzU0YWU1N2I3MmQzZjliMzVhZThkM2QzNTMzMTEyNmJhOThh
14
- MTUwYzE2NDgyNjQxYjNiNWRjZDRiMmQxMTMyOTI5ZWE5Y2UyMzJmMGQ2OTNk
15
- YWZlN2FiYzMwOTg1MWIyM2UxMjY0YzE4ODM5M2I1Y2RjMDBmYTY=
13
+ Y2VlNmY0OTRiYTIwM2Q0YjU1YmI5YWFkYjJkZDdmMTVmNjVjN2M0MGZiYmM4
14
+ MTZlYzIzYzdjYWY1MGJjZWQ3ZTBmN2ZkOTkwNDJhODZjMTc1NmI3NWRiNTA0
15
+ Y2ZjODM3NWYwZjE4ODlmMjIwM2ViYjc2ODJiOTkzZTM5YzI2Zjc=
@@ -1,18 +1,10 @@
1
1
  bundler_args: --without development
2
2
  language: ruby
3
3
  rvm:
4
- - rbx-18mode
5
4
  - rbx-19mode
6
- - jruby-18mode
7
5
  - jruby-19mode
8
- - 1.8.7
9
6
  - 1.9.2
10
7
  - 1.9.3
11
8
  - 2.0.0
12
9
  services:
13
- - redis-server
14
- matrix:
15
- allow_failures:
16
- - rvm: rbx-18mode
17
- - rvm: jruby-18mode
18
- - rvm: 1.8.7
10
+ - redis-server
data/Gemfile CHANGED
@@ -10,7 +10,7 @@ gem "yard"
10
10
  # platforms :jruby do
11
11
  # end
12
12
 
13
- gem "hiredis", "~> 0.4.5", :require => false
13
+ gem "hiredis", ">= 0.4.5", :require => false
14
14
  gem "em-synchrony", :require => false
15
15
 
16
16
  group :development do
@@ -27,7 +27,7 @@ group :test do
27
27
  gem "timecop"
28
28
  gem "simplecov", :require => false
29
29
  gem "coveralls", :require => false
30
- gem "cane"
30
+ gem "cane", :require => false, :platforms => :ruby_19
31
31
  end
32
32
 
33
33
  gemspec
data/README.md CHANGED
@@ -1,25 +1,15 @@
1
- # Rubykiq ( WIP ) [![Gem Version](https://badge.fury.io/rb/rubykiq.png)][gem] [![Build Status](https://travis-ci.org/karlfreeman/rubykiq.png?branch=master)][travis] [![Dependency Status](https://gemnasium.com/karlfreeman/rubykiq.png?travis)][gemnasium] [![Coverage Status](https://coveralls.io/repos/karlfreeman/rubykiq/badge.png?branch=master)][coveralls] [![Code Climate](https://codeclimate.com/github/karlfreeman/rubykiq.png)][codeclimate]
1
+ # Rubykiq
2
2
 
3
3
  [Sidekiq] agnostic enqueuing using Redis.
4
4
 
5
- [gem]: https://rubygems.org/gems/rubykiq
6
- [travis]: http://travis-ci.org/karlfreeman/rubykiq
7
- [gemnasium]: https://gemnasium.com/karlfreeman/rubykiq
8
- [coveralls]: https://coveralls.io/r/karlfreeman/rubykiq
9
- [codeclimate]: https://codeclimate.com/github/karlfreeman/rubykiq
10
-
11
- [sidekiq]: http://mperham.github.com/sidekiq/
12
-
13
- 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.
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.
14
6
 
15
7
  ## Features / Usage Examples
16
8
 
17
- * [Redis][] has support for [alternative drivers](https://github.com/redis/redis-rb#alternate-drivers), Rubykiq is tested with these in mind. ( eg :synchrony )
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
10
  * The `:at` parameter supports `Time`, `Date` and any `Time.parse`-able strings.
19
- * Pushing multiple and singular jobs has the same interface, simply nest args.
20
- * Slightly less gem dependecies, and by that I mean Sidekiq::Client without Celluloid ( which is already very light! )
21
-
22
- [redis]: https://github.com/redis/redis-rb
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! )
23
13
 
24
14
  ```ruby
25
15
  require "rubykiq"
@@ -51,9 +41,25 @@ Rubykiq.push(:class => "DelayedMailer", :at => "2013-01-01T09:00:00Z")
51
41
  job = { :class => "Worker" }
52
42
  Rubykiq << job
53
43
  ```
54
- __It's advised that using [Sidekiq::Client's push] method when already a dependency is going to be better in most everyday cases__
55
44
 
56
- [sidekiq::client's push]: https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/client.rb#L36
45
+ ## Caveats
46
+
47
+ * 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.
49
+
50
+ ## Build & Dependency Status
51
+
52
+ [![Gem Version](https://badge.fury.io/rb/rubykiq.png)][gem]
53
+ [![Build Status](https://travis-ci.org/karlfreeman/rubykiq.png)][travis]
54
+ [![Dependency Status](https://gemnasium.com/karlfreeman/rubykiq.png?travis)][gemnasium]
55
+ [![Code Quality](https://codeclimate.com/github/karlfreeman/rubykiq.png)][codeclimate]
56
+ [![Coverage Status](https://coveralls.io/repos/karlfreeman/rubykiq/badge.png?branch=master)][coveralls]
57
+
58
+ ## Supported Redis Drivers
59
+
60
+ * [Ruby](https://github.com/redis/redis-rb#alternate-drivers)
61
+ * [Hiredis](https://github.com/redis/hiredis)
62
+ * [Synchrony](https://github.com/igrigorik/em-synchrony)
57
63
 
58
64
  ## Supported Ruby Versions
59
65
  This library aims to support and is [tested against][travis] the following Ruby
@@ -65,9 +71,6 @@ implementations:
65
71
  * [JRuby][] (drivers: ruby)
66
72
  * [Rubinius][] (drivers: ruby)
67
73
 
68
- [jruby]: http://www.jruby.org/
69
- [rubinius]: http://rubini.us/
70
-
71
74
  # Credits
72
75
 
73
76
  Inspiration:
@@ -79,3 +82,14 @@ Cribbed:
79
82
  - [Sidekiq's internal client class](https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/client.rb)
80
83
  - [Sidekiq's internal redis class](https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/redis_connection.rb)
81
84
  - [Sidekiq's FAQ](https://github.com/mperham/sidekiq/wiki/FAQ)
85
+
86
+ [sidekiq]: http://mperham.github.com/sidekiq
87
+ [redis]: https://github.com/redis/redis-rb
88
+ [gem]: https://rubygems.org/gems/rubykiq
89
+ [travis]: http://travis-ci.org/karlfreeman/rubykiq
90
+ [gemnasium]: https://gemnasium.com/karlfreeman/rubykiq
91
+ [coveralls]: https://coveralls.io/r/karlfreeman/rubykiq
92
+ [codeclimate]: https://codeclimate.com/github/karlfreeman/rubykiq
93
+ [jruby]: http://www.jruby.org
94
+ [rubinius]: http://rubini.us
95
+
@@ -10,7 +10,7 @@ module Rubykiq
10
10
  # delegate all VALID_OPTIONS_KEYS accessors to the client
11
11
  def_delegators :client, *Rubykiq::Client::VALID_OPTIONS_KEYS
12
12
 
13
- # delegate all VALID_OPTIONS_KEYS setters to the client ( Hacky I know... )
13
+ # delegate all VALID_OPTIONS_KEYS setters to the client ( hacky I know... )
14
14
  def_delegators :client, *(Rubykiq::Client::VALID_OPTIONS_KEYS.dup.collect! do |key| "#{key}=".to_sym; end)
15
15
 
16
16
  # Fetch the Rubykiq::Client
@@ -1,7 +1,7 @@
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
7
 
@@ -1,5 +1,5 @@
1
- require 'redis'
2
- require 'redis/namespace'
1
+ require "redis"
2
+ require "redis/namespace"
3
3
 
4
4
  module Rubykiq
5
5
 
@@ -1,3 +1,3 @@
1
1
  module Rubykiq
2
- VERSION = "0.0.1" unless defined?(Rubykiq::VERSION)
2
+ VERSION = "0.0.2" unless defined?(Rubykiq::VERSION)
3
3
  end
@@ -3,11 +3,11 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
  require "rubykiq/version"
4
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"
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
11
  gem.name = "rubykiq"
12
12
  gem.version = Rubykiq::VERSION
13
13
  gem.authors = ["Karl Freeman"]
@@ -18,24 +18,27 @@ end
18
18
 
19
19
  #
20
20
  RSpec.configure do |config|
21
+
22
+ #
21
23
  config.expect_with :rspec do |c|
22
24
  c.syntax = :expect
23
25
  end
24
- end
25
26
 
26
- #
27
- def jruby?
28
- defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
29
- end
27
+ #
28
+ def jruby?
29
+ defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
30
+ end
30
31
 
31
- #
32
- def wrap_in_synchrony?(driver)
32
+ #
33
+ def wrap_in_synchrony?(driver)
34
+
35
+ yield unless driver == :synchrony
33
36
 
34
- yield unless driver == :synchrony
37
+ EM.synchrony do
38
+ yield if block_given?
39
+ EM.stop
40
+ end
35
41
 
36
- EM.synchrony do
37
- yield if block_given?
38
- EM.stop
39
42
  end
40
43
 
41
44
  end
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubykiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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-04-22 00:00:00.000000000 Z
11
+ date: 2013-08-04 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
- - - ~>
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.0'
83
83
  description: Sidekiq agnostic enqueuing using Redis
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  version: '0'
131
131
  requirements: []
132
132
  rubyforge_project:
133
- rubygems_version: 2.0.1
133
+ rubygems_version: 2.0.6
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Sidekiq agnostic enqueuing using Redis