boxing 0.7.0 → 0.8.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: 6369f2784f2e613f5779480d472aa20054385f6ef9c9edba6ad28b303df87238
4
- data.tar.gz: 640b903e8871b8bf637a0f4cad9f74cbe0cea056c9a8456caf2558fb967ae430
3
+ metadata.gz: ab97ea8a0276e762c9cd0f5736f19175fd233d4f552462c8fb1faadc8a121086
4
+ data.tar.gz: c5224a0d0ca31c95dff6b1ab6a021951f226acc935e8db4c7b73ea4154dd49b1
5
5
  SHA512:
6
- metadata.gz: 3a0904396731f7a2903c6579ea721f3d4375d24f8c4ee55d02f05bd5930e89d9e79fe9b7829b20c1c7afa53bd002643ccb1a1fcd22d6b7dd1fd39d43d22ebca4
7
- data.tar.gz: 2b40b007d34d034562351f8da3c8feb1ae3f55540f0807ffaab3c6ba8fc59e404a27f59defb51e6e68193b6dd54ec6618048cfe79a6766e0ee73dc46318a47dd
6
+ metadata.gz: 737444f78fcd82b5db9a7613e36756ade56cef14d479ed9e60465a68c48a1402fb301de6111174ba0ad6f2e4d1aa3ae12e56f6470569d8f81bf65eda0de498ff
7
+ data.tar.gz: abec7450d007e6eba5dd33b682c6bee3ef2b3d88ea7d28443af281305c9b46258f71c1ab75ee473bfc464e00678a22236a3b1440b93641b70eec50e1d2a7e70e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- boxing (0.7.0)
4
+ boxing (0.8.0)
5
5
  bundler (~> 2.0)
6
6
  thor (~> 1.0)
7
7
 
@@ -9,51 +9,51 @@ GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  ast (2.4.2)
12
- bundler-audit (0.9.0.1)
12
+ bundler-audit (0.9.1)
13
13
  bundler (>= 1.2.0, < 3)
14
14
  thor (~> 1.0)
15
15
  childprocess (4.1.0)
16
- diff-lcs (1.4.4)
16
+ diff-lcs (1.5.0)
17
17
  docile (1.4.0)
18
18
  iniparse (1.5.0)
19
- overcommit (0.58.0)
19
+ overcommit (0.59.1)
20
20
  childprocess (>= 0.6.3, < 5)
21
21
  iniparse (~> 1.4)
22
22
  rexml (~> 3.2)
23
- parallel (1.21.0)
24
- parser (3.0.3.2)
23
+ parallel (1.22.1)
24
+ parser (3.1.2.0)
25
25
  ast (~> 2.4.1)
26
- rainbow (3.0.0)
26
+ rainbow (3.1.1)
27
27
  rake (13.0.6)
28
- regexp_parser (2.2.0)
28
+ regexp_parser (2.4.0)
29
29
  rexml (3.2.5)
30
- rspec (3.10.0)
31
- rspec-core (~> 3.10.0)
32
- rspec-expectations (~> 3.10.0)
33
- rspec-mocks (~> 3.10.0)
34
- rspec-core (3.10.1)
35
- rspec-support (~> 3.10.0)
36
- rspec-expectations (3.10.1)
30
+ rspec (3.11.0)
31
+ rspec-core (~> 3.11.0)
32
+ rspec-expectations (~> 3.11.0)
33
+ rspec-mocks (~> 3.11.0)
34
+ rspec-core (3.11.0)
35
+ rspec-support (~> 3.11.0)
36
+ rspec-expectations (3.11.0)
37
37
  diff-lcs (>= 1.2.0, < 2.0)
38
- rspec-support (~> 3.10.0)
39
- rspec-mocks (3.10.2)
38
+ rspec-support (~> 3.11.0)
39
+ rspec-mocks (3.11.1)
40
40
  diff-lcs (>= 1.2.0, < 2.0)
41
- rspec-support (~> 3.10.0)
42
- rspec-support (3.10.3)
43
- rubocop (1.23.0)
41
+ rspec-support (~> 3.11.0)
42
+ rspec-support (3.11.0)
43
+ rubocop (1.30.0)
44
44
  parallel (~> 1.10)
45
- parser (>= 3.0.0.0)
45
+ parser (>= 3.1.0.0)
46
46
  rainbow (>= 2.2.2, < 4.0)
47
47
  regexp_parser (>= 1.8, < 3.0)
48
- rexml
49
- rubocop-ast (>= 1.12.0, < 2.0)
48
+ rexml (>= 3.2.5, < 4.0)
49
+ rubocop-ast (>= 1.18.0, < 2.0)
50
50
  ruby-progressbar (~> 1.7)
51
51
  unicode-display_width (>= 1.4.0, < 3.0)
52
- rubocop-ast (1.15.0)
53
- parser (>= 3.0.1.1)
52
+ rubocop-ast (1.18.0)
53
+ parser (>= 3.1.1.0)
54
54
  rubocop-rake (0.6.0)
55
55
  rubocop (~> 1.0)
56
- rubocop-rspec (2.6.0)
56
+ rubocop-rspec (2.11.1)
57
57
  rubocop (~> 1.19)
58
58
  ruby-progressbar (1.11.0)
59
59
  simplecov (0.21.2)
@@ -61,8 +61,8 @@ GEM
61
61
  simplecov-html (~> 0.11)
62
62
  simplecov_json_formatter (~> 0.1)
63
63
  simplecov-html (0.12.3)
64
- simplecov_json_formatter (0.1.3)
65
- thor (1.1.0)
64
+ simplecov_json_formatter (0.1.4)
65
+ thor (1.2.1)
66
66
  unicode-display_width (2.1.0)
67
67
 
68
68
  PLATFORMS
@@ -82,4 +82,4 @@ DEPENDENCIES
82
82
  simplecov
83
83
 
84
84
  BUNDLED WITH
85
- 2.2.32
85
+ 2.3.14
data/README.md CHANGED
@@ -109,6 +109,24 @@ Boxing.config do |c|
109
109
  end
110
110
  ```
111
111
 
112
+ ### Revision Information
113
+
114
+ ```ruby
115
+ Boxing.config do |c|
116
+ c.revision = true
117
+ end
118
+ ```
119
+ > When building the image, you have to add `--build-arg REVISION=...` to set your revision name to compile it correctly.
120
+
121
+ ### Sentry Support
122
+
123
+ ```ruby
124
+ Boxing.config do |c|
125
+ c.sentry_release = true
126
+ end
127
+ ```
128
+ > When building the image, you have to add `--build-arg SENTRY_RELEASE=...` to set your release name to compile it correctly.
129
+
112
130
  ### Assets Precompile
113
131
 
114
132
  This feature is disabled by default and suggest to use CI to build it.
@@ -120,6 +138,7 @@ Boxing.config do |c|
120
138
  c.node_version = '14.18'
121
139
  end
122
140
  ```
141
+ > When building the image, you have to add `--build-arg RAILS_MASTER_KEY=...` to set your production key to compile it correctly.
123
142
 
124
143
  ### Health Check
125
144
 
data/lib/boxing/config.rb CHANGED
@@ -12,12 +12,13 @@ module Boxing
12
12
  attr_accessor :root, :name, :registry, :ignores, :port,
13
13
  :health_check, :health_check_path,
14
14
  :assets_precompile, :node_version,
15
- :build_packages, :runtime_packages
15
+ :build_packages, :runtime_packages,
16
+ :revision, :sentry_release
16
17
 
17
18
  # @since 0.5.0
18
19
  def initialize(&block)
19
20
  @name = 'myapp'
20
- @root = '/srv/app'
21
+ @root = '/src/app'
21
22
  @port = 9292
22
23
  @health_check_path = '/status'
23
24
  @assets_precompile = false
@@ -50,7 +50,7 @@ module Boxing
50
50
  USER_PATH = Pathname.new(Gem.user_home).join('.local/share/ruby-boxing-db')
51
51
 
52
52
  # @since 0.3.0
53
- DEFAULT_PATH = ENV['BOXING_DB'] || USER_PATH
53
+ DEFAULT_PATH = ENV.fetch('BOXING_DB', USER_PATH)
54
54
 
55
55
  # @since 0.3.0
56
56
  attr_reader :path
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Boxing
4
- VERSION = '0.7.0'
4
+ VERSION = '0.8.0'
5
5
  end
@@ -26,6 +26,9 @@ RUN gem install bundler:<%= Bundler::VERSION %> \
26
26
  FROM node:${NODE_VERSION}-alpine as node
27
27
  FROM ruby:${RUBY_VERSION}-alpine as assets
28
28
  ARG APP_ROOT
29
+ ARG RAILS_MASTER_KEY
30
+
31
+ ENV RAILS_MASTER_KEY $RAILS_MASTER_KEY
29
32
 
30
33
  <%- if packages.select(&:runtime?).any? -%>
31
34
  RUN apk add --no-cache <%= packages.select(&:runtime?).join(' ') %> yarn
@@ -68,10 +71,18 @@ ENV APP_ROOT=$APP_ROOT
68
71
  COPY . ${APP_ROOT}
69
72
  <%- if config.assets_precompile -%>COPY --from=assets /${APP_ROOT}/public /${APP_ROOT}/public
70
73
  <%- end -%>
74
+ <%- if config.revision -%>
71
75
 
72
76
  ARG REVISION
73
77
  ENV REVISION $REVISION
74
- RUN echo $REVISION > ${SERVER_ROOT}/REVISION
78
+ ENV COMMIT_SHORT_SHA $REVISION
79
+ RUN echo "${REVISION}" > ${APP_ROOT}/REVISION
80
+ <%- end -%>
81
+ <%- if config.sentry_release -%>
82
+
83
+ ARG SENTRY_RELEASE
84
+ ENV SENTRY_RELEASE $SENTRY_RELEASE
85
+ <%- end -%>
75
86
 
76
87
  # Apply Execute Permission
77
88
  RUN adduser -h ${APP_ROOT} -D -s /bin/nologin ruby ruby && \
@@ -33,6 +33,8 @@ tmp/*
33
33
 
34
34
  # Frontend
35
35
  node_modules/
36
+ /app/assets/builds/*
37
+ !/app/assets/builds/.keep
36
38
 
37
39
  # Licensed
38
40
  .licensed.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.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - 蒼時弦也
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-31 00:00:00.000000000 Z
11
+ date: 2022-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubygems_version: 3.2.26
94
+ rubygems_version: 3.1.6
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: The zero-configuration Dockerfile generator for Ruby