delayed_job_ironmq 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 82cb55dc34f6dc0e2110bdca7e4bcd3fdd8affca
4
+ data.tar.gz: 12cc3347deb24b7fbd95cfe1ff135d995ac60f63
5
+ SHA512:
6
+ metadata.gz: 6d12fce9d30d8bf403d3bdcb9445e69fac5fa7c77b1e7475bdcb29e48615619acbafd7c7573a13dd569d5e160725223bbba048ecc0abcb8fb05f6cf8d8d2da83
7
+ data.tar.gz: 4c563d142bed4edc8be79078fd544269a81ff6bb3eade695180bc3ce143d534bf946fea95643af47b6f0d9209f7294625e58b20a37ec85e69ae9242754dd3c41
@@ -0,0 +1,10 @@
1
+ *.swp
2
+ *.tmproj
3
+ .DS_Store
4
+ *.esproj/
5
+ .idea/
6
+ /coverage
7
+ /rdoc
8
+ /pkg
9
+ .rvmrc
10
+ .bundle/config
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,44 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ delayed_job_ironmq (1.0.2)
5
+ delayed_job (>= 3.0.0)
6
+ iron_mq (>= 4.0.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (3.2.18)
12
+ i18n (~> 0.6, >= 0.6.4)
13
+ multi_json (~> 1.0)
14
+ delayed_job (3.0.5)
15
+ activesupport (~> 3.0)
16
+ diff-lcs (1.2.5)
17
+ i18n (0.6.9)
18
+ iron_core (1.0.3)
19
+ rest (>= 2.6.4)
20
+ iron_mq (5.0.1)
21
+ iron_core (>= 0.5.1)
22
+ multi_json (1.10.0)
23
+ net-http-persistent (2.9.4)
24
+ netrc (0.7.7)
25
+ rest (2.7.1)
26
+ net-http-persistent (>= 2.9.1)
27
+ rest_client (>= 1.7.1)
28
+ rest_client (1.7.3)
29
+ netrc (~> 0.7.7)
30
+ rspec (2.14.1)
31
+ rspec-core (~> 2.14.0)
32
+ rspec-expectations (~> 2.14.0)
33
+ rspec-mocks (~> 2.14.0)
34
+ rspec-core (2.14.8)
35
+ rspec-expectations (2.14.5)
36
+ diff-lcs (>= 1.1.3, < 2.0)
37
+ rspec-mocks (2.14.6)
38
+
39
+ PLATFORMS
40
+ ruby
41
+
42
+ DEPENDENCIES
43
+ delayed_job_ironmq!
44
+ rspec
data/README.md CHANGED
@@ -27,7 +27,7 @@ Optionally: Add an initializer (`config/initializers/delayed_job.rb`):
27
27
  ```ruby
28
28
  Delayed::Worker.configure do |config|
29
29
  # optional params:
30
- config.available_priorities = [-1,0,1,2] # Default is [0]. Please note, each new priority will speed down a bit picking job from queue
30
+ config.available_priorities = [-1,0,1,2] # Default is [0]. Please note, adding new priorities will slow down picking the next job from queue. Also note that these priorities must include all priorities of your Delayed Jobs.
31
31
  config.queue_name = 'default' # Specify an alternative queue name
32
32
  config.delay = 0 # Time to wait before message will be available on the queue
33
33
  config.timeout = 5.minutes # The time in seconds to wait after message is taken off the queue, before it is put back on. Delete before :timeout to ensure it does not go back on the queue.
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+
3
+ require 'bundler'
4
+
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
@@ -0,0 +1,24 @@
1
+ require File.expand_path('../lib/delayed/backend/version', __FILE__)
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.authors = ["Alexander Shapiotko", "Iron.io, Inc"]
5
+ gem.email = ["alex@iron.io", "support@iron.io"]
6
+ gem.description = "IronMQ backend for delayed_job"
7
+ gem.summary = "IronMQ backend for delayed_job"
8
+ gem.homepage = "https://github.com/iron-io/delayed_job_ironmq"
9
+ gem.license = "BSD-2-Clause"
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = "delayed_job_ironmq"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = Delayed::Backend::Ironmq::VERSION
17
+
18
+ gem.required_rubygems_version = ">= 1.3.6"
19
+ gem.required_ruby_version = Gem::Requirement.new(">= 1.8")
20
+ gem.add_runtime_dependency "iron_mq", ">= 4.0.0"
21
+ gem.add_runtime_dependency "delayed_job", ">= 3.0.0"
22
+
23
+ gem.add_development_dependency "rspec"
24
+ end
@@ -49,7 +49,6 @@ module Delayed
49
49
  end
50
50
  end
51
51
  end
52
- puts "Messages removed: #{deleted}"
53
52
  end
54
53
 
55
54
  # No need to check locks
@@ -18,7 +18,6 @@ module Delayed
18
18
  field :queue, :type => String
19
19
 
20
20
  def initialize(data = {})
21
- puts "[init] Delayed::Backend::Ironmq"
22
21
  @msg = nil
23
22
  if data.is_a?(IronMQ::Message)
24
23
  @msg = data
@@ -54,8 +53,6 @@ module Delayed
54
53
  end
55
54
 
56
55
  def save
57
- puts "[SAVE] #{@attributes.inspect}"
58
-
59
56
  if @attributes[:handler].blank?
60
57
  raise "Handler missing!"
61
58
  end
@@ -76,7 +73,6 @@ module Delayed
76
73
 
77
74
  def destroy
78
75
  if @msg
79
- puts "job destroyed! #{@msg.id}"
80
76
  @msg.delete
81
77
  end
82
78
  end
@@ -107,6 +103,10 @@ module Delayed
107
103
  super
108
104
  end
109
105
 
106
+ def id
107
+ @msg.id if @msg
108
+ end
109
+
110
110
  private
111
111
 
112
112
  def queue_name
@@ -1,11 +1,7 @@
1
1
  module Delayed
2
2
  module Backend
3
3
  module Ironmq
4
- @@version = nil
5
-
6
- def self.version
7
- @@version ||= File.read(File.dirname(__FILE__) + '/../../../VERSION').strip
8
- end
4
+ VERSION = "1.0.2"
9
5
  end
10
6
  end
11
- end
7
+ end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_job_ironmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
5
- prerelease:
4
+ version: 1.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Alexander Shapiotko
@@ -10,83 +9,65 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-05-15 00:00:00.000000000 Z
12
+ date: 2014-05-18 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: iron_mq
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - '>='
21
19
  - !ruby/object:Gem::Version
22
20
  version: 4.0.0
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - '>='
29
26
  - !ruby/object:Gem::Version
30
27
  version: 4.0.0
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: delayed_job
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ~>
32
+ - - '>='
37
33
  - !ruby/object:Gem::Version
38
34
  version: 3.0.0
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ~>
39
+ - - '>='
45
40
  - !ruby/object:Gem::Version
46
41
  version: 3.0.0
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: rspec
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '2.0'
55
- type: :development
56
- prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
60
- - - ! '>='
61
- - !ruby/object:Gem::Version
62
- version: '2.0'
63
- - !ruby/object:Gem::Dependency
64
- name: jeweler2
65
- requirement: !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
68
- - - ! '>='
46
+ - - '>='
69
47
  - !ruby/object:Gem::Version
70
48
  version: '0'
71
49
  type: :development
72
50
  prerelease: false
73
51
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
52
  requirements:
76
- - - ! '>='
53
+ - - '>='
77
54
  - !ruby/object:Gem::Version
78
55
  version: '0'
79
56
  description: IronMQ backend for delayed_job
80
- email: info@iron.io
57
+ email:
58
+ - alex@iron.io
59
+ - support@iron.io
81
60
  executables: []
82
61
  extensions: []
83
- extra_rdoc_files:
84
- - LICENSE
85
- - README.md
62
+ extra_rdoc_files: []
86
63
  files:
64
+ - .gitignore
65
+ - Gemfile
66
+ - Gemfile.lock
87
67
  - LICENSE
88
68
  - README.md
89
- - VERSION
69
+ - Rakefile
70
+ - delayed_job_ironmq.gemspec
90
71
  - lib/delayed/backend/actions.rb
91
72
  - lib/delayed/backend/iron_mq_config.rb
92
73
  - lib/delayed/backend/ironmq.rb
@@ -96,30 +77,28 @@ files:
96
77
  - lib/delayed_job_ironmq.rb
97
78
  - spec/.gitkeep
98
79
  homepage: https://github.com/iron-io/delayed_job_ironmq
99
- licenses: []
80
+ licenses:
81
+ - BSD-2-Clause
82
+ metadata: {}
100
83
  post_install_message:
101
84
  rdoc_options: []
102
85
  require_paths:
103
86
  - lib
104
87
  required_ruby_version: !ruby/object:Gem::Requirement
105
- none: false
106
88
  requirements:
107
- - - ! '>='
89
+ - - '>='
108
90
  - !ruby/object:Gem::Version
109
- version: '0'
110
- segments:
111
- - 0
112
- hash: 2249236380944404920
91
+ version: '1.8'
113
92
  required_rubygems_version: !ruby/object:Gem::Requirement
114
- none: false
115
93
  requirements:
116
- - - ! '>='
94
+ - - '>='
117
95
  - !ruby/object:Gem::Version
118
- version: '0'
96
+ version: 1.3.6
119
97
  requirements: []
120
98
  rubyforge_project:
121
- rubygems_version: 1.8.25
99
+ rubygems_version: 2.2.2
122
100
  signing_key:
123
- specification_version: 3
101
+ specification_version: 4
124
102
  summary: IronMQ backend for delayed_job
125
- test_files: []
103
+ test_files:
104
+ - spec/.gitkeep
data/VERSION DELETED
@@ -1,2 +0,0 @@
1
- 1.0.1
2
-