boxing 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/boxing/context.rb +17 -6
- data/lib/boxing/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af8de757c6161777e9736f17b858e4c4bee3c47a9d169f6719b55d7407bcf9e5
|
4
|
+
data.tar.gz: f57afeca9dfa7b749bfebb470650abcb05a8bde3e15ce8d49cdf35f2372052eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9554a76aa1f1733e1f1927e69b2c132be8ad54d6c5419406ad4bfa7b03e871105bb811c990d633e58a3309767101d88362afdfc1b820e5d88aff7cfaa58e74ef
|
7
|
+
data.tar.gz: af9331633f264efb01af94ad17f52b57c5c3a41940082c5685e6d55df32fe8774d4a504717cfddf3a698bb013fb5123ad644902ec14cd2b11c03e80c85cb3501
|
data/Gemfile.lock
CHANGED
data/lib/boxing/context.rb
CHANGED
@@ -77,12 +77,11 @@ module Boxing
|
|
77
77
|
#
|
78
78
|
# @since 0.6.0
|
79
79
|
def extra_packages
|
80
|
-
Array[config.build_packages, config.runtime_packages].
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
end
|
80
|
+
Array[config.build_packages, config.runtime_packages].flatten.map do |name|
|
81
|
+
next if name.nil?
|
82
|
+
|
83
|
+
Package.new(name, mode: mode_of(name))
|
84
|
+
end.compact
|
86
85
|
end
|
87
86
|
|
88
87
|
# Return node.js version
|
@@ -104,5 +103,17 @@ module Boxing
|
|
104
103
|
def to_binding
|
105
104
|
binding
|
106
105
|
end
|
106
|
+
|
107
|
+
# Check Package Mode
|
108
|
+
#
|
109
|
+
# @return [Number]
|
110
|
+
#
|
111
|
+
# @since 0.6.3
|
112
|
+
def mode_of(name)
|
113
|
+
mode = 0
|
114
|
+
mode |= Package::BUILD if config.build_packages&.include?(name)
|
115
|
+
mode |= Package::RUNTIME if config.runtime_packages&.include?(name)
|
116
|
+
mode
|
117
|
+
end
|
107
118
|
end
|
108
119
|
end
|
data/lib/boxing/version.rb
CHANGED