destroy_backgrounded 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -0
- data/CONTRIBUTORS.txt +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +38 -0
- data/Rakefile +13 -0
- data/destroy_backgrounded.gemspec +29 -0
- data/lib/destroy_backgrounded.rb +44 -0
- data/lib/destroy_backgrounded/version.rb +3 -0
- data/test/database.yml +4 -0
- data/test/database_setup.rb +41 -0
- data/test/helper.rb +43 -0
- data/test/matchers/backgrounded_matchers.rb +52 -0
- data/test/matchers/callback_matcher.rb +90 -0
- data/test/matchers/destroy_matcher.rb +52 -0
- data/test/test_destroy_backgrounded.rb +92 -0
- metadata +202 -0
data/.gitignore
ADDED
data/CONTRIBUTORS.txt
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2011 Socialcast, Inc
|
4
|
+
|
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.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# destroy_backgrounded
|
2
|
+
|
3
|
+
Backgrounded Destroy ActiveRecord instances.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
class Blog < ActiveRecord::Base
|
9
|
+
acts_as_destroy_backgrounded
|
10
|
+
end
|
11
|
+
blog = Blog.create! :name => 'foo'
|
12
|
+
|
13
|
+
# backgrounded destroy the instance
|
14
|
+
blog.destroy
|
15
|
+
|
16
|
+
# immediately destroy the instance
|
17
|
+
blog.destroy_immediate
|
18
|
+
|
19
|
+
```
|
20
|
+
|
21
|
+
## Features
|
22
|
+
* simple configuration
|
23
|
+
* support for immediately destroying
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
* Fork the project
|
28
|
+
* Add tests
|
29
|
+
* Fix the issue
|
30
|
+
* Submit a pull request on github
|
31
|
+
|
32
|
+
see CONTRIBUTORS.txt for complete list of contributors
|
33
|
+
|
34
|
+
## Copyright
|
35
|
+
|
36
|
+
Copyright (c) 2011 Socialcast Inc.
|
37
|
+
See LICENSE.txt for further details.
|
38
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
Bundler::GemHelper.install_tasks
|
3
|
+
|
4
|
+
require 'rake'
|
5
|
+
|
6
|
+
require 'rake/testtask'
|
7
|
+
Rake::TestTask.new(:test) do |test|
|
8
|
+
test.libs << 'lib' << 'test'
|
9
|
+
test.pattern = 'test/**/test_*.rb'
|
10
|
+
test.verbose = true
|
11
|
+
end
|
12
|
+
task :default => :test
|
13
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
require "destroy_backgrounded/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "destroy_backgrounded"
|
6
|
+
s.version = DestroyBackgrounded::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.authors = ["Sean Walbran"]
|
9
|
+
s.email = ["seanwalbran@gmail.com"]
|
10
|
+
s.homepage = "http://github.com/seanwalbran/destroy_backgrounded"
|
11
|
+
s.summary = %q{background destroy Rails ActiveRecord objects}
|
12
|
+
s.description = %q{destroy database records in the background}
|
13
|
+
|
14
|
+
s.rubyforge_project = "destroy_backgrounded"
|
15
|
+
|
16
|
+
s.add_runtime_dependency(%q<activerecord>, ["~> 3.0.0"])
|
17
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
18
|
+
s.add_development_dependency(%q<mocha>, [">= 0"])
|
19
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
20
|
+
s.add_development_dependency(%q<sqlite3-ruby>, ["~> 1.3.2"])
|
21
|
+
s.add_development_dependency(%q<ruby-debug>, [">= 0"])
|
22
|
+
s.add_development_dependency(%q<timecop>, [">= 0"])
|
23
|
+
s.add_development_dependency(%q<backgrounded>, [">= 0"])
|
24
|
+
|
25
|
+
s.files = `git ls-files`.split("\n")
|
26
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
27
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
28
|
+
s.require_paths = ["lib"]
|
29
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'active_support/all'
|
2
|
+
require 'active_record'
|
3
|
+
require 'backgrounded'
|
4
|
+
|
5
|
+
module DestroyBackgrounded
|
6
|
+
module ActiveRecordExtensions
|
7
|
+
def destroy_backgrounded?
|
8
|
+
false
|
9
|
+
end
|
10
|
+
|
11
|
+
def acts_as_destroy_backgrounded(*args)
|
12
|
+
extend DestroyBackgrounded::ClassMethods
|
13
|
+
include DestroyBackgrounded::AliasMethods
|
14
|
+
include DestroyBackgrounded::InstanceMethods
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
module ClassMethods
|
19
|
+
def destroy_backgrounded?
|
20
|
+
true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
module AliasMethods
|
25
|
+
def self.included(base)
|
26
|
+
base.send(:alias_method, :destroy_immediate, :destroy)
|
27
|
+
base.send(:backgrounded, :destroy_immediate)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
module InstanceMethods
|
32
|
+
|
33
|
+
def destroy
|
34
|
+
if self.class.destroy_backgrounded?
|
35
|
+
destroy_immediate_backgrounded
|
36
|
+
else
|
37
|
+
destroy_immediate
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
ActiveRecord::Base.send(:extend, DestroyBackgrounded::ActiveRecordExtensions)
|
data/test/database.yml
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'logger'
|
2
|
+
config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
|
3
|
+
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
|
4
|
+
ActiveRecord::Base.establish_connection(config[ENV['DB'] || 'sqlite'])
|
5
|
+
|
6
|
+
ActiveRecord::Schema.define(:version => 2) do
|
7
|
+
create_table :blogs, :force => true do |t|
|
8
|
+
t.column :title, :string
|
9
|
+
t.column :body, :string
|
10
|
+
end
|
11
|
+
create_table :comments, :force => true do |t|
|
12
|
+
t.column :blog_id, :integer
|
13
|
+
t.column :text, :string
|
14
|
+
end
|
15
|
+
create_table :links, :force => true do |t|
|
16
|
+
t.column :blog_id, :integer
|
17
|
+
t.column :name, :string
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
class Blog < ActiveRecord::Base
|
22
|
+
has_many :comments, :dependent => :destroy
|
23
|
+
has_many :links, :dependent => :destroy
|
24
|
+
acts_as_destroy_backgrounded
|
25
|
+
attr_accessible :title
|
26
|
+
include CallbackMatcher::ActiveRecordHooks
|
27
|
+
end
|
28
|
+
|
29
|
+
class Comment < ActiveRecord::Base
|
30
|
+
acts_as_destroy_backgrounded
|
31
|
+
attr_accessible :text
|
32
|
+
belongs_to :blog
|
33
|
+
include CallbackMatcher::ActiveRecordHooks
|
34
|
+
end
|
35
|
+
|
36
|
+
class Link < ActiveRecord::Base
|
37
|
+
belongs_to :blog
|
38
|
+
attr_accessible :name
|
39
|
+
include CallbackMatcher::ActiveRecordHooks
|
40
|
+
end
|
41
|
+
|
data/test/helper.rb
ADDED
@@ -0,0 +1,43 @@
|
|
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
|
+
require 'mocha'
|
13
|
+
require "ruby-debug"
|
14
|
+
require 'timecop'
|
15
|
+
require 'backgrounded'
|
16
|
+
|
17
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
18
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
19
|
+
require 'destroy_backgrounded'
|
20
|
+
require 'matchers/destroy_matcher'
|
21
|
+
require 'matchers/callback_matcher'
|
22
|
+
require 'database_setup'
|
23
|
+
|
24
|
+
class Test::Unit::TestCase
|
25
|
+
extend DestroyMatcher::MatcherMethods
|
26
|
+
extend CallbackMatcher::MatcherMethods
|
27
|
+
end
|
28
|
+
|
29
|
+
module Backgrounded
|
30
|
+
module Handler
|
31
|
+
class NoOpHandler
|
32
|
+
def request(object, method, *args)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
Backgrounded.handler = Backgrounded::Handler::NoOpHandler.new
|
38
|
+
|
39
|
+
# configure default logger to standard out with info log level
|
40
|
+
Backgrounded.logger = Logger.new STDOUT
|
41
|
+
Backgrounded.logger.level = Logger::DEBUG
|
42
|
+
ActiveRecord::Base.logger=Logger.new(STDOUT)
|
43
|
+
ActiveRecord::Base.logger.level=0
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module DestroyBackgrounded
|
2
|
+
class BackgroundedMatcher
|
3
|
+
def softly
|
4
|
+
@softly = true
|
5
|
+
self
|
6
|
+
end
|
7
|
+
def description
|
8
|
+
"destroy the subject"
|
9
|
+
end
|
10
|
+
def matches?(subject)
|
11
|
+
@subject = subject
|
12
|
+
errors.empty?
|
13
|
+
end
|
14
|
+
def failure_message
|
15
|
+
"Expected #{@subject.inspect} to be destroyed: #{errors.join("\n")}"
|
16
|
+
end
|
17
|
+
def errors
|
18
|
+
return @errors if @errors
|
19
|
+
@errors = []
|
20
|
+
@errors << "was found in database" if subject_found?
|
21
|
+
@errors << "did not destroy instance" if destroyed? && !@subject.destroyed?
|
22
|
+
@errors
|
23
|
+
end
|
24
|
+
def softly?
|
25
|
+
!!@softly
|
26
|
+
end
|
27
|
+
def destroyed?
|
28
|
+
!!@destroyed
|
29
|
+
end
|
30
|
+
def subject_found?
|
31
|
+
!!@subject.class.find(@subject.id)
|
32
|
+
rescue ActiveRecord::RecordNotFound
|
33
|
+
false
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
class DestroyMatcher
|
40
|
+
module MatcherMethods
|
41
|
+
def soft_destroy
|
42
|
+
DestroyMatcher.new :soft
|
43
|
+
end
|
44
|
+
def hard_destroy
|
45
|
+
DestroyMatcher.new :hard
|
46
|
+
end
|
47
|
+
def destroy_subject
|
48
|
+
DestroyBackgrounded::DestroyMatcher.new
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
@@ -0,0 +1,90 @@
|
|
1
|
+
|
2
|
+
class CallbackMatcher
|
3
|
+
CALLBACK_EVENTS = [:before, :after, :after_commit_on]
|
4
|
+
CALLBACK_TYPES = [:create, :update, :destroy, :save]
|
5
|
+
|
6
|
+
module MatcherMethods
|
7
|
+
|
8
|
+
def trigger_callbacks_for(callback_types)
|
9
|
+
CallbackMatcher.new Array.wrap(callback_types)
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
module ActiveRecordHooks
|
15
|
+
|
16
|
+
def self.included(base)
|
17
|
+
base.class_eval do
|
18
|
+
class << self
|
19
|
+
attr_accessor :callback_tester_attrs
|
20
|
+
end
|
21
|
+
@callback_tester_attrs = []
|
22
|
+
CALLBACK_EVENTS.each do |ce|
|
23
|
+
CALLBACK_TYPES.each do |ct|
|
24
|
+
callback_name = :"#{ce}_#{ct}"
|
25
|
+
callback_attr = :"called_#{callback_name}"
|
26
|
+
callback_method, has_on_option = (ce.to_s =~ /_on/ ? [ce.to_s.gsub('_on',''), true] : [callback_name, false])
|
27
|
+
@callback_tester_attrs << callback_attr
|
28
|
+
attr_accessor callback_attr
|
29
|
+
send( callback_method, (has_on_option ? {:on => ct} : {})) {
|
30
|
+
instance_variable_set(:"@#{callback_attr}", true)
|
31
|
+
}
|
32
|
+
|
33
|
+
define_method :"#{callback_attr}?" do
|
34
|
+
instance_variable_get(:"@#{callback_attr}")
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
alias_method_chain :initialize, :callback_init
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def initialize_with_callback_init(*args)
|
43
|
+
reset_callback_flags!
|
44
|
+
initialize_without_callback_init(*args)
|
45
|
+
end
|
46
|
+
|
47
|
+
def reset_callback_flags!
|
48
|
+
self.class.callback_tester_attrs.each do |attr|
|
49
|
+
send("#{attr}=", false)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
def initialize(callback_types)
|
56
|
+
@callback_types = callback_types
|
57
|
+
end
|
58
|
+
|
59
|
+
def failure_message
|
60
|
+
"Expected #{@subject} #{expectation}:"
|
61
|
+
end
|
62
|
+
|
63
|
+
def negative_failure_message
|
64
|
+
"Did not expect #{@subject} #{expectation}:"
|
65
|
+
end
|
66
|
+
|
67
|
+
def description
|
68
|
+
"check that #{@callback_types.join(', ')} callbacks were called"
|
69
|
+
end
|
70
|
+
|
71
|
+
def expectation
|
72
|
+
@expectations.join("\n")
|
73
|
+
end
|
74
|
+
|
75
|
+
def matches?(subject)
|
76
|
+
@subject = subject
|
77
|
+
@expectations = []
|
78
|
+
result = true
|
79
|
+
@callback_types.each do |ct|
|
80
|
+
CALLBACK_EVENTS.each do |ce|
|
81
|
+
called = @subject.send(:"called_#{ce}_#{ct}?")
|
82
|
+
result &&= called
|
83
|
+
@expectations << "#{ce}_#{ct} callbacks to be triggered"
|
84
|
+
end
|
85
|
+
end
|
86
|
+
result
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module DestroyBackgrounded
|
2
|
+
class DestroyMatcher
|
3
|
+
def softly
|
4
|
+
@softly = true
|
5
|
+
self
|
6
|
+
end
|
7
|
+
def description
|
8
|
+
"destroy the subject"
|
9
|
+
end
|
10
|
+
def matches?(subject)
|
11
|
+
@subject = subject
|
12
|
+
errors.empty?
|
13
|
+
end
|
14
|
+
def failure_message
|
15
|
+
"Expected #{@subject.inspect} to be destroyed: #{errors.join("\n")}"
|
16
|
+
end
|
17
|
+
def errors
|
18
|
+
return @errors if @errors
|
19
|
+
@errors = []
|
20
|
+
@errors << "was found in database" if subject_found?
|
21
|
+
@errors << "did not destroy instance" if destroyed? && !@subject.destroyed?
|
22
|
+
@errors
|
23
|
+
end
|
24
|
+
def softly?
|
25
|
+
!!@softly
|
26
|
+
end
|
27
|
+
def destroyed?
|
28
|
+
!!@destroyed
|
29
|
+
end
|
30
|
+
def subject_found?
|
31
|
+
!!@subject.class.find(@subject.id)
|
32
|
+
rescue ActiveRecord::RecordNotFound
|
33
|
+
false
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
class DestroyMatcher
|
40
|
+
module MatcherMethods
|
41
|
+
def soft_destroy
|
42
|
+
DestroyMatcher.new :soft
|
43
|
+
end
|
44
|
+
def hard_destroy
|
45
|
+
DestroyMatcher.new :hard
|
46
|
+
end
|
47
|
+
def destroy_subject
|
48
|
+
DestroyBackgrounded::DestroyMatcher.new
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'helper')
|
2
|
+
|
3
|
+
class TestDestroyBackgrounded < Test::Unit::TestCase
|
4
|
+
context 'with non-backgrounded activerecord class' do
|
5
|
+
should 'not be backgrounded' do
|
6
|
+
assert !Link.destroy_backgrounded?
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
context 'with backgrounded activerecord class' do
|
11
|
+
should 'be backgrounded' do
|
12
|
+
assert Blog.destroy_backgrounded?
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
context 'with instance of backgrounded class' do
|
17
|
+
setup do
|
18
|
+
@blog = Blog.create! :title => 'foo'
|
19
|
+
end
|
20
|
+
context 'when destroying instance with instance.destroy' do
|
21
|
+
subject do
|
22
|
+
@blog.destroy
|
23
|
+
@blog
|
24
|
+
end
|
25
|
+
should_not destroy_subject
|
26
|
+
should_not trigger_callbacks_for :destroy
|
27
|
+
#should schedule_destroy_subject
|
28
|
+
end
|
29
|
+
context 'when destroying instance with Class.destroy_all' do
|
30
|
+
subject do
|
31
|
+
Blog.destroy_all :id => @blog.id
|
32
|
+
@blog
|
33
|
+
end
|
34
|
+
should_not destroy_subject
|
35
|
+
should_not trigger_callbacks_for :destroy
|
36
|
+
#should schedule_destroy_subject
|
37
|
+
end
|
38
|
+
context 'when destroying instance with instance.destroy_immediate' do
|
39
|
+
subject do
|
40
|
+
@blog.destroy_immediate
|
41
|
+
@blog
|
42
|
+
end
|
43
|
+
should destroy_subject
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
context 'with instance of non backgrounded class' do
|
48
|
+
setup do
|
49
|
+
@link = Link.create! :name => 'foo'
|
50
|
+
end
|
51
|
+
context 'when destroying instance with instance.destroy' do
|
52
|
+
subject do
|
53
|
+
@link.destroy
|
54
|
+
@link
|
55
|
+
end
|
56
|
+
should destroy_subject
|
57
|
+
end
|
58
|
+
context 'when destroying instance with Class.destroy_all' do
|
59
|
+
subject do
|
60
|
+
Link.destroy_all :id => @link.id
|
61
|
+
@link
|
62
|
+
end
|
63
|
+
should destroy_subject
|
64
|
+
# should_not schedule_destroy_subject
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
context 'with nonbackgrounded instance that belongs to backgrounded instance' do
|
69
|
+
setup do
|
70
|
+
@blog = Blog.create!(:title => 'foo')
|
71
|
+
@link = @blog.links.create! :text => 'bar'
|
72
|
+
end
|
73
|
+
context 'when destroying parent backgrounded instance with destroy' do
|
74
|
+
subject do
|
75
|
+
@blog.destroy
|
76
|
+
@link
|
77
|
+
end
|
78
|
+
should_not destroy_subject
|
79
|
+
should_not trigger_callbacks_for :destroy
|
80
|
+
#should_not schedule_destroy_subject
|
81
|
+
end
|
82
|
+
context 'when destroying parent backgrounded instance with destroy_immediate' do
|
83
|
+
subject do
|
84
|
+
@blog.destroy_immediate
|
85
|
+
@link
|
86
|
+
end
|
87
|
+
should destroy_subject
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
|
metadata
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: destroy_backgrounded
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Sean Walbran
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-11-22 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: activerecord
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 7
|
29
|
+
segments:
|
30
|
+
- 3
|
31
|
+
- 0
|
32
|
+
- 0
|
33
|
+
version: 3.0.0
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: shoulda
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
version: "0"
|
48
|
+
type: :development
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: mocha
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 3
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
62
|
+
type: :development
|
63
|
+
version_requirements: *id003
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: bundler
|
66
|
+
prerelease: false
|
67
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
hash: 3
|
73
|
+
segments:
|
74
|
+
- 0
|
75
|
+
version: "0"
|
76
|
+
type: :development
|
77
|
+
version_requirements: *id004
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: sqlite3-ruby
|
80
|
+
prerelease: false
|
81
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ~>
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 31
|
87
|
+
segments:
|
88
|
+
- 1
|
89
|
+
- 3
|
90
|
+
- 2
|
91
|
+
version: 1.3.2
|
92
|
+
type: :development
|
93
|
+
version_requirements: *id005
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: ruby-debug
|
96
|
+
prerelease: false
|
97
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
hash: 3
|
103
|
+
segments:
|
104
|
+
- 0
|
105
|
+
version: "0"
|
106
|
+
type: :development
|
107
|
+
version_requirements: *id006
|
108
|
+
- !ruby/object:Gem::Dependency
|
109
|
+
name: timecop
|
110
|
+
prerelease: false
|
111
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
hash: 3
|
117
|
+
segments:
|
118
|
+
- 0
|
119
|
+
version: "0"
|
120
|
+
type: :development
|
121
|
+
version_requirements: *id007
|
122
|
+
- !ruby/object:Gem::Dependency
|
123
|
+
name: backgrounded
|
124
|
+
prerelease: false
|
125
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
126
|
+
none: false
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
hash: 3
|
131
|
+
segments:
|
132
|
+
- 0
|
133
|
+
version: "0"
|
134
|
+
type: :development
|
135
|
+
version_requirements: *id008
|
136
|
+
description: destroy database records in the background
|
137
|
+
email:
|
138
|
+
- seanwalbran@gmail.com
|
139
|
+
executables: []
|
140
|
+
|
141
|
+
extensions: []
|
142
|
+
|
143
|
+
extra_rdoc_files: []
|
144
|
+
|
145
|
+
files:
|
146
|
+
- .gitignore
|
147
|
+
- CONTRIBUTORS.txt
|
148
|
+
- Gemfile
|
149
|
+
- LICENSE.txt
|
150
|
+
- README.md
|
151
|
+
- Rakefile
|
152
|
+
- destroy_backgrounded.gemspec
|
153
|
+
- lib/destroy_backgrounded.rb
|
154
|
+
- lib/destroy_backgrounded/version.rb
|
155
|
+
- test/database.yml
|
156
|
+
- test/database_setup.rb
|
157
|
+
- test/helper.rb
|
158
|
+
- test/matchers/backgrounded_matchers.rb
|
159
|
+
- test/matchers/callback_matcher.rb
|
160
|
+
- test/matchers/destroy_matcher.rb
|
161
|
+
- test/test_destroy_backgrounded.rb
|
162
|
+
homepage: http://github.com/seanwalbran/destroy_backgrounded
|
163
|
+
licenses: []
|
164
|
+
|
165
|
+
post_install_message:
|
166
|
+
rdoc_options: []
|
167
|
+
|
168
|
+
require_paths:
|
169
|
+
- lib
|
170
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
171
|
+
none: false
|
172
|
+
requirements:
|
173
|
+
- - ">="
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
hash: 3
|
176
|
+
segments:
|
177
|
+
- 0
|
178
|
+
version: "0"
|
179
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
|
+
none: false
|
181
|
+
requirements:
|
182
|
+
- - ">="
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
hash: 3
|
185
|
+
segments:
|
186
|
+
- 0
|
187
|
+
version: "0"
|
188
|
+
requirements: []
|
189
|
+
|
190
|
+
rubyforge_project: destroy_backgrounded
|
191
|
+
rubygems_version: 1.8.6
|
192
|
+
signing_key:
|
193
|
+
specification_version: 3
|
194
|
+
summary: background destroy Rails ActiveRecord objects
|
195
|
+
test_files:
|
196
|
+
- test/database.yml
|
197
|
+
- test/database_setup.rb
|
198
|
+
- test/helper.rb
|
199
|
+
- test/matchers/backgrounded_matchers.rb
|
200
|
+
- test/matchers/callback_matcher.rb
|
201
|
+
- test/matchers/destroy_matcher.rb
|
202
|
+
- test/test_destroy_backgrounded.rb
|