sequel_migrations_toys 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/sequel_migrations_toys/template.rb +1 -1
- data/lib/sequel_migrations_toys/template/run.rb +4 -3
- data/lib/sequel_migrations_toys/version.rb +1 -1
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '024681247b06fbb597f4199ac22089048f88d73eaf6889d76ae3727097632f81'
|
4
|
+
data.tar.gz: 3d5ac229bfcee55effbbf2af0224e9ac9ed9cf58233d7af7cfeae91761f9ba78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf52f816b89ae1b63e42ce725ff5687bc3d460614fdb8d948bbceef49fd68ffbbd960fb29e3137f2e317d3b449f52efcfc198505d63b9c5a45e065dfc7f29598
|
7
|
+
data.tar.gz: e21cb857354c7d2ea311a41ed4e5d2b4c2f9584529e3d5e833a4d8329e32b4ecd607f47839393d418a3d85196724fd96312a4a2f64895094458fab95ee1ef8f0
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -38,7 +38,7 @@ expand SequelMigrationsToys::Template,
|
|
38
38
|
# optional, has such default
|
39
39
|
db_migrations_dir: 'db/migrations',
|
40
40
|
db_connection_proc: (proc do
|
41
|
-
require "#{context_directory}/
|
41
|
+
require "#{context_directory}/application"
|
42
42
|
MyProject::Application.db_connection
|
43
43
|
end)
|
44
44
|
|
@@ -9,7 +9,7 @@ module SequelMigrationsToys
|
|
9
9
|
|
10
10
|
attr_reader :db_migrations_dir, :db_connection_proc
|
11
11
|
|
12
|
-
def initialize(db_migrations_dir: 'db/migrations'
|
12
|
+
def initialize(db_connection_proc:, db_migrations_dir: 'db/migrations')
|
13
13
|
@db_migrations_dir = db_migrations_dir
|
14
14
|
@db_connection_proc = db_connection_proc
|
15
15
|
end
|
@@ -12,19 +12,20 @@ module SequelMigrationsToys
|
|
12
12
|
|
13
13
|
flag :target, '-t', '--target=VERSION'
|
14
14
|
flag :current, '-c', '--current=VERSION', default: 'current'
|
15
|
+
flag :dump, '--[no-]dump', default: true
|
15
16
|
flag :force, '-f', '--force', desc: 'Allow missing migration files'
|
16
17
|
|
17
|
-
SEQUEL_EXTENSIONS = %i[migration inflector].freeze
|
18
|
+
self::SEQUEL_EXTENSIONS = %i[migration inflector].freeze
|
18
19
|
|
19
20
|
to_run do
|
20
21
|
@template = template
|
21
22
|
|
22
23
|
## PSQL tools or analog are required
|
23
|
-
exec_tool 'database:dump'
|
24
|
+
exec_tool 'database:dump' if dump
|
24
25
|
|
25
26
|
## https://github.com/jeremyevans/sequel/issues/1182#issuecomment-217696754
|
26
27
|
require 'sequel'
|
27
|
-
SEQUEL_EXTENSIONS.each { |extension| Sequel.extension extension }
|
28
|
+
self.class::SEQUEL_EXTENSIONS.each { |extension| Sequel.extension extension }
|
28
29
|
|
29
30
|
Sequel::Migrator.run(
|
30
31
|
@template.db_connection, @template.db_migrations_dir, options
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel_migrations_toys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Popov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: alt_memery
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.12.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.12.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry-byebug
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,42 +86,42 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.8.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.8.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: toys
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.12.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.12.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: codecov
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.5.0
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.5.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rspec
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,28 +142,28 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
145
|
+
version: 0.21.2
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
152
|
+
version: 0.21.2
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rubocop
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 1.4.0
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 1.4.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rubocop-performance
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: '
|
187
|
+
version: '2.0'
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: '
|
194
|
+
version: '2.0'
|
195
195
|
description: 'Toys template for Sequel migrations.
|
196
196
|
|
197
197
|
'
|
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
241
|
- !ruby/object:Gem::Version
|
242
242
|
version: '0'
|
243
243
|
requirements: []
|
244
|
-
rubygems_version: 3.
|
244
|
+
rubygems_version: 3.2.22
|
245
245
|
signing_key:
|
246
246
|
specification_version: 4
|
247
247
|
summary: Toys template for Sequel migrations.
|