resque-ensure-connected 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +42 -0
- data/.rvmrc +1 -0
- data/CONTRIBUTORS.txt +6 -0
- data/Gemfile +2 -15
- data/Gemfile.lock +42 -40
- data/LICENSE.txt +19 -17
- data/README.md +29 -0
- data/Rakefile +1 -46
- data/lib/resque-ensure-connected.rb +10 -1
- data/lib/resque-ensure-connected/version.rb +5 -0
- data/resque-ensure-connected.gemspec +20 -69
- data/test/helper.rb +1 -0
- data/test/test_resque-ensure-connected.rb +7 -13
- metadata +44 -70
- data/README.rdoc +0 -27
- data/VERSION +0 -1
data/.gitignore
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# rcov generated
|
2
|
+
coverage
|
3
|
+
|
4
|
+
# rdoc generated
|
5
|
+
rdoc
|
6
|
+
|
7
|
+
# yard generated
|
8
|
+
doc
|
9
|
+
.yardoc
|
10
|
+
|
11
|
+
# bundler
|
12
|
+
.bundle
|
13
|
+
|
14
|
+
# jeweler generated
|
15
|
+
pkg
|
16
|
+
|
17
|
+
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
|
18
|
+
#
|
19
|
+
# * Create a file at ~/.gitignore
|
20
|
+
# * Include files you want ignored
|
21
|
+
# * Run: git config --global core.excludesfile ~/.gitignore
|
22
|
+
#
|
23
|
+
# After doing this, these files will be ignored in all your git projects,
|
24
|
+
# saving you from having to 'pollute' every project you touch with them
|
25
|
+
#
|
26
|
+
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
27
|
+
#
|
28
|
+
# For MacOS:
|
29
|
+
#
|
30
|
+
#.DS_Store
|
31
|
+
#
|
32
|
+
# For TextMate
|
33
|
+
#*.tmproj
|
34
|
+
#tmtags
|
35
|
+
#
|
36
|
+
# For emacs:
|
37
|
+
#*~
|
38
|
+
#\#*
|
39
|
+
#.\#*
|
40
|
+
#
|
41
|
+
# For vim:
|
42
|
+
#*.swp
|
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use ree-1.8.7-2011.03@resque-ensure-connected --create
|
data/CONTRIBUTORS.txt
ADDED
data/Gemfile
CHANGED
@@ -1,17 +1,4 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
|
-
# Add dependencies required to use your gem here.
|
3
|
-
# Example:
|
4
|
-
# gem "activesupport", ">= 2.3.5"
|
5
|
-
gem 'resque', '~> 1.10.0'
|
6
|
-
gem 'activerecord', '>= 2.3.5'
|
7
2
|
|
8
|
-
#
|
9
|
-
|
10
|
-
group :development do
|
11
|
-
gem "shoulda", ">= 0"
|
12
|
-
gem "mocha", ">= 0"
|
13
|
-
gem "bundler", "~> 1.0.0"
|
14
|
-
gem "jeweler", "~> 1.5.1"
|
15
|
-
gem "rcov", ">= 0"
|
16
|
-
gem "resque_unit", ">= 0"
|
17
|
-
end
|
3
|
+
# Specify your gem's dependencies in resque-ensure-connected.gemspec
|
4
|
+
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,47 +1,52 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
resque-ensure-connected (0.2.0)
|
5
|
+
activerecord (>= 2.3.5)
|
6
|
+
resque (>= 1.10.0)
|
7
|
+
|
1
8
|
GEM
|
2
9
|
remote: http://rubygems.org/
|
3
10
|
specs:
|
4
|
-
activemodel (3.
|
5
|
-
activesupport (= 3.
|
6
|
-
builder (~>
|
7
|
-
i18n (~> 0.
|
8
|
-
activerecord (3.
|
9
|
-
activemodel (= 3.
|
10
|
-
activesupport (= 3.
|
11
|
-
arel (~>
|
12
|
-
tzinfo (~> 0.3.
|
13
|
-
activesupport (3.
|
14
|
-
|
15
|
-
|
16
|
-
builder (
|
17
|
-
|
18
|
-
i18n (0.4.1)
|
19
|
-
jeweler (1.5.1)
|
20
|
-
bundler (~> 1.0.0)
|
21
|
-
git (>= 1.2.5)
|
22
|
-
rake
|
11
|
+
activemodel (3.1.1)
|
12
|
+
activesupport (= 3.1.1)
|
13
|
+
builder (~> 3.0.0)
|
14
|
+
i18n (~> 0.6)
|
15
|
+
activerecord (3.1.1)
|
16
|
+
activemodel (= 3.1.1)
|
17
|
+
activesupport (= 3.1.1)
|
18
|
+
arel (~> 2.2.1)
|
19
|
+
tzinfo (~> 0.3.29)
|
20
|
+
activesupport (3.1.1)
|
21
|
+
multi_json (~> 1.0)
|
22
|
+
arel (2.2.1)
|
23
|
+
builder (3.0.0)
|
24
|
+
i18n (0.6.0)
|
23
25
|
json (1.4.6)
|
24
26
|
mocha (0.9.8)
|
25
27
|
rake
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
multi_json (1.0.3)
|
29
|
+
rack (1.3.5)
|
30
|
+
rack-protection (1.1.4)
|
31
|
+
rack
|
32
|
+
rake (0.9.2.2)
|
33
|
+
redis (2.2.2)
|
34
|
+
redis-namespace (1.0.3)
|
31
35
|
redis (< 3.0.0)
|
32
|
-
resque (1.
|
33
|
-
|
34
|
-
redis-namespace (~> 0.
|
36
|
+
resque (1.19.0)
|
37
|
+
multi_json (~> 1.0)
|
38
|
+
redis-namespace (~> 1.0.2)
|
35
39
|
sinatra (>= 0.9.2)
|
36
40
|
vegas (~> 0.1.2)
|
37
|
-
resque_unit (0.
|
38
|
-
json (
|
41
|
+
resque_unit (0.4.1)
|
42
|
+
json (>= 1.4.6)
|
39
43
|
shoulda (2.11.3)
|
40
|
-
sinatra (1.1
|
41
|
-
rack (~> 1.1)
|
42
|
-
|
43
|
-
|
44
|
-
|
44
|
+
sinatra (1.3.1)
|
45
|
+
rack (~> 1.3, >= 1.3.4)
|
46
|
+
rack-protection (~> 1.1, >= 1.1.2)
|
47
|
+
tilt (~> 1.3, >= 1.3.3)
|
48
|
+
tilt (1.3.3)
|
49
|
+
tzinfo (0.3.31)
|
45
50
|
vegas (0.1.8)
|
46
51
|
rack (>= 1.0.0)
|
47
52
|
|
@@ -49,11 +54,8 @@ PLATFORMS
|
|
49
54
|
ruby
|
50
55
|
|
51
56
|
DEPENDENCIES
|
52
|
-
activerecord (>= 2.3.5)
|
53
|
-
bundler (~> 1.0.0)
|
54
|
-
jeweler (~> 1.5.1)
|
55
57
|
mocha
|
56
|
-
|
57
|
-
resque
|
58
|
-
resque_unit
|
58
|
+
rake (= 0.9.2.2)
|
59
|
+
resque-ensure-connected!
|
60
|
+
resque_unit (= 0.4.1)
|
59
61
|
shoulda
|
data/LICENSE.txt
CHANGED
@@ -1,20 +1,22 @@
|
|
1
|
-
|
1
|
+
The MIT License
|
2
2
|
|
3
|
-
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
3
|
+
Copyright (c) 2011 Socialcast, Inc
|
10
4
|
|
11
|
-
|
12
|
-
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
13
22
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# resque-ensure-connected
|
2
|
+
|
3
|
+
Ensure that all resque jobs have a valid activerecord connection before execution.
|
4
|
+
|
5
|
+
## Configuration
|
6
|
+
|
7
|
+
NONE! The gem automatically configures Resque to connect with each forked process.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
``` ruby
|
12
|
+
# Bundler Gemfile
|
13
|
+
gem 'resque-ensure-connected'
|
14
|
+
```
|
15
|
+
|
16
|
+
## Contributing
|
17
|
+
|
18
|
+
* Fork the project
|
19
|
+
* Fix the issue
|
20
|
+
* Add tests
|
21
|
+
* Create pull request on github
|
22
|
+
|
23
|
+
see CONTRIBUTORS.txt for complete list of contributors.
|
24
|
+
|
25
|
+
## Copyright
|
26
|
+
|
27
|
+
Copyright (c) 2011 Socialcast Inc.
|
28
|
+
See LICENSE.txt for further details.
|
29
|
+
|
data/Rakefile
CHANGED
@@ -1,53 +1,8 @@
|
|
1
|
-
require
|
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 'rake'
|
11
|
-
|
12
|
-
require 'jeweler'
|
13
|
-
Jeweler::Tasks.new do |gem|
|
14
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
|
-
gem.name = "resque-ensure-connected"
|
16
|
-
gem.homepage = "http://github.com/wireframe/resque-ensure-connected"
|
17
|
-
gem.license = "MIT"
|
18
|
-
gem.summary = %Q{ensure active record connections are valid before performing work}
|
19
|
-
gem.description = %Q{ensure active record connections are valid before performing work}
|
20
|
-
gem.email = "ryan@codecrate.com"
|
21
|
-
gem.authors = ["Ryan Sonnek"]
|
22
|
-
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
23
|
-
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
24
|
-
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
25
|
-
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
26
|
-
end
|
27
|
-
Jeweler::RubygemsDotOrgTasks.new
|
28
|
-
|
1
|
+
require "bundler/gem_tasks"
|
29
2
|
require 'rake/testtask'
|
30
3
|
Rake::TestTask.new(:test) do |test|
|
31
4
|
test.libs << 'lib' << 'test'
|
32
5
|
test.pattern = 'test/**/test_*.rb'
|
33
6
|
test.verbose = true
|
34
7
|
end
|
35
|
-
|
36
|
-
require 'rcov/rcovtask'
|
37
|
-
Rcov::RcovTask.new do |test|
|
38
|
-
test.libs << 'test'
|
39
|
-
test.pattern = 'test/**/test_*.rb'
|
40
|
-
test.verbose = true
|
41
|
-
end
|
42
|
-
|
43
8
|
task :default => :test
|
44
|
-
|
45
|
-
require 'rake/rdoctask'
|
46
|
-
Rake::RDocTask.new do |rdoc|
|
47
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
48
|
-
|
49
|
-
rdoc.rdoc_dir = 'rdoc'
|
50
|
-
rdoc.title = "resque-ensure-connected #{version}"
|
51
|
-
rdoc.rdoc_files.include('README*')
|
52
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
53
|
-
end
|
@@ -1,5 +1,14 @@
|
|
1
1
|
require 'active_record'
|
2
|
+
require 'resque'
|
3
|
+
require "resque-ensure-connected/version"
|
2
4
|
|
5
|
+
module Resque
|
6
|
+
module EnsureConnected
|
7
|
+
def self.verify_active_connections
|
8
|
+
ActiveRecord::Base.connection_handler.verify_active_connections!
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
3
12
|
Resque.after_fork do |job|
|
4
|
-
|
13
|
+
Resque::EnsureConnected.verify_active_connections
|
5
14
|
end
|
@@ -1,76 +1,27 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "resque-ensure-connected/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
6
|
+
s.name = "resque-ensure-connected"
|
7
|
+
s.version = Resque::EnsureConnected::VERSION
|
8
|
+
s.authors = ["Ryan Sonnek"]
|
9
|
+
s.email = ["ryan@socialcast.com"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{ensure active record connections are valid before performing work}
|
12
|
+
s.description = %q{ensure active record connections are valid before performing resque background jobs}
|
9
13
|
|
10
|
-
s.
|
11
|
-
s.authors = ["Ryan Sonnek"]
|
12
|
-
s.date = %q{2010-12-06}
|
13
|
-
s.description = %q{ensure active record connections are valid before performing work}
|
14
|
-
s.email = %q{ryan@codecrate.com}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE.txt",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
"Gemfile",
|
22
|
-
"Gemfile.lock",
|
23
|
-
"LICENSE.txt",
|
24
|
-
"README.rdoc",
|
25
|
-
"Rakefile",
|
26
|
-
"VERSION",
|
27
|
-
"lib/resque-ensure-connected.rb",
|
28
|
-
"resque-ensure-connected.gemspec",
|
29
|
-
"test/helper.rb",
|
30
|
-
"test/test_resque-ensure-connected.rb"
|
31
|
-
]
|
32
|
-
s.homepage = %q{http://github.com/wireframe/resque-ensure-connected}
|
33
|
-
s.licenses = ["MIT"]
|
34
|
-
s.require_paths = ["lib"]
|
35
|
-
s.rubygems_version = %q{1.3.7}
|
36
|
-
s.summary = %q{ensure active record connections are valid before performing work}
|
37
|
-
s.test_files = [
|
38
|
-
"test/helper.rb",
|
39
|
-
"test/test_resque-ensure-connected.rb"
|
40
|
-
]
|
14
|
+
s.rubyforge_project = "resque-ensure-connected"
|
41
15
|
|
42
|
-
|
43
|
-
|
44
|
-
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
45
20
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
|
53
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
54
|
-
s.add_development_dependency(%q<resque_unit>, [">= 0"])
|
55
|
-
else
|
56
|
-
s.add_dependency(%q<resque>, ["~> 1.10.0"])
|
57
|
-
s.add_dependency(%q<activerecord>, [">= 2.3.5"])
|
58
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
59
|
-
s.add_dependency(%q<mocha>, [">= 0"])
|
60
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
61
|
-
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
|
62
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
63
|
-
s.add_dependency(%q<resque_unit>, [">= 0"])
|
64
|
-
end
|
65
|
-
else
|
66
|
-
s.add_dependency(%q<resque>, ["~> 1.10.0"])
|
67
|
-
s.add_dependency(%q<activerecord>, [">= 2.3.5"])
|
68
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
69
|
-
s.add_dependency(%q<mocha>, [">= 0"])
|
70
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
71
|
-
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
|
72
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
73
|
-
s.add_dependency(%q<resque_unit>, [">= 0"])
|
74
|
-
end
|
21
|
+
s.add_runtime_dependency(%q<resque>, [">= 1.10.0"])
|
22
|
+
s.add_runtime_dependency(%q<activerecord>, [">= 2.3.5"])
|
23
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
24
|
+
s.add_development_dependency(%q<mocha>, [">= 0"])
|
25
|
+
s.add_development_dependency(%q<resque_unit>, ["0.4.1"])
|
26
|
+
s.add_development_dependency(%q<rake>, ["0.9.2.2"])
|
75
27
|
end
|
76
|
-
|
data/test/helper.rb
CHANGED
@@ -3,36 +3,30 @@ require 'helper'
|
|
3
3
|
class TestResqueEnsureConnected < Test::Unit::TestCase
|
4
4
|
class FakeJob
|
5
5
|
@queue = 'test'
|
6
|
-
def self.perform
|
6
|
+
def self.perform(foo, bar)
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
10
|
class FakeHandler
|
11
11
|
@invoked = false
|
12
12
|
def verify_active_connections!
|
13
|
-
|
14
|
-
puts 'invoked'
|
15
|
-
puts @@invoked
|
13
|
+
@invoked = true
|
16
14
|
end
|
17
|
-
def
|
15
|
+
def invoked?
|
18
16
|
@invoked
|
19
17
|
end
|
20
18
|
end
|
21
19
|
|
22
20
|
should "ensure verify connections after forking process" do
|
23
|
-
Resque.
|
21
|
+
Resque.reset!
|
24
22
|
worker = Resque::Worker.new(:jobs)
|
25
23
|
Resque::Job.create(:jobs, FakeJob, 20, '/tmp')
|
26
24
|
|
27
25
|
handler = FakeHandler.new
|
28
26
|
ActiveRecord::Base.connection_handler = handler
|
29
|
-
puts FakeHandler.invoked?
|
30
|
-
worker.work(0)
|
31
27
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
assert FakeHandler.invoked?
|
36
|
-
#WTF? why is this assertion failing?
|
28
|
+
Resque.after_fork.call
|
29
|
+
|
30
|
+
assert handler.invoked?
|
37
31
|
end
|
38
32
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-ensure-connected
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Sonnek
|
@@ -15,17 +15,15 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2011-11-09 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
|
-
prerelease: false
|
23
|
-
type: :runtime
|
24
21
|
name: resque
|
22
|
+
prerelease: false
|
25
23
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
24
|
none: false
|
27
25
|
requirements:
|
28
|
-
- -
|
26
|
+
- - ">="
|
29
27
|
- !ruby/object:Gem::Version
|
30
28
|
hash: 63
|
31
29
|
segments:
|
@@ -34,10 +32,10 @@ dependencies:
|
|
34
32
|
- 0
|
35
33
|
version: 1.10.0
|
36
34
|
requirement: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
prerelease: false
|
39
35
|
type: :runtime
|
36
|
+
- !ruby/object:Gem::Dependency
|
40
37
|
name: activerecord
|
38
|
+
prerelease: false
|
41
39
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
42
40
|
none: false
|
43
41
|
requirements:
|
@@ -50,10 +48,10 @@ dependencies:
|
|
50
48
|
- 5
|
51
49
|
version: 2.3.5
|
52
50
|
requirement: *id002
|
51
|
+
type: :runtime
|
53
52
|
- !ruby/object:Gem::Dependency
|
54
|
-
prerelease: false
|
55
|
-
type: :development
|
56
53
|
name: shoulda
|
54
|
+
prerelease: false
|
57
55
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
58
56
|
none: false
|
59
57
|
requirements:
|
@@ -64,10 +62,10 @@ dependencies:
|
|
64
62
|
- 0
|
65
63
|
version: "0"
|
66
64
|
requirement: *id003
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
prerelease: false
|
69
65
|
type: :development
|
66
|
+
- !ruby/object:Gem::Dependency
|
70
67
|
name: mocha
|
68
|
+
prerelease: false
|
71
69
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
72
70
|
none: false
|
73
71
|
requirements:
|
@@ -78,91 +76,67 @@ dependencies:
|
|
78
76
|
- 0
|
79
77
|
version: "0"
|
80
78
|
requirement: *id004
|
79
|
+
type: :development
|
81
80
|
- !ruby/object:Gem::Dependency
|
81
|
+
name: resque_unit
|
82
82
|
prerelease: false
|
83
|
-
type: :development
|
84
|
-
name: bundler
|
85
83
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
86
84
|
none: false
|
87
85
|
requirements:
|
88
|
-
- -
|
86
|
+
- - "="
|
89
87
|
- !ruby/object:Gem::Version
|
90
|
-
hash:
|
88
|
+
hash: 13
|
91
89
|
segments:
|
92
|
-
- 1
|
93
90
|
- 0
|
94
|
-
-
|
95
|
-
|
91
|
+
- 4
|
92
|
+
- 1
|
93
|
+
version: 0.4.1
|
96
94
|
requirement: *id005
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
prerelease: false
|
99
95
|
type: :development
|
100
|
-
name: jeweler
|
101
|
-
version_requirements: &id006 !ruby/object:Gem::Requirement
|
102
|
-
none: false
|
103
|
-
requirements:
|
104
|
-
- - ~>
|
105
|
-
- !ruby/object:Gem::Version
|
106
|
-
hash: 1
|
107
|
-
segments:
|
108
|
-
- 1
|
109
|
-
- 5
|
110
|
-
- 1
|
111
|
-
version: 1.5.1
|
112
|
-
requirement: *id006
|
113
96
|
- !ruby/object:Gem::Dependency
|
97
|
+
name: rake
|
114
98
|
prerelease: false
|
115
|
-
|
116
|
-
name: rcov
|
117
|
-
version_requirements: &id007 !ruby/object:Gem::Requirement
|
99
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
118
100
|
none: false
|
119
101
|
requirements:
|
120
|
-
- - "
|
102
|
+
- - "="
|
121
103
|
- !ruby/object:Gem::Version
|
122
|
-
hash:
|
104
|
+
hash: 11
|
123
105
|
segments:
|
124
106
|
- 0
|
125
|
-
|
126
|
-
|
127
|
-
-
|
128
|
-
|
107
|
+
- 9
|
108
|
+
- 2
|
109
|
+
- 2
|
110
|
+
version: 0.9.2.2
|
111
|
+
requirement: *id006
|
129
112
|
type: :development
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
requirements:
|
134
|
-
- - ">="
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
hash: 3
|
137
|
-
segments:
|
138
|
-
- 0
|
139
|
-
version: "0"
|
140
|
-
requirement: *id008
|
141
|
-
description: ensure active record connections are valid before performing work
|
142
|
-
email: ryan@codecrate.com
|
113
|
+
description: ensure active record connections are valid before performing resque background jobs
|
114
|
+
email:
|
115
|
+
- ryan@socialcast.com
|
143
116
|
executables: []
|
144
117
|
|
145
118
|
extensions: []
|
146
119
|
|
147
|
-
extra_rdoc_files:
|
148
|
-
|
149
|
-
- README.rdoc
|
120
|
+
extra_rdoc_files: []
|
121
|
+
|
150
122
|
files:
|
151
123
|
- .document
|
124
|
+
- .gitignore
|
125
|
+
- .rvmrc
|
126
|
+
- CONTRIBUTORS.txt
|
152
127
|
- Gemfile
|
153
128
|
- Gemfile.lock
|
154
129
|
- LICENSE.txt
|
155
|
-
- README.
|
130
|
+
- README.md
|
156
131
|
- Rakefile
|
157
|
-
- VERSION
|
158
132
|
- lib/resque-ensure-connected.rb
|
133
|
+
- lib/resque-ensure-connected/version.rb
|
159
134
|
- resque-ensure-connected.gemspec
|
160
135
|
- test/helper.rb
|
161
136
|
- test/test_resque-ensure-connected.rb
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
- MIT
|
137
|
+
homepage: ""
|
138
|
+
licenses: []
|
139
|
+
|
166
140
|
post_install_message:
|
167
141
|
rdoc_options: []
|
168
142
|
|
@@ -188,8 +162,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
162
|
version: "0"
|
189
163
|
requirements: []
|
190
164
|
|
191
|
-
rubyforge_project:
|
192
|
-
rubygems_version: 1.
|
165
|
+
rubyforge_project: resque-ensure-connected
|
166
|
+
rubygems_version: 1.8.5
|
193
167
|
signing_key:
|
194
168
|
specification_version: 3
|
195
169
|
summary: ensure active record connections are valid before performing work
|
data/README.rdoc
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
= resque-ensure-connected
|
2
|
-
|
3
|
-
Ensure that all resque jobs have a valid activerecord connection before execution.
|
4
|
-
|
5
|
-
== Configuration
|
6
|
-
|
7
|
-
NONE! The gem automatically configures Resque to connect with each forked process.
|
8
|
-
|
9
|
-
== Installation
|
10
|
-
|
11
|
-
gem resque-ensure-connected
|
12
|
-
|
13
|
-
== Contributing to resque-ensure-connected
|
14
|
-
|
15
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
16
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
17
|
-
* Fork the project
|
18
|
-
* Start a feature/bugfix branch
|
19
|
-
* Commit and push until you are happy with your contribution
|
20
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
21
|
-
* 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.
|
22
|
-
|
23
|
-
== Copyright
|
24
|
-
|
25
|
-
Copyright (c) 2010 Ryan Sonnek. See LICENSE.txt for
|
26
|
-
further details.
|
27
|
-
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.1.0
|