active_archive 6.0.1 → 6.0.2
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/.gitignore +4 -0
- data/.irbrc +44 -0
- data/.rubocop.yml +1 -1
- data/bin/rake +0 -0
- data/lib/active_archive/base.rb +1 -1
- data/lib/active_archive/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b227c206994dbd0870daa51ea5560753a60743ace96526f595f52571dc9efb19
|
|
4
|
+
data.tar.gz: 42344b758b06621d8ec5f1a0e9dd5265d136ccf650984e7a10cb358a8d8736b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2d594cb5dcf53dea45edd01ec8a1ae9fd2658d17770857e96366a88a851a5ec66ebf7a33a147e4569975aefec4af452b27c5c12bccd94ae6e4763b6c2340d5b2
|
|
7
|
+
data.tar.gz: b895f13b73c1b931b2399640b2e07c72ef239cdb5d2ecbe299429576d298fda8829c539c765c2aa28217a63da1ce926e883d07ac7923a05b473adcce5f3549dc
|
data/.gitignore
CHANGED
data/.irbrc
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Awesome print
|
|
4
|
+
begin
|
|
5
|
+
require 'awesome_print'
|
|
6
|
+
|
|
7
|
+
AwesomePrint.irb!
|
|
8
|
+
rescue LoadError => err
|
|
9
|
+
warn "Couldn't load awesome_print: #{err}"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# IRB
|
|
13
|
+
require 'irb/completion'
|
|
14
|
+
|
|
15
|
+
ARGV.concat %w[--readline --prompt-mode simple]
|
|
16
|
+
|
|
17
|
+
IRB.conf[:PROMPT_MODE] = :SIMPLE
|
|
18
|
+
IRB.conf[:EVAL_HISTORY] = 1000
|
|
19
|
+
IRB.conf[:SAVE_HISTORY] = 1000
|
|
20
|
+
IRB.conf[:HISTORY_FILE] = File.expand_path('.irbrc_history')
|
|
21
|
+
|
|
22
|
+
# Rails
|
|
23
|
+
railsrc_path = File.expand_path('.irbrc_rails')
|
|
24
|
+
|
|
25
|
+
if (ENV['RAILS_ENV'] || defined?(Rails)) && File.exist?(railsrc_path)
|
|
26
|
+
begin
|
|
27
|
+
load railsrc_path
|
|
28
|
+
rescue Exception => err
|
|
29
|
+
warn "Could not load: #{railsrc_path} because of #{err}"
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Object
|
|
34
|
+
class Object
|
|
35
|
+
|
|
36
|
+
def interesting_methods
|
|
37
|
+
case self.class
|
|
38
|
+
when Class then public_methods.sort - Object.public_methods
|
|
39
|
+
when Module then public_methods.sort - Module.public_methods
|
|
40
|
+
else public_methods.sort - Object.new.public_methods
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
end
|
data/.rubocop.yml
CHANGED
data/bin/rake
CHANGED
|
File without changes
|
data/lib/active_archive/base.rb
CHANGED
|
@@ -107,7 +107,7 @@ module ActiveArchive
|
|
|
107
107
|
self.class.reflections.each do |table_name, reflection|
|
|
108
108
|
next unless dependent_destroy?(reflection)
|
|
109
109
|
|
|
110
|
-
klass = relection_klass(
|
|
110
|
+
klass = relection_klass(reflection.class_name)
|
|
111
111
|
next unless klass.archivable?
|
|
112
112
|
|
|
113
113
|
dependents = reflection_dependents(table_name)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_archive
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.0.
|
|
4
|
+
version: 6.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juan Gomez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-01-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -160,6 +160,7 @@ files:
|
|
|
160
160
|
- ".DS_Store"
|
|
161
161
|
- ".fasterer.yml"
|
|
162
162
|
- ".gitignore"
|
|
163
|
+
- ".irbrc"
|
|
163
164
|
- ".reek.yml"
|
|
164
165
|
- ".rspec"
|
|
165
166
|
- ".rubocop.yml"
|
|
@@ -202,8 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
202
203
|
- !ruby/object:Gem::Version
|
|
203
204
|
version: '0'
|
|
204
205
|
requirements: []
|
|
205
|
-
|
|
206
|
-
rubygems_version: 2.7.7
|
|
206
|
+
rubygems_version: 3.0.2
|
|
207
207
|
signing_key:
|
|
208
208
|
specification_version: 4
|
|
209
209
|
summary: Gem for soft-deleting ActiveRecord objects.
|