k_builder 0.0.75 → 0.0.77

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: a432a388ce390634de8eb468c6039363fbab90a2989d33ac2b8220c2760bdfb2
4
- data.tar.gz: 7dc8058c7ec98d683fc337f39d5bb4bce706f6cfb2b27d5adeed370d783a57fb
3
+ metadata.gz: ac1cdc23345b4070d9bb728958b15b688860f0b0aaa0517acfbc2e775003ee82
4
+ data.tar.gz: 4a8bc3c079064f427d3d64eeb2487ac57de05bcd5eec932045bef8e449809992
5
5
  SHA512:
6
- metadata.gz: 26ad9ec1140503a8acabe33c7cf8f0daa57e53592d51e475b244b76c5fea344c9baac5239d59d20257c2fae0a0df25b980bd9bcd1d2c2a17324dc0384647bf27
7
- data.tar.gz: bc01fae9a9e40e5ef62de671e3afcd6955db116a34fc2230e5f1c3899789be37170d82e358c44fd509c86f04672c7c60b2089bd7f1d677f7c707011bcdda188b
6
+ metadata.gz: 21d748c245757fd6b0f52117de0cf3c6551385a357899404ab75da30df41927b29e26242c8320d880941b85271421b8c29caf6d2c8692506440cff08f9eca898
7
+ data.tar.gz: 29096922d0f86f016f0fe42422544bc44bba0707d6988eb54abc7b82fb404da23a76d893f7813f2155dd7ff6b080eb8afff01bf75296235821de9278283a3152
data/.rubocop.yml CHANGED
@@ -39,7 +39,7 @@ Metrics/MethodLength:
39
39
  Layout/LineLength:
40
40
  Max: 200
41
41
  # Ignores annotate output
42
- IgnoredPatterns: ['\A# \*\*']
42
+ AllowedPatterns: ['\A# \*\*']
43
43
  IgnoreCopDirectives: true
44
44
 
45
45
  Lint/UnusedMethodArgument:
data/Gemfile CHANGED
@@ -2,24 +2,23 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- # Specify your gem's dependencies in handlebars_helpers.gemspec
6
5
  gemspec
7
6
 
8
- # group :development do
9
- # # Currently conflicts with GitHub actions and so I remove it on push
10
- # # pry on steroids
11
- # gem 'jazz_fingers'
12
- # gem 'pry-coolline', github: 'owst/pry-coolline', branch: 'support_new_pry_config_api'
13
- # end
14
-
15
7
  group :development, :test do
16
8
  gem 'guard-bundler'
17
9
  gem 'guard-rspec'
18
10
  gem 'guard-rubocop'
19
- gem 'rake', '~> 12.0'
11
+ gem 'rake' # , '~> 12.0'
20
12
  gem 'rake-compiler', require: false
21
13
  gem 'rspec', '~> 3.0'
22
14
  gem 'rubocop'
23
15
  gem 'rubocop-rake', require: false
24
16
  gem 'rubocop-rspec', require: false
25
17
  end
18
+
19
+ if ENV['KLUE_LOCAL_GEMS']&.to_s&.downcase == 'true'
20
+ group :development, :test do
21
+ puts 'Using Local GEMs'
22
+ gem 'handlebarsjs' , path: '../handlebarsjs'
23
+ end
24
+ end
data/k_builder.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_builder'
27
- spec.metadata['changelog_uri'] = 'https://github.com/klueless-io/k_builder/commits/master'
25
+ spec.metadata['homepage_uri'] = spec.homepage
26
+ spec.metadata['source_code_uri'] = 'https://github.com/klueless-io/k_builder'
27
+ spec.metadata['changelog_uri'] = 'https://github.com/klueless-io/k_builder/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.
@@ -37,12 +38,11 @@ Gem::Specification.new do |spec|
37
38
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
38
39
  spec.require_paths = ['lib']
39
40
  # spec.extensions = ['ext/k_builder/extconf.rb']
40
- spec.add_dependency 'handlebars-helpers', '~> 0'
41
+ # spec.add_dependency 'handlebars-helpers', '~> 0'
42
+ spec.add_dependency 'handlebarsjs', '~> 0.6'
41
43
  spec.add_dependency 'k_config', '~> 0'
42
44
  spec.add_dependency 'k_log', '~> 0'
43
45
  spec.add_dependency 'k_type', '~> 0'
44
46
  spec.add_dependency 'k_util', '~> 0'
45
47
  spec.add_dependency 'rubocop', '~> 1.8'
46
-
47
- spec.metadata['rubygems_mfa_required'] = 'true'
48
48
  end
@@ -210,7 +210,7 @@ module KBuilder
210
210
  def delete_file(file, **opts)
211
211
  full_file = target_file(file, **opts) # = opts.key?(:folder_key) ? target_file(file, folder: opts[:folder_key]) : target_file(file)
212
212
 
213
- File.delete(full_file) if File.exist?(full_file)
213
+ FileUtils.rm_rf(full_file)
214
214
 
215
215
  self
216
216
  end
@@ -517,9 +517,17 @@ module KBuilder
517
517
 
518
518
  template_content = use_template(**opts)
519
519
 
520
- Handlebars::Helpers::Template.render(template_content, opts) unless template_content.nil?
520
+ Handlebarsjs.render(template_content, opts) unless template_content.nil?
521
+ # Handlebars::Helpers::Template.render(template_content, opts) unless template_content.nil?
521
522
  end
522
523
 
524
+ # Usage
525
+ #
526
+ # @example
527
+ #
528
+ # Dir.chdir(k_builder.target_folders.get(:app)) do
529
+ # k_builder.run_cop('**/*.rb', fix_unsafe: true)
530
+ # end
523
531
  def run_cop(file, **opts)
524
532
  command = Commands::RuboCopCommand.new(file, builder: self, **opts)
525
533
  command.execute
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KBuilder
4
- VERSION = '0.0.75'
4
+ VERSION = '0.0.77'
5
5
  end
data/lib/k_builder.rb CHANGED
@@ -17,14 +17,15 @@ require 'k_builder/commands/base_command'
17
17
  require 'k_builder/commands/rubo_cop_command'
18
18
  require 'k_builder/commands/code_syntax_highlighter_command'
19
19
 
20
- require 'handlebars/helpers/template'
20
+ require 'handlebarsjs'
21
+ # require 'handlebars/helpers/template'
21
22
 
22
23
  module KBuilder
23
24
  # raise KBuilder::Error, 'Sample message'
24
25
  class Error < StandardError; end
25
26
  end
26
27
 
27
- if ENV['KLUE_DEBUG']&.to_s&.downcase == 'true'
28
+ if ENV.fetch('KLUE_DEBUG', 'false').downcase == 'true'
28
29
  namespace = 'KBuilder::Version'
29
30
  file_path = $LOADED_FEATURES.find { |f| f.include?('k_builder/version') }
30
31
  version = KBuilder::VERSION.ljust(9)
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.75
4
+ version: 0.0.77
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-03-05 00:00:00.000000000 Z
11
+ date: 2022-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: handlebars-helpers
14
+ name: handlebarsjs
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '0.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '0.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: k_config
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
- rubygems_version: 3.2.33
167
+ rubygems_version: 3.1.6
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: K Builder provides various fluent builders for initializing applications