k_manager 0.0.33 → 0.0.35

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: ff66d66e1c8f48b8a59cef27ea02b62803451df098054bf408d3c6172556d9ff
4
- data.tar.gz: 1c4622061c9e2f0626f9cc164883f574b0f142fcdc14e1c6b9d3242219932552
3
+ metadata.gz: 4138ffde5db58d882f4367513c5b1aa7f1e57b68eb7bcc4b4f57ed60fc8252aa
4
+ data.tar.gz: e47eb62bb1a24a87b44a41fa53fff2719ec8f7a43520fbcef6e435bac52f4f31
5
5
  SHA512:
6
- metadata.gz: 12cfa1e9c1eb607ce807540c4eb1e1cfdd5c2841963fa4c739b094c1610ba017accb64d8f516da4d89ed667dc734ddf037e1f41bb5ed85663fccb60f9c941a8d
7
- data.tar.gz: d220a454b77654b2efb51c228b231bfa16e6788ce9d51ec77fed5aaf9c773bc9eebc3def3279e041198669aef2618ef08d5299b7c439ec56656ca52222e6aca7
6
+ metadata.gz: 281e835be0dbe14b012462d1a10247e5452fbb527849031ecbc1df9c5d73182d7f18f66f85ee60ce75ec5010769178d7a1e1ede5ba3a9ee0a92c9e2b681619d2
7
+ data.tar.gz: b3ea44fbc8697d7934ece6811881d60470dbb55ccb1eb4d92e1345677150d62d3ac1f9a1558a68a0eb600ecfd2fc353bccbfd2a3604203dbd9e01a7703648986
data/.builders/boot.rb CHANGED
@@ -6,35 +6,28 @@ CONFIG_KEY = :k_manager
6
6
 
7
7
  log.kv 'working folder', Dir.pwd
8
8
 
9
- Handlebars::Helpers.configure do |config|
10
- config.helper_config_file = File.join(Gem.loaded_specs['handlebars-helpers'].full_gem_path, '.handlebars_helpers.json')
11
- config.string_formatter_config_file = File.join(Gem.loaded_specs['handlebars-helpers'].full_gem_path, '.handlebars_string_formatters.json')
12
- end
13
-
14
- def camel
15
- require 'handlebars/helpers/string_formatting/camel'
16
- Handlebars::Helpers::StringFormatting::Camel.new
17
- end
18
-
19
- def titleize
20
- require 'handlebars/helpers/string_formatting/titleize'
21
- Handlebars::Helpers::StringFormatting::Titleize.new
22
- end
23
-
24
- def pluralize
25
- require 'handlebars/helpers/inflection/pluralize'
26
- Handlebars::Helpers::Inflection::Pluralize.new
27
- end
28
-
29
- def singularize
30
- require 'handlebars/helpers/inflection/singularize'
31
- Handlebars::Helpers::Inflection::Singularize.new
32
- end
33
-
34
- def dasherize
35
- require 'handlebars/helpers/string_formatting/dasherize'
36
- Handlebars::Helpers::StringFormatting::Dasherize.new
37
- end
9
+ KConfig.configure do |config|
10
+ config.handlebars.defaults.add_array_defaults
11
+ config.handlebars.defaults.add_case_defaults
12
+ config.handlebars.defaults.add_comparison_defaults
13
+ config.handlebars.defaults.add_inflection_defaults
14
+ end
15
+
16
+ # def camel
17
+ # Cmdlet::Case::Camel.new
18
+ # end
19
+ # def titleize
20
+ # Cmdlet::Case::Title.new
21
+ # end
22
+ # def pluralize
23
+ # Cmdlet::Case::Pluralize.new
24
+ # end
25
+ # def singularize
26
+ # Cmdlet::Case::Singularize.new
27
+ # end
28
+ # def dasherize
29
+ # Cmdlet::Case::Dash.new
30
+ # end
38
31
 
39
32
  def k_builder
40
33
  @k_builder ||= KBuilder::BaseBuilder.init(KConfig.configuration(CONFIG_KEY))
data/.rubocop.yml CHANGED
@@ -42,7 +42,7 @@ Metrics/MethodLength:
42
42
  Layout/LineLength:
43
43
  Max: 200
44
44
  # Ignores annotate output
45
- IgnoredPatterns: ['\A# \*\*']
45
+ AllowedPatterns: ['\A# \*\*']
46
46
  IgnoreCopDirectives: true
47
47
 
48
48
  Lint/UnusedMethodArgument:
data/Gemfile CHANGED
@@ -16,7 +16,7 @@ group :development, :test do
16
16
  gem 'guard-bundler'
17
17
  gem 'guard-rspec'
18
18
  gem 'guard-rubocop'
19
- gem 'rake', '~> 12.0'
19
+ gem 'rake'
20
20
  gem 'rake-compiler', require: false
21
21
  gem 'rspec', '~> 3.0'
22
22
  gem 'rubocop'
@@ -28,7 +28,8 @@ end
28
28
  if ENV['KLUE_LOCAL_GEMS']&.to_s&.downcase == 'true'
29
29
  group :development, :test do
30
30
  puts 'Using Local GEMs'
31
- gem 'handlebars-helpers' , path: '../handlebars-helpers'
31
+ # gem 'handlebars-helpers' , path: '../handlebars-helpers'
32
+ gem 'handlebarsjs' , path: '../handlebarsjs'
32
33
  gem 'k_builder' , path: '../k_builder'
33
34
  gem 'k_builder-dotnet' , path: '../k_builder-dotnet'
34
35
  # gem 'k_builder-package_json' , path: '../k_builder-package_json'
data/k_manager.gemspec CHANGED
@@ -22,9 +22,10 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  # spec.metadata['allowed_push_host'] = "Set to 'http://mygemserver.com'"
24
24
 
25
- spec.metadata['homepage_uri'] = spec.homepage
26
- spec.metadata['source_code_uri'] = 'https://github.com/klueless-io/k_manager'
27
- spec.metadata['changelog_uri'] = 'https://github.com/klueless-io/k_manager/commits/master'
25
+ spec.metadata['homepage_uri'] = spec.homepage
26
+ spec.metadata['source_code_uri'] = 'https://github.com/klueless-io/k_manager'
27
+ spec.metadata['changelog_uri'] = 'https://github.com/klueless-io/k_manager/commits/master'
28
+ spec.metadata['rubygems_mfa_required'] = 'true'
28
29
 
29
30
  # Specify which files should be added to the gem when it is released.
30
31
  # The `git ls-files -z` loads the RubyGem files that have been added into git.
@@ -38,6 +39,7 @@ Gem::Specification.new do |spec|
38
39
  spec.require_paths = ['lib']
39
40
  # spec.extensions = ['ext/k_manager/extconf.rb']
40
41
 
42
+ spec.add_dependency 'cmdlet', '~> 0'
41
43
  spec.add_dependency 'drawio_dsl', '~> 0.1'
42
44
  spec.add_dependency 'dry-struct', '~> 1'
43
45
  spec.add_dependency 'filewatcher', '~> 2.0.0.beta5'
@@ -52,7 +54,4 @@ Gem::Specification.new do |spec|
52
54
  # spec.add_dependency 'k_type' , '~> 0.0.0'
53
55
  # spec.add_dependency 'k_util' , '~> 0.0.0'
54
56
  spec.add_dependency 'dry-cli', '~> 0.7.0'
55
- spec.metadata = {
56
- 'rubygems_mfa_required' => 'true'
57
- }
58
57
  end
@@ -76,6 +76,7 @@ module KManager
76
76
  end
77
77
  # rubocop:enable Metrics/ParameterLists
78
78
 
79
+ # rubocop:disable Metrics/CyclomaticComplexity
79
80
  def setup_builder_from_template(name, builder_folder, template_root_folder, template, **opts)
80
81
  return false unless template
81
82
 
@@ -83,6 +84,8 @@ module KManager
83
84
  template_folder = File.join(template_root_folder, template)
84
85
  starter_config = template_starter_config(template_folder)
85
86
 
87
+ log.error("Starter config not found for template: #{template}") unless starter_config
88
+
86
89
  return false unless starter_config
87
90
 
88
91
  builder = get_builder(builder_folder, template_folder)
@@ -93,6 +96,7 @@ module KManager
93
96
  builder.add_file(relative_file, template_file: relative_file, **{ name: name }.merge(opts))
94
97
  end
95
98
  end
99
+ # rubocop:enable Metrics/CyclomaticComplexity
96
100
 
97
101
  def template_starter_config(template_folder)
98
102
  starter_file = File.join(template_folder, '.starter.json')
@@ -25,7 +25,9 @@ module KManager
25
25
  # Infer key is the file name without the extension stored in dash-case
26
26
  def infer_key
27
27
  file_name = Pathname.new(source_path).basename.sub_ext('').to_s
28
- Handlebars::Helpers::StringFormatting::Snake.new.parse(file_name)
28
+
29
+ # Handlebars::Helpers::StringFormatting::Snake.new.parse(file_name)
30
+ Cmdlet::Case::Snake.new.call(file_name)
29
31
  end
30
32
 
31
33
  def default_scheme
@@ -4,8 +4,6 @@ require 'securerandom'
4
4
 
5
5
  module KManager
6
6
  module Resources
7
- require 'handlebars/helpers/string_formatting/dasherize'
8
-
9
7
  # A memory resource represents content that is generated programmatically and just stored in memory.
10
8
  class MemResource < KManager::Resources::BaseResource
11
9
  def initialize(**opts)
@@ -2,8 +2,6 @@
2
2
 
3
3
  module KManager
4
4
  module Resources
5
- require 'handlebars/helpers/string_formatting/dasherize'
6
-
7
5
  # A web resource represents content that is loaded via a web URI.
8
6
  #
9
7
  # Web resources do not support watchers and so if you want to handle
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KManager
4
- VERSION = '0.0.33'
4
+ VERSION = '0.0.35'
5
5
  end
data/lib/k_manager.rb CHANGED
@@ -13,10 +13,6 @@ require 'k_builder'
13
13
  require 'k_ext/github'
14
14
  require 'drawio_dsl'
15
15
 
16
- # IS THIS NEEDED? this was used for infer_key
17
- require 'handlebars/helpers/string_formatting/dasherize'
18
- require 'handlebars/helpers/string_formatting/snake'
19
-
20
16
  require 'k_manager/version'
21
17
  require 'k_manager/overview/models'
22
18
  require 'k_manager/overview/queries'
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33
4
+ version: 0.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-28 00:00:00.000000000 Z
11
+ date: 2022-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cmdlet
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: drawio_dsl
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -241,6 +255,9 @@ homepage: http://appydave.com/gems/k-manager
241
255
  licenses:
242
256
  - MIT
243
257
  metadata:
258
+ homepage_uri: http://appydave.com/gems/k-manager
259
+ source_code_uri: https://github.com/klueless-io/k_manager
260
+ changelog_uri: https://github.com/klueless-io/k_manager/commits/master
244
261
  rubygems_mfa_required: 'true'
245
262
  post_install_message:
246
263
  rdoc_options: []
@@ -257,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
274
  - !ruby/object:Gem::Version
258
275
  version: '0'
259
276
  requirements: []
260
- rubygems_version: 3.2.33
277
+ rubygems_version: 3.1.6
261
278
  signing_key:
262
279
  specification_version: 4
263
280
  summary: K Manager provides a managed host for documents, resources and code generator