delayed_job_shallow_mongoid 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +21 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile +3 -1
- data/README.md +2 -1
- data/lib/delayed/shallow_mongoid/performable_mailer.rb +2 -1
- data/lib/delayed/shallow_mongoid/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d9f061d6bebee451a7cf5e173cf3915e76b3ff1
|
4
|
+
data.tar.gz: b4911534f11ec8df900c3cb82a1f7f4cc7051433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e6a11f8dadf6191f297c64678b1db697c7dd1b0fef392109342a8335942ce457d157e6f87151a961ae08cb0c50376f8867b41246243a17a57cb1a417c3ac308
|
7
|
+
data.tar.gz: 54d59cf294de273b28985cdac34605b80bf807d439d3af85911f9973d1f6267bf6c1ef3dd76b4d7f3b5a902323a9fc9529a19a78d3c595ba97ee827c064161fa
|
data/.travis.yml
CHANGED
@@ -4,15 +4,32 @@ language: ruby
|
|
4
4
|
|
5
5
|
cache: bundler
|
6
6
|
|
7
|
+
before_install: gem update bundler --no-document
|
8
|
+
|
7
9
|
rvm:
|
8
|
-
- 2.
|
9
|
-
- 2.
|
10
|
+
- 2.4.1
|
11
|
+
- 2.3.4
|
12
|
+
- 2.2.7
|
13
|
+
- 2.1.9
|
10
14
|
- 2.0.0
|
11
15
|
- 1.9.3
|
12
|
-
-
|
13
|
-
- jruby-19mode
|
16
|
+
- jruby-9.1.8.0
|
14
17
|
|
15
18
|
env:
|
16
19
|
- MONGOID_VERSION=3
|
17
20
|
- MONGOID_VERSION=4
|
18
21
|
- MONGOID_VERSION=5
|
22
|
+
- MONGOID_VERSION=6
|
23
|
+
|
24
|
+
matrix:
|
25
|
+
exclude:
|
26
|
+
- rvm: 2.1.9
|
27
|
+
env: MONGOID_VERSION=6
|
28
|
+
- rvm: 2.0.0
|
29
|
+
env: MONGOID_VERSION=5
|
30
|
+
- rvm: 2.0.0
|
31
|
+
env: MONGOID_VERSION=6
|
32
|
+
- rvm: 1.9.3
|
33
|
+
env: MONGOID_VERSION=5
|
34
|
+
- rvm: 1.9.3
|
35
|
+
env: MONGOID_VERSION=6
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
delayed_job_shallow_mongoid
|
2
2
|
===========================
|
3
3
|
|
4
|
-
[![Build Status](https://secure.travis-ci.org/joeyAghion/delayed_job_shallow_mongoid.
|
4
|
+
[![Build Status](https://secure.travis-ci.org/joeyAghion/delayed_job_shallow_mongoid.svg?branch=master)](http://travis-ci.org/joeyAghion/delayed_job_shallow_mongoid)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/delayed_job_shallow_mongoid.svg)](http://badge.fury.io/rb/delayed_job_shallow_mongoid)
|
5
6
|
|
6
7
|
This library short-circuits serialization of [Mongoid](http://mongoid.org) model instances when a delayed job is called on them, or when they're passed as arguments to a delayed job. Rather than generate and store the fully-serialized YAML, a simple stub is stored. When the job is run, the stub is recognized and a `find` is done to look up the underlying document. If a referenced model isn't found at this point, the job simply does nothing.
|
7
8
|
|
@@ -3,7 +3,8 @@ module Delayed
|
|
3
3
|
def perform
|
4
4
|
klass = ShallowMongoid.load(object)
|
5
5
|
delayed_arguments = *args.map { |a| ShallowMongoid.load(a) }
|
6
|
-
klass.send(method_name, *delayed_arguments)
|
6
|
+
message = klass.send(method_name, *delayed_arguments)
|
7
|
+
message.respond_to?(:deliver_now) ? message.deliver_now : message.deliver
|
7
8
|
rescue Delayed::ShallowMongoid::Errors::DocumentNotFound
|
8
9
|
return true # do nothing if document has been removed
|
9
10
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delayed_job_shallow_mongoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joey Aghion
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-04-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: delayed_job
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.
|
184
|
+
rubygems_version: 2.6.8
|
185
185
|
signing_key:
|
186
186
|
specification_version: 3
|
187
187
|
summary: More efficient Mongoid document serialization for delayed_job.
|