prick 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prick/program.rb +1 -1
- data/lib/prick/project.rb +10 -0
- data/lib/prick/schema.rb +2 -1
- data/lib/prick/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3009c0da5619e908746d98eefe922851d886105d10b6bc49cc0295cf47a50033
|
4
|
+
data.tar.gz: 3ee5cd54a3b29171306c3ad2fe8ea10c2e6d1ad84e1b8446b6314770c6734aef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ee1ce2cd13293542db575cbbf5d955f542eff9b3cc6e4b87027800e7b0effb12ca134df2665f6a2a240cb0c191cd2fc9e5cca9b943c307591b499e75d27b5db
|
7
|
+
data.tar.gz: 7f81e321f4875bce049b5adf7eb7fe7394a8112135d13b73ebdd48680b014329517e7137df419f504861a2d855243d37dfcafc2f67226fef57c537e28dd27dde
|
data/lib/prick/program.rb
CHANGED
data/lib/prick/project.rb
CHANGED
@@ -162,6 +162,16 @@ module Prick
|
|
162
162
|
self
|
163
163
|
end
|
164
164
|
|
165
|
+
def prepare_schema(name, commit: true)
|
166
|
+
path = File.join(SCHEMA_DIR, name)
|
167
|
+
FileUtils.mkdir_p(path)
|
168
|
+
Git.add Share.cp("schema/schema.sql", path, clobber: false, templates: { 'SCHEMA' => name })
|
169
|
+
Git.add Share.cp("schema/build.yml", path, clobber: false)
|
170
|
+
File.open(Schema.yml_file, "a") { |f| f.write("- #{name}\n") }
|
171
|
+
Git.add(Schema.yml_file)
|
172
|
+
submit "Added schema #{name}", commit
|
173
|
+
end
|
174
|
+
|
165
175
|
def prepare_diff(from_version = version)
|
166
176
|
begin
|
167
177
|
from_name = "#{name}-base"
|
data/lib/prick/schema.rb
CHANGED
@@ -9,7 +9,8 @@ module Prick
|
|
9
9
|
|
10
10
|
# Note this models the SCHEMA_DIR directory, not a database schema
|
11
11
|
class Schema
|
12
|
-
def yml_file()
|
12
|
+
def yml_file() self.class.yml_file end
|
13
|
+
def self.yml_file() SchemaBuilder.yml_file(SCHEMA_DIR) end
|
13
14
|
|
14
15
|
def version() SchemaVersion.load end
|
15
16
|
def version=(version) SchemaVersion.new(version).write end
|
data/lib/prick/version.rb
CHANGED