active_archive 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +9 -0
- data/.rspec +4 -0
- data/.travis.yml +13 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/README.md +91 -0
- data/Rakefile +3 -0
- data/active_archive.gemspec +30 -0
- data/bin/console +14 -0
- data/bin/rake +16 -0
- data/bin/setup +7 -0
- data/lib/active_archive/base.rb +165 -0
- data/lib/active_archive/configuration.rb +10 -0
- data/lib/active_archive/methods.rb +17 -0
- data/lib/active_archive/scopes.rb +13 -0
- data/lib/active_archive/table_definition.rb +16 -0
- data/lib/active_archive/version.rb +3 -0
- data/lib/active_archive.rb +28 -0
- metadata +175 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ec93dcaf2dd6ab61b15e9eb92855956144bfadf3
|
4
|
+
data.tar.gz: 31fa6290e019bb71d717fdc8d0a6051d19e760f0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ebb06526a83603e60d51f9d64d6dc9995ae8856ade8ecc5ae55fd5060a03c05daf111e8a4c86192c692d1ff2f710ba314792bc0ec45c504815c8a77f7d9d27f0
|
7
|
+
data.tar.gz: 07044a0805397f2732b6fc68f2e357300efd121e9f8a9fc952291fe4a6a0b30c75469727e9ac3359a34b8909ecf3e8ca89f166d076dacf5c87b6c172a3ddbe60
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
# ActiveArchive
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/active_archive.svg)](http://badge.fury.io/rb/active_archive)
|
4
|
+
[![Build Status](https://travis-ci.org/drexed/active_archive.svg?branch=master)](https://travis-ci.org/drexed/active_archive)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/drexed/active_archive/badge.png)](https://coveralls.io/r/drexed/active_archive)
|
6
|
+
|
7
|
+
ActiveArchive is a library for preventing database records from being destroyed.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'active_archive'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install active_archive
|
24
|
+
|
25
|
+
## Table of Contents
|
26
|
+
|
27
|
+
* [Configurations](#configurations)
|
28
|
+
* [Methods](#methods)
|
29
|
+
* [Scopes](#scopes)
|
30
|
+
|
31
|
+
## Configurations
|
32
|
+
|
33
|
+
**Options:**
|
34
|
+
* all_records_archivable
|
35
|
+
* dependent_record_window
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
ActiveArchive.configure do |config|
|
39
|
+
# option = default
|
40
|
+
|
41
|
+
config.all_records_archivable = false
|
42
|
+
config.dependent_record_window = 3.seconds
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
## Methods
|
47
|
+
|
48
|
+
**Options:**
|
49
|
+
* archive
|
50
|
+
* destroy
|
51
|
+
* destroy_all
|
52
|
+
* delete
|
53
|
+
* delete_all
|
54
|
+
* unarchive
|
55
|
+
* unarchive_all
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
User.first.archive #=> archives User record and dependents
|
59
|
+
User.first.destroy #=> archives User record and dependents
|
60
|
+
User.first.delete #=> deletes User record and dependents
|
61
|
+
User.first.unarchive #=> unarchives User record and dependents
|
62
|
+
|
63
|
+
User.first.archive(:force) #=> destroys User record and dependents
|
64
|
+
User.first.destroy(:force) #=> destroys User record and dependents
|
65
|
+
|
66
|
+
User.archive_all #=> archives all User records and dependents
|
67
|
+
User.destroy_all #=> archives all User records and dependents
|
68
|
+
User.delete_all #=> deletes all User records and dependents
|
69
|
+
User.unarchive_all #=> unarchives all User record and dependents
|
70
|
+
```
|
71
|
+
|
72
|
+
## Scopes
|
73
|
+
|
74
|
+
**Options:**
|
75
|
+
* default
|
76
|
+
* archived
|
77
|
+
* unarchived
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
User.all #=> returns all records
|
81
|
+
User.archived.all #=> returns only archived record
|
82
|
+
User.unarchived.all #=> returns only unarchived record
|
83
|
+
```
|
84
|
+
|
85
|
+
## Contributing
|
86
|
+
|
87
|
+
1. Fork it ( https://github.com/[my-github-username]/active_archive/fork )
|
88
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
89
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
90
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
91
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'active_archive/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "active_archive"
|
8
|
+
spec.version = ActiveArchive::VERSION
|
9
|
+
spec.authors = ["Juan Gomez"]
|
10
|
+
spec.email = ["j.gomez@drexed.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Soft-delete ActiveRecord records.}
|
13
|
+
spec.description = %q{Prevent database records from being destroyed.}
|
14
|
+
spec.homepage = "https://github.com/drexed/active_archive"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = "exe"
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ["lib", "support"]
|
20
|
+
|
21
|
+
spec.add_runtime_dependency "activerecord"
|
22
|
+
spec.add_runtime_dependency "activesupport"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler"
|
25
|
+
spec.add_development_dependency "coveralls"
|
26
|
+
spec.add_development_dependency "rake"
|
27
|
+
spec.add_development_dependency "rspec"
|
28
|
+
spec.add_development_dependency "sqlite3"
|
29
|
+
spec.add_development_dependency "database_cleaner"
|
30
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "active_archive"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/rake
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rake' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rake', 'rake')
|
data/bin/setup
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
module ActiveArchive
|
2
|
+
module Base
|
3
|
+
|
4
|
+
def self.included(base)
|
5
|
+
base.extend Methods
|
6
|
+
base.extend Scopes
|
7
|
+
|
8
|
+
base.instance_eval do
|
9
|
+
define_model_callbacks :unarchive
|
10
|
+
|
11
|
+
before_unarchive :unarchive_destroyed_dependent_records
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def archived?
|
16
|
+
archivable? ? !!archived_at : destroyed?
|
17
|
+
end
|
18
|
+
|
19
|
+
def archivable?
|
20
|
+
respond_to?(:archived_at)
|
21
|
+
end
|
22
|
+
|
23
|
+
def destroy(force=nil)
|
24
|
+
with_transaction_returning_status do
|
25
|
+
if unarchivable? || should_force_destroy?(force)
|
26
|
+
permanently_delete_records_after { super() }
|
27
|
+
else
|
28
|
+
destroy_with_permanent_records(force)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
alias_method(:archive, :destroy)
|
34
|
+
|
35
|
+
def unarchive(validate=nil)
|
36
|
+
with_transaction_returning_status do
|
37
|
+
run_callbacks(:unarchive) { set_archived_at(nil, validate) }
|
38
|
+
self
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def unarchived?
|
43
|
+
!archived?
|
44
|
+
end
|
45
|
+
|
46
|
+
def unarchivable?
|
47
|
+
!archivable?
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
def attempt_notifying_observers(callback)
|
53
|
+
begin
|
54
|
+
notify_observers(callback)
|
55
|
+
rescue NoMethodError => e
|
56
|
+
# RETURN
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def destroy_with_permanent_records(force=nil)
|
61
|
+
run_callbacks(:destroy) { archived? || (new_record? ? save : set_archived_at(Time.now, force)) }
|
62
|
+
archived? ? self : false
|
63
|
+
end
|
64
|
+
|
65
|
+
def get_dependent_records
|
66
|
+
dependent_records = {}
|
67
|
+
self.class.reflections.each do |key, reflection|
|
68
|
+
if reflection.options[:dependent] == :destroy
|
69
|
+
next unless records = self.send(key)
|
70
|
+
if records.respond_to?(:size)
|
71
|
+
next unless records.size > 0
|
72
|
+
else
|
73
|
+
records = [] << records
|
74
|
+
end
|
75
|
+
dependent_record = records.first
|
76
|
+
next if dependent_record.nil?
|
77
|
+
dependent_records[dependent_record.class] = records.map(&:id)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
return(dependent_records)
|
81
|
+
end
|
82
|
+
|
83
|
+
def permanently_delete_records(dependent_records)
|
84
|
+
dependent_records.each do |klass, ids|
|
85
|
+
ids.each do |id|
|
86
|
+
record = begin
|
87
|
+
klass.unscoped.find(id)
|
88
|
+
rescue ::ActiveRecord::RecordNotFound
|
89
|
+
next
|
90
|
+
end
|
91
|
+
record.archived_at = nil
|
92
|
+
record.destroy(:force)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
def permanently_delete_records_after(&block)
|
98
|
+
dependent_records = get_dependent_records
|
99
|
+
dependent_results = block.call
|
100
|
+
permanently_delete_records(dependent_records) if dependent_results
|
101
|
+
return(dependent_results)
|
102
|
+
end
|
103
|
+
|
104
|
+
def unarchive_destroyed_dependent_records
|
105
|
+
self.class.reflections
|
106
|
+
.select { |name, reflection| (reflection.options[:dependent].to_s == "destroy") && reflection.klass.archivable? }
|
107
|
+
.each do |name, reflection|
|
108
|
+
cardinality = reflection.macro.to_s.gsub('has_', '')
|
109
|
+
|
110
|
+
if cardinality == 'many'
|
111
|
+
records = archived_at.nil? ? send(name).unscoped : send(name).unscoped.where(
|
112
|
+
[
|
113
|
+
"#{reflection.quoted_table_name}.archived_at > ? AND #{reflection.quoted_table_name}.archived_at < ?",
|
114
|
+
archived_at - ActiveArchive.configuration.dependent_record_window,
|
115
|
+
archived_at + ActiveArchive.configuration.dependent_record_window
|
116
|
+
]
|
117
|
+
)
|
118
|
+
elsif cardinality == 'one' or cardinality == 'belongs_to'
|
119
|
+
self.class.unscoped do
|
120
|
+
records = [] << send(name)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
[records].flatten.compact.each { |d| d.unarchive }
|
125
|
+
send(name, :reload)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
def set_archived_at(value, force=nil)
|
130
|
+
return self unless archivable?
|
131
|
+
record = self.class.unscoped.find(id)
|
132
|
+
record.archived_at = value
|
133
|
+
|
134
|
+
begin
|
135
|
+
should_ignore_validations?(force) ? record.save(validate: false) : record.save!
|
136
|
+
|
137
|
+
if ::Gem::Version.new(::ActiveRecord::VERSION::STRING) < ::Gem::Version.new('4.2.0')
|
138
|
+
@attributes = record.attributes
|
139
|
+
@attributes_cache = record.attributes.except(record.class.serialized_attributes.keys)
|
140
|
+
|
141
|
+
if defined?(::ActiveRecord::AttributeMethods::Serialization::Attribute)
|
142
|
+
serialized_attribute_class = ::ActiveRecord::AttributeMethods::Serialization::Attribute
|
143
|
+
self.class.serialized_attributes.each do |key, coder|
|
144
|
+
@attributes[key] = serialized_attribute_class.new(coder, @attributes[key], :unserialized) if @attributes.key?(key)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
else
|
148
|
+
@attributes = record.instance_variable_get('@attributes')
|
149
|
+
end
|
150
|
+
rescue Exception => e
|
151
|
+
record.destroy
|
152
|
+
raise(e)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
def should_force_destroy?(force)
|
157
|
+
(Hash === force) ? force[:force] : (:force == force)
|
158
|
+
end
|
159
|
+
|
160
|
+
def should_ignore_validations?(force)
|
161
|
+
(Hash === force) && (false == force[:validate])
|
162
|
+
end
|
163
|
+
|
164
|
+
end
|
165
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module ActiveArchive
|
2
|
+
module Methods
|
3
|
+
|
4
|
+
def archivable?
|
5
|
+
columns.detect { |c| c.name == "archived_at" }
|
6
|
+
end
|
7
|
+
|
8
|
+
def archive_all(conditions=nil)
|
9
|
+
conditions ? where(conditions).destroy_all : destroy_all
|
10
|
+
end
|
11
|
+
|
12
|
+
def unarchive_all(conditions=nil)
|
13
|
+
(conditions ? where(conditions) : all).to_a.each { |r| r.unarchive }
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module ActiveRecord
|
2
|
+
module ConnectionAdapters
|
3
|
+
class TableDefinition
|
4
|
+
|
5
|
+
def timestamps_with_archived_at(options)
|
6
|
+
if ActiveArchive.configuration.all_records_archivable
|
7
|
+
timestamps_without_archived_at(options)
|
8
|
+
column(:archived_at, :datetime)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
alias_method_chain(:timestamps, :archived_at)
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require "active_archive/version"
|
2
|
+
require "active_archive/configuration"
|
3
|
+
require "active_archive/table_definition"
|
4
|
+
require "active_archive/methods"
|
5
|
+
require "active_archive/scopes"
|
6
|
+
require "active_archive/base"
|
7
|
+
|
8
|
+
module ActiveArchive
|
9
|
+
|
10
|
+
class << self
|
11
|
+
attr_accessor :configuration
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.configuration
|
15
|
+
@configuration ||= Configuration.new
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.configuration=(config)
|
19
|
+
@configuration = config
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.configure
|
23
|
+
yield(configuration)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
ActiveRecord::Base.send(:include, ActiveArchive::Base)
|
metadata
ADDED
@@ -0,0 +1,175 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: active_archive
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Juan Gomez
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-08-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: coveralls
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: sqlite3
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: database_cleaner
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: Prevent database records from being destroyed.
|
126
|
+
email:
|
127
|
+
- j.gomez@drexed.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".coveralls.yml"
|
133
|
+
- ".gitignore"
|
134
|
+
- ".rspec"
|
135
|
+
- ".travis.yml"
|
136
|
+
- CODE_OF_CONDUCT.md
|
137
|
+
- Gemfile
|
138
|
+
- README.md
|
139
|
+
- Rakefile
|
140
|
+
- active_archive.gemspec
|
141
|
+
- bin/console
|
142
|
+
- bin/rake
|
143
|
+
- bin/setup
|
144
|
+
- lib/active_archive.rb
|
145
|
+
- lib/active_archive/base.rb
|
146
|
+
- lib/active_archive/configuration.rb
|
147
|
+
- lib/active_archive/methods.rb
|
148
|
+
- lib/active_archive/scopes.rb
|
149
|
+
- lib/active_archive/table_definition.rb
|
150
|
+
- lib/active_archive/version.rb
|
151
|
+
homepage: https://github.com/drexed/active_archive
|
152
|
+
licenses: []
|
153
|
+
metadata: {}
|
154
|
+
post_install_message:
|
155
|
+
rdoc_options: []
|
156
|
+
require_paths:
|
157
|
+
- lib
|
158
|
+
- support
|
159
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
169
|
+
requirements: []
|
170
|
+
rubyforge_project:
|
171
|
+
rubygems_version: 2.4.8
|
172
|
+
signing_key:
|
173
|
+
specification_version: 4
|
174
|
+
summary: Soft-delete ActiveRecord records.
|
175
|
+
test_files: []
|