boxing 0.6.2 → 0.7.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: bc21028b8c1cec59fa65a7625960e5148558949307af4ca0a67c113de3c13384
4
- data.tar.gz: f31e60e67183097d525671bf03314083e0f0616a4d6069c87005fbc5c069fd29
3
+ metadata.gz: 6369f2784f2e613f5779480d472aa20054385f6ef9c9edba6ad28b303df87238
4
+ data.tar.gz: 640b903e8871b8bf637a0f4cad9f74cbe0cea056c9a8456caf2558fb967ae430
5
5
  SHA512:
6
- metadata.gz: 0eddac800256df2f53666810539c6347703274bde008d7043309d096b27a7c083fd96a6ab854a84c0354b8387532689a8cc612da06ed310cc6a5c97b0f3d73ff
7
- data.tar.gz: de2c527ba2ce831900bf5942872b169faae0cb0b5fb4f931fecc7083745a7f5ab5b3631ce0f40380efeb5e0e650c2d7d8695c123aa019a613c267f6b593e1713
6
+ metadata.gz: 3a0904396731f7a2903c6579ea721f3d4375d24f8c4ee55d02f05bd5930e89d9e79fe9b7829b20c1c7afa53bd002643ccb1a1fcd22d6b7dd1fd39d43d22ebca4
7
+ data.tar.gz: 2b40b007d34d034562351f8da3c8feb1ae3f55540f0807ffaab3c6ba8fc59e404a27f59defb51e6e68193b6dd54ec6618048cfe79a6766e0ee73dc46318a47dd
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.7.0)
5
5
  bundler (~> 2.0)
6
6
  thor (~> 1.0)
7
7
 
data/lib/boxing/config.rb CHANGED
@@ -19,7 +19,7 @@ module Boxing
19
19
  @name = 'myapp'
20
20
  @root = '/srv/app'
21
21
  @port = 9292
22
- @health_path = '/status'
22
+ @health_check_path = '/status'
23
23
  @assets_precompile = false
24
24
 
25
25
  instance_exec(self, &block) if defined?(yield)
@@ -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.7.0'
5
5
  end
@@ -15,14 +15,12 @@ RUN gem install bundler:<%= Bundler::VERSION %> \
15
15
  && bundle config --local deployment 'true' \
16
16
  && bundle config --local frozen 'true' \
17
17
  && bundle config --local no-cache 'true' \
18
- && bundle config --local system 'true' \
19
18
  && bundle config --local without 'development test' \
20
19
  && bundle install -j "$(getconf _NPROCESSORS_ONLN)" \
21
- && find /${APP_ROOT}/vendor/bundle -type f -name '*.c' -delete \
22
- && find /${APP_ROOT}/vendor/bundle -type f -name '*.o' -delete \
23
- && find /usr/local/bundle -type f -name '*.c' -delete \
24
- && find /usr/local/bundle -type f -name '*.o' -delete \
25
- && rm -rf /usr/local/bundle/cache/*.gem
20
+ && find ${APP_ROOT}/vendor/bundle -type f -name '*.c' -delete \
21
+ && find ${APP_ROOT}/vendor/bundle -type f -name '*.h' -delete \
22
+ && find ${APP_ROOT}/vendor/bundle -type f -name '*.o' -delete \
23
+ && find ${APP_ROOT}/vendor/bundle -type f -name '*.gem' -delete
26
24
 
27
25
  <%- if config.assets_precompile -%>
28
26
  FROM node:${NODE_VERSION}-alpine as node
@@ -37,7 +35,7 @@ COPY --from=node /usr/local/bin/node /usr/local/bin/node
37
35
 
38
36
  COPY --from=gem /usr/local/bundle/config /usr/local/bundle/config
39
37
  COPY --from=gem /usr/local/bundle /usr/local/bundle
40
- COPY --from=gem /${APP_ROOT}/vendor/bundle /${APP_ROOT}/vendor/bundle
38
+ COPY --from=gem ${APP_ROOT}/vendor/bundle ${APP_ROOT}/vendor/bundle
41
39
 
42
40
  RUN mkdir -p ${APP_ROOT}
43
41
  COPY . ${APP_ROOT}
@@ -56,7 +54,7 @@ RUN apk add --no-cache <%= packages.select(&:runtime?).join(' ') %>
56
54
  <%- end -%>
57
55
  COPY --from=gem /usr/local/bundle/config /usr/local/bundle/config
58
56
  COPY --from=gem /usr/local/bundle /usr/local/bundle
59
- COPY --from=gem /${APP_ROOT}/vendor/bundle /${APP_ROOT}/vendor/bundle
57
+ COPY --from=gem ${APP_ROOT}/vendor/bundle ${APP_ROOT}/vendor/bundle
60
58
 
61
59
  RUN mkdir -p ${APP_ROOT}
62
60
 
metadata CHANGED
@@ -1,14 +1,14 @@
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.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - 蒼時弦也
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-21 00:00:00.000000000 Z
11
+ date: 2022-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler