remote_database_importer 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.standard.yml +3 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +80 -0
- data/LICENSE.txt +21 -0
- data/README.md +67 -0
- data/Rakefile +10 -0
- data/bin/remote_database_importer +14 -0
- data/lib/railtie.rb +10 -0
- data/lib/remote_database_importer/config.rb +99 -0
- data/lib/remote_database_importer/operation.rb +112 -0
- data/lib/remote_database_importer/version.rb +5 -0
- data/lib/remote_database_importer.rb +9 -0
- data/lib/tasks/remote_database_importer.rake +7 -0
- data/readme_images/.DS_Store +0 -0
- data/readme_images/config_sample.png +0 -0
- data/readme_images/import-job.gif +0 -0
- data/sig/remote_database_importer.rbs +4 -0
- metadata +137 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cc2634f7ebf5e2ab65295a75ce3a851bfdc12632be061376b921e20689a7e614
|
4
|
+
data.tar.gz: 62e21889fbbc2ecff1ec1d9eae582a112bb8121509c31118558bab4ed947c190
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a2dab0f7513fba0965b73effd56c2aeeb96c24f85ace4fff2d97e40b0f13c960d517321e950381923c0534b565891c885c10e7ed36ebc0c51899cf0303c8bb4b
|
7
|
+
data.tar.gz: ff8507cff4411cb07295a3faddb54df8d263573c15baff4ffcfb493f5379956cc969fb08ca3edf1fc8790ed26618539134e99323a2afa48d8ca9290bf477dc22
|
data/.rspec
ADDED
data/.standard.yml
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
remote_database_importer (0.1.0)
|
5
|
+
colorize (~> 0.8)
|
6
|
+
thor (~> 1.2)
|
7
|
+
tty-config (~> 0.6)
|
8
|
+
tty-spinner (~> 0.9)
|
9
|
+
|
10
|
+
GEM
|
11
|
+
remote: https://rubygems.org/
|
12
|
+
specs:
|
13
|
+
ast (2.4.2)
|
14
|
+
coderay (1.1.3)
|
15
|
+
colorize (0.8.1)
|
16
|
+
diff-lcs (1.5.0)
|
17
|
+
json (2.6.2)
|
18
|
+
method_source (1.0.0)
|
19
|
+
parallel (1.22.1)
|
20
|
+
parser (3.1.2.1)
|
21
|
+
ast (~> 2.4.1)
|
22
|
+
pry (0.14.1)
|
23
|
+
coderay (~> 1.1)
|
24
|
+
method_source (~> 1.0)
|
25
|
+
rainbow (3.1.1)
|
26
|
+
rake (13.0.6)
|
27
|
+
regexp_parser (2.6.0)
|
28
|
+
rexml (3.2.5)
|
29
|
+
rspec (3.11.0)
|
30
|
+
rspec-core (~> 3.11.0)
|
31
|
+
rspec-expectations (~> 3.11.0)
|
32
|
+
rspec-mocks (~> 3.11.0)
|
33
|
+
rspec-core (3.11.0)
|
34
|
+
rspec-support (~> 3.11.0)
|
35
|
+
rspec-expectations (3.11.1)
|
36
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
+
rspec-support (~> 3.11.0)
|
38
|
+
rspec-mocks (3.11.1)
|
39
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
+
rspec-support (~> 3.11.0)
|
41
|
+
rspec-support (3.11.1)
|
42
|
+
rubocop (1.35.1)
|
43
|
+
json (~> 2.3)
|
44
|
+
parallel (~> 1.10)
|
45
|
+
parser (>= 3.1.2.1)
|
46
|
+
rainbow (>= 2.2.2, < 4.0)
|
47
|
+
regexp_parser (>= 1.8, < 3.0)
|
48
|
+
rexml (>= 3.2.5, < 4.0)
|
49
|
+
rubocop-ast (>= 1.20.1, < 2.0)
|
50
|
+
ruby-progressbar (~> 1.7)
|
51
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
52
|
+
rubocop-ast (1.23.0)
|
53
|
+
parser (>= 3.1.1.0)
|
54
|
+
rubocop-performance (1.14.3)
|
55
|
+
rubocop (>= 1.7.0, < 2.0)
|
56
|
+
rubocop-ast (>= 0.4.0)
|
57
|
+
ruby-progressbar (1.11.0)
|
58
|
+
standard (1.16.1)
|
59
|
+
rubocop (= 1.35.1)
|
60
|
+
rubocop-performance (= 1.14.3)
|
61
|
+
thor (1.2.1)
|
62
|
+
tty-config (0.6.0)
|
63
|
+
tty-cursor (0.7.1)
|
64
|
+
tty-spinner (0.9.3)
|
65
|
+
tty-cursor (~> 0.7)
|
66
|
+
unicode-display_width (2.3.0)
|
67
|
+
|
68
|
+
PLATFORMS
|
69
|
+
arm64-darwin-21
|
70
|
+
x86_64-linux
|
71
|
+
|
72
|
+
DEPENDENCIES
|
73
|
+
pry (~> 0.14)
|
74
|
+
rake (~> 13.0)
|
75
|
+
remote_database_importer!
|
76
|
+
rspec (~> 3.0)
|
77
|
+
standard (~> 1.3)
|
78
|
+
|
79
|
+
BUNDLED WITH
|
80
|
+
2.3.7
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2022 Leon
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# RemoteDatabaseImporter
|
2
|
+
**RemoteDatabaseImporter** is a small gem with one specific reason to exist: Dump remote databases and import it locally.
|
3
|
+
|
4
|
+
**This gem is currently in beta phase!**
|
5
|
+
Its well possible that unexpected errors can occur.
|
6
|
+
|
7
|
+
## Features
|
8
|
+
- Define multiple environments (such as staging, production etc.)
|
9
|
+
- Rails intergration via rake task
|
10
|
+
- Decide for yourself if the dump should be done over ssh or if pg_dump should connect to the DB port directly
|
11
|
+
- It can therefore be used for almost all hosting providers (Heroku, Kubernetes, self-hosted, etc.)
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
Add this line to your application's gemfile:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
gem 'remote_database_importer'
|
19
|
+
```
|
20
|
+
|
21
|
+
And then execute:
|
22
|
+
|
23
|
+
$ bundle install
|
24
|
+
|
25
|
+
Or install it yourself as:
|
26
|
+
|
27
|
+
$ gem install remote_database_importer
|
28
|
+
|
29
|
+
## Usage
|
30
|
+
Whenever you want current live data, you can run the command:
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
rake remote_database:import
|
34
|
+
```
|
35
|
+
|
36
|
+
![Import Job Demo](readme_images/import-job.gif)
|
37
|
+
|
38
|
+
### Config
|
39
|
+
The settings for the different environments is stored in the `remote_database_importer.yml` file.
|
40
|
+
When you first run the rake task, it will dynamically create this file for you.
|
41
|
+
|
42
|
+
|
43
|
+
![asdf](readme_images/config_sample.png)
|
44
|
+
|
45
|
+
### DB Access
|
46
|
+
The easiest and fastest way is to exchange your ssh-key with the server beforehand, so you don't have to enter a password.
|
47
|
+
Otherwise during the rake task execution a password entry is required.
|
48
|
+
|
49
|
+
The effective dump call is as follows:
|
50
|
+
```ruby
|
51
|
+
"ssh SSH_USER@HOST -p SSH_PORT 'pg_dump -Fc -U DB_USER -d DB_NAME -h localhost -C' > DB_DUMP_LOCATION"
|
52
|
+
or
|
53
|
+
"pg_dump -Fc 'host=HOST dbname=DB_NAME user=DB_USER port=POSTGRES_PORT' > DB_DUMP_LOCATION"
|
54
|
+
```
|
55
|
+
|
56
|
+
## Limitations
|
57
|
+
- At the moment only Postgres databases are supported
|
58
|
+
- It has to run inside a Rails app. There is a CLI command `remote_database_importer import` as an alternative to the rake task, but there are still some Rails commands like `rails db:drop db:create - rails db:migrate`, which makes it currently not possible to use the gem outside of Rails
|
59
|
+
- Not suitable for very large databases, you could run into SSH timeouts
|
60
|
+
|
61
|
+
## Contributing
|
62
|
+
|
63
|
+
Bug reports and pull requests are very welcome!
|
64
|
+
|
65
|
+
## License
|
66
|
+
|
67
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'thor'
|
4
|
+
require_relative '../lib/remote_database_importer/operation'
|
5
|
+
|
6
|
+
class RemoteDatabaseImporterCLI < Thor
|
7
|
+
desc "Restore remote database and import it locally", "asdf"
|
8
|
+
def import
|
9
|
+
importer = RemoteDatabaseImporter::Operation.new
|
10
|
+
importer.import
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
RemoteDatabaseImporterCLI.start
|
data/lib/railtie.rb
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
module RemoteDatabaseImporter
|
2
|
+
class Config
|
3
|
+
require "tty/config"
|
4
|
+
require "colorize"
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
@config = TTY::Config.new
|
8
|
+
@config.filename = "remote_database_importer"
|
9
|
+
@config.extname = ".yml"
|
10
|
+
@config.append_path Dir.pwd
|
11
|
+
end
|
12
|
+
|
13
|
+
def read_or_create_configfile
|
14
|
+
unless @config.exist?
|
15
|
+
puts "===========================================================".colorize(:green)
|
16
|
+
puts "Hi there! There is no config file yet, lets create one! 😄"
|
17
|
+
create_default_config
|
18
|
+
puts "===========================================================".colorize(:green)
|
19
|
+
end
|
20
|
+
@config.read
|
21
|
+
end
|
22
|
+
|
23
|
+
def ask(question, default: nil, options: nil)
|
24
|
+
question += " (#{options.join(" / ")})" if options.present?
|
25
|
+
question += " [#{default}]" if default.present?
|
26
|
+
|
27
|
+
puts question.colorize(:light_blue)
|
28
|
+
answer = $stdin.gets.chomp
|
29
|
+
answer.present? ? answer : default
|
30
|
+
end
|
31
|
+
|
32
|
+
def create_default_config
|
33
|
+
enter_new_environments = true
|
34
|
+
environment_count = 1
|
35
|
+
|
36
|
+
local_db_name = ask("Whats the name of the local database you wanna import to?", default: "myawesomeapp_development")
|
37
|
+
@config.set(:local_db_name, value: local_db_name)
|
38
|
+
puts
|
39
|
+
|
40
|
+
while enter_new_environments
|
41
|
+
puts "#{environment_count}. Environment".colorize(:green)
|
42
|
+
env = ask("Whats the name of the #{environment_count}. environment you wanna add?", default: "staging")
|
43
|
+
puts
|
44
|
+
|
45
|
+
puts "Database settings:".colorize(:green)
|
46
|
+
db_name = ask("Enter the DB name for the #{env} environment:", default: "myawesomeapp_#{env}")
|
47
|
+
db_user = ask("Enter the DB user for the #{env} environment:", default: "deployer")
|
48
|
+
puts
|
49
|
+
|
50
|
+
puts "Connection settings:".colorize(:green)
|
51
|
+
host = ask("Enter the IP or hostname of the DB server:", default: "myawesomeapp.com")
|
52
|
+
dump_type = ask("Should the dump happen over a ssh connection or can pg_dump access the DB port directly? (if the DB lives on a seperat server pg_dump the way to go)", default: "pg_dump", options: ["ssh", "pg_dump"])
|
53
|
+
|
54
|
+
ssh_user, ssh_port, postgres_port = nil
|
55
|
+
if dump_type == "ssh"
|
56
|
+
ssh_user = ask("Enter the username for the SSH connection:", default: "deployer")
|
57
|
+
ssh_port = ask("Enter the port for the SSH connection:", default: "22")
|
58
|
+
else
|
59
|
+
postgres_port = ask("Enter the database port for the pg_dump command:", default: "5432")
|
60
|
+
end
|
61
|
+
puts
|
62
|
+
|
63
|
+
env_config = {
|
64
|
+
env.to_s => {
|
65
|
+
"database" => {
|
66
|
+
"name" => db_name,
|
67
|
+
"user" => db_user
|
68
|
+
},
|
69
|
+
"connection" => {
|
70
|
+
"host" => host,
|
71
|
+
"dump_type" => dump_type,
|
72
|
+
"postgres_port" => postgres_port,
|
73
|
+
"ssh_user" => ssh_user,
|
74
|
+
"ssh_port" => ssh_port
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
@config.append(env_config, to: :environments)
|
79
|
+
|
80
|
+
continue = ask("Do you wanna add another environment? (anything other than 'yes' will exit)")
|
81
|
+
if continue&.downcase == "yes"
|
82
|
+
environment_count += 1
|
83
|
+
else
|
84
|
+
enter_new_environments = false
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
@config.write
|
89
|
+
end
|
90
|
+
|
91
|
+
# TODO: validate user input
|
92
|
+
# private
|
93
|
+
# def validate_config(config)
|
94
|
+
# config.each do |key, value|
|
95
|
+
#
|
96
|
+
# end
|
97
|
+
# end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,112 @@
|
|
1
|
+
module RemoteDatabaseImporter
|
2
|
+
class Operation
|
3
|
+
require "remote_database_importer/config"
|
4
|
+
require "tty/spinner/multi"
|
5
|
+
require "pry"
|
6
|
+
|
7
|
+
LOG_FILE = "tmp/remote_database_importer.log"
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
config_handler = RemoteDatabaseImporter::Config.new
|
11
|
+
@config = config_handler.read_or_create_configfile
|
12
|
+
end
|
13
|
+
|
14
|
+
def environments
|
15
|
+
@config.fetch("environments")
|
16
|
+
end
|
17
|
+
|
18
|
+
def select_environment
|
19
|
+
if environments.size > 1
|
20
|
+
puts "Select the operation environment:"
|
21
|
+
|
22
|
+
environments.map(&:keys).flatten.each_with_index do |env, index|
|
23
|
+
puts "#{index} for #{env.capitalize}"
|
24
|
+
end
|
25
|
+
env = environments[$stdin.gets.chomp.to_i].values[0]
|
26
|
+
raise "Environment couldn't be found!" if env.blank?
|
27
|
+
@current_environment = env
|
28
|
+
return
|
29
|
+
end
|
30
|
+
|
31
|
+
@current_environment = environments[0].values[0]
|
32
|
+
end
|
33
|
+
|
34
|
+
def import
|
35
|
+
select_environment
|
36
|
+
multi_spinner = TTY::Spinner::Multi.new("[:spinner] Import remote DB", format: :dots_3)
|
37
|
+
tasks = create_tasks_and_spinners(multi_spinner)
|
38
|
+
|
39
|
+
puts "Be aware, you may get asked for a password for the ssh or db connection"
|
40
|
+
tasks.each do |task|
|
41
|
+
task[:spinner].auto_spin
|
42
|
+
task_execution_was_successful = system(task[:command])
|
43
|
+
return "Can't continue, following task failed: #{task[:command]} - checkout the logfile: #{LOG_FILE}" unless task_execution_was_successful
|
44
|
+
task[:spinner].stop("... Done!")
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def create_tasks_and_spinners(multi_spinner)
|
51
|
+
tasks = [
|
52
|
+
{name: "Terminate current DB sessions", command: terminate_current_db_sessions},
|
53
|
+
{name: "Dump remote DB", command: dump_remote_db},
|
54
|
+
{name: "Drop and create local DB", command: drop_and_create_local_db},
|
55
|
+
{name: "Restore remote DB", command: restore_db},
|
56
|
+
{name: "Run migrations", command: run_migrations},
|
57
|
+
{name: "Remove logfile", command: remove_logfile},
|
58
|
+
{name: "Remove dumpfile", command: remove_dumpfile}
|
59
|
+
]
|
60
|
+
tasks.each.with_index(1) do |task, index|
|
61
|
+
task[:spinner] = multi_spinner.register "#{index}/#{tasks.length} :spinner #{task[:name]}"
|
62
|
+
end
|
63
|
+
tasks
|
64
|
+
end
|
65
|
+
|
66
|
+
# terminate local db sessions, otherwise the db can't be dropped
|
67
|
+
def terminate_current_db_sessions
|
68
|
+
"psql -d #{@config.fetch("local_db_name")} -c 'SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname = current_database() AND pid <> pg_backend_pid();' > #{LOG_FILE}"
|
69
|
+
end
|
70
|
+
|
71
|
+
def dump_remote_db
|
72
|
+
env = @current_environment
|
73
|
+
host = env["connection"]["host"]
|
74
|
+
db_name = env["database"]["name"]
|
75
|
+
db_user = env["database"]["user"]
|
76
|
+
dump_type = env["connection"]["dump_type"]
|
77
|
+
ssh_user = env["connection"]["ssh_user"]
|
78
|
+
ssh_port = env["connection"]["ssh_port"]
|
79
|
+
postgres_port = env["connection"]["postgres_port"]
|
80
|
+
|
81
|
+
if dump_type == "ssh"
|
82
|
+
"ssh #{ssh_user}@#{host} -p #{ssh_port} 'pg_dump -Fc -U #{db_user} -d #{db_name} -h localhost -C' > #{db_dump_location}"
|
83
|
+
else
|
84
|
+
"pg_dump -Fc 'host=#{host} dbname=#{db_name} user=#{db_user} port=#{postgres_port}' > #{db_dump_location}"
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def drop_and_create_local_db
|
89
|
+
"rails db:environment:set RAILS_ENV=development; rake db:drop db:create > #{LOG_FILE}"
|
90
|
+
end
|
91
|
+
|
92
|
+
def restore_db
|
93
|
+
"pg_restore --jobs 8 --no-privileges --no-owner --dbname #{@config.fetch("local_db_name")} #{db_dump_location}"
|
94
|
+
end
|
95
|
+
|
96
|
+
def run_migrations
|
97
|
+
"rake db:migrate > #{LOG_FILE}"
|
98
|
+
end
|
99
|
+
|
100
|
+
def remove_logfile
|
101
|
+
"rm #{LOG_FILE}"
|
102
|
+
end
|
103
|
+
|
104
|
+
def remove_dumpfile
|
105
|
+
"rm #{db_dump_location}"
|
106
|
+
end
|
107
|
+
|
108
|
+
def db_dump_location
|
109
|
+
"tmp/#{@current_environment["database"]["name"]}.dump"
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "remote_database_importer/version"
|
4
|
+
require_relative "remote_database_importer/operation"
|
5
|
+
|
6
|
+
module RemoteDatabaseImporter
|
7
|
+
class Error < StandardError; end
|
8
|
+
require_relative "railtie" if defined?(Rails)
|
9
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: remote_database_importer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Leon
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-10-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: tty-config
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.6'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: tty-spinner
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.9'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.9'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: colorize
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.8'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.8'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.14'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.14'
|
83
|
+
description: Dump remote database and import locally. Currently only postgres databases
|
84
|
+
supported
|
85
|
+
email:
|
86
|
+
- nonick@nonick.ch
|
87
|
+
executables:
|
88
|
+
- remote_database_importer
|
89
|
+
extensions: []
|
90
|
+
extra_rdoc_files: []
|
91
|
+
files:
|
92
|
+
- ".rspec"
|
93
|
+
- ".standard.yml"
|
94
|
+
- CHANGELOG.md
|
95
|
+
- Gemfile
|
96
|
+
- Gemfile.lock
|
97
|
+
- LICENSE.txt
|
98
|
+
- README.md
|
99
|
+
- Rakefile
|
100
|
+
- bin/remote_database_importer
|
101
|
+
- lib/railtie.rb
|
102
|
+
- lib/remote_database_importer.rb
|
103
|
+
- lib/remote_database_importer/config.rb
|
104
|
+
- lib/remote_database_importer/operation.rb
|
105
|
+
- lib/remote_database_importer/version.rb
|
106
|
+
- lib/tasks/remote_database_importer.rake
|
107
|
+
- readme_images/.DS_Store
|
108
|
+
- readme_images/config_sample.png
|
109
|
+
- readme_images/import-job.gif
|
110
|
+
- sig/remote_database_importer.rbs
|
111
|
+
homepage: https://github.com/leon-vogt/remote_database_importer
|
112
|
+
licenses:
|
113
|
+
- MIT
|
114
|
+
metadata:
|
115
|
+
homepage_uri: https://github.com/leon-vogt/remote_database_importer
|
116
|
+
source_code_uri: https://github.com/leon-vogt/remote_database_importer
|
117
|
+
changelog_uri: https://github.com/leon-vogt/remote_database_importer/blob/main/CHANGELOG.md
|
118
|
+
post_install_message:
|
119
|
+
rdoc_options: []
|
120
|
+
require_paths:
|
121
|
+
- lib
|
122
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 2.6.0
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
requirements: []
|
133
|
+
rubygems_version: 3.3.7
|
134
|
+
signing_key:
|
135
|
+
specification_version: 4
|
136
|
+
summary: Dump remote database and import locally
|
137
|
+
test_files: []
|