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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 241496eebc696681823dccc7e8c86b31a821a470
4
- data.tar.gz: 6a3694a48a1c5f94e00e904678ad2290001b9917
3
+ metadata.gz: 0d9f061d6bebee451a7cf5e173cf3915e76b3ff1
4
+ data.tar.gz: b4911534f11ec8df900c3cb82a1f7f4cc7051433
5
5
  SHA512:
6
- metadata.gz: 0e3d4c20ede088bcdfb6737d74b016da324aece575250254c7d3a6a6a36d6deacc5a2ed4f6b48bc3710fb67fb58a942acf4cf52f2af782da3212ec313315bbcb
7
- data.tar.gz: 8ca08d593b35d303a86049f7c2cd2024f692ba5931df58e511a11380747d34f035e67571ef3b0720f0784ab232923087b91ab3e38077e7ed722fb87e5b18a9e5
6
+ metadata.gz: 6e6a11f8dadf6191f297c64678b1db697c7dd1b0fef392109342a8335942ce457d157e6f87151a961ae08cb0c50376f8867b41246243a17a57cb1a417c3ac308
7
+ data.tar.gz: 54d59cf294de273b28985cdac34605b80bf807d439d3af85911f9973d1f6267bf6c1ef3dd76b4d7f3b5a902323a9fc9529a19a78d3c595ba97ee827c064161fa
@@ -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.2
9
- - 2.1.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
- - rbx-2
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
@@ -1,3 +1,8 @@
1
+ 1.2.0 (2017-04-07)
2
+ ------------
3
+
4
+ * [#12](https://github.com/joeyAghion/delayed_job_shallow_mongoid/pull/12): Support Mongoid 6 - [@yuki24](https://github.com/yuki24).
5
+
1
6
  1.1.0 (2015-09-25)
2
7
  ------------------
3
8
 
data/Gemfile CHANGED
@@ -3,8 +3,10 @@ source 'http://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  case version = ENV['MONGOID_VERSION'] || '5.0'
6
+ when /^6/
7
+ gem 'mongoid', '~> 6.0'
6
8
  when /^5/
7
- gem 'mongoid', '~> 4.0'
9
+ gem 'mongoid', '~> 5.0'
8
10
  when /^4/
9
11
  gem 'mongoid', '~> 4.0'
10
12
  when /^3/
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.png?branch=master)](http://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).deliver
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
@@ -1,5 +1,5 @@
1
1
  module Delayed
2
2
  module ShallowMongoid
3
- VERSION = '1.1.0'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  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.1.0
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: 2015-09-25 00:00:00.000000000 Z
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.2.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.