kuby-core 0.19.0 → 0.20.1

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: c0d4130691d41056e212ebe92b1f0284b13fcd3b2459d5c86f05ad9f3c5a5261
4
- data.tar.gz: 5685c32062c4883261fbfe9bb14bef8c69d3d09d585a8c58bfe908455ae87856
3
+ metadata.gz: 06a251c7d2b03e322ee06fbfd3c7f81bb86e4a466256a0c38c7d2946f10b3fb0
4
+ data.tar.gz: 810c9f2d8f06b227d3da5c1107602b303aa3d3cfbbdb95f65b696a022a032449
5
5
  SHA512:
6
- metadata.gz: 3339e14436ef7bf06037a81f1acdf00753f15021a1bef00d8e13ad958c6f56f3aa913b03b698980e7b71bc3b3640fc5de80fa781eefe83fc04c935e1e38dfd54
7
- data.tar.gz: cb1bb78c42467746fbd92ed8a1350b1a1edb71863a92d4c50f6e7e08eb9c13f1768fd2d3ecd1452dc50b34ad820c9e701ea879df1b86b7bf75c1d51b45674e09
6
+ metadata.gz: 235cf03f26393d82f744a7876893ef85566aca8f86145a6257978dac4ea172a9442295cbf84369dff4931e02f4ba89e6ee94539d7b01059abbf6b3d0f98b4100
7
+ data.tar.gz: 378a491ba6ddcb36e3d1e196bb45a43b5d2468e147197cd9379e5e9d6472f829797c5269e49489baf8a7bf9a56cdb5c022323d68479c3c567ff7af8218a1ba69
data/CHANGELOG.md CHANGED
@@ -1,8 +1,15 @@
1
1
  ## Unreleased
2
+
3
+ ## 0.20.1
4
+ * Remove accidentally-released `require 'sorbet-runtime'` in bin/kuby.
5
+
6
+ ## 0.20.0
2
7
  * Modify the Rails generator to add the `activerecord-cockroachdb-adapter` to your bundle.
8
+ * Add the `LayerStack#replace` and corresponding `Docker::Spec#replace` methods for replacing phases. This can be a lot easier than using `#insert` and `#delete`, which can mess with the relative order of the phases and cause surprising results.
9
+ * Don't run init containers for creating and migrating the database if database management is turned off.
3
10
 
4
11
  ## 0.19.0
5
- * Add support to configure the number of web workers for puma (#124, @zhalltyemill)
12
+ * Add support for configuring the number of web workers for puma (#124, @zhalltyemill)
6
13
 
7
14
  ## 0.18.0
8
15
  * Add the ability to specify your app's root directory.
@@ -94,6 +94,15 @@ module Kuby
94
94
  end
95
95
  end
96
96
 
97
+ # T::Sig::WithoutRuntime.sig { params(name: Symbol, layer: Layer).void }
98
+ def replace(name, layer)
99
+ unless layers.include?(name)
100
+ raise ArgumentError, "Could not find existing layer '#{name}'"
101
+ end
102
+
103
+ layers[name] = layer
104
+ end
105
+
97
106
  # T::Sig::WithoutRuntime.sig { params(name: Symbol).void }
98
107
  def delete(name)
99
108
  stack.delete(name)
@@ -145,6 +145,11 @@ module Kuby
145
145
  layer_stack.insert(name, layer, options, &block)
146
146
  end
147
147
 
148
+ # T::Sig::WithoutRuntime.sig { params(name: Symbol, layer: Layer).void }
149
+ def replace(name, layer)
150
+ layer_stack.replace(name, layer)
151
+ end
152
+
148
153
  # T::Sig::WithoutRuntime.sig { params(name: Symbol).void }
149
154
  def delete(name)
150
155
  layer_stack.delete(name)
@@ -106,12 +106,14 @@ module Kuby
106
106
  image image_with_tag
107
107
  end
108
108
 
109
- init_container(:create_db) do
110
- image image_with_tag
111
- end
109
+ if spec.manage_database?
110
+ init_container(:create_db) do
111
+ image image_with_tag
112
+ end
112
113
 
113
- init_container(:migrate_db) do
114
- image image_with_tag
114
+ init_container(:migrate_db) do
115
+ image image_with_tag
116
+ end
115
117
  end
116
118
  end
117
119
  end
@@ -308,36 +310,38 @@ module Kuby
308
310
  end
309
311
  end
310
312
 
311
- init_container(:create_db) do
312
- name "#{kube_spec.selector_app}-create-db"
313
- command %w(bundle exec rake kuby:rails_app:db:bootstrap)
313
+ if kube_spec.manage_database?
314
+ init_container(:create_db) do
315
+ name "#{kube_spec.selector_app}-create-db"
316
+ command %w(bundle exec rake kuby:rails_app:db:bootstrap)
314
317
 
315
- env_from do
316
- config_map_ref do
317
- name kube_spec.config_map.metadata.name
318
+ env_from do
319
+ config_map_ref do
320
+ name kube_spec.config_map.metadata.name
321
+ end
318
322
  end
319
- end
320
323
 
321
- env_from do
322
- secret_ref do
323
- name kube_spec.app_secrets.metadata.name
324
+ env_from do
325
+ secret_ref do
326
+ name kube_spec.app_secrets.metadata.name
327
+ end
324
328
  end
325
329
  end
326
- end
327
330
 
328
- init_container(:migrate_db) do
329
- name "#{kube_spec.selector_app}-migrate-db"
330
- command %w(bundle exec rake kuby:rails_app:db:migrate)
331
+ init_container(:migrate_db) do
332
+ name "#{kube_spec.selector_app}-migrate-db"
333
+ command %w(bundle exec rake kuby:rails_app:db:migrate)
331
334
 
332
- env_from do
333
- config_map_ref do
334
- name kube_spec.config_map.metadata.name
335
+ env_from do
336
+ config_map_ref do
337
+ name kube_spec.config_map.metadata.name
338
+ end
335
339
  end
336
- end
337
340
 
338
- env_from do
339
- secret_ref do
340
- name kube_spec.app_secrets.metadata.name
341
+ env_from do
342
+ secret_ref do
343
+ name kube_spec.app_secrets.metadata.name
344
+ end
341
345
  end
342
346
  end
343
347
  end
data/lib/kuby/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # typed: true
2
2
 
3
3
  module Kuby
4
- VERSION = '0.19.0'.freeze
4
+ VERSION = '0.20.1'.freeze
5
5
  end
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.19.0
4
+ version: 0.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-27 00:00:00.000000000 Z
11
+ date: 2023-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize