cmdlet 0.12.2 → 0.12.3
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 +4 -4
- data/.builders/data/cmdlets/misc.json +26 -0
- data/.builders/generators/cmdlets/misc.rb +12 -0
- data/CHANGELOG.md +7 -0
- data/lib/cmdlet/_.rb +1 -0
- data/lib/cmdlet/misc/omit.rb +16 -0
- data/lib/cmdlet/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5b7731fda1f675a53e1b86458149d614132e85034ec1cd30509ce01aefe14b7
|
4
|
+
data.tar.gz: ffebe0a907f59f24b609bf77386d6a912599cc5e3083f963b96599caf8902eae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e540d6cb05f4570df80161cfc9d4ece91e0534fc124a48ad8ae37e28766698da33bbd204d4cadcac78e84dc58b105a42b0e0442203947a1b3d01e5e0dc8af92
|
7
|
+
data.tar.gz: f1a2d7b6d861c4a75790c61019cc6e0e6c4cab5d1536de1ce538ad2100dc694bde5210ade68195447d49c500680bac83490d7429c5d2f20b78b17b839cb995c9
|
@@ -26,6 +26,32 @@
|
|
26
26
|
],
|
27
27
|
"ruby": " value = '' if value.nil?\n value\n"
|
28
28
|
},
|
29
|
+
{
|
30
|
+
"name": "omit",
|
31
|
+
"aliases": [
|
32
|
+
"ignore",
|
33
|
+
"comment_out"
|
34
|
+
],
|
35
|
+
"description": "this content will not get written out, useful for commenting out code",
|
36
|
+
"result": "empty stting",
|
37
|
+
"category": "misc",
|
38
|
+
"category_description": "Miscellaneous cmdlets",
|
39
|
+
"base_class_require": null,
|
40
|
+
"base_class": null,
|
41
|
+
"parameters": [
|
42
|
+
{
|
43
|
+
"name": "value",
|
44
|
+
"description": "value to omit",
|
45
|
+
"splat": null,
|
46
|
+
"default": null,
|
47
|
+
"param_type": "String|Int"
|
48
|
+
}
|
49
|
+
],
|
50
|
+
"examples": [
|
51
|
+
|
52
|
+
],
|
53
|
+
"ruby": " ''\n"
|
54
|
+
},
|
29
55
|
{
|
30
56
|
"name": "format_json",
|
31
57
|
"aliases": [
|
@@ -16,6 +16,18 @@ KManager.action :misc_commands do
|
|
16
16
|
value
|
17
17
|
RUBY
|
18
18
|
end
|
19
|
+
.cmdlet do
|
20
|
+
name :omit
|
21
|
+
aliases %i[ignore comment_out]
|
22
|
+
description 'this content will not get written out, useful for commenting out code'
|
23
|
+
result 'empty stting'
|
24
|
+
|
25
|
+
parameter :value, 'value to omit', param_type: 'String|Int'
|
26
|
+
|
27
|
+
ruby <<-RUBY
|
28
|
+
''
|
29
|
+
RUBY
|
30
|
+
end
|
19
31
|
.cmdlet do
|
20
32
|
name :format_json
|
21
33
|
description 'FormatJson will take an object and write it out as pretty JSON'
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.12.2](https://github.com/klueless-io/cmdlet/compare/v0.12.1...v0.12.2) (2023-07-19)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* remove omit cmdlet, not needed ([3c6966e](https://github.com/klueless-io/cmdlet/commit/3c6966e2b45fe83202363557e6d1bac495664555))
|
7
|
+
|
1
8
|
## [0.12.1](https://github.com/klueless-io/cmdlet/compare/v0.12.0...v0.12.1) (2023-07-18)
|
2
9
|
|
3
10
|
|
data/lib/cmdlet/_.rb
CHANGED
@@ -32,6 +32,7 @@ require_relative 'inflection/pluralize_number'
|
|
32
32
|
require_relative 'inflection/pluralize_number_word'
|
33
33
|
require_relative 'inflection/singularize'
|
34
34
|
require_relative 'misc/format_json'
|
35
|
+
require_relative 'misc/omit'
|
35
36
|
require_relative 'misc/safe'
|
36
37
|
require_relative 'str/padl'
|
37
38
|
require_relative 'str/padr'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cmdlet
|
4
|
+
# Miscellaneous cmdlets
|
5
|
+
module Misc
|
6
|
+
# Omit: this content will not get written out, useful for commenting out code
|
7
|
+
class Omit < Cmdlet::BaseCmdlet
|
8
|
+
#
|
9
|
+
# @param [String|Int] value - value to omit
|
10
|
+
# @return [String] empty stting
|
11
|
+
def call(_value)
|
12
|
+
''
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/cmdlet/version.rb
CHANGED
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "cmdlet",
|
3
|
-
"version": "0.12.
|
3
|
+
"version": "0.12.3",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "cmdlet",
|
9
|
-
"version": "0.12.
|
9
|
+
"version": "0.12.3",
|
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
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cmdlet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- lib/cmdlet/inflection/pluralize_number_word.rb
|
131
131
|
- lib/cmdlet/inflection/singularize.rb
|
132
132
|
- lib/cmdlet/misc/format_json.rb
|
133
|
+
- lib/cmdlet/misc/omit.rb
|
133
134
|
- lib/cmdlet/misc/safe.rb
|
134
135
|
- lib/cmdlet/str/padl.rb
|
135
136
|
- lib/cmdlet/str/padr.rb
|