metatron 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b844d137e3df7127e494a87bba53cf57343a99a91e0f36fdbd33defff23df6d
4
- data.tar.gz: 4dba955ae80c9ecffff78cca57de7750486ad7d07ca2c939c6678a6d048e253f
3
+ metadata.gz: ef4bf936a9316f23439a920e4a6923362640b185ccc1ee529ce4b164cf6acd08
4
+ data.tar.gz: 6a8b1ce24431f8bf991d0a2c9cf9ab85c82c601e80c001e3ef8c40e5d9fda009
5
5
  SHA512:
6
- metadata.gz: ffe7d65914ad3db99912387b9b27b177bde7e37981f0fe5b358b1f69a01eb271380f7326f8b84d93b0b82751a91ebebdd106816d0555dca657cff9d5b4b3e4a5
7
- data.tar.gz: 5e7893561036961a85605bbcac1a8b6d7ad4242c9298050ef2d73a32d5a7cc1818f05862b4b53497acbc6e3592fae3e80dc5f258043bb83eb61358c994011584
6
+ metadata.gz: bbd66de712a0770d70f907157d7165e3d3c05e3c0c273e29786ac826022f1564be6019e22c0539c6d8a36e91047e851e019f7ad01521060e1603644f45dd5d11
7
+ data.tar.gz: d168cebe1c6aa51f36975313b731e9f07a09402f446a6fe891f51b01d0106fc7c4a28ca87c4641239dc1165cad9aa157ec2e4fed111518c5034d18327efd5891
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.3.4
1
+ 3.3.5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- metatron (0.8.0)
4
+ metatron (0.8.2)
5
5
  json (~> 2.6)
6
6
  rack (>= 2.2.8, < 4)
7
7
 
@@ -27,11 +27,11 @@ GEM
27
27
  nokogiri (1.16.7-x86_64-linux)
28
28
  racc (~> 1.4)
29
29
  parallel (1.26.3)
30
- parser (3.3.4.2)
30
+ parser (3.3.5.0)
31
31
  ast (~> 2.4.1)
32
32
  racc
33
33
  racc (1.8.1)
34
- rack (3.1.7)
34
+ rack (3.1.8)
35
35
  rack-test (2.1.0)
36
36
  rack (>= 1.3)
37
37
  rainbow (3.1.1)
@@ -40,33 +40,31 @@ GEM
40
40
  regexp_parser (2.9.2)
41
41
  reverse_markdown (2.1.1)
42
42
  nokogiri
43
- rexml (3.3.5)
44
- strscan
43
+ rexml (3.3.8)
45
44
  rspec (3.13.0)
46
45
  rspec-core (~> 3.13.0)
47
46
  rspec-expectations (~> 3.13.0)
48
47
  rspec-mocks (~> 3.13.0)
49
- rspec-core (3.13.0)
48
+ rspec-core (3.13.2)
50
49
  rspec-support (~> 3.13.0)
51
- rspec-expectations (3.13.1)
50
+ rspec-expectations (3.13.3)
52
51
  diff-lcs (>= 1.2.0, < 2.0)
53
52
  rspec-support (~> 3.13.0)
54
- rspec-mocks (3.13.1)
53
+ rspec-mocks (3.13.2)
55
54
  diff-lcs (>= 1.2.0, < 2.0)
56
55
  rspec-support (~> 3.13.0)
57
56
  rspec-support (3.13.1)
58
- rubocop (1.65.1)
57
+ rubocop (1.67.0)
59
58
  json (~> 2.3)
60
59
  language_server-protocol (>= 3.17.0)
61
60
  parallel (~> 1.10)
62
61
  parser (>= 3.3.0.2)
63
62
  rainbow (>= 2.2.2, < 4.0)
64
63
  regexp_parser (>= 2.4, < 3.0)
65
- rexml (>= 3.2.5, < 4.0)
66
- rubocop-ast (>= 1.31.1, < 2.0)
64
+ rubocop-ast (>= 1.32.2, < 2.0)
67
65
  ruby-progressbar (~> 1.7)
68
66
  unicode-display_width (>= 2.4.0, < 3.0)
69
- rubocop-ast (1.32.1)
67
+ rubocop-ast (1.32.3)
70
68
  parser (>= 3.3.1.0)
71
69
  rubocop-capybara (2.21.0)
72
70
  rubocop (~> 1.41)
@@ -89,7 +87,7 @@ GEM
89
87
  simplecov-cobertura (2.1.0)
90
88
  rexml
91
89
  simplecov (~> 0.19)
92
- simplecov-html (0.12.3)
90
+ simplecov-html (0.13.1)
93
91
  simplecov_json_formatter (0.1.4)
94
92
  solargraph (0.50.0)
95
93
  backport (~> 1.2)
@@ -107,11 +105,10 @@ GEM
107
105
  thor (~> 1.0)
108
106
  tilt (~> 2.0)
109
107
  yard (~> 0.9, >= 0.9.24)
110
- strscan (3.1.0)
111
- thor (1.3.1)
108
+ thor (1.3.2)
112
109
  tilt (2.4.0)
113
- unicode-display_width (2.5.0)
114
- yard (0.9.36)
110
+ unicode-display_width (2.6.0)
111
+ yard (0.9.37)
115
112
 
116
113
  PLATFORMS
117
114
  arm64-darwin-22
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Metatron
4
+ module Templates
5
+ # Template for basic Role k8s resource
6
+ class ResourceQuota < Template
7
+ include Concerns::Annotated
8
+ include Concerns::Namespaced
9
+
10
+ attr_accessor :additional_labels, :spec
11
+
12
+ def initialize(name)
13
+ super
14
+ @additional_labels = {}
15
+ @spec = {}
16
+ end
17
+
18
+ def render
19
+ {
20
+ apiVersion:,
21
+ kind:,
22
+ metadata: {
23
+ name:,
24
+ labels: base_labels.merge(additional_labels)
25
+ }.merge(formatted_annotations).merge(formatted_namespace).compact
26
+ }.merge(formatted_spec)
27
+ end
28
+
29
+ def formatted_spec = (@spec || {}).empty? ? {} : { spec: }
30
+ end
31
+ end
32
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Metatron
4
- VERSION = "0.8.0"
4
+ VERSION = "0.8.2"
5
5
  end
data/lib/metatron.rb CHANGED
@@ -35,6 +35,7 @@ require "metatron/templates/namespace"
35
35
  require "metatron/templates/network_policy"
36
36
  require "metatron/templates/persistent_volume_claim"
37
37
  require "metatron/templates/replica_set"
38
+ require "metatron/templates/resource_quota"
38
39
  require "metatron/templates/role"
39
40
  require "metatron/templates/role_binding"
40
41
  require "metatron/templates/secret"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metatron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Gnagy
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-18 00:00:00.000000000 Z
11
+ date: 2024-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -212,7 +212,7 @@ dependencies:
212
212
  - - "~>"
213
213
  - !ruby/object:Gem::Version
214
214
  version: '0.9'
215
- description:
215
+ description:
216
216
  email:
217
217
  - jonathan.gnagy@gmail.com
218
218
  executables: []
@@ -255,6 +255,7 @@ files:
255
255
  - lib/metatron/templates/persistent_volume_claim.rb
256
256
  - lib/metatron/templates/pod.rb
257
257
  - lib/metatron/templates/replica_set.rb
258
+ - lib/metatron/templates/resource_quota.rb
258
259
  - lib/metatron/templates/role.rb
259
260
  - lib/metatron/templates/role_binding.rb
260
261
  - lib/metatron/templates/secret.rb
@@ -272,7 +273,7 @@ licenses:
272
273
  metadata:
273
274
  homepage_uri: https://github.com/jgnagy/metatron
274
275
  source_code_uri: https://github.com/jgnagy/metatron
275
- post_install_message:
276
+ post_install_message:
276
277
  rdoc_options: []
277
278
  require_paths:
278
279
  - lib
@@ -287,8 +288,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
287
288
  - !ruby/object:Gem::Version
288
289
  version: '0'
289
290
  requirements: []
290
- rubygems_version: 3.4.10
291
- signing_key:
291
+ rubygems_version: 3.5.16
292
+ signing_key:
292
293
  specification_version: 4
293
294
  summary: So meta
294
295
  test_files: []