actionable 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 340c99f50eea984f343dda499ec85fc3e37ab5ba
4
- data.tar.gz: 960769538e741862fd713646df304a7edb487166
3
+ metadata.gz: f03b0a7dce60b9d34efb093640194bb0b3ad7e49
4
+ data.tar.gz: 774e885c475093f721a7b8e60f64ba65d7b71793
5
5
  SHA512:
6
- metadata.gz: 4efd2fa61ea17102a93783fbabd35fc79b9768fb164b69ff5624774fed69ce1226cb5a2956d004089bac76d4517b95bf36e9e1cd9e0b8d84aea41bcd0be064a7
7
- data.tar.gz: 1894e8d1c89db1ba786670edff77878ddca9361fa0eb9adaf06a35487fe1eec3de1af9fd928777fc0afde12d46b1f0798e867c8260a7f5ac0f822481a587047b
6
+ metadata.gz: 42c77d2cc1bfb40c165603a3c820dd642f99456e812e0952b7e91c462f3191c0b22cc551735540c31e20a246eeb5f2ddd22db1e5d6c0c3d74c8dd898fb77200a
7
+ data.tar.gz: b1a6de02ede0dbd112ce8890cb22426be8a47a7c587c27ef72f8a12ae6bbb9ffe0c22d116dcf9b7e84512a4a4a9a2818d1578790928be6fe4c320f4b2357cc46
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'resque', '~> 1.24.1'
4
- gem 'mongoid', github: 'mongoid/mongoid', branch: 'master'
4
+ gem 'mongoid', '4.0.0.alpha2'
5
5
  gemspec
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
 
30
30
  spec.add_dependency "activesupport", ">= 4.0.0"
31
31
  spec.add_dependency "resque", "~> 1.24.1"
32
- spec.add_dependency "mongoid", ">= 3.9"
32
+ spec.add_dependency "mongoid", "~> 4.0.0.alpha2"
33
33
  spec.add_dependency "rufus-scheduler", "~> 2.0.4"
34
34
 
35
35
 
@@ -1,8 +1,8 @@
1
1
  module Actionable
2
2
  module MemoryStore
3
-
3
+
4
4
  def self.insert(model)
5
- key = (model[:id] ||= Moped::BSON::ObjectId.new.to_s)
5
+ key = (model[:id] ||= BSON::ObjectId.new.to_s)
6
6
  set(key,model)
7
7
  add(hash["target_#{model[:target_id]}"],model) if model[:target_id].present?
8
8
  model
@@ -1,4 +1,5 @@
1
1
  require 'mongoid'
2
+ require 'moped'
2
3
 
3
4
  module Actionable
4
5
  module MongoidStore
@@ -14,7 +15,7 @@ module Actionable
14
15
  field :payload, type: Hash
15
16
  field :job_class_name, type: String
16
17
  field :status, type: Symbol, default: :new
17
- field :target_id, type: Moped::BSON::ObjectId
18
+ field :target_id, type: BSON::ObjectId
18
19
  field :target_class_name, type: String
19
20
  field :exception_message, type: String
20
21
  field :exception_backtrace, type: Array
@@ -26,10 +27,10 @@ module Actionable
26
27
 
27
28
  scope :with_job_class, ->(klass) { where(job_class_name: klass.to_s.classify)}
28
29
 
29
- scope :scheduled_or_late, where(:status.in => [:scheduled,:late])
30
+ scope :scheduled_or_late, -> { where(:status.in => [:scheduled,:late]) }
30
31
 
31
32
  [:scheduled,:enqueued,:working,:complete,:canceled,:failed,:overdue].each do |status|
32
- scope status, where(status: status)
33
+ scope status, -> { where(status: status) }
33
34
  define_method(:"#{status}?") { self.status == status }
34
35
  end
35
36
 
@@ -1,3 +1,3 @@
1
1
  module Actionable
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Luxemburg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-25 00:00:00.000000000 Z
11
+ date: 2014-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -154,16 +154,16 @@ dependencies:
154
154
  name: mongoid
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - '>='
157
+ - - ~>
158
158
  - !ruby/object:Gem::Version
159
- version: '3.9'
159
+ version: 4.0.0.alpha2
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - '>='
164
+ - - ~>
165
165
  - !ruby/object:Gem::Version
166
- version: '3.9'
166
+ version: 4.0.0.alpha2
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rufus-scheduler
169
169
  requirement: !ruby/object:Gem::Requirement