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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc21028b8c1cec59fa65a7625960e5148558949307af4ca0a67c113de3c13384
4
- data.tar.gz: f31e60e67183097d525671bf03314083e0f0616a4d6069c87005fbc5c069fd29
3
+ metadata.gz: af8de757c6161777e9736f17b858e4c4bee3c47a9d169f6719b55d7407bcf9e5
4
+ data.tar.gz: f57afeca9dfa7b749bfebb470650abcb05a8bde3e15ce8d49cdf35f2372052eb
5
5
  SHA512:
6
- metadata.gz: 0eddac800256df2f53666810539c6347703274bde008d7043309d096b27a7c083fd96a6ab854a84c0354b8387532689a8cc612da06ed310cc6a5c97b0f3d73ff
7
- data.tar.gz: de2c527ba2ce831900bf5942872b169faae0cb0b5fb4f931fecc7083745a7f5ab5b3631ce0f40380efeb5e0e650c2d7d8695c123aa019a613c267f6b593e1713
6
+ metadata.gz: 9554a76aa1f1733e1f1927e69b2c132be8ad54d6c5419406ad4bfa7b03e871105bb811c990d633e58a3309767101d88362afdfc1b820e5d88aff7cfaa58e74ef
7
+ data.tar.gz: af9331633f264efb01af94ad17f52b57c5c3a41940082c5685e6d55df32fe8774d4a504717cfddf3a698bb013fb5123ad644902ec14cd2b11c03e80c85cb3501
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- boxing (0.6.2)
4
+ boxing (0.6.3)
5
5
  bundler (~> 2.0)
6
6
  thor (~> 1.0)
7
7
 
@@ -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].compact.flat_map do |name|
81
- mode = 0
82
- mode |= Package::BUILD if config.build_packages&.include?(name)
83
- mode |= Package::RUNTIME if config.runtime_packages&.include?(name)
84
- Package.new(name, mode: mode)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Boxing
4
- VERSION = '0.6.2'
4
+ VERSION = '0.6.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - 蒼時弦也