rails-archiver 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/rails-archiver/unarchiver.rb +6 -2
- data/rails-archiver.gemspec +2 -2
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 22767f51d1fefb73fd2d17b703a0ee846509bb99fc4dd2bed27c06a28fcdfc60
|
4
|
+
data.tar.gz: d04f42ec798d1df81fc3ee76575d4e1658563b73e4087f1e1639553b489b52b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9b6176a12fd8fd673ebb726dcaa4dd08f2a3e561718685693870f78d0661b863e7ca03b2ea8a9da8f8e18e73f1128115c20af17f65aee08e070911584473958
|
7
|
+
data.tar.gz: 176e5169d8d4756fdae4ff8fcbe5e8f5bcde4395a262a332321e7cbbdf1e61530e7373b1fd389217d5c747190d4dbb0023aa1aab48c29df5128ac7827a7a502d
|
@@ -40,7 +40,7 @@ module RailsArchiver
|
|
40
40
|
if @model
|
41
41
|
@model.reload
|
42
42
|
if @model.attribute_names.include?('archived')
|
43
|
-
@model.
|
43
|
+
@model.class.where(id: @model.id).update_all(:archived => false)
|
44
44
|
end
|
45
45
|
end
|
46
46
|
@logger.info("#{source} load complete!")
|
@@ -51,7 +51,11 @@ module RailsArchiver
|
|
51
51
|
def load_classes(hash)
|
52
52
|
full_hash = hash.with_indifferent_access
|
53
53
|
full_hash.each do |key, vals|
|
54
|
-
|
54
|
+
begin
|
55
|
+
save_models(key.constantize, vals)
|
56
|
+
rescue NameError => e
|
57
|
+
@logger.error("Could not save models for #{key}: #{e.message}")
|
58
|
+
end
|
55
59
|
end
|
56
60
|
if @options[:crash_on_errors] && self.errors.any?
|
57
61
|
raise ImportError.new("Errors occurred during load - please see 'errors' method for more details")
|
data/rails-archiver.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'rails-archiver'
|
3
3
|
s.require_paths = %w(. lib lib/rails-archiver)
|
4
|
-
s.version = '0.1.
|
5
|
-
s.date = '
|
4
|
+
s.version = '0.1.8'
|
5
|
+
s.date = '2024-07-03'
|
6
6
|
s.summary = 'Fully archive a Rails model'
|
7
7
|
s.description = <<-EOF
|
8
8
|
EOF
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-archiver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Orner
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -56,7 +56,7 @@ homepage: https://github.com/dorner/rails-archiver
|
|
56
56
|
licenses:
|
57
57
|
- MIT
|
58
58
|
metadata: {}
|
59
|
-
post_install_message:
|
59
|
+
post_install_message:
|
60
60
|
rdoc_options: []
|
61
61
|
require_paths:
|
62
62
|
- "."
|
@@ -73,9 +73,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
|
-
|
77
|
-
|
78
|
-
signing_key:
|
76
|
+
rubygems_version: 3.4.10
|
77
|
+
signing_key:
|
79
78
|
specification_version: 4
|
80
79
|
summary: Fully archive a Rails model
|
81
80
|
test_files: []
|