flgen 0.20.0 → 0.21.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/README.md +2 -0
- data/lib/flgen/context.rb +2 -2
- data/lib/flgen/file_list.rb +5 -1
- data/lib/flgen/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe67e7c60ca35355577e56501c46a5745fec3209091ae08adec482291480bfc2
|
4
|
+
data.tar.gz: b1b22bab5e3221f0b065d56cd280f6511430f7180954242e0adfc5e1d5199cb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a736ba945d947a72ddeccf2c1f09f0f75ed27aa9ec79fc59c81518619bd004094a96dd6911185f861371abeb8c25abc3ebe3b7fae4a1695b40c221e08b47b6c3
|
7
|
+
data.tar.gz: b4666bb3afdd53adf29f6a8f6c63d02e660e9c0558b9a5681bf2e33196360eeead5ca6d54a863918915fb3facd4bc57999c6b89c9bdb87d7d3a787c18d5eb4a7
|
data/README.md
CHANGED
@@ -47,6 +47,8 @@ FLGen prives APIs listed below to describe your filelists.
|
|
47
47
|
* Define a text macro.
|
48
48
|
* `macro?(name)`/`macro_defined?(name)`
|
49
49
|
* Return `true` if the given macro is defined.
|
50
|
+
* `macro(name)`
|
51
|
+
* Return the value of the given macro.
|
50
52
|
* `env?(name)`
|
51
53
|
* Return `true` if the givne environment variable is defined.
|
52
54
|
* `env(name)`
|
data/lib/flgen/context.rb
CHANGED
@@ -40,7 +40,7 @@ module FLGen
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def macros
|
43
|
-
@macros ||=
|
43
|
+
@macros ||= {}
|
44
44
|
end
|
45
45
|
|
46
46
|
def add_include_directory(directory)
|
@@ -106,7 +106,7 @@ module FLGen
|
|
106
106
|
|
107
107
|
def add_macro_definition(macro, value, predefined)
|
108
108
|
name = macro.to_sym
|
109
|
-
macros
|
109
|
+
macros[name] = value || true
|
110
110
|
add_macro_argument(name, value) unless predefined
|
111
111
|
end
|
112
112
|
|
data/lib/flgen/file_list.rb
CHANGED
@@ -50,11 +50,15 @@ module FLGen
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def macro?(macro)
|
53
|
-
@context.macros.
|
53
|
+
@context.macros.key?(macro.to_sym)
|
54
54
|
end
|
55
55
|
|
56
56
|
alias_method :macro_defined?, :macro?
|
57
57
|
|
58
|
+
def macro(name)
|
59
|
+
@context.macros[name.to_sym]
|
60
|
+
end
|
61
|
+
|
58
62
|
def env?(name)
|
59
63
|
ENV.key?(name.to_s)
|
60
64
|
end
|
data/lib/flgen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taichi Ishitani
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Filelist generator
|
14
14
|
email:
|
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
requirements: []
|
68
|
-
rubygems_version: 3.5.
|
68
|
+
rubygems_version: 3.5.9
|
69
69
|
signing_key:
|
70
70
|
specification_version: 4
|
71
71
|
summary: Filelist generator
|