prick 0.32.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/prick/environment.rb +17 -14
- data/lib/prick/local/fmt.rb +1 -1
- data/lib/prick/state.rb +2 -2
- data/lib/prick/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c38cab1d940acbbaf8c36dadfddd5ce8a003e45fd881c0af033ee16b9b1bcb9b
|
4
|
+
data.tar.gz: c9c67dd1b746adf191a2193c536a7c2a97a962f5a7b70c371ecf42bb60621cec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f81c8872d37f1b2f772c013c3fd1dad4f5936552aa8a6fa32b1b594d6da5ed20e06725590fd2a5317a8c9cda41b591845c6a68ec7ab4c2b82842b3fd2599c9c
|
7
|
+
data.tar.gz: 17c08c190070820e63facc09a7411c8f90b43f7994a8a5eefc04baa2c7f0a9647ec562ce000d0677289d922f56c5eae410f68d0b323e8f177df122c1167b9fec
|
data/lib/prick/environment.rb
CHANGED
@@ -75,8 +75,8 @@ module Prick
|
|
75
75
|
|
76
76
|
forward_to :effective_variables, :key?, :[], :[]=, :to_h, :empty?, :size, :each, :map
|
77
77
|
|
78
|
-
def bash() = "build_#{name}"
|
79
|
-
def super_bash() = (has_super? ? "build_#{name}_super" : nil)
|
78
|
+
def bash() = "build_#{name}" # FIXME build has been out-commented
|
79
|
+
def super_bash() = (has_super? ? "build_#{name}_super" : nil) # FIXME same
|
80
80
|
def bash_environment
|
81
81
|
effective_variables.map { |ident, value|
|
82
82
|
["PRICK_ENVIRONMENT_#{ident.upcase}", value]
|
@@ -89,9 +89,9 @@ module Prick
|
|
89
89
|
puts "#{name}:"
|
90
90
|
indent {
|
91
91
|
self.each { |ident,val|
|
92
|
-
|
93
|
-
|
94
|
-
|
92
|
+
# if ident == :build
|
93
|
+
# puts "super: #{super_environment&.name || 'false'}"
|
94
|
+
# end
|
95
95
|
assigner = assigners[ident]&.name || name
|
96
96
|
assigner_str = (assigner != name ? " (#{assigner})" : "")
|
97
97
|
if types[ident] == "TEXT"
|
@@ -146,7 +146,9 @@ module Prick
|
|
146
146
|
|
147
147
|
end
|
148
148
|
|
149
|
+
# FIXME build has been out-commented
|
149
150
|
def bash_command(environment = nil)
|
151
|
+
raise "Not available right now"
|
150
152
|
constrain environment, String, nil
|
151
153
|
if environment
|
152
154
|
env = self[environment] or raise "Unknown environment: '#{environment}'"
|
@@ -247,7 +249,7 @@ module Prick
|
|
247
249
|
when "STRING"
|
248
250
|
; # nop
|
249
251
|
when "LIST"
|
250
|
-
value = value
|
252
|
+
value = value&.split || []
|
251
253
|
when "TEXT"
|
252
254
|
value = value.chomp
|
253
255
|
when nil
|
@@ -321,7 +323,8 @@ module Prick
|
|
321
323
|
|
322
324
|
# Ignore if variable is assigned in the current environment and not the
|
323
325
|
# special :build attribute
|
324
|
-
|
326
|
+
# next if env.assignments.key?(ident) && ident != :build
|
327
|
+
next if env.assignments.key?(ident)
|
325
328
|
|
326
329
|
# Pool of ancestors. When an environment assigns a value, all ancestors
|
327
330
|
# of the environment are removed from the pool. If any remaining environment
|
@@ -340,9 +343,9 @@ module Prick
|
|
340
343
|
if ancestor.assignments.key?(ident)
|
341
344
|
# Remove all ancestors that are inherited by the assigning environment
|
342
345
|
pool -= ancestor.ancestors
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
+
# if ident == :build
|
347
|
+
# env.super_environment = ancestor #if ident == :build
|
348
|
+
# end
|
346
349
|
break
|
347
350
|
end
|
348
351
|
end
|
@@ -353,11 +356,11 @@ module Prick
|
|
353
356
|
while ancestor = queue.shift
|
354
357
|
next if !pool.include?(ancestor)
|
355
358
|
if ancestor.assign?(ident)
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
+
# if ident == :build && env.assign?(:build)
|
360
|
+
# env.super_environment = nil
|
361
|
+
# else
|
359
362
|
raise ArgumentError, "Ambigious definition of '#{ident}' in #{ancestor.name} environment"
|
360
|
-
|
363
|
+
# end
|
361
364
|
end
|
362
365
|
end
|
363
366
|
end
|
data/lib/prick/local/fmt.rb
CHANGED
data/lib/prick/state.rb
CHANGED
@@ -195,8 +195,8 @@ module Prick
|
|
195
195
|
"PRICK_ENVIRONMENT" => Prick.state.environment&.to_s, # may be the empty string
|
196
196
|
})
|
197
197
|
|
198
|
-
# PRICK_ENVIRONMENT_* variables
|
199
|
-
if !Prick.state.environment.nil?
|
198
|
+
# PRICK_ENVIRONMENT_* variables. Only defined if the environment is known
|
199
|
+
if !Prick.state.environment.nil? && environments.key?(environment)
|
200
200
|
hash.merge! environments[environment].bash_environment
|
201
201
|
end
|
202
202
|
end
|
data/lib/prick/version.rb
CHANGED
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.
|
4
|
+
version: 0.33.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: 2024-04-
|
11
|
+
date: 2024-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic
|