slonik_migration 1.1.3 → 1.2.1
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 +80 -0
- data/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/gemfiles/rails50.gemfile +1 -0
- data/gemfiles/rails51.gemfile +1 -0
- data/gemfiles/rails52.gemfile +1 -0
- data/gemfiles/rails60.gemfile +1 -0
- data/gemfiles/rails61.gemfile +5 -0
- data/gemfiles/rails70.gemfile +5 -0
- data/gemfiles/rails71.gemfile +5 -0
- data/lib/generators/slonik_migration/config_generator.rb +2 -0
- data/lib/slonik_migration/command.rb +2 -0
- data/lib/slonik_migration/config.rb +21 -8
- data/lib/slonik_migration/extension.rb +2 -0
- data/lib/slonik_migration/railtie.rb +2 -0
- data/lib/slonik_migration/version.rb +3 -1
- data/lib/slonik_migration.rb +2 -0
- data/lib/tasks/slonik_migration.rake +2 -0
- metadata +10 -7
- 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: 6e91f59938392524c23e33e477734c3faa88b512900ebab204d2f5c49c19f839
|
4
|
+
data.tar.gz: b87cb6f4e6f518b974f43393ed28bf4c97a5abd14c835e39ae211e202865387d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80d8c5a880b0b5f8bd7184a785affd795e9f6c0f255aa22ef305eaa855e3119dfebbcc0f9f41c12912784f504d4fcb2f142c1c9c9b6e1749ba8c1611b65a2653
|
7
|
+
data.tar.gz: 8c88b74567361e765339afe6554512d8f726f1ab555ea262c97c0c77e3daf4f23fa9f37ef2dd3adc6098dc40e624270dd14ad46bd65b4e2017b7b95b2a1014eb
|
@@ -0,0 +1,80 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
runs-on: ubuntu-22.04
|
8
|
+
services:
|
9
|
+
postgres:
|
10
|
+
image: postgres:15
|
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, 3.2, 3.3]
|
21
|
+
gemfile: ['rails50', 'rails51', 'rails52', 'rails60', 'rails61', 'rails70', 'rails71']
|
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.4
|
30
|
+
gemfile: rails71
|
31
|
+
- ruby: 2.5
|
32
|
+
gemfile: rails70
|
33
|
+
- ruby: 2.5
|
34
|
+
gemfile: rails71
|
35
|
+
- ruby: 2.6
|
36
|
+
gemfile: rails70
|
37
|
+
- ruby: 2.6
|
38
|
+
gemfile: rails71
|
39
|
+
- ruby: 3.0
|
40
|
+
gemfile: rails50
|
41
|
+
- ruby: 3.0
|
42
|
+
gemfile: rails51
|
43
|
+
- ruby: 3.0
|
44
|
+
gemfile: rails52
|
45
|
+
- ruby: 3.1
|
46
|
+
gemfile: rails50
|
47
|
+
- ruby: 3.1
|
48
|
+
gemfile: rails51
|
49
|
+
- ruby: 3.1
|
50
|
+
gemfile: rails52
|
51
|
+
- ruby: 3.2
|
52
|
+
gemfile: rails50
|
53
|
+
- ruby: 3.2
|
54
|
+
gemfile: rails51
|
55
|
+
- ruby: 3.2
|
56
|
+
gemfile: rails52
|
57
|
+
- ruby: 3.3
|
58
|
+
gemfile: rails50
|
59
|
+
- ruby: 3.3
|
60
|
+
gemfile: rails51
|
61
|
+
- ruby: 3.3
|
62
|
+
gemfile: rails52
|
63
|
+
|
64
|
+
name: ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}
|
65
|
+
|
66
|
+
env:
|
67
|
+
POSTGRES_USER: postgres
|
68
|
+
POSTGRES_PASSWORD: postgres
|
69
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
70
|
+
|
71
|
+
steps:
|
72
|
+
- uses: actions/checkout@v4
|
73
|
+
- uses: ruby/setup-ruby@v1
|
74
|
+
with:
|
75
|
+
ruby-version: ${{ matrix.ruby }}
|
76
|
+
bundler-cache: true
|
77
|
+
- name: Run test
|
78
|
+
run: |
|
79
|
+
bundle exec rspec spec/slonik_migration_spec.rb
|
80
|
+
bundle exec rspec spec/slonik_migration_task_spec.rb
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/gemfiles/rails50.gemfile
CHANGED
data/gemfiles/rails51.gemfile
CHANGED
data/gemfiles/rails52.gemfile
CHANGED
data/gemfiles/rails60.gemfile
CHANGED
@@ -1,22 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'ostruct'
|
2
4
|
|
3
5
|
module SlonikMigration
|
4
6
|
class Config
|
5
7
|
class << self
|
6
8
|
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
|
9
|
+
hash = load_file
|
15
10
|
OpenStruct.new(hash).freeze
|
16
11
|
end
|
17
12
|
|
18
13
|
private
|
19
14
|
|
15
|
+
def load_file
|
16
|
+
file = config_file
|
17
|
+
if File.exist?(file)
|
18
|
+
load_yaml(file).fetch(ENV['RAILS_ENV'] || 'development', {})
|
19
|
+
else
|
20
|
+
{}
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def load_yaml(file)
|
25
|
+
yaml = ERB.new(IO.read(file)).result
|
26
|
+
if Gem::Version.new(Psych::VERSION) >= Gem::Version.new("4.0")
|
27
|
+
YAML.load(yaml, aliases: true)
|
28
|
+
else
|
29
|
+
YAML.load(yaml)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
20
33
|
def config_file
|
21
34
|
if ENV['CONFIG_FILE']
|
22
35
|
ENV['CONFIG_FILE']
|
data/lib/slonik_migration.rb
CHANGED
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.1
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshikazu Kaneta
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-23 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,9 @@ files:
|
|
113
113
|
- gemfiles/rails51.gemfile
|
114
114
|
- gemfiles/rails52.gemfile
|
115
115
|
- gemfiles/rails60.gemfile
|
116
|
+
- gemfiles/rails61.gemfile
|
117
|
+
- gemfiles/rails70.gemfile
|
118
|
+
- gemfiles/rails71.gemfile
|
116
119
|
- lib/generators/slonik_migration/config_generator.rb
|
117
120
|
- lib/generators/slonik_migration/templates/slonik.yml
|
118
121
|
- lib/slonik_migration.rb
|
@@ -126,7 +129,7 @@ files:
|
|
126
129
|
homepage: https://github.com/kanety/slonik_migration
|
127
130
|
licenses: []
|
128
131
|
metadata: {}
|
129
|
-
post_install_message:
|
132
|
+
post_install_message:
|
130
133
|
rdoc_options: []
|
131
134
|
require_paths:
|
132
135
|
- lib
|
@@ -141,8 +144,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
144
|
- !ruby/object:Gem::Version
|
142
145
|
version: '0'
|
143
146
|
requirements: []
|
144
|
-
rubygems_version: 3.
|
145
|
-
signing_key:
|
147
|
+
rubygems_version: 3.3.3
|
148
|
+
signing_key:
|
146
149
|
specification_version: 4
|
147
150
|
summary: A rails migration gem for slony
|
148
151
|
test_files: []
|
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
|