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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '068edcb37106f1848382dbe09a797743785b6ce15a3f3fd774b0026e272cd967'
4
- data.tar.gz: 179111bfdcb3a20bd0f051eca9d8ddf0766fb5e11971e118d441ffd6db33dce1
3
+ metadata.gz: c93c8899de81d23efa209a6e6078421e699051c1417c3e9c0a49c52dc374e212
4
+ data.tar.gz: c80eaef5f71d3d984df8bc50b13a15f5f37b3d1df7fbff8501c0e8e754178f37
5
5
  SHA512:
6
- metadata.gz: fbfd24c35f7405d2b182a77edfb5e66fe9f543738b4b64b76c39ae0e064d6bc83768f004bed53ba112ea4f251332d370587a2a6caa951e2f4f5b2cae42be4bb3
7
- data.tar.gz: 7ba48b03e573813efe4e88f34c13c333a385890b38a938100c1f624e838fd349ffd2d43ce56e9d13fdfb2e3787e5d0e0d0dad1e46f34e9911d3f244564a70aa7
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
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Migrate
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
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.0
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-22 00:00:00.000000000 Z
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.3
101
+ rubygems_version: 3.1.2
101
102
  signing_key:
102
103
  specification_version: 4
103
104
  summary: Generic library to support migrations.