delayed_job_shallow_mongoid 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -4
- data/Gemfile.lock +9 -12
- data/LICENSE.txt +1 -1
- data/README.rdoc +6 -13
- data/Rakefile +5 -14
- data/VERSION +1 -1
- data/delayed_job_shallow_mongoid.gemspec +7 -15
- metadata +23 -47
- data/test/helper.rb +0 -18
- data/test/test_delayed_job_shallow_mongoid.rb +0 -7
data/Gemfile
CHANGED
@@ -3,17 +3,15 @@ source "http://rubygems.org"
|
|
3
3
|
# Example:
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
5
5
|
|
6
|
-
gem
|
7
|
-
gem "delayed_job", "~> 2.1.4"
|
8
|
-
gem "delayed_job_mongoid", "~> 1.0.4"
|
6
|
+
gem "delayed_job_mongoid", ">= 1.0.4"
|
9
7
|
|
10
8
|
# Add dependencies to develop your gem here.
|
11
9
|
# Include everything needed to run rake, tests, features, etc.
|
12
10
|
group :development do
|
11
|
+
gem 'actionmailer'
|
13
12
|
gem "shoulda", ">= 0"
|
14
13
|
gem "bundler", "~> 1.0.0"
|
15
14
|
gem "jeweler", "~> 1.6.4"
|
16
|
-
gem "rcov", ">= 0"
|
17
15
|
gem 'rspec'
|
18
16
|
gem "ruby-debug19"
|
19
17
|
end
|
data/Gemfile.lock
CHANGED
@@ -22,15 +22,15 @@ GEM
|
|
22
22
|
activesupport (3.1.3)
|
23
23
|
multi_json (~> 1.0)
|
24
24
|
archive-tar-minitar (0.5.2)
|
25
|
-
bson (1.5.
|
25
|
+
bson (1.5.1)
|
26
26
|
builder (3.0.0)
|
27
27
|
columnize (0.3.5)
|
28
|
-
daemons (1.
|
29
|
-
delayed_job (
|
28
|
+
daemons (1.0.10)
|
29
|
+
delayed_job (3.0.0.pre4)
|
30
30
|
activesupport (~> 3.0)
|
31
|
-
daemons
|
32
|
-
delayed_job_mongoid (1.0.
|
33
|
-
delayed_job (
|
31
|
+
daemons (= 1.0.10)
|
32
|
+
delayed_job_mongoid (1.0.6)
|
33
|
+
delayed_job (= 3.0.0.pre4)
|
34
34
|
mongoid (>= 2.0)
|
35
35
|
diff-lcs (1.1.3)
|
36
36
|
erubis (2.7.0)
|
@@ -48,8 +48,8 @@ GEM
|
|
48
48
|
mime-types (~> 1.16)
|
49
49
|
treetop (~> 1.4.8)
|
50
50
|
mime-types (1.17.2)
|
51
|
-
mongo (1.5.
|
52
|
-
bson (= 1.5.
|
51
|
+
mongo (1.5.1)
|
52
|
+
bson (= 1.5.1)
|
53
53
|
mongoid (2.3.4)
|
54
54
|
activemodel (~> 3.1)
|
55
55
|
mongo (~> 1.3)
|
@@ -64,7 +64,6 @@ GEM
|
|
64
64
|
rack-test (0.6.1)
|
65
65
|
rack (>= 1.0)
|
66
66
|
rake (0.9.2.2)
|
67
|
-
rcov (0.9.11)
|
68
67
|
rspec (2.7.0)
|
69
68
|
rspec-core (~> 2.7.0)
|
70
69
|
rspec-expectations (~> 2.7.0)
|
@@ -100,10 +99,8 @@ PLATFORMS
|
|
100
99
|
DEPENDENCIES
|
101
100
|
actionmailer
|
102
101
|
bundler (~> 1.0.0)
|
103
|
-
|
104
|
-
delayed_job_mongoid (~> 1.0.4)
|
102
|
+
delayed_job_mongoid (>= 1.0.4)
|
105
103
|
jeweler (~> 1.6.4)
|
106
|
-
rcov
|
107
104
|
rspec
|
108
105
|
ruby-debug19
|
109
106
|
shoulda
|
data/LICENSE.txt
CHANGED
data/README.rdoc
CHANGED
@@ -1,19 +1,12 @@
|
|
1
1
|
= delayed_job_shallow_mongoid
|
2
2
|
|
3
|
-
|
3
|
+
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.
|
4
4
|
|
5
|
-
==
|
6
|
-
|
7
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
8
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
9
|
-
* Fork the project
|
10
|
-
* Start a feature/bugfix branch
|
11
|
-
* Commit and push until you are happy with your contribution
|
12
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
5
|
+
== Contributions
|
14
6
|
|
15
|
-
|
7
|
+
* Contributions encouraged. Feature branches appreciated.
|
8
|
+
* Development generously supported by [Art.sy](http://art.sy).
|
16
9
|
|
17
|
-
Copyright
|
18
|
-
further details.
|
10
|
+
== Copyright
|
19
11
|
|
12
|
+
Copyright (c) 2011 Joey Aghion, Art.sy Inc. See LICENSE.txt for further details.
|
data/Rakefile
CHANGED
@@ -10,6 +10,7 @@ rescue Bundler::BundlerError => e
|
|
10
10
|
exit e.status_code
|
11
11
|
end
|
12
12
|
require 'rake'
|
13
|
+
require 'rspec/core/rake_task'
|
13
14
|
|
14
15
|
require 'jeweler'
|
15
16
|
Jeweler::Tasks.new do |gem|
|
@@ -25,22 +26,12 @@ Jeweler::Tasks.new do |gem|
|
|
25
26
|
end
|
26
27
|
Jeweler::RubygemsDotOrgTasks.new
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
test.pattern = 'test/**/test_*.rb'
|
32
|
-
test.verbose = true
|
29
|
+
desc "Run all tests"
|
30
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
+
spec.pattern = "spec/**/*_spec.rb"
|
33
32
|
end
|
34
33
|
|
35
|
-
|
36
|
-
Rcov::RcovTask.new do |test|
|
37
|
-
test.libs << 'test'
|
38
|
-
test.pattern = 'test/**/test_*.rb'
|
39
|
-
test.verbose = true
|
40
|
-
test.rcov_opts << '--exclude "gems/*"'
|
41
|
-
end
|
42
|
-
|
43
|
-
task :default => :test
|
34
|
+
task :default => :spec
|
44
35
|
|
45
36
|
require 'rake/rdoctask'
|
46
37
|
Rake::RDocTask.new do |rdoc|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "delayed_job_shallow_mongoid"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Joey Aghion"]
|
12
|
-
s.date = "2011-11-
|
12
|
+
s.date = "2011-11-30"
|
13
13
|
s.description = "When the object or arg to a delayed_job is a Mongoid document, store only a small stub of the object instead of the full serialization."
|
14
14
|
s.email = "joey@aghion.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -31,9 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
"lib/delayed/shallow_mongoid/document_stub.rb",
|
32
32
|
"lib/delayed_job_shallow_mongoid.rb",
|
33
33
|
"spec/delayed_job_shallow_mongoid_spec.rb",
|
34
|
-
"spec/spec_helper.rb"
|
35
|
-
"test/helper.rb",
|
36
|
-
"test/test_delayed_job_shallow_mongoid.rb"
|
34
|
+
"spec/spec_helper.rb"
|
37
35
|
]
|
38
36
|
s.homepage = "http://github.com/jaghion/delayed_job_shallow_mongoid"
|
39
37
|
s.licenses = ["MIT"]
|
@@ -45,34 +43,28 @@ Gem::Specification.new do |s|
|
|
45
43
|
s.specification_version = 3
|
46
44
|
|
47
45
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
48
|
-
s.add_runtime_dependency(%q<
|
49
|
-
s.
|
50
|
-
s.add_runtime_dependency(%q<delayed_job_mongoid>, ["~> 1.0.4"])
|
46
|
+
s.add_runtime_dependency(%q<delayed_job_mongoid>, [">= 1.0.4"])
|
47
|
+
s.add_development_dependency(%q<actionmailer>, [">= 0"])
|
51
48
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
52
49
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
53
50
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
54
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
55
51
|
s.add_development_dependency(%q<rspec>, [">= 0"])
|
56
52
|
s.add_development_dependency(%q<ruby-debug19>, [">= 0"])
|
57
53
|
else
|
54
|
+
s.add_dependency(%q<delayed_job_mongoid>, [">= 1.0.4"])
|
58
55
|
s.add_dependency(%q<actionmailer>, [">= 0"])
|
59
|
-
s.add_dependency(%q<delayed_job>, ["~> 2.1.4"])
|
60
|
-
s.add_dependency(%q<delayed_job_mongoid>, ["~> 1.0.4"])
|
61
56
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
62
57
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
63
58
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
64
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
65
59
|
s.add_dependency(%q<rspec>, [">= 0"])
|
66
60
|
s.add_dependency(%q<ruby-debug19>, [">= 0"])
|
67
61
|
end
|
68
62
|
else
|
63
|
+
s.add_dependency(%q<delayed_job_mongoid>, [">= 1.0.4"])
|
69
64
|
s.add_dependency(%q<actionmailer>, [">= 0"])
|
70
|
-
s.add_dependency(%q<delayed_job>, ["~> 2.1.4"])
|
71
|
-
s.add_dependency(%q<delayed_job_mongoid>, ["~> 1.0.4"])
|
72
65
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
73
66
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
74
67
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
75
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
76
68
|
s.add_dependency(%q<rspec>, [">= 0"])
|
77
69
|
s.add_dependency(%q<ruby-debug19>, [">= 0"])
|
78
70
|
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: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,44 +9,33 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-11-
|
12
|
+
date: 2011-11-30 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement: &
|
15
|
+
name: delayed_job_mongoid
|
16
|
+
requirement: &2165876760 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: *2168663180
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: delayed_job
|
27
|
-
requirement: &2168662700 !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
|
-
requirements:
|
30
|
-
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 2.1.4
|
21
|
+
version: 1.0.4
|
33
22
|
type: :runtime
|
34
23
|
prerelease: false
|
35
|
-
version_requirements: *
|
24
|
+
version_requirements: *2165876760
|
36
25
|
- !ruby/object:Gem::Dependency
|
37
|
-
name:
|
38
|
-
requirement: &
|
26
|
+
name: actionmailer
|
27
|
+
requirement: &2165830840 !ruby/object:Gem::Requirement
|
39
28
|
none: false
|
40
29
|
requirements:
|
41
|
-
- -
|
30
|
+
- - ! '>='
|
42
31
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
44
|
-
type: :
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
45
34
|
prerelease: false
|
46
|
-
version_requirements: *
|
35
|
+
version_requirements: *2165830840
|
47
36
|
- !ruby/object:Gem::Dependency
|
48
37
|
name: shoulda
|
49
|
-
requirement: &
|
38
|
+
requirement: &2165830220 !ruby/object:Gem::Requirement
|
50
39
|
none: false
|
51
40
|
requirements:
|
52
41
|
- - ! '>='
|
@@ -54,10 +43,10 @@ dependencies:
|
|
54
43
|
version: '0'
|
55
44
|
type: :development
|
56
45
|
prerelease: false
|
57
|
-
version_requirements: *
|
46
|
+
version_requirements: *2165830220
|
58
47
|
- !ruby/object:Gem::Dependency
|
59
48
|
name: bundler
|
60
|
-
requirement: &
|
49
|
+
requirement: &2165829600 !ruby/object:Gem::Requirement
|
61
50
|
none: false
|
62
51
|
requirements:
|
63
52
|
- - ~>
|
@@ -65,10 +54,10 @@ dependencies:
|
|
65
54
|
version: 1.0.0
|
66
55
|
type: :development
|
67
56
|
prerelease: false
|
68
|
-
version_requirements: *
|
57
|
+
version_requirements: *2165829600
|
69
58
|
- !ruby/object:Gem::Dependency
|
70
59
|
name: jeweler
|
71
|
-
requirement: &
|
60
|
+
requirement: &2165828980 !ruby/object:Gem::Requirement
|
72
61
|
none: false
|
73
62
|
requirements:
|
74
63
|
- - ~>
|
@@ -76,21 +65,10 @@ dependencies:
|
|
76
65
|
version: 1.6.4
|
77
66
|
type: :development
|
78
67
|
prerelease: false
|
79
|
-
version_requirements: *
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: rcov
|
82
|
-
requirement: &2168660300 !ruby/object:Gem::Requirement
|
83
|
-
none: false
|
84
|
-
requirements:
|
85
|
-
- - ! '>='
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '0'
|
88
|
-
type: :development
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: *2168660300
|
68
|
+
version_requirements: *2165828980
|
91
69
|
- !ruby/object:Gem::Dependency
|
92
70
|
name: rspec
|
93
|
-
requirement: &
|
71
|
+
requirement: &2165828340 !ruby/object:Gem::Requirement
|
94
72
|
none: false
|
95
73
|
requirements:
|
96
74
|
- - ! '>='
|
@@ -98,10 +76,10 @@ dependencies:
|
|
98
76
|
version: '0'
|
99
77
|
type: :development
|
100
78
|
prerelease: false
|
101
|
-
version_requirements: *
|
79
|
+
version_requirements: *2165828340
|
102
80
|
- !ruby/object:Gem::Dependency
|
103
81
|
name: ruby-debug19
|
104
|
-
requirement: &
|
82
|
+
requirement: &2165827680 !ruby/object:Gem::Requirement
|
105
83
|
none: false
|
106
84
|
requirements:
|
107
85
|
- - ! '>='
|
@@ -109,7 +87,7 @@ dependencies:
|
|
109
87
|
version: '0'
|
110
88
|
type: :development
|
111
89
|
prerelease: false
|
112
|
-
version_requirements: *
|
90
|
+
version_requirements: *2165827680
|
113
91
|
description: When the object or arg to a delayed_job is a Mongoid document, store
|
114
92
|
only a small stub of the object instead of the full serialization.
|
115
93
|
email: joey@aghion.com
|
@@ -134,8 +112,6 @@ files:
|
|
134
112
|
- lib/delayed_job_shallow_mongoid.rb
|
135
113
|
- spec/delayed_job_shallow_mongoid_spec.rb
|
136
114
|
- spec/spec_helper.rb
|
137
|
-
- test/helper.rb
|
138
|
-
- test/test_delayed_job_shallow_mongoid.rb
|
139
115
|
homepage: http://github.com/jaghion/delayed_job_shallow_mongoid
|
140
116
|
licenses:
|
141
117
|
- MIT
|
@@ -151,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
127
|
version: '0'
|
152
128
|
segments:
|
153
129
|
- 0
|
154
|
-
hash:
|
130
|
+
hash: -3944111042140295912
|
155
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
132
|
none: false
|
157
133
|
requirements:
|
data/test/helper.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler'
|
3
|
-
begin
|
4
|
-
Bundler.setup(:default, :development)
|
5
|
-
rescue Bundler::BundlerError => e
|
6
|
-
$stderr.puts e.message
|
7
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
-
exit e.status_code
|
9
|
-
end
|
10
|
-
require 'test/unit'
|
11
|
-
require 'shoulda'
|
12
|
-
|
13
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
-
require 'delayed_job_shallow_mongoid'
|
16
|
-
|
17
|
-
class Test::Unit::TestCase
|
18
|
-
end
|