pangea 0.0.6 → 0.0.8

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: a552e61c368a2c85f86115d15cf87db444a0ed0c20280d3cc2619c06db7bcc3b
4
- data.tar.gz: 5d0b8cfddf77c4f645526a15dcbf500a8e9851f80e64710b83d2e2019a2da510
3
+ metadata.gz: '08bbe0e8f0931815a00f5f718214ea075f28a47e5f39939a92a8b114d967776a'
4
+ data.tar.gz: 55cf406d8254ff7f872ceecdbc5914076489584749a97d9793978099aecfa6c9
5
5
  SHA512:
6
- metadata.gz: 4fac250ea40c878f7e98487bcbdb8154492c714f0443a0b82088214b690526799370478adfd54f7fdab8d1d480eda23e4af1475062e9cdbe8adc370c64d8a99d
7
- data.tar.gz: d7481bde920c7e05b0a504b71f163da634f27786b81d9b6ca6e971b58401545bd5d13c7081a485c02d8171614bb1f3d811fc464ea73ca56339ff96f034c71075
6
+ metadata.gz: 3b0a439347ed7cc7e52f4bd605779acaff104caf29f3e9f9d3ebf1946b6cbd484477ffc22669c41b2cbcebdbc9f27bc64db9f610784e6e15d52d92f00d4a12b4
7
+ data.tar.gz: e11262b1aa6b3a3fd1f44bd7da0a1fe843dcd029e4dde3d9893ac43427729b146d88366cc48d45e5d7019e2a920c6931c1895b9b1c687d5bc92253d9a079cd62
data/Gemfile.lock CHANGED
@@ -15,6 +15,7 @@ GEM
15
15
  rexml
16
16
  kramdown-parser-gfm (1.1.0)
17
17
  kramdown (~> 2.0)
18
+ language_server-protocol (3.17.0.3)
18
19
  nokogiri (1.15.2-x86_64-darwin)
19
20
  racc (~> 1.4)
20
21
  parallel (1.23.0)
@@ -43,9 +44,10 @@ GEM
43
44
  rspec-mocks (3.12.5)
44
45
  diff-lcs (>= 1.2.0, < 2.0)
45
46
  rspec-support (~> 3.12.0)
46
- rspec-support (3.12.0)
47
- rubocop (1.52.1)
47
+ rspec-support (3.12.1)
48
+ rubocop (1.54.0)
48
49
  json (~> 2.3)
50
+ language_server-protocol (>= 3.17.0)
49
51
  parallel (~> 1.10)
50
52
  parser (>= 3.2.2.3)
51
53
  rainbow (>= 2.2.2, < 4.0)
@@ -56,6 +58,16 @@ GEM
56
58
  unicode-display_width (>= 2.4.0, < 3.0)
57
59
  rubocop-ast (1.29.0)
58
60
  parser (>= 3.2.1.0)
61
+ rubocop-capybara (2.18.0)
62
+ rubocop (~> 1.41)
63
+ rubocop-factory_bot (2.23.1)
64
+ rubocop (~> 1.33)
65
+ rubocop-rake (0.6.0)
66
+ rubocop (~> 1.0)
67
+ rubocop-rspec (2.22.0)
68
+ rubocop (~> 1.33)
69
+ rubocop-capybara (~> 2.17)
70
+ rubocop-factory_bot (~> 2.22)
59
71
  ruby-progressbar (1.13.0)
60
72
  solargraph (0.49.0)
61
73
  backport (~> 1.2)
@@ -113,6 +125,8 @@ DEPENDENCIES
113
125
  rake
114
126
  rspec
115
127
  rubocop
128
+ rubocop-rake
129
+ rubocop-rspec
116
130
  solargraph
117
131
  terraform-synthesizer
118
132
  toml-rb
data/gemset.nix CHANGED
@@ -121,6 +121,16 @@
121
121
  };
122
122
  version = "1.1.0";
123
123
  };
124
+ language_server-protocol = {
125
+ groups = ["default" "development"];
126
+ platforms = [];
127
+ source = {
128
+ remotes = ["https://rubygems.org"];
129
+ sha256 = "0gvb1j8xsqxms9mww01rmdl78zkd72zgxaap56bhv8j45z05hp1x";
130
+ type = "gem";
131
+ };
132
+ version = "3.17.0.3";
133
+ };
124
134
  nokogiri = {
125
135
  dependencies = ["racc"];
126
136
  groups = ["default" "development"];
@@ -284,21 +294,21 @@
284
294
  platforms = [];
285
295
  source = {
286
296
  remotes = ["https://rubygems.org"];
287
- sha256 = "12y52zwwb3xr7h91dy9k3ndmyyhr3mjcayk0nnarnrzz8yr48kfx";
297
+ sha256 = "1ky86j3ksi26ng9ybd7j0qsdf1lpr8mzrmn98yy9gzv801fvhsgr";
288
298
  type = "gem";
289
299
  };
290
- version = "3.12.0";
300
+ version = "3.12.1";
291
301
  };
292
302
  rubocop = {
293
- dependencies = ["json" "parallel" "parser" "rainbow" "regexp_parser" "rexml" "rubocop-ast" "ruby-progressbar" "unicode-display_width"];
303
+ dependencies = ["json" "language_server-protocol" "parallel" "parser" "rainbow" "regexp_parser" "rexml" "rubocop-ast" "ruby-progressbar" "unicode-display_width"];
294
304
  groups = ["development"];
295
305
  platforms = [];
296
306
  source = {
297
307
  remotes = ["https://rubygems.org"];
298
- sha256 = "0bxc1p7bwh8dlmcvh6ns239sp9v8j46vw4h450ag8wa7bh1ii1wh";
308
+ sha256 = "02ysjbi1gkcpj4x1fdlbzz3vs2vqkk161smrawnaw77y7m3gvq8z";
299
309
  type = "gem";
300
310
  };
301
- version = "1.52.1";
311
+ version = "1.54.0";
302
312
  };
303
313
  rubocop-ast = {
304
314
  dependencies = ["parser"];
@@ -311,6 +321,50 @@
311
321
  };
312
322
  version = "1.29.0";
313
323
  };
324
+ rubocop-capybara = {
325
+ dependencies = ["rubocop"];
326
+ groups = ["default" "development"];
327
+ platforms = [];
328
+ source = {
329
+ remotes = ["https://rubygems.org"];
330
+ sha256 = "01fn05a87g009ch1sh00abdmgjab87i995msap26vxq1a5smdck6";
331
+ type = "gem";
332
+ };
333
+ version = "2.18.0";
334
+ };
335
+ rubocop-factory_bot = {
336
+ dependencies = ["rubocop"];
337
+ groups = ["default" "development"];
338
+ platforms = [];
339
+ source = {
340
+ remotes = ["https://rubygems.org"];
341
+ sha256 = "0kqchl8f67k2g56sq2h1sm2wb6br5gi47s877hlz94g5086f77n1";
342
+ type = "gem";
343
+ };
344
+ version = "2.23.1";
345
+ };
346
+ rubocop-rake = {
347
+ dependencies = ["rubocop"];
348
+ groups = ["development"];
349
+ platforms = [];
350
+ source = {
351
+ remotes = ["https://rubygems.org"];
352
+ sha256 = "1nyq07sfb3vf3ykc6j2d5yq824lzq1asb474yka36jxgi4hz5djn";
353
+ type = "gem";
354
+ };
355
+ version = "0.6.0";
356
+ };
357
+ rubocop-rspec = {
358
+ dependencies = ["rubocop" "rubocop-capybara" "rubocop-factory_bot"];
359
+ groups = ["development"];
360
+ platforms = [];
361
+ source = {
362
+ remotes = ["https://rubygems.org"];
363
+ sha256 = "00rsflhijcr0q838fgbdmk7knm5kcjpimn6x0k9qmiw15hi96x1d";
364
+ type = "gem";
365
+ };
366
+ version = "2.22.0";
367
+ };
314
368
  ruby-progressbar = {
315
369
  groups = ["default" "development"];
316
370
  platforms = [];
@@ -18,25 +18,55 @@ module Config
18
18
 
19
19
  # return array of paths that can store a configuration
20
20
  def default_paths
21
- p = {}
21
+ paths = {}
22
22
 
23
+ # configuration files to look for
23
24
  EXTENSIONS.each do |ext|
24
- p[ext] = [] unless p[ext]
25
- p[ext] << File.join(%(/opt), %(share), %(pangea.#{ext}))
26
- p[ext] << File.join(%(/etc), %(pangea), %(pangea.#{ext}))
27
- p[ext].concat(
25
+ paths[ext] = [] unless p[ext]
26
+
27
+ ###############################
28
+ # system level configuration
29
+ ###############################
30
+
31
+ paths[ext] << File.join(%(/etc), %(pangea), %(pangea.#{ext}))
32
+ paths[ext].concat(
28
33
  Dir.glob(
29
34
  File.join(%(/etc/), %(pangea), %(conf.d), %(*.#{ext}))
30
35
  )
31
36
  )
32
- p[ext] << File.join(xdg_config_home, %(pangea), %(pangea.#{ext}))
33
- p[ext].concat(
37
+
38
+ # end system level configuration
39
+
40
+ ###############################
41
+ # home configuration
42
+ ###############################
43
+
44
+ paths[ext] << File.join(xdg_config_home, %(pangea), %(pangea.#{ext}))
45
+ paths[ext].concat(
34
46
  Dir.glob(
35
47
  File.join(xdg_config_home, %(pangea), %(conf.d), %(*.#{ext}))
36
48
  )
37
49
  )
50
+
51
+ # end home configuration
52
+
53
+ ###############################
54
+ # local configuration
55
+ ###############################
56
+
57
+ paths[ext] << %(pangea.#{ext})
58
+ paths[ext] << Dir.glob(
59
+ File.join(
60
+ %(pangea),
61
+ %(conf.d),
62
+ %(*.#{ext})
63
+ )
64
+ )
65
+
66
+ # end local configuration
38
67
  end
39
68
 
69
+ # only return existing files
40
70
  res = []
41
71
  EXTENSIONS.each do |ext|
42
72
  files = p[ext]
@@ -1,4 +1,6 @@
1
1
  require %(pangea/cli/subcommands/pangea)
2
+ require %(pangea/synthesizer/config)
3
+ require %(pangea/cli/config)
2
4
 
3
5
  class ConfigCommand < PangeaCommand
4
6
  usage do
@@ -7,8 +9,33 @@ class ConfigCommand < PangeaCommand
7
9
  command %(config)
8
10
  end
9
11
 
12
+ argument :subcommand do
13
+ desc %(subcommand for config)
14
+ required
15
+ end
16
+
17
+ def help
18
+ <<~HELP
19
+ Usage: pangea config [OPTIONS] SUBCOMMAND
20
+
21
+ Arguments:
22
+ SUBCOMMAND subcommand for config
23
+
24
+ Options:
25
+ -h, --help Print usage
26
+ HELP
27
+ end
28
+
10
29
  def run(argv)
11
30
  parse(argv)
31
+ puts argv
12
32
  print help
33
+
34
+ case params[:subcommand].to_s
35
+ when %(show)
36
+ config = Config.resolve_configurations
37
+ puts config
38
+ end
39
+
13
40
  end
14
41
  end
@@ -87,13 +87,13 @@ class InfraCommand < PangeaCommand
87
87
  %(src),
88
88
  src_dir.to_s
89
89
  ))
90
- stitch_files = Dir.glob("#{File.join(
90
+ synth_files = Dir.glob("#{File.join(
91
91
  project[:src][:location].to_s,
92
92
  %(src),
93
93
  src_dir.to_s
94
94
  )}/**/*.rb")
95
- stitch_files.each do |stitch_file|
96
- synth.synthesize(File.read(stitch_file))
95
+ synth_files.each do |synth_file|
96
+ synth.synthesize(File.read(synth_file))
97
97
  end
98
98
  end
99
99
  end
@@ -22,8 +22,6 @@ class Command < PangeaCommand
22
22
  <<~HELP
23
23
  Usage: pangea command [OPTIONS] SUBCOMMAND
24
24
 
25
- stitch together infrastructure
26
-
27
25
  Arguments:
28
26
  SUBCOMMAND subcommand for pangea
29
27
 
@@ -1,3 +1,3 @@
1
1
  module Pangea
2
- VERSION = %(0.0.6).freeze
2
+ VERSION = %(0.0.8).freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pangea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - drzthslnt@gmail.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-02 00:00:00.000000000 Z
11
+ date: 2023-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop-rspec