boxing 0.3.1 → 0.4.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: bc45fc502d0e92045969b463a8371bfd70c0375903be656554d0b0523a4e54db
4
- data.tar.gz: 2f65fa15db1b98e7f2c8b58c592fdef26feb484408d1bdc75329f882b0561f6c
3
+ metadata.gz: 747c1ce612416684731778d49c0b85eaf1630d01a305c9a96494e5828d7c0cbc
4
+ data.tar.gz: fe4025de518fce98279332c9dd5565294966d6b55e6a5bd60bcb09da5672bd8d
5
5
  SHA512:
6
- metadata.gz: b3d12460d64bd448880826172ea91393f58ea1b2e44178ae343da1ca2023909a45b2ff1d3c7afc5efcb7b8f0657c8f99d2490d633638cfef45ae2f28ecb176c5
7
- data.tar.gz: 0c8ba08ef084fe5881e8cb90b54ff1d9486abe2de905d21103346b4e445962dbe488c714aac8fe8d599319036d795fd0ac4cef9e9db83680b331e8106fe4e721
6
+ metadata.gz: 075d91ba4af2033ca7f2f55d7d3414dbc9b718f882e6531ed854609469a268ca85c13898c3c5c3e571c4039f0a00b3828a54c6493d5717a59cb30312111317b5
7
+ data.tar.gz: 15a7c46db72f0c0e481bfbd6af6abecd69e8ac077b3f66bf971a7c98cbb7e33d33b5f87378b3afeb8126f8d00ab0d80a961b49098c6a161884126f5573e8e28e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- boxing (0.3.1)
4
+ boxing (0.4.0)
5
5
  bundler (~> 2.0)
6
6
  thor (~> 1.0)
7
7
 
data/README.md CHANGED
@@ -93,6 +93,7 @@ bundle exec boxing update
93
93
  * [ ] Package Database
94
94
  * [x] Built-in (Move to standalone repoistory in future)
95
95
  * [x] Standalone Repoistory
96
+ * [x] Support gems from `git` repoistory
96
97
  * [x] Customize Source
97
98
  * [ ] Base Image
98
99
  * [x] Alpine
@@ -20,11 +20,14 @@ module Boxing
20
20
  #
21
21
  # @since 0.1.0
22
22
  def packages
23
- @packages ||= Set.new(
24
- @dependencies
25
- .map(&:name)
26
- .flat_map { |name| @database.package_for(name).to_a }
27
- )
23
+ @packages ||=
24
+ Set
25
+ .new(default_packages)
26
+ .merge(
27
+ @dependencies
28
+ .map(&:name)
29
+ .flat_map { |name| @database.package_for(name).to_a }
30
+ )
28
31
  end
29
32
 
30
33
  # Check rubygems exists
@@ -38,6 +41,29 @@ module Boxing
38
41
  @dependencies.any? { |dep| names.include?(dep.name) }
39
42
  end
40
43
 
44
+ # Does any gem from git
45
+ #
46
+ # @return [TrueClass|FalseClass]
47
+ #
48
+ # @since 0.4.0
49
+ def git?
50
+ pp @dependencies
51
+ @dependencies.any?(&:git)
52
+ end
53
+
54
+ # Default packages
55
+ #
56
+ # @return [Array<Boxing::Package>]
57
+ #
58
+ # @since 0.4.0
59
+ def default_packages
60
+ [
61
+ Package.new('build-base', mode: Package::BUILD)
62
+ ]
63
+ .push(git? ? Package.new('git', mode: Package::BUILD) : nil)
64
+ .compact
65
+ end
66
+
41
67
  # Convert to binding
42
68
  #
43
69
  # @return [Binding]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Boxing
4
- VERSION = '0.3.1'
4
+ VERSION = '0.4.0'
5
5
  end
@@ -4,7 +4,7 @@ ARG RUBY_VERSION=<%= RUBY_VERSION %>
4
4
  FROM ruby:${RUBY_VERSION}-alpine AS gem
5
5
  ARG APP_ROOT
6
6
 
7
- RUN apk add --no-cache build-base <%= packages.select(&:build?).join(' ') %>
7
+ RUN apk add --no-cache <%= packages.select(&:build?).join(' ') %>
8
8
 
9
9
  RUN mkdir -p ${APP_ROOT}
10
10
  COPY Gemfile Gemfile.lock ${APP_ROOT}/
@@ -29,9 +29,6 @@ ARG APP_ROOT
29
29
  <%- if packages.select(&:runtime?).any? -%>
30
30
  RUN apk add --no-cache <%= packages.select(&:runtime?).join(' ') %>
31
31
 
32
- ARG REVISION
33
- ENV REVISION $REVISION
34
-
35
32
  <%- end -%>
36
33
  COPY --from=gem /usr/local/bundle/config /usr/local/bundle/config
37
34
  COPY --from=gem /usr/local/bundle /usr/local/bundle
@@ -46,6 +43,9 @@ ENV RAILS_LOG_TO_STDOUT=true
46
43
  ENV APP_ROOT=$APP_ROOT
47
44
 
48
45
  COPY . ${APP_ROOT}
46
+
47
+ ARG REVISION
48
+ ENV REVISION $REVISION
49
49
  RUN echo $REVISION > ${SERVER_ROOT}/REVISION
50
50
 
51
51
  # Apply Execute Permission
@@ -8,8 +8,10 @@ docker-compose*.yml
8
8
  # CI/CD
9
9
  .github/
10
10
  .cache/
11
+ .circleci/
11
12
  coverage/
12
13
  spec/
14
+ test/
13
15
  features/
14
16
  .gitlab-ci.yml
15
17
  .travis.yml
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.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - 蒼時弦也
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-29 00:00:00.000000000 Z
11
+ date: 2021-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler