prick 0.22.0 → 0.24.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: 0abcf31dce923144b50de361488a1735e88a835a1ee35b6a01d3e45ea170f15a
4
- data.tar.gz: 9917c1a6d630b034849cc1e1a10bebc2d871ea29c61867b61246b4b714f508bb
3
+ metadata.gz: b5065121dced32d8bbf1853dfcfe608b8da79dace4fb92e195bd48b1c0786e05
4
+ data.tar.gz: a1ee387900d3935dfe4ed63c52aae1a9d81b0b6e351bfaedd0b634b3ab59e4fb
5
5
  SHA512:
6
- metadata.gz: e9c68ea9d1894decd7d65a15002246b2c460b757c0987062e0ec419befab12fa334e3e7c089fa09e54a18337a53855fd735ef366353e726ff0d4dad1f343b9f1
7
- data.tar.gz: 95ac406592fb8e32c22469d9937adbfd3cd1b8dd713cbe37f8522135b03bb5287a9cfd8eb8acbe7c910624b0dc443038cc3afcda03ae36bdf8db1e51fb191511
6
+ metadata.gz: 19f8db7776250e9eb1d159009ebd77444ef4b3d6af2baa6ddb877607eb36b876426da5ff4c13bcf44b61a615c11abb1e2dcaf199e4a3eb412e8afe03cfad7ed6
7
+ data.tar.gz: f7cd6e6fbaeeb6b619695d5e6ebf3441b4171da80ee30535ee63504a1c29dd8a6364b3169c1d6d2644752cbf9eacf038e30648b53640394f9da3af60526ed231
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
 
@@ -114,7 +121,7 @@ opts, args = ShellOpts.process(SPEC, ARGV, exception: true)
114
121
 
115
122
  begin
116
123
  # Handle verbose and quiet
117
- $verbose = opts.verbose
124
+ $verbose = opts.verbose?
118
125
  $quiet = opts.quiet?
119
126
 
120
127
  # Honor -C option
@@ -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}"
@@ -57,7 +57,7 @@ module Prick
57
57
  kind = nil
58
58
  batch = nil
59
59
 
60
- for node in [init_nodes, decl_nodes, fox_seed_nodes, sql_seed_nodes, term_nodes].flatten
60
+ for node in [init_nodes, decl_nodes, fox_seed_nodes, sql_seed_nodes, term_nodes.reverse].flatten
61
61
  case node.kind
62
62
  when :module
63
63
  if batch&.kind != :module
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.22.0"
4
+ VERSION = "0.24.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.22.0
4
+ version: 0.24.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-13 00:00:00.000000000 Z
11
+ date: 2023-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic