prick 0.21.3 → 0.23.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: 0550a4891159d10478b94aa8837940a31aed031a9b3764e3e86cdceba095d833
4
- data.tar.gz: bcff9473fede146266c9803c0ac37bd70c33bd3ce1b6c25d27847c28be4420a8
3
+ metadata.gz: 46f2e0fa7ba46116e93b2e1e6f027a76e43e794724d83d49709a27c5df16b85e
4
+ data.tar.gz: baad024e6417d00e2917425df77728aa49eabd8af2f8e348bf6d5b885126f07b
5
5
  SHA512:
6
- metadata.gz: 2f583cff2b3754caa9dbc39e20cbc5dd23fcfe88c40f19838bbdb896d335df958a806aef98150676759fba8b98b0f524d76dfbf146a9d4f615423af2c6448ec7
7
- data.tar.gz: 7bf6f685aec49b77cb630505c9f419f7ee69c0a5d164b52a5915a154e145a9229f070e100c4e240cbbdf065249d5c4e8c422e3cc88d30479bac1a4fbc30fc05f
6
+ metadata.gz: 3f4181c28363697b22afa4a610837f599e6b22c3836bce579b1570fc3a729bac10b5efca99d38824b735a33e53a576ba426d96720e757602dca39e069675db9d
7
+ data.tar.gz: bd260d3c6b0476127a4f2fb5cba5a7631b8edebe5be7afe291314353e94c2cb25d18c3bba422b4129b707277735989b06bf5d05bfa5974e099194c5ad0f68452
data/TODO CHANGED
@@ -1,3 +1,12 @@
1
+ o Have the following entries
2
+
3
+ sql: SQL_STATEMENT
4
+ exec: BASH_COMMAND
5
+ eval: BASH_COMMAND
6
+ call:
7
+ ...
8
+
9
+
1
10
  o Use mikras_root(1) to be able to run from any subdirectory
2
11
  o Add 'prick build .' and 'prick make .'
3
12
 
data/exe/prick CHANGED
@@ -49,6 +49,13 @@ SPEC = %(
49
49
  init! -n,name=NAME -t,title=TITLE [DIRECTORY]
50
50
  Initializes a prick project
51
51
 
52
+ env! ENVIRONMENT
53
+ Set build environment in the prick context file. The environment is
54
+ accessible as $ENVIRONMENT in build.yml files and can be used to do
55
+ conditional builds. There are no built-in values for the environment but
56
+ 'production' and 'development' will be typical choices. Defaults to
57
+ 'development'
58
+
52
59
  setup!
53
60
  Create the database user (if necessary) and an empty database
54
61
 
@@ -162,6 +169,11 @@ begin
162
169
  when :version!
163
170
  puts "#{Prick.state.name}-#{Prick.state.version}"
164
171
 
172
+ when :env!
173
+ env = args.expect(1)
174
+ Prick.state.environment = env
175
+ Prick.state.save
176
+
165
177
  when :setup!
166
178
  Prick::SubCommand.setup(database, username)
167
179
 
@@ -202,7 +214,7 @@ begin
202
214
  Prick::SubCommand.drop_users(database)
203
215
  when :database
204
216
  Prick::SubCommand.drop_database(database)
205
- when :data, :schema, :database, :all
217
+ when :data, :schema
206
218
  raise NotImplementedError
207
219
  else
208
220
  raise Prick::Error, "Unknown subject: #{subject}"
@@ -46,7 +46,7 @@ module Prick
46
46
  unit = make_build_unit(parent, path)
47
47
  entries = YAML.load(File.read(path)) || []
48
48
  entries.each { |entry|
49
- if entry.is_a?(Hash)
49
+ if entry.is_a?(Hash) && (entry.size != 1 || entry.first.first != "sql")
50
50
  entry.each { |key, value|
51
51
  if key == "schema"
52
52
  unit.schema = value
data/lib/prick/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Prick
4
- VERSION = "0.21.3"
4
+ VERSION = "0.23.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.3
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-10 00:00:00.000000000 Z
11
+ date: 2023-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic