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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98dae1ae969be39dba2d394c5ef973837bddd75b57e95a50984369b9b63b68a9
4
- data.tar.gz: 2d346ef2b8b6ea0bde7c6a0442278f9c9a3132a8268555417790f7cd5f45a936
3
+ metadata.gz: 3009c0da5619e908746d98eefe922851d886105d10b6bc49cc0295cf47a50033
4
+ data.tar.gz: 3ee5cd54a3b29171306c3ad2fe8ea10c2e6d1ad84e1b8446b6314770c6734aef
5
5
  SHA512:
6
- metadata.gz: fe461c8c031c7279cdd53329b92808a92367939841d30c4e7a995ae2c42e089fbdf0c8e143beef9997512bb94dc0b2c838df83d8990b545a27dec1ab94e0f3ba
7
- data.tar.gz: 03cd1324f95be8e3672cc0e1a05e1818c287d62e786a4ac27eebf42d9f71151766d7002f1f19de0c1f44b86568797e80d96e6209103661ba1d4cb8132d959ca8
6
+ metadata.gz: 7ee1ce2cd13293542db575cbbf5d955f542eff9b3cc6e4b87027800e7b0effb12ca134df2665f6a2a240cb0c191cd2fc9e5cca9b943c307591b499e75d27b5db
7
+ data.tar.gz: 7f81e321f4875bce049b5adf7eb7fe7394a8112135d13b73ebdd48680b014329517e7137df419f504861a2d855243d37dfcafc2f67226fef57c537e28dd27dde
data/lib/prick/program.rb CHANGED
@@ -162,7 +162,7 @@ module Prick
162
162
  end
163
163
 
164
164
  def prepare_schema(name)
165
- raise NotYet
165
+ project.prepare_schema(name)
166
166
  end
167
167
 
168
168
  def prepare_diff(version = nil)
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() SchemaBuilder.yml_file(SCHEMA_DIR) end
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
@@ -4,7 +4,7 @@
4
4
 
5
5
  # Required by gem
6
6
  module Prick
7
- VERSION = "0.8.0"
7
+ VERSION = "0.9.0"
8
8
  end
9
9
 
10
10
  # Project related code starts here
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen