backhoe 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +34 -0
- data/Appraisals +4 -0
- data/README.md +1 -1
- data/gemfiles/activerecord_5.1.gemfile.lock +2 -2
- data/gemfiles/activerecord_5.2.gemfile.lock +2 -2
- data/gemfiles/activerecord_6.0.gemfile.lock +2 -2
- data/gemfiles/activerecord_6.1.gemfile.lock +2 -2
- data/gemfiles/activerecord_7.0.gemfile +7 -0
- data/gemfiles/activerecord_7.0.gemfile.lock +62 -0
- data/lib/backhoe/mysql.rb +1 -1
- data/lib/backhoe/version.rb +1 -1
- data/lib/backhoe.rb +12 -2
- metadata +6 -4
- data/.travis.yml +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eedc96f1b7466ebc166988dce01252aec90d14fcadd216cf926699e5d97b2e4
|
4
|
+
data.tar.gz: ac773a88ca48fa6f3d89228b6e3ea319bec0e64e4a5ab0ce2fbbd67e08a3127f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad26930dc3f9f53b3fbc62909fcd0942f478dd97c496ca3cb5127d19d81fdedd24db74358d33c3c797084c75bef77f1402ec308159c59265642f2093eda982eb
|
7
|
+
data.tar.gz: eb1a3ddb18501571bc2cbd2d3fd9af921d75788f5fc9c43ec7cfac20437c834b470ed335ce38223212cdc7950e18e09c16148a134c486b5e6c138428c4a16be6
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push, pull_request]
|
3
|
+
jobs:
|
4
|
+
test:
|
5
|
+
strategy:
|
6
|
+
fail-fast: false
|
7
|
+
matrix:
|
8
|
+
gemfile: [ activerecord_5.1, activerecord_5.2, activerecord_6.0, activerecord_6.1, activerecord_7.0 ]
|
9
|
+
ruby: [ 2.6, 2.7, 3.0 ]
|
10
|
+
exclude:
|
11
|
+
- gemfile: activerecord_5.1
|
12
|
+
ruby: 3.0
|
13
|
+
- gemfile: activerecord_5.2
|
14
|
+
ruby: 3.0
|
15
|
+
- gemfile: activerecord_7.0
|
16
|
+
ruby: 2.6
|
17
|
+
|
18
|
+
runs-on: ubuntu-18.04
|
19
|
+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
20
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
- uses: shogo82148/actions-setup-mysql@v1
|
24
|
+
with:
|
25
|
+
mysql-version: 5.7
|
26
|
+
my-cnf: |
|
27
|
+
socket=/tmp/mysql.sock
|
28
|
+
- uses: ruby/setup-ruby@v1
|
29
|
+
with:
|
30
|
+
ruby-version: ${{ matrix.ruby }}
|
31
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
32
|
+
cache-version: 10
|
33
|
+
- run: bundle exec rake
|
34
|
+
|
data/Appraisals
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Backhoe
|
2
|
-
[![
|
2
|
+
[![CI Status](https://github.com/botandrose/backhoe/workflows/CI/badge.svg?branch=master)](https://github.com/botandrose/backhoe/actions?query=workflow%3ACI+branch%3Amaster)
|
3
3
|
|
4
4
|
Dump and load current ActiveRecord database to and from a file.
|
5
5
|
|
@@ -0,0 +1,62 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
backhoe (0.4.1)
|
5
|
+
activerecord
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (7.0.1)
|
11
|
+
activesupport (= 7.0.1)
|
12
|
+
activerecord (7.0.1)
|
13
|
+
activemodel (= 7.0.1)
|
14
|
+
activesupport (= 7.0.1)
|
15
|
+
activesupport (7.0.1)
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
|
+
i18n (>= 1.6, < 2)
|
18
|
+
minitest (>= 5.1)
|
19
|
+
tzinfo (~> 2.0)
|
20
|
+
appraisal (2.4.1)
|
21
|
+
bundler
|
22
|
+
rake
|
23
|
+
thor (>= 0.14.0)
|
24
|
+
byebug (11.1.3)
|
25
|
+
concurrent-ruby (1.1.9)
|
26
|
+
diff-lcs (1.5.0)
|
27
|
+
i18n (1.8.11)
|
28
|
+
concurrent-ruby (~> 1.0)
|
29
|
+
minitest (5.15.0)
|
30
|
+
mysql2 (0.5.3)
|
31
|
+
rake (10.5.0)
|
32
|
+
rspec (3.10.0)
|
33
|
+
rspec-core (~> 3.10.0)
|
34
|
+
rspec-expectations (~> 3.10.0)
|
35
|
+
rspec-mocks (~> 3.10.0)
|
36
|
+
rspec-core (3.10.1)
|
37
|
+
rspec-support (~> 3.10.0)
|
38
|
+
rspec-expectations (3.10.2)
|
39
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
+
rspec-support (~> 3.10.0)
|
41
|
+
rspec-mocks (3.10.2)
|
42
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
+
rspec-support (~> 3.10.0)
|
44
|
+
rspec-support (3.10.3)
|
45
|
+
thor (1.2.1)
|
46
|
+
tzinfo (2.0.4)
|
47
|
+
concurrent-ruby (~> 1.0)
|
48
|
+
|
49
|
+
PLATFORMS
|
50
|
+
x86_64-linux
|
51
|
+
|
52
|
+
DEPENDENCIES
|
53
|
+
activerecord (~> 7.0.0)
|
54
|
+
appraisal
|
55
|
+
backhoe!
|
56
|
+
byebug
|
57
|
+
mysql2
|
58
|
+
rake (~> 10.0)
|
59
|
+
rspec (~> 3.0)
|
60
|
+
|
61
|
+
BUNDLED WITH
|
62
|
+
2.2.32
|
data/lib/backhoe/mysql.rb
CHANGED
data/lib/backhoe/version.rb
CHANGED
data/lib/backhoe.rb
CHANGED
@@ -24,8 +24,18 @@ module Backhoe
|
|
24
24
|
|
25
25
|
def database_config
|
26
26
|
env = Rails.env || "development"
|
27
|
-
|
28
|
-
|
27
|
+
configs = ActiveRecord::Base.configurations
|
28
|
+
hash = if configs.respond_to?(:configs_for)
|
29
|
+
config = configs.configs_for(env_name: env).first
|
30
|
+
if config.respond_to?(:configuration_hash)
|
31
|
+
config.configuration_hash # rails 7
|
32
|
+
else
|
33
|
+
config.config # rails 6
|
34
|
+
end
|
35
|
+
else
|
36
|
+
configs[env] # rails 5
|
37
|
+
end
|
38
|
+
HashWithIndifferentAccess.new(hash)
|
29
39
|
end
|
30
40
|
end
|
31
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backhoe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -101,9 +101,9 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- ".github/workflows/ci.yml"
|
104
105
|
- ".gitignore"
|
105
106
|
- ".rspec"
|
106
|
-
- ".travis.yml"
|
107
107
|
- Appraisals
|
108
108
|
- Gemfile
|
109
109
|
- LICENSE.txt
|
@@ -121,6 +121,8 @@ files:
|
|
121
121
|
- gemfiles/activerecord_6.0.gemfile.lock
|
122
122
|
- gemfiles/activerecord_6.1.gemfile
|
123
123
|
- gemfiles/activerecord_6.1.gemfile.lock
|
124
|
+
- gemfiles/activerecord_7.0.gemfile
|
125
|
+
- gemfiles/activerecord_7.0.gemfile.lock
|
124
126
|
- lib/backhoe.rb
|
125
127
|
- lib/backhoe/base.rb
|
126
128
|
- lib/backhoe/mysql.rb
|
@@ -146,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
148
|
- !ruby/object:Gem::Version
|
147
149
|
version: '0'
|
148
150
|
requirements: []
|
149
|
-
rubygems_version: 3.
|
151
|
+
rubygems_version: 3.2.32
|
150
152
|
signing_key:
|
151
153
|
specification_version: 4
|
152
154
|
summary: Dump and load current database to and from a file.
|