migrate 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bake/migrate.rb +23 -0
- data/lib/migrate/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c93c8899de81d23efa209a6e6078421e699051c1417c3e9c0a49c52dc374e212
|
4
|
+
data.tar.gz: c80eaef5f71d3d984df8bc50b13a15f5f37b3d1df7fbff8501c0e8e754178f37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b045061080a89b577262f9b58c489dcc261d87ea379d02345438d0b4e8508baf1f6526bf75304aa7e06f0e8e521d8934e03f14e678a3b5bd46d7fafa09b1043c
|
7
|
+
data.tar.gz: 260ba7b196f4fce998a46a1e140ea462403688ee38965255857475940883ea7cb407d0d96a78eb1cdc884421f10a9d8c4abaaf9d22d31ddd1fc360b62b423730
|
data/bake/migrate.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
# @parameter paths [Array] Only apply the specified migrations.
|
3
|
+
def migrate(paths: nil)
|
4
|
+
require 'migrate/controller'
|
5
|
+
|
6
|
+
controller = Migrate::Controller.new
|
7
|
+
|
8
|
+
controller.migrate!
|
9
|
+
end
|
10
|
+
|
11
|
+
# @parameter name [String] the path for the new migration.
|
12
|
+
def create(name)
|
13
|
+
require 'migrate/controller'
|
14
|
+
|
15
|
+
controller = Migrate::Controller.new
|
16
|
+
|
17
|
+
path = controller.create!(name) do |file|
|
18
|
+
file.puts "\# migrate(...) do"
|
19
|
+
file.puts "\# end"
|
20
|
+
end
|
21
|
+
|
22
|
+
Console.logger.info(self, "Created migration at #{path}")
|
23
|
+
end
|
data/lib/migrate/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: migrate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: build-files
|
@@ -72,6 +72,7 @@ executables: []
|
|
72
72
|
extensions: []
|
73
73
|
extra_rdoc_files: []
|
74
74
|
files:
|
75
|
+
- bake/migrate.rb
|
75
76
|
- lib/migrate.rb
|
76
77
|
- lib/migrate/controller.rb
|
77
78
|
- lib/migrate/migration.rb
|
@@ -97,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
98
|
- !ruby/object:Gem::Version
|
98
99
|
version: '0'
|
99
100
|
requirements: []
|
100
|
-
rubygems_version: 3.2
|
101
|
+
rubygems_version: 3.1.2
|
101
102
|
signing_key:
|
102
103
|
specification_version: 4
|
103
104
|
summary: Generic library to support migrations.
|