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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 631c54ba5ee068f6e555a6e5402a6543af7b117c
4
- data.tar.gz: 4d194e22a65b774c3dcce89fe176a9967b834a60
2
+ SHA256:
3
+ metadata.gz: 22767f51d1fefb73fd2d17b703a0ee846509bb99fc4dd2bed27c06a28fcdfc60
4
+ data.tar.gz: d04f42ec798d1df81fc3ee76575d4e1658563b73e4087f1e1639553b489b52b6
5
5
  SHA512:
6
- metadata.gz: 171728f0a785320566a37c212e3758b6de78c9d2d3304e7b477b4f7b383d182df87152c2c1ff19aae6af8f3ad20066ef2c1920f8ed2966b64bafb130855043ee
7
- data.tar.gz: 79917bf2e130af7934a1b603bed51d542a69bf038cff449614b2ff6d2f332164a946e11559d618622d5e96535021e0921241d9a161b50f10974bdc3ed6cae574
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.update_attribute(:archived, false)
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
- save_models(key.constantize, vals)
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")
@@ -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.7'
5
- s.date = '2018-06-20'
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.7
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: 2018-06-20 00:00:00.000000000 Z
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
- rubyforge_project:
77
- rubygems_version: 2.6.14
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: []