kuby-core 0.12.0 → 0.13.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: 4a072588afc0cc4e0cf815c276628b90c192bf24310ed6c4c53089bc467ba278
4
- data.tar.gz: 364b1265256eda0eea1f57469f241a1c78f1bdb2be0d37d8a23b5c6f01f4ff43
3
+ metadata.gz: a443b66d4dff19f6a2112b6365a9579b0490b049ef51ab612ad9e6cf4a807901
4
+ data.tar.gz: 2b38151be094c758a64ecdc95c585f184f4e9eea1affbdc4d071cc7a20d499a0
5
5
  SHA512:
6
- metadata.gz: 866438d8c0880d949150d337b01fce94dfab9d0606ab3e2358e4c7cad376bb36cb3ff958ea72188967abf1192216c3b7586ddcfba6d7e0324ab4fbe37a085e49
7
- data.tar.gz: 87e438bd3f4783b1b3d0e7609d773f5eeee91f7b9ae980446c8ca63084bddeb3a525d944750fe13fb36e98d782188cf6bd06c3df5edff742d8a1d5d80aa53966
6
+ metadata.gz: 6cf93a88bc24ab142fa497daddc7227d417c138391f46db6f5b77a862c96e9c2733d880eded21d464170963902364ac0f2806f84cd083d0a5b408231987bcf2b
7
+ data.tar.gz: dab2dcd180ff19421ef44aef1a3384e1faa0b49511925e6557d54500a652a5c854217a8c463cd738cd6a745b2eb1804262e35539635fdb4d98ed13d2abc90aa2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.13.0
2
+ * Fix handling rails/rake options in remote exec (@palkan, #60)
3
+ * Add `bundler_phase.gemfiles(*paths)` to allow adding additional gemfiles (@palkan, #61)
4
+
1
5
  ## 0.12.0
2
6
  * Fix issue causing volume mount errors when k8s tries to schedule asset pods on multiple nodes (fixes #42).
3
7
  - Persistent volumes can only be mounted on a single physical node.
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  ## Kuby
2
2
 
3
- [![Build Status](https://travis-ci.com/getkuby/kuby-core.svg?branch=master)](https://travis-ci.com/getkuby/kuby-core)
3
+ ![Unit Tests](https://github.com/getkuby/kuby-core/actions/workflows/unit_tests.yml/badge.svg?branch=master)
4
+ ![Integration Tests](https://github.com/getkuby/kuby-core/actions/workflows/integration_tests.yml/badge.svg?branch=master)
4
5
 
5
6
  Deploy your Rails app the easy way.
6
7
 
data/lib/kuby/commands.rb CHANGED
@@ -25,9 +25,10 @@ module Kuby
25
25
  def run(args)
26
26
  if idx = args.index('rails') || idx = args.index('rake')
27
27
  @rails_options = T.let(@rails_options, T.nilable(T::Array[String]))
28
- @rails_options = args[idx..-1]
28
+ @rails_options = args[(idx + 1)..-1]
29
29
  super(args[0..idx])
30
30
  else
31
+ @rails_options = []
31
32
  super
32
33
  end
33
34
  end
@@ -164,7 +165,7 @@ module Kuby
164
165
  rc.desc 'Runs an arbitrary command inside a running Rails pod.'
165
166
  rc.command :exec do |c|
166
167
  c.action do |global_options, options, args|
167
- tasks.remote_exec(args)
168
+ tasks.remote_exec([*args, *@rails_options])
168
169
  end
169
170
  end
170
171
 
@@ -35,6 +35,7 @@ module Kuby
35
35
 
36
36
  @version = T.let(@version, T.nilable(String))
37
37
  @gemfile = T.let(@gemfile, T.nilable(String))
38
+ @gemfiles = T.let([], T::Array[String])
38
39
  @without = T.let(@without, T.nilable(T::Array[String]))
39
40
  end
40
41
 
@@ -51,6 +52,10 @@ module Kuby
51
52
  dockerfile.copy(gf, '.')
52
53
  dockerfile.copy(lf, '.')
53
54
 
55
+ @gemfiles.each do |file|
56
+ dockerfile.copy(file, file)
57
+ end
58
+
54
59
  unless wo.empty?
55
60
  dockerfile.env("BUNDLE_WITHOUT='#{wo.join(' ')}'")
56
61
  end
@@ -67,6 +72,11 @@ module Kuby
67
72
  dockerfile.env("PATH=./bin:$PATH")
68
73
  end
69
74
 
75
+ sig { params(paths: String).void }
76
+ def gemfiles(*paths)
77
+ @gemfiles.concat(paths)
78
+ end
79
+
70
80
  private
71
81
 
72
82
  sig { returns(String) }
data/lib/kuby/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # typed: true
2
2
 
3
3
  module Kuby
4
- VERSION = '0.12.0'.freeze
4
+ VERSION = '0.13.0'.freeze
5
5
  end
@@ -107,6 +107,18 @@ describe Kuby::Docker::Spec do
107
107
  expect(subject).to match(/RUN bundle install .* --gemfile foo\/bar\/Gemfile/)
108
108
  end
109
109
  end
110
+
111
+ context 'when multiple gemfiles are specified' do
112
+ before { spec.bundler_phase.gemfiles('gemfiles/a.gemfile', 'gemfiles/b.gemfile') }
113
+
114
+ it 'uses all gemfiles including the default one' do
115
+ expect(subject).to include("COPY Gemfile .\n")
116
+ expect(subject).to include("COPY Gemfile.lock .\n")
117
+ expect(subject).to include("COPY gemfiles/a.gemfile gemfiles/a.gemfile\n")
118
+ expect(subject).to include("COPY gemfiles/b.gemfile gemfiles/b.gemfile\n")
119
+ expect(subject).to match(/RUN bundle install .* --gemfile Gemfile/)
120
+ end
121
+ end
110
122
  end
111
123
 
112
124
  describe '#package' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuby-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-07 00:00:00.000000000 Z
11
+ date: 2021-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -290,7 +290,6 @@ files:
290
290
  - spec/docker/timestamp_tag_spec.rb
291
291
  - spec/docker/timestamped_image_spec.rb
292
292
  - spec/dummy/Gemfile
293
- - spec/dummy/Gemfile.lock
294
293
  - spec/dummy/README.md
295
294
  - spec/dummy/Rakefile
296
295
  - spec/dummy/app/assets/config/manifest.js
@@ -334,7 +333,6 @@ files:
334
333
  - spec/dummy/config/initializers/mime_types.rb
335
334
  - spec/dummy/config/initializers/wrap_parameters.rb
336
335
  - spec/dummy/config/locales/en.yml
337
- - spec/dummy/config/master.key
338
336
  - spec/dummy/config/puma.rb
339
337
  - spec/dummy/config/routes.rb
340
338
  - spec/dummy/config/spring.rb
@@ -351,7 +349,6 @@ files:
351
349
  - spec/dummy/test/application_system_test_case.rb
352
350
  - spec/dummy/test/channels/application_cable/connection_test.rb
353
351
  - spec/dummy/test/test_helper.rb
354
- - spec/dummy/tmp/cache/bootsnap-load-path-cache
355
352
  - spec/spec_helper.rb
356
353
  - spec/support/docker/fake_cli.rb
357
354
  - spec/support/docker/remote/fake_client.rb
@@ -374,7 +371,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
374
371
  - !ruby/object:Gem::Version
375
372
  version: '0'
376
373
  requirements: []
377
- rubygems_version: 3.1.4
374
+ rubygems_version: 3.2.22
378
375
  signing_key:
379
376
  specification_version: 4
380
377
  summary: Deploy your Rails app onto Kubernetes the easy way.
@@ -1,223 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- actioncable (6.0.3.2)
5
- actionpack (= 6.0.3.2)
6
- nio4r (~> 2.0)
7
- websocket-driver (>= 0.6.1)
8
- actionmailbox (6.0.3.2)
9
- actionpack (= 6.0.3.2)
10
- activejob (= 6.0.3.2)
11
- activerecord (= 6.0.3.2)
12
- activestorage (= 6.0.3.2)
13
- activesupport (= 6.0.3.2)
14
- mail (>= 2.7.1)
15
- actionmailer (6.0.3.2)
16
- actionpack (= 6.0.3.2)
17
- actionview (= 6.0.3.2)
18
- activejob (= 6.0.3.2)
19
- mail (~> 2.5, >= 2.5.4)
20
- rails-dom-testing (~> 2.0)
21
- actionpack (6.0.3.2)
22
- actionview (= 6.0.3.2)
23
- activesupport (= 6.0.3.2)
24
- rack (~> 2.0, >= 2.0.8)
25
- rack-test (>= 0.6.3)
26
- rails-dom-testing (~> 2.0)
27
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
28
- actiontext (6.0.3.2)
29
- actionpack (= 6.0.3.2)
30
- activerecord (= 6.0.3.2)
31
- activestorage (= 6.0.3.2)
32
- activesupport (= 6.0.3.2)
33
- nokogiri (>= 1.8.5)
34
- actionview (6.0.3.2)
35
- activesupport (= 6.0.3.2)
36
- builder (~> 3.1)
37
- erubi (~> 1.4)
38
- rails-dom-testing (~> 2.0)
39
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
40
- activejob (6.0.3.2)
41
- activesupport (= 6.0.3.2)
42
- globalid (>= 0.3.6)
43
- activemodel (6.0.3.2)
44
- activesupport (= 6.0.3.2)
45
- activerecord (6.0.3.2)
46
- activemodel (= 6.0.3.2)
47
- activesupport (= 6.0.3.2)
48
- activestorage (6.0.3.2)
49
- actionpack (= 6.0.3.2)
50
- activejob (= 6.0.3.2)
51
- activerecord (= 6.0.3.2)
52
- marcel (~> 0.3.1)
53
- activesupport (6.0.3.2)
54
- concurrent-ruby (~> 1.0, >= 1.0.2)
55
- i18n (>= 0.7, < 2)
56
- minitest (~> 5.1)
57
- tzinfo (~> 1.1)
58
- zeitwerk (~> 2.2, >= 2.2.2)
59
- addressable (2.7.0)
60
- public_suffix (>= 2.0.2, < 5.0)
61
- bindex (0.8.1)
62
- bootsnap (1.4.8)
63
- msgpack (~> 1.0)
64
- builder (3.2.4)
65
- byebug (11.1.3)
66
- capybara (3.33.0)
67
- addressable
68
- mini_mime (>= 0.1.3)
69
- nokogiri (~> 1.8)
70
- rack (>= 1.6.0)
71
- rack-test (>= 0.6.3)
72
- regexp_parser (~> 1.5)
73
- xpath (~> 3.2)
74
- childprocess (3.0.0)
75
- concurrent-ruby (1.1.7)
76
- crass (1.0.6)
77
- erubi (1.9.0)
78
- ffi (1.13.1)
79
- globalid (0.4.2)
80
- activesupport (>= 4.2.0)
81
- i18n (1.8.5)
82
- concurrent-ruby (~> 1.0)
83
- jbuilder (2.10.0)
84
- activesupport (>= 5.0.0)
85
- listen (3.2.1)
86
- rb-fsevent (~> 0.10, >= 0.10.3)
87
- rb-inotify (~> 0.9, >= 0.9.10)
88
- loofah (2.7.0)
89
- crass (~> 1.0.2)
90
- nokogiri (>= 1.5.9)
91
- mail (2.7.1)
92
- mini_mime (>= 0.1.1)
93
- marcel (0.3.3)
94
- mimemagic (~> 0.3.2)
95
- method_source (1.0.0)
96
- mimemagic (0.3.5)
97
- mini_mime (1.0.2)
98
- mini_portile2 (2.4.0)
99
- minitest (5.14.1)
100
- msgpack (1.3.3)
101
- nio4r (2.5.2)
102
- nokogiri (1.10.10)
103
- mini_portile2 (~> 2.4.0)
104
- public_suffix (4.0.5)
105
- puma (4.3.5)
106
- nio4r (~> 2.0)
107
- rack (2.2.3)
108
- rack-proxy (0.6.5)
109
- rack
110
- rack-test (1.1.0)
111
- rack (>= 1.0, < 3)
112
- rails (6.0.3.2)
113
- actioncable (= 6.0.3.2)
114
- actionmailbox (= 6.0.3.2)
115
- actionmailer (= 6.0.3.2)
116
- actionpack (= 6.0.3.2)
117
- actiontext (= 6.0.3.2)
118
- actionview (= 6.0.3.2)
119
- activejob (= 6.0.3.2)
120
- activemodel (= 6.0.3.2)
121
- activerecord (= 6.0.3.2)
122
- activestorage (= 6.0.3.2)
123
- activesupport (= 6.0.3.2)
124
- bundler (>= 1.3.0)
125
- railties (= 6.0.3.2)
126
- sprockets-rails (>= 2.0.0)
127
- rails-dom-testing (2.0.3)
128
- activesupport (>= 4.2.0)
129
- nokogiri (>= 1.6)
130
- rails-html-sanitizer (1.3.0)
131
- loofah (~> 2.3)
132
- railties (6.0.3.2)
133
- actionpack (= 6.0.3.2)
134
- activesupport (= 6.0.3.2)
135
- method_source
136
- rake (>= 0.8.7)
137
- thor (>= 0.20.3, < 2.0)
138
- rake (13.0.1)
139
- rb-fsevent (0.10.4)
140
- rb-inotify (0.10.1)
141
- ffi (~> 1.0)
142
- regexp_parser (1.7.1)
143
- rubyzip (2.3.0)
144
- sass-rails (6.0.0)
145
- sassc-rails (~> 2.1, >= 2.1.1)
146
- sassc (2.4.0)
147
- ffi (~> 1.9)
148
- sassc-rails (2.1.2)
149
- railties (>= 4.0.0)
150
- sassc (>= 2.0)
151
- sprockets (> 3.0)
152
- sprockets-rails
153
- tilt
154
- selenium-webdriver (3.142.7)
155
- childprocess (>= 0.5, < 4.0)
156
- rubyzip (>= 1.2.2)
157
- spring (2.1.1)
158
- spring-watcher-listen (2.0.1)
159
- listen (>= 2.7, < 4.0)
160
- spring (>= 1.2, < 3.0)
161
- sprockets (4.0.2)
162
- concurrent-ruby (~> 1.0)
163
- rack (> 1, < 3)
164
- sprockets-rails (3.2.1)
165
- actionpack (>= 4.0)
166
- activesupport (>= 4.0)
167
- sprockets (>= 3.0.0)
168
- sqlite3 (1.4.2)
169
- thor (1.0.1)
170
- thread_safe (0.3.6)
171
- tilt (2.0.10)
172
- turbolinks (5.2.1)
173
- turbolinks-source (~> 5.2)
174
- turbolinks-source (5.2.0)
175
- tzinfo (1.2.7)
176
- thread_safe (~> 0.1)
177
- web-console (4.0.4)
178
- actionview (>= 6.0.0)
179
- activemodel (>= 6.0.0)
180
- bindex (>= 0.4.0)
181
- railties (>= 6.0.0)
182
- webdrivers (4.4.1)
183
- nokogiri (~> 1.6)
184
- rubyzip (>= 1.3.0)
185
- selenium-webdriver (>= 3.0, < 4.0)
186
- webpacker (4.3.0)
187
- activesupport (>= 4.2)
188
- rack-proxy (>= 0.6.1)
189
- railties (>= 4.2)
190
- websocket-driver (0.7.3)
191
- websocket-extensions (>= 0.1.0)
192
- websocket-extensions (0.1.5)
193
- xpath (3.2.0)
194
- nokogiri (~> 1.8)
195
- zeitwerk (2.4.0)
196
-
197
- PLATFORMS
198
- ruby
199
-
200
- DEPENDENCIES
201
- bootsnap (>= 1.4.2)
202
- byebug
203
- capybara (>= 2.15)
204
- jbuilder (~> 2.7)
205
- listen (~> 3.2)
206
- puma (~> 4.1)
207
- rails (~> 6.0.3, >= 6.0.3.2)
208
- sass-rails (>= 6)
209
- selenium-webdriver
210
- spring
211
- spring-watcher-listen (~> 2.0.0)
212
- sqlite3 (~> 1.4)
213
- turbolinks (~> 5)
214
- tzinfo-data
215
- web-console (>= 3.3.0)
216
- webdrivers
217
- webpacker (~> 4.0)
218
-
219
- RUBY VERSION
220
- ruby 2.5.8p224
221
-
222
- BUNDLED WITH
223
- 2.1.4
@@ -1 +0,0 @@
1
- e02c0a6ae84e2533f0f5a02962d0ac35