cmdlet 0.5.0 → 0.6.0

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: 7858e7b563b7d8fd9ed449d7d21de54eb3f6816d28fb80b7b46deb2fb741101f
4
- data.tar.gz: 92fddb23254d18ab8ae07bfe00c3d593845aadd1243e2e1bfee78b7c4628da4b
3
+ metadata.gz: d2f90c89d289ef06c536a7d11f99415ce7edd32e81dafa7b4886ba9bc54a87ac
4
+ data.tar.gz: 26d34c6d9a0d54be7cdcf403a92096919391dc14e547f6971e18aab22601ee6c
5
5
  SHA512:
6
- metadata.gz: 40f58c5d81364fb22291245f52b5b6e457f123f36a88a380e74e9dd7102d42f2afd63888165570849a4502dd25a90fd37bca056decaa3edd4de0f3747d9500e9
7
- data.tar.gz: c3058b29c7f59a80c2bc58f237a05fa8a690b5d7444a04afcd8451919476d0dc0c00c599425502971b9e2b55c6166b51cef3049d6aca903700329b66997cff38
6
+ metadata.gz: eed56d8e114624213419b305e1c5b609ed39a67d88749a9bc676a4d96b72e0cfceba6301102ecba142837834b18421d5e19ae73a3537e56636b6cac8411668db
7
+ data.tar.gz: d5e22d7073e0edb2b781a69a15b861f572b85602e22dea4e8736eea72228db6f696b368a3ce402a48b53eebe8610b0076c6d5f71e9191941a68011e4ea4d8b86
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ KConfig.configure do |config|
4
+ {{#each cmdlets}}
5
+ config.handlebars.helper(:{{name}}, Handlebarsjs::Helpers::{{camel category}}::{{camel name}}.new)
6
+ {{/each}}
7
+ end
@@ -59,35 +59,6 @@
59
59
  ],
60
60
  "ruby": " return '' if values.nil? || !values.is_a?(::Array)\n values = values.reject(&:blank?)\n return '' if values.length.zero?\n\n \"#{separator}#{values.join(separator)}\"\n"
61
61
  },
62
- {
63
- "name": "join_pre",
64
- "description": "join an array of values with separator as a string and using the separator at the beginning of string",
65
- "result": null,
66
- "category": "array",
67
- "category_description": "Array handling routines, eg. join, join_prefix, join_post",
68
- "base_class_require": null,
69
- "base_class": null,
70
- "parameters": [
71
- {
72
- "name": "values",
73
- "description": "array of values to join",
74
- "splat": null,
75
- "default": null,
76
- "param_type": "String|Int"
77
- },
78
- {
79
- "name": "separator",
80
- "description": "separator between values, defaults to comma",
81
- "splat": null,
82
- "default": "','",
83
- "param_type": "String"
84
- }
85
- ],
86
- "examples": [
87
-
88
- ],
89
- "ruby": " return '' if values.nil? || !values.is_a?(::Array)\n values = values.reject(&:blank?)\n return '' if values.length.zero?\n\n \"#{separator}#{values.join(separator)}\"\n"
90
- },
91
62
  {
92
63
  "name": "join_post",
93
64
  "description": "join an array of values with separator as a string and using the separator at the end of string",
@@ -48,6 +48,16 @@ class CmdletDirector < KDirector::Directors::BaseDirector
48
48
  add(handlebars_spec_file, template_file: 'handlebars_helper_spec.rb', cmdlet: cmdlet, on_exist: :skip)
49
49
  end
50
50
 
51
+ if builder.cmdlets.length.positive?
52
+ cd(:handlebars_lib)
53
+
54
+ category = builder.cmdlets.first[:category]
55
+ handlebars_category_configuration_file = "handlebarsjs/helpers/#{category}/default_configuration.rb"
56
+
57
+ oadd(handlebars_category_configuration_file, template_file: 'handlebars_helper_default_configuration.rb', cmdlets: builder.cmdlets)
58
+ end
59
+
60
+
51
61
  self
52
62
  end
53
63
 
@@ -35,21 +35,6 @@ KManager.action :array_commands do
35
35
  "#{separator}#{values.join(separator)}"
36
36
  RUBY
37
37
  end
38
- .cmdlet do
39
- name :join_pre
40
- description 'join an array of values with separator as a string and using the separator at the beginning of string'
41
-
42
- parameter :values, 'array of values to join', param_type: 'String|Int'
43
- parameter :separator, 'separator between values, defaults to comma', default: "','"
44
-
45
- ruby <<-'RUBY'
46
- return '' if values.nil? || !values.is_a?(::Array)
47
- values = values.reject(&:blank?)
48
- return '' if values.length.zero?
49
-
50
- "#{separator}#{values.join(separator)}"
51
- RUBY
52
- end
53
38
  .cmdlet do
54
39
  name :join_post
55
40
  description 'join an array of values with separator as a string and using the separator at the end of string'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [0.5.0](https://github.com/klueless-io/cmdlet/compare/v0.4.2...v0.5.0) (2022-07-12)
2
+
3
+
4
+ ### Features
5
+
6
+ * add inflection: pluralize_number and pluralize_number_word ([53b1d00](https://github.com/klueless-io/cmdlet/commit/53b1d00fa44da710a480935d41f26966702d1ae6))
7
+
1
8
  ## [0.4.2](https://github.com/klueless-io/cmdlet/compare/v0.4.1...v0.4.2) (2022-07-12)
2
9
 
3
10
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cmdlet
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "cmdlet",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "cmdlet",
9
- "version": "0.5.0",
9
+ "version": "0.6.0",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.1",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cmdlet",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Cmdlet provides a set of functions (wrapped in the command pattern) that perform simple actions",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmdlet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
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-07-12 00:00:00.000000000 Z
11
+ date: 2022-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -51,6 +51,7 @@ files:
51
51
  - ".builders/.templates/cmdlet_spec.rb"
52
52
  - ".builders/.templates/cmdlets_require_all.rb"
53
53
  - ".builders/.templates/handlebars_helper.rb"
54
+ - ".builders/.templates/handlebars_helper_default_configuration.rb"
54
55
  - ".builders/.templates/handlebars_helper_require_all.rb"
55
56
  - ".builders/.templates/handlebars_helper_spec.rb"
56
57
  - ".builders/_.rb"