k_builder 0.0.60 → 0.0.61

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: d8494aef9a52b82292f311e3807abf4d33070651120adb6958140ccb2e7ffe74
4
- data.tar.gz: d738c8e89d7f69e41eb53d2d5ee99f79b5ef7021abfac2ce7591cf2f2cd0f670
3
+ metadata.gz: c78906798abec61e633a8e6447baed740f5618025e6ec1733655c5173ee62b43
4
+ data.tar.gz: fd412c1aab0fa24ea34c2394c43ae77bba5588d4d25c50e890f1dc4a14f84f7e
5
5
  SHA512:
6
- metadata.gz: 1ab76466e313810fe85aca4fcca266a6148c894b04861cfc2e9a93df5d4092e528d288c31d8346d9ee71118ade34fee98a0ab1459b43784e932499d14f71ce81
7
- data.tar.gz: 10f60644f6117ff592217262bb9d39bacfcc2059b201fb1b822176b26a0f2a8d598b6b8687417cbb1fc0b6548ce3007369050b1c716859a8d00e8292b0d016a3
6
+ metadata.gz: bbf46357650901ba2a5af3ba6c9371d6ca4752c281a57f88edcbb9b9264b75fa83afab90d679642dfe0475b4b48d5291fe936f83e70bc61cff193bdc96978105
7
+ data.tar.gz: a41800fce5dfe7297995317eed2441f1bd27d52e3af4def56558dcad53e1390c75cf4a699cd4f9fa2b90b76087d86c011b7204ff14a161be0b490edef09e3de9
data/.rubocop.yml CHANGED
@@ -7,6 +7,7 @@ AllCops:
7
7
  Exclude:
8
8
  - "_/**/*"
9
9
  - "spec/samples/**/*"
10
+ - "bin/*"
10
11
 
11
12
  Metrics/BlockLength:
12
13
  Exclude:
data/bin/k CHANGED
@@ -5,7 +5,7 @@
5
5
  # chmod +x bin/k
6
6
 
7
7
  help = %(
8
- ----------------------------------------------------------------------
8
+ ----------------------------------------------------------------------
9
9
  Klue Scripts - Help
10
10
  ----------------------------------------------------------------------
11
11
  k - This Help File
data/k_builder.gemspec CHANGED
@@ -42,6 +42,8 @@ Gem::Specification.new do |spec|
42
42
  spec.add_dependency 'k_log', '~> 0'
43
43
  spec.add_dependency 'k_type', '~> 0'
44
44
  spec.add_dependency 'k_util', '~> 0'
45
+ spec.add_dependency 'rubocop', '~> 1.8'
46
+
45
47
  # spec.add_dependency "anyway_config" , ">= 2.0.0"
46
48
  # spec.add_dependency "config" , ">= 3.0.0"
47
49
  end
data/lib/k_builder.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'rubocop'
4
+
3
5
  require 'k_log'
4
6
  require 'k_util'
5
7
  require 'k_type'
@@ -320,6 +320,17 @@ module KBuilder
320
320
  Handlebars::Helpers::Template.render(template_content, opts) unless template_content.nil?
321
321
  end
322
322
 
323
+ def run_cop(file, auto_safe: false, auto_all: false)
324
+ cli = RuboCop::CLI.new
325
+ opts = ['--format', 'simple', file]
326
+ opts.prepend('-a') if auto_safe
327
+ opts.prepend('-A') if auto_all
328
+
329
+ cli.run(opts)
330
+ end
331
+
332
+ # Need to handle absolute files, see
333
+ # /Users/davidcruwys/dev/printspeak/reference_application/printspeak-domain/.builders/presentation/presentation_builder/commands/copy_ruby_resource_command.rb
323
334
  def run_prettier(file, log_level: :log)
324
335
  # command = "prettier --check #{file} --write #{file}"
325
336
  command = "npx prettier --loglevel #{log_level} --write #{file}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KBuilder
4
- VERSION = '0.0.60'
4
+ VERSION = '0.0.61'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.60
4
+ version: 0.0.61
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-26 00:00:00.000000000 Z
11
+ date: 2021-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: handlebars-helpers
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.8'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.8'
69
83
  description: " K Builder provides various fluent builders for initializing applications
70
84
  with different language requirements\n"
71
85
  email: