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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/boxing/config.rb +1 -1
- data/lib/boxing/context.rb +17 -6
- data/lib/boxing/version.rb +1 -1
- data/templates/Dockerfile.tt +6 -8
- 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: 6369f2784f2e613f5779480d472aa20054385f6ef9c9edba6ad28b303df87238
|
4
|
+
data.tar.gz: 640b903e8871b8bf637a0f4cad9f74cbe0cea056c9a8456caf2558fb967ae430
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a0904396731f7a2903c6579ea721f3d4375d24f8c4ee55d02f05bd5930e89d9e79fe9b7829b20c1c7afa53bd002643ccb1a1fcd22d6b7dd1fd39d43d22ebca4
|
7
|
+
data.tar.gz: 2b40b007d34d034562351f8da3c8feb1ae3f55540f0807ffaab3c6ba8fc59e404a27f59defb51e6e68193b6dd54ec6618048cfe79a6766e0ee73dc46318a47dd
|
data/Gemfile.lock
CHANGED
data/lib/boxing/config.rb
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
data/templates/Dockerfile.tt
CHANGED
@@ -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
|
22
|
-
&& find
|
23
|
-
&& find /
|
24
|
-
&& find /
|
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
|
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
|
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.
|
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-
|
11
|
+
date: 2022-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|