backup_restore_db 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f8cfb03924066e95fb38b5f1787ef2131ca1f4ab9f857a5b570e8333b107735
4
- data.tar.gz: 2eb635f3f065070f713f96d59699d7cf8e0ecdde83ab2dab3ab83ab617099b47
3
+ metadata.gz: a3e1823137eaa3b89511900ddd83ec548a5c8a2c00e5a02754f8efe7d9ced803
4
+ data.tar.gz: 6900553965466109c99ef5f1ee9c8b696c21d26ff10797013f904782394dadec
5
5
  SHA512:
6
- metadata.gz: d2bf055eddb24ae8f8881caa9b585e263636bc96433bac04146ef38cf289206dfe9c7f764064493cd6b679fa3bee871a57478418df4757fd15571d8dbff42191
7
- data.tar.gz: ac9159949bf3ee030742864be49324cbf9d75c79db3529fa08ae701b056e1e037e9efb28e0b2701ca6f897ccc24d689ce53dbf68cfceae40263fcfe1dad4c824
6
+ metadata.gz: ffb1fff8b94fd0bb57acc2b80e3ade3d6a9cea6dd1931418cc9a09e6d4c53bdbdd9da8468fa07a812cb16523049631828c7b0765a76995ceec61d598bbf6f84b
7
+ data.tar.gz: bc404edbd5732275c8519e7f928290f78c3d000ebf7f69c0d74586cd67fc04bd50631fe641297a7b160bd297cab8dee39d0088819bdfc511c5b3fe57b3537836
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- backup_restore_db (0.1.3)
4
+ backup_restore_db (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module BackupRestoreDb
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -5,12 +5,6 @@ require 'fileutils'
5
5
  include Gem::UserInteraction
6
6
 
7
7
 
8
-
9
-
10
-
11
-
12
-
13
-
14
8
  def list_of_tables_in_db
15
9
  ActiveRecord::Base.connection.tables.to_a.find_all {|e| e != "schema_migrations" && e != "ar_internal_metadata" }
16
10
  end
@@ -25,9 +19,6 @@ end
25
19
 
26
20
 
27
21
 
28
-
29
-
30
-
31
22
  namespace :db do
32
23
 
33
24
 
@@ -53,7 +44,7 @@ namespace :db do
53
44
  # array, and works like in an array, but not for exporting
54
45
  #from a string I try to call a class instance with constantize
55
46
 
56
- data = (capitalize1(tableName).singularize).constantize.all.as_json
47
+ data = (capitalize1(tableName).singularize).safe_constantize.all.as_json
57
48
 
58
49
  # The pretty is nice so I can diff exports easily, if that's not important, JSON(users) will do
59
50
  File.open(filepath, 'w') do |f|
@@ -83,7 +74,7 @@ namespace :db do
83
74
  data = JSON.parse(File.read(filepath))
84
75
 
85
76
  data.each do |s|
86
- (capitalize1(tableName).singularize).constantize.create(s)
77
+ (capitalize1(tableName).singularize).safe_constantize.create(s)
87
78
  end
88
79
 
89
80
  puts "- imported #{tableName.size} #{tableName}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backup_restore_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corrado Tuccitto
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-14 00:00:00.000000000 Z
11
+ date: 2020-09-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: backup and restore your db with a single line
14
14
  email:
@@ -26,6 +26,7 @@ files:
26
26
  - Rakefile
27
27
  - backup_restore_db-0.1.0.gem
28
28
  - backup_restore_db-0.1.2.gem
29
+ - backup_restore_db-0.1.3.gem
29
30
  - backup_restore_db.gemspec
30
31
  - bin/console
31
32
  - bin/setup
@@ -39,7 +40,7 @@ licenses:
39
40
  metadata:
40
41
  homepage_uri: https://bitbucket.org/eaglepeace/backup_restore_db/src/master/
41
42
  source_code_uri: https://bitbucket.org/eaglepeace/backup_restore_db/src/master/
42
- post_install_message:
43
+ post_install_message:
43
44
  rdoc_options: []
44
45
  require_paths:
45
46
  - lib
@@ -55,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
56
  version: '0'
56
57
  requirements: []
57
58
  rubygems_version: 3.1.2
58
- signing_key:
59
+ signing_key:
59
60
  specification_version: 4
60
61
  summary: backup and restore your db
61
62
  test_files: []