slonik_migration 1.1.3 → 1.2.0
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 +4 -4
- data/.github/workflows/ci.yml +62 -0
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/gemfiles/rails60.gemfile +1 -0
- data/gemfiles/rails61.gemfile +5 -0
- data/gemfiles/rails70.gemfile +5 -0
- data/lib/slonik_migration/config.rb +19 -8
- data/lib/slonik_migration/version.rb +1 -1
- metadata +5 -3
- data/.travis.yml +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3caa52c10f2bf3e46027dbb8c0ff309e8dad46d9f5efc45694d31af21c2ba9f7
|
4
|
+
data.tar.gz: 5f430959a86ff8b3bcb71e911eba4115bb8e4f2acb69c03554a19e66cc9b19d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a06fdbe3f87891a5c456ad5da721a064044db89ab66059dcb1a0f4ce3c5a84601f785a3f37de2d8ac9a15e118b5855e8b1e71f550774c54f714497e7eb8f7674
|
7
|
+
data.tar.gz: 8a9ff1a400a121b4759251733892dd49bcecb21e1bcf0e47b4718c039743f6102879f51cb44c790c88038b99d6739440b1a4786d0595b4a10e6ccc92032451d7
|
@@ -0,0 +1,62 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
runs-on: ubuntu-20.04
|
8
|
+
services:
|
9
|
+
postgres:
|
10
|
+
image: postgres:9.5
|
11
|
+
env:
|
12
|
+
POSTGRES_USER: postgres
|
13
|
+
POSTGRES_PASSWORD: postgres
|
14
|
+
ports:
|
15
|
+
- 5432:5432
|
16
|
+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
17
|
+
strategy:
|
18
|
+
fail-fast: false
|
19
|
+
matrix:
|
20
|
+
ruby: [2.4, 2.5, 2.6, 2.7, '3.0', 3.1]
|
21
|
+
gemfile: ['rails50', 'rails51', 'rails52', 'rails60', 'rails61', 'rails70']
|
22
|
+
exclude:
|
23
|
+
- ruby: 2.4
|
24
|
+
gemfile: rails60
|
25
|
+
- ruby: 2.4
|
26
|
+
gemfile: rails61
|
27
|
+
- ruby: 2.4
|
28
|
+
gemfile: rails70
|
29
|
+
- ruby: 2.5
|
30
|
+
gemfile: rails70
|
31
|
+
- ruby: 2.6
|
32
|
+
gemfile: rails70
|
33
|
+
- ruby: 3.0
|
34
|
+
gemfile: rails50
|
35
|
+
- ruby: 3.0
|
36
|
+
gemfile: rails51
|
37
|
+
- ruby: 3.0
|
38
|
+
gemfile: rails52
|
39
|
+
- ruby: 3.1
|
40
|
+
gemfile: rails50
|
41
|
+
- ruby: 3.1
|
42
|
+
gemfile: rails51
|
43
|
+
- ruby: 3.1
|
44
|
+
gemfile: rails52
|
45
|
+
|
46
|
+
name: ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}
|
47
|
+
|
48
|
+
env:
|
49
|
+
POSTGRES_USER: postgres
|
50
|
+
POSTGRES_PASSWORD: postgres
|
51
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
52
|
+
|
53
|
+
steps:
|
54
|
+
- uses: actions/checkout@v2
|
55
|
+
- uses: ruby/setup-ruby@v1
|
56
|
+
with:
|
57
|
+
ruby-version: ${{ matrix.ruby }}
|
58
|
+
bundler-cache: true
|
59
|
+
- name: Run test
|
60
|
+
run: |
|
61
|
+
bundle exec rspec spec/slonik_migration_spec.rb
|
62
|
+
bundle exec rspec spec/slonik_migration_task_spec.rb
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/gemfiles/rails60.gemfile
CHANGED
@@ -4,19 +4,30 @@ module SlonikMigration
|
|
4
4
|
class Config
|
5
5
|
class << self
|
6
6
|
def load
|
7
|
-
|
8
|
-
env = ENV['RAILS_ENV'] || 'development'
|
9
|
-
|
10
|
-
hash = if File.exist?(file)
|
11
|
-
YAML.load(ERB.new(IO.read(file)).result)[env]
|
12
|
-
else
|
13
|
-
{}
|
14
|
-
end
|
7
|
+
hash = load_file
|
15
8
|
OpenStruct.new(hash).freeze
|
16
9
|
end
|
17
10
|
|
18
11
|
private
|
19
12
|
|
13
|
+
def load_file
|
14
|
+
file = config_file
|
15
|
+
if File.exist?(file)
|
16
|
+
load_yaml(file).fetch(ENV['RAILS_ENV'] || 'development', {})
|
17
|
+
else
|
18
|
+
{}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def load_yaml(file)
|
23
|
+
yaml = ERB.new(IO.read(file)).result
|
24
|
+
if Gem::Version.new(Psych::VERSION) >= Gem::Version.new("4.0")
|
25
|
+
YAML.load(yaml, aliases: true)
|
26
|
+
else
|
27
|
+
YAML.load(yaml)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
20
31
|
def config_file
|
21
32
|
if ENV['CONFIG_FILE']
|
22
33
|
ENV['CONFIG_FILE']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slonik_migration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshikazu Kaneta
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-08 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
|
- CHANGELOG.md
|
108
108
|
- Gemfile
|
109
109
|
- LICENSE
|
@@ -113,6 +113,8 @@ files:
|
|
113
113
|
- gemfiles/rails51.gemfile
|
114
114
|
- gemfiles/rails52.gemfile
|
115
115
|
- gemfiles/rails60.gemfile
|
116
|
+
- gemfiles/rails61.gemfile
|
117
|
+
- gemfiles/rails70.gemfile
|
116
118
|
- lib/generators/slonik_migration/config_generator.rb
|
117
119
|
- lib/generators/slonik_migration/templates/slonik.yml
|
118
120
|
- lib/slonik_migration.rb
|
data/.travis.yml
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- 2.3
|
4
|
-
- 2.4
|
5
|
-
- 2.5
|
6
|
-
- 2.6
|
7
|
-
- 2.7
|
8
|
-
services:
|
9
|
-
- postgresql
|
10
|
-
addons:
|
11
|
-
postgresql: "9.5"
|
12
|
-
gemfile:
|
13
|
-
- gemfiles/rails50.gemfile
|
14
|
-
- gemfiles/rails51.gemfile
|
15
|
-
- gemfiles/rails52.gemfile
|
16
|
-
- gemfiles/rails60.gemfile
|
17
|
-
matrix:
|
18
|
-
exclude:
|
19
|
-
- rvm: 2.3
|
20
|
-
gemfile: gemfiles/rails60.gemfile
|
21
|
-
- rvm: 2.4
|
22
|
-
gemfile: gemfiles/rails60.gemfile
|
23
|
-
script:
|
24
|
-
- bundle exec rspec spec/slonik_migration_spec.rb
|
25
|
-
- bundle exec rspec spec/slonik_migration_task_spec.rb
|