dumpcar 0.1.2 → 0.1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 072d4fd45f4ca0e706115fb2e45f50dc9f9950e4c0fe87358092917318b91fde
4
- data.tar.gz: f57a226716065e3f34c9bb70c1e0cbc005255aed52204c137e913e850b9d2e25
3
+ metadata.gz: 1396e074eed574e995b27cd85826da3f17e6aab55d39791a2dd3b9a1bb764c58
4
+ data.tar.gz: 1c9e4115887c5fe9b8372c1d5890e5c3cb710a740c63ee633c50244af0567be9
5
5
  SHA512:
6
- metadata.gz: 4914d13e5e7ac7c504d1194d62d1f2e64f735021d0acf6518b3c9aea29cad03496ac48cf923c3700321039fee4d72a95cd6b18832156b3d82a13a2a5a91477f6
7
- data.tar.gz: b4dbdf8e423a4e4393cfded8765cb0ae1d76e3426b4f5005de9791261cb278f4f89eb4812034662f1a75c8628952aae5c736037afbd05d22d967cceb5c905da3
6
+ metadata.gz: 982e4e4c0417eabccdba95b61a41862755caa7c45f5c77706e248ec92cfb4916755dbf479cb2b31597663991c2afb0db2f98878f0b1a3cd1d2c620ecbd118a58
7
+ data.tar.gz: 5a92d2ad81a9340c03f93eb5d6350fedbff646ad574500821ba56ea050e1e76ad4e2ee1576c6e25dcee87db924dad97026893d05b3a124ee84b8b6031e628b26
data/.standard.yml CHANGED
@@ -1,3 +1,5 @@
1
1
  # For available configuration options, see:
2
2
  # https://github.com/standardrb/standard
3
3
  ruby_version: 3.2
4
+ ignore:
5
+ - "gemfiles/*.gemfile"
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Dumpcar
2
2
 
3
+ [![Ruby Gem version](https://badge.fury.io/rb/dumpcar.svg)](https://rubygems.org/gems/dumpcar)
4
+
3
5
  Rake tasks for dumping and restoring the contents of the PostgreSQL database for your Rails application.
4
6
 
5
7
  - Dump (`rails dumpcar:dump`) and restore your last dump (`rails dumpcar:restore`) with a single command
@@ -6,16 +6,16 @@ gem "aruba", "~> 2.3"
6
6
  gem "irb"
7
7
  gem "rake", "~> 13.0"
8
8
  gem "rspec", "~> 3.0"
9
- gem "rspec-github", require: false
9
+ gem "rspec-github", :require => false
10
10
  gem "shoulda-matchers"
11
11
  gem "standard", "~> 1.3"
12
12
  gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", git: "https://github.com/pboling/appraisal.git", ref: "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
17
17
  gem "debug"
18
18
  gem "rails", "~> 6.0.0"
19
19
  gem "concurrent-ruby", "1.3.4"
20
20
 
21
- gemspec path: "../"
21
+ gemspec :path => "../"
@@ -6,16 +6,16 @@ gem "aruba", "~> 2.3"
6
6
  gem "irb"
7
7
  gem "rake", "~> 13.0"
8
8
  gem "rspec", "~> 3.0"
9
- gem "rspec-github", require: false
9
+ gem "rspec-github", :require => false
10
10
  gem "shoulda-matchers"
11
11
  gem "standard", "~> 1.3"
12
12
  gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", git: "https://github.com/pboling/appraisal.git", ref: "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
17
17
  gem "debug"
18
18
  gem "rails", "~> 6.1.0"
19
19
  gem "concurrent-ruby", "1.3.4"
20
20
 
21
- gemspec path: "../"
21
+ gemspec :path => "../"
@@ -6,16 +6,16 @@ gem "aruba", "~> 2.3"
6
6
  gem "irb"
7
7
  gem "rake", "~> 13.0"
8
8
  gem "rspec", "~> 3.0"
9
- gem "rspec-github", require: false
9
+ gem "rspec-github", :require => false
10
10
  gem "shoulda-matchers"
11
11
  gem "standard", "~> 1.3"
12
12
  gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", git: "https://github.com/pboling/appraisal.git", ref: "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
17
17
  gem "debug"
18
18
  gem "rails", "~> 7.0.0"
19
19
  gem "concurrent-ruby", "1.3.4"
20
20
 
21
- gemspec path: "../"
21
+ gemspec :path => "../"
@@ -6,15 +6,15 @@ gem "aruba", "~> 2.3"
6
6
  gem "irb"
7
7
  gem "rake", "~> 13.0"
8
8
  gem "rspec", "~> 3.0"
9
- gem "rspec-github", require: false
9
+ gem "rspec-github", :require => false
10
10
  gem "shoulda-matchers"
11
11
  gem "standard", "~> 1.3"
12
12
  gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", git: "https://github.com/pboling/appraisal.git", ref: "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
17
17
  gem "debug"
18
18
  gem "rails", "~> 7.1.0"
19
19
 
20
- gemspec path: "../"
20
+ gemspec :path => "../"
@@ -6,15 +6,15 @@ gem "aruba", "~> 2.3"
6
6
  gem "irb"
7
7
  gem "rake", "~> 13.0"
8
8
  gem "rspec", "~> 3.0"
9
- gem "rspec-github", require: false
9
+ gem "rspec-github", :require => false
10
10
  gem "shoulda-matchers"
11
11
  gem "standard", "~> 1.3"
12
12
  gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", git: "https://github.com/pboling/appraisal.git", ref: "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
17
17
  gem "debug"
18
18
  gem "rails", "~> 7.2.0"
19
19
 
20
- gemspec path: "../"
20
+ gemspec :path => "../"
@@ -6,15 +6,15 @@ gem "aruba", "~> 2.3"
6
6
  gem "irb"
7
7
  gem "rake", "~> 13.0"
8
8
  gem "rspec", "~> 3.0"
9
- gem "rspec-github", require: false
9
+ gem "rspec-github", :require => false
10
10
  gem "shoulda-matchers"
11
11
  gem "standard", "~> 1.3"
12
12
  gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", git: "https://github.com/pboling/appraisal.git", ref: "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
17
17
  gem "debug"
18
18
  gem "rails", "~> 8.0.0"
19
19
 
20
- gemspec path: "../"
20
+ gemspec :path => "../"
@@ -6,15 +6,15 @@ gem "aruba", "~> 2.3"
6
6
  gem "irb"
7
7
  gem "rake", "~> 13.0"
8
8
  gem "rspec", "~> 3.0"
9
- gem "rspec-github", require: false
9
+ gem "rspec-github", :require => false
10
10
  gem "shoulda-matchers"
11
11
  gem "standard", "~> 1.3"
12
12
  gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", git: "https://github.com/pboling/appraisal.git", ref: "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
17
17
  gem "debug"
18
- gem "rails", github: "rails/rails", branch: "main"
18
+ gem "rails", :github => "rails/rails", :branch => "main"
19
19
 
20
- gemspec path: "../"
20
+ gemspec :path => "../"
@@ -3,7 +3,7 @@ module Dumpcar
3
3
  attr_reader :location, :pg
4
4
  def initialize(base: Rails.root.join("db/dumps"))
5
5
  @location = Location.new(base)
6
- @pg = Pg.new(get_connection_db_config)
6
+ @pg = Pg.new(Dumpcar::Util.get_connection_db_config)
7
7
  end
8
8
 
9
9
  def dump
@@ -13,11 +13,5 @@ module Dumpcar
13
13
  def restore
14
14
  @pg.restore(@location.last)
15
15
  end
16
-
17
- private
18
-
19
- def get_connection_db_config
20
- (Rails.version < "6.1") ? ActiveRecord::Base.connection_config : ActiveRecord::Base.connection_db_config.configuration_hash
21
- end
22
16
  end
23
17
  end
@@ -0,0 +1,5 @@
1
+ module Dumpcar::Util
2
+ def self.get_connection_db_config
3
+ (Rails.version < "6.1") ? ActiveRecord::Base.connection_config : ActiveRecord::Base.connection_db_config.configuration_hash
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dumpcar
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.2.1"
5
5
  end
data/lib/dumpcar.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "dumpcar/version"
2
2
  require "dumpcar/location"
3
3
  require "dumpcar/pg"
4
+ require "dumpcar/util"
4
5
  require "dumpcar/instance"
5
6
  require "dumpcar/railtie" if defined?(Rails)
6
7
 
data/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "lint-staged": {
11
11
  "*.{js,css,md,yml}": "prettier --write",
12
- "*.{rb,rake,gemspec,ru,gemfile}": "bin/standardrb --fix",
12
+ "*.{rb,rake,gemspec,ru}": "bin/standardrb --fix",
13
13
  "Gemfile": "bin/standardrb --fix"
14
14
  }
15
15
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dumpcar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Schultz
@@ -75,6 +75,7 @@ files:
75
75
  - lib/dumpcar/location.rb
76
76
  - lib/dumpcar/pg.rb
77
77
  - lib/dumpcar/railtie.rb
78
+ - lib/dumpcar/util.rb
78
79
  - lib/dumpcar/version.rb
79
80
  - lib/rails/commands/dumpcar_command.rb
80
81
  - package-lock.json