deleted_at 0.4.0rc1 → 0.5.0.pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/{spec/support/rails/public/favicon.ico → CHANGELOG.md} +0 -0
- data/{LICENSE.txt → LICENSE} +0 -0
- data/README.md +29 -15
- data/lib/deleted_at.rb +29 -29
- data/lib/deleted_at/active_record.rb +37 -0
- data/lib/deleted_at/core.rb +51 -0
- data/lib/deleted_at/{views.rb → legacy.rb} +23 -14
- data/lib/deleted_at/railtie.rb +5 -4
- data/lib/deleted_at/relation.rb +72 -0
- data/lib/deleted_at/table_definition.rb +10 -0
- data/lib/deleted_at/version.rb +1 -1
- metadata +30 -67
- data/.gitignore +0 -78
- data/.rspec +0 -2
- data/.travis.yml +0 -43
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -19
- data/Rakefile +0 -6
- data/deleted_at.gemspec +0 -42
- data/gemfiles/activerecord-4.0.Gemfile +0 -3
- data/gemfiles/activerecord-4.1.Gemfile +0 -3
- data/gemfiles/activerecord-4.2.Gemfile +0 -3
- data/gemfiles/activerecord-5.0.Gemfile +0 -3
- data/gemfiles/activerecord-5.1.Gemfile +0 -3
- data/lib/deleted_at/active_record/base.rb +0 -102
- data/lib/deleted_at/active_record/connection_adapters/abstract/schema_definition.rb +0 -17
- data/lib/deleted_at/active_record/relation.rb +0 -43
- data/spec/deleted_at/active_record/base_spec.rb +0 -21
- data/spec/deleted_at/active_record/relation_spec.rb +0 -166
- data/spec/deleted_at/views_spec.rb +0 -76
- data/spec/spec_helper.rb +0 -28
- data/spec/support/rails/app/models/animals/dog.rb +0 -5
- data/spec/support/rails/app/models/comment.rb +0 -6
- data/spec/support/rails/app/models/post.rb +0 -7
- data/spec/support/rails/app/models/user.rb +0 -7
- data/spec/support/rails/config/database.yml +0 -4
- data/spec/support/rails/config/routes.rb +0 -3
- data/spec/support/rails/db/schema.rb +0 -27
- data/spec/support/rails/log/.gitignore +0 -1
data/lib/deleted_at/version.rb
CHANGED
metadata
CHANGED
@@ -1,36 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deleted_at
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dale Stevens
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: pg
|
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
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: activerecord
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - ">="
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version: '4'
|
19
|
+
version: '4.2'
|
34
20
|
- - "<"
|
35
21
|
- !ruby/object:Gem::Version
|
36
22
|
version: '6'
|
@@ -40,10 +26,24 @@ dependencies:
|
|
40
26
|
requirements:
|
41
27
|
- - ">="
|
42
28
|
- !ruby/object:Gem::Version
|
43
|
-
version: '4'
|
29
|
+
version: '4.2'
|
44
30
|
- - "<"
|
45
31
|
- !ruby/object:Gem::Version
|
46
32
|
version: '6'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: pg
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: pry-byebug
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,14 +78,14 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
81
|
+
version: '12.0'
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
88
|
+
version: '12.0'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: combustion
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,40 +107,17 @@ executables: []
|
|
107
107
|
extensions: []
|
108
108
|
extra_rdoc_files: []
|
109
109
|
files:
|
110
|
-
-
|
111
|
-
-
|
112
|
-
- ".travis.yml"
|
113
|
-
- CODE_OF_CONDUCT.md
|
114
|
-
- Gemfile
|
115
|
-
- LICENSE.txt
|
110
|
+
- CHANGELOG.md
|
111
|
+
- LICENSE
|
116
112
|
- README.md
|
117
|
-
- Rakefile
|
118
|
-
- deleted_at.gemspec
|
119
|
-
- gemfiles/activerecord-4.0.Gemfile
|
120
|
-
- gemfiles/activerecord-4.1.Gemfile
|
121
|
-
- gemfiles/activerecord-4.2.Gemfile
|
122
|
-
- gemfiles/activerecord-5.0.Gemfile
|
123
|
-
- gemfiles/activerecord-5.1.Gemfile
|
124
113
|
- lib/deleted_at.rb
|
125
|
-
- lib/deleted_at/active_record
|
126
|
-
- lib/deleted_at/
|
127
|
-
- lib/deleted_at/
|
114
|
+
- lib/deleted_at/active_record.rb
|
115
|
+
- lib/deleted_at/core.rb
|
116
|
+
- lib/deleted_at/legacy.rb
|
128
117
|
- lib/deleted_at/railtie.rb
|
118
|
+
- lib/deleted_at/relation.rb
|
119
|
+
- lib/deleted_at/table_definition.rb
|
129
120
|
- lib/deleted_at/version.rb
|
130
|
-
- lib/deleted_at/views.rb
|
131
|
-
- spec/deleted_at/active_record/base_spec.rb
|
132
|
-
- spec/deleted_at/active_record/relation_spec.rb
|
133
|
-
- spec/deleted_at/views_spec.rb
|
134
|
-
- spec/spec_helper.rb
|
135
|
-
- spec/support/rails/app/models/animals/dog.rb
|
136
|
-
- spec/support/rails/app/models/comment.rb
|
137
|
-
- spec/support/rails/app/models/post.rb
|
138
|
-
- spec/support/rails/app/models/user.rb
|
139
|
-
- spec/support/rails/config/database.yml
|
140
|
-
- spec/support/rails/config/routes.rb
|
141
|
-
- spec/support/rails/db/schema.rb
|
142
|
-
- spec/support/rails/log/.gitignore
|
143
|
-
- spec/support/rails/public/favicon.ico
|
144
121
|
homepage: https://github.com/TwilightCoders/deleted_at
|
145
122
|
licenses:
|
146
123
|
- MIT
|
@@ -150,12 +127,11 @@ post_install_message:
|
|
150
127
|
rdoc_options: []
|
151
128
|
require_paths:
|
152
129
|
- lib
|
153
|
-
- spec
|
154
130
|
required_ruby_version: !ruby/object:Gem::Requirement
|
155
131
|
requirements:
|
156
132
|
- - ">="
|
157
133
|
- !ruby/object:Gem::Version
|
158
|
-
version: '2.
|
134
|
+
version: '2.3'
|
159
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
136
|
requirements:
|
161
137
|
- - ">"
|
@@ -163,21 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
139
|
version: 1.3.1
|
164
140
|
requirements: []
|
165
141
|
rubyforge_project:
|
166
|
-
rubygems_version: 2.7.
|
142
|
+
rubygems_version: 2.7.6
|
167
143
|
signing_key:
|
168
144
|
specification_version: 4
|
169
145
|
summary: Soft delete your data, but keep it clean.
|
170
|
-
test_files:
|
171
|
-
- spec/deleted_at/active_record/base_spec.rb
|
172
|
-
- spec/deleted_at/active_record/relation_spec.rb
|
173
|
-
- spec/deleted_at/views_spec.rb
|
174
|
-
- spec/spec_helper.rb
|
175
|
-
- spec/support/rails/app/models/animals/dog.rb
|
176
|
-
- spec/support/rails/app/models/comment.rb
|
177
|
-
- spec/support/rails/app/models/post.rb
|
178
|
-
- spec/support/rails/app/models/user.rb
|
179
|
-
- spec/support/rails/config/database.yml
|
180
|
-
- spec/support/rails/config/routes.rb
|
181
|
-
- spec/support/rails/db/schema.rb
|
182
|
-
- spec/support/rails/log/.gitignore
|
183
|
-
- spec/support/rails/public/favicon.ico
|
146
|
+
test_files: []
|
data/.gitignore
DELETED
@@ -1,78 +0,0 @@
|
|
1
|
-
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
2
|
-
#
|
3
|
-
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
-
# or operating system, you probably want to add a global ignore instead:
|
5
|
-
# git config --global core.excludesfile ~/.gitignore_global
|
6
|
-
|
7
|
-
# Database config and secrets
|
8
|
-
/config/database.yml
|
9
|
-
/config/secrets.yml
|
10
|
-
|
11
|
-
# Ignore bundler config
|
12
|
-
/.bundle
|
13
|
-
|
14
|
-
# Ignore client credentials
|
15
|
-
/config/client_api_credentials.yml
|
16
|
-
|
17
|
-
# Ignore the default SQLite database.
|
18
|
-
/db/*.sqlite3
|
19
|
-
|
20
|
-
# Ignore all logfiles and tempfiles.
|
21
|
-
/log/*.log
|
22
|
-
/tmp
|
23
|
-
/db/structure.sql
|
24
|
-
/doc/app/*
|
25
|
-
/vendor/cldr/*
|
26
|
-
/public/uploads/*
|
27
|
-
/public/photo/*
|
28
|
-
/public/test/*
|
29
|
-
/test/assets/*
|
30
|
-
/spec/assets/*
|
31
|
-
/public/assets/**
|
32
|
-
.powenv
|
33
|
-
.rvmrc
|
34
|
-
.env
|
35
|
-
.ruby-version
|
36
|
-
|
37
|
-
# Compiled source #
|
38
|
-
###################
|
39
|
-
/build/
|
40
|
-
*.com
|
41
|
-
*.class
|
42
|
-
*.dll
|
43
|
-
*.exe
|
44
|
-
*.o
|
45
|
-
*.so
|
46
|
-
|
47
|
-
# Packages #
|
48
|
-
############
|
49
|
-
# it's better to unpack these files and commit the raw source
|
50
|
-
# git has its own built in compression methods
|
51
|
-
*.7z
|
52
|
-
*.dmg
|
53
|
-
*.gz
|
54
|
-
*.iso
|
55
|
-
*.jar
|
56
|
-
*.rar
|
57
|
-
*.tar
|
58
|
-
*.zip
|
59
|
-
|
60
|
-
# Logs and databases #
|
61
|
-
######################
|
62
|
-
*.log
|
63
|
-
*.sql
|
64
|
-
*.sqlite
|
65
|
-
|
66
|
-
# OS generated files #
|
67
|
-
######################
|
68
|
-
.DS_Store
|
69
|
-
.DS_Store?
|
70
|
-
._*
|
71
|
-
.Spotlight-V100
|
72
|
-
.Trashes
|
73
|
-
Icon?
|
74
|
-
ehthumbs.db
|
75
|
-
Thumbs.db
|
76
|
-
/Gemfile.lock
|
77
|
-
/coverage
|
78
|
-
/.editorconfig
|
data/.rspec
DELETED
data/.travis.yml
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
sudo: false
|
3
|
-
|
4
|
-
cache: bundler
|
5
|
-
script:
|
6
|
-
- bundle exec rspec
|
7
|
-
|
8
|
-
after_success:
|
9
|
-
- bundle exec codeclimate-test-reporter
|
10
|
-
|
11
|
-
addons:
|
12
|
-
postgresql: "9.3"
|
13
|
-
|
14
|
-
rvm:
|
15
|
-
- 2.4
|
16
|
-
- 2.3
|
17
|
-
- 2.2
|
18
|
-
- 2.1
|
19
|
-
- 2.0
|
20
|
-
|
21
|
-
gemfile:
|
22
|
-
- gemfiles/activerecord-5.1.Gemfile
|
23
|
-
- gemfiles/activerecord-5.0.Gemfile
|
24
|
-
- gemfiles/activerecord-4.2.Gemfile
|
25
|
-
- gemfiles/activerecord-4.1.Gemfile
|
26
|
-
- gemfiles/activerecord-4.0.Gemfile
|
27
|
-
|
28
|
-
matrix:
|
29
|
-
exclude:
|
30
|
-
- rvm: 2.0
|
31
|
-
gemfile: gemfiles/activerecord-5.0.Gemfile
|
32
|
-
- rvm: 2.0
|
33
|
-
gemfile: gemfiles/activerecord-5.1.Gemfile
|
34
|
-
|
35
|
-
- rvm: 2.1
|
36
|
-
gemfile: gemfiles/activerecord-5.0.Gemfile
|
37
|
-
- rvm: 2.1
|
38
|
-
gemfile: gemfiles/activerecord-5.1.Gemfile
|
39
|
-
|
40
|
-
- rvm: 2.4
|
41
|
-
gemfile: gemfiles/activerecord-4.0.Gemfile
|
42
|
-
- rvm: 2.4
|
43
|
-
gemfile: gemfiles/activerecord-4.1.Gemfile
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at dale@getnotion.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
gemspec
|
4
|
-
|
5
|
-
group :test do
|
6
|
-
|
7
|
-
# Generates coverage stats of specs
|
8
|
-
gem 'simplecov'
|
9
|
-
|
10
|
-
# Publishes coverage to codeclimate
|
11
|
-
gem 'codeclimate-test-reporter'
|
12
|
-
|
13
|
-
gem 'rspec'
|
14
|
-
|
15
|
-
gem 'database_cleaner'
|
16
|
-
|
17
|
-
gem 'combustion'
|
18
|
-
|
19
|
-
end
|
data/Rakefile
DELETED
data/deleted_at.gemspec
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'deleted_at/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "deleted_at"
|
8
|
-
spec.version = DeletedAt::VERSION
|
9
|
-
spec.authors = ['Dale Stevens']
|
10
|
-
spec.email = ['dale@twilightcoders.net']
|
11
|
-
|
12
|
-
spec.summary = %q{Soft delete your data, but keep it clean.}
|
13
|
-
spec.description = %q{Default scopes are bad. Don't delete your data. DeletedAt, I choose you!}
|
14
|
-
spec.homepage = "https://github.com/TwilightCoders/deleted_at"
|
15
|
-
spec.license = "MIT"
|
16
|
-
|
17
|
-
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
-
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
-
if spec.respond_to?(:metadata)
|
20
|
-
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
21
|
-
else
|
22
|
-
raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
|
23
|
-
end
|
24
|
-
|
25
|
-
spec.files = `git ls-files -z`.split("\x0")
|
26
|
-
spec.bindir = 'bin'
|
27
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
28
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
29
|
-
spec.require_paths = ['lib', 'spec']
|
30
|
-
|
31
|
-
rails_versions = ['>= 4', '< 6']
|
32
|
-
spec.required_ruby_version = '>= 2.0'
|
33
|
-
|
34
|
-
spec.add_runtime_dependency 'pg', '~> 0'
|
35
|
-
spec.add_runtime_dependency 'activerecord', rails_versions
|
36
|
-
|
37
|
-
spec.add_development_dependency 'pry-byebug', '~> 3'
|
38
|
-
spec.add_development_dependency 'bundler', '~> 1.3'
|
39
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
40
|
-
spec.add_development_dependency 'combustion', '~> 0.7'
|
41
|
-
|
42
|
-
end
|