handlebarsjs 0.6.3 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/handlebarsjs/handlebars_configuration.rb +7 -2
- data/lib/handlebarsjs/handlebars_configuration_defaults.rb +11 -11
- data/lib/handlebarsjs/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4962fdcc88f1a68831b1907b713aa3f8996ca23dee96da1d970545a2875c0b44
|
4
|
+
data.tar.gz: 3eaa1ec0405fc12467286ac2e0db49af24269f7fe589e0365ce16439b43799c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5aa1c58ae7e8de87949843cd3b6d90abcc04928c55a97181fca747b64aa7e2e53af87c16ee89c05112136dc8723b521caf1058948476ce7c38db46030d6a6b9
|
7
|
+
data.tar.gz: f50f5ad4daff693c4c9b0ef2f3756f2073b952165178831ac0e7361986021d0d54e100aae0647fc66aa7dd58d0173dd5639901c842349a61df5ce57025525830
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.6.3](https://github.com/klueless-io/handlebarsjs/compare/v0.6.2...v0.6.3) (2022-07-14)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* add_all_defaults to configuration ([5755639](https://github.com/klueless-io/handlebarsjs/commit/575563988b17eb17807ce7b7b2ca76e06eba796d))
|
7
|
+
|
1
8
|
## [0.6.2](https://github.com/klueless-io/handlebarsjs/compare/v0.6.1...v0.6.2) (2022-07-13)
|
2
9
|
|
3
10
|
|
@@ -16,8 +16,13 @@ module Handlebarsjs
|
|
16
16
|
|
17
17
|
HelperConfig = Struct.new(:name, :helper)
|
18
18
|
|
19
|
-
def helper(name, helper)
|
20
|
-
|
19
|
+
def helper(name, helper, aliases: [])
|
20
|
+
names = [name.to_sym]
|
21
|
+
names = (names + aliases.map(&:to_sym)).uniq
|
22
|
+
|
23
|
+
names.each do |helper_name|
|
24
|
+
@helpers << HelperConfig.new(helper_name, helper)
|
25
|
+
end
|
21
26
|
end
|
22
27
|
end
|
23
28
|
end
|
@@ -13,26 +13,26 @@ module Handlebarsjs
|
|
13
13
|
def add_array_defaults
|
14
14
|
KConfig.configure do |config|
|
15
15
|
config.handlebars.helper(:join, Handlebarsjs::Helpers::Array::Join.new)
|
16
|
-
config.handlebars.helper(:join_pre, Handlebarsjs::Helpers::Array::JoinPre.new)
|
17
16
|
config.handlebars.helper(:join_post, Handlebarsjs::Helpers::Array::JoinPost.new)
|
17
|
+
config.handlebars.helper(:join_pre, Handlebarsjs::Helpers::Array::JoinPre.new)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
def add_case_defaults
|
22
22
|
KConfig.configure do |config|
|
23
|
-
config.handlebars.helper(:back_slash, Handlebarsjs::Helpers::Case::BackSlash.new)
|
24
|
-
config.handlebars.helper(:camel, Handlebarsjs::Helpers::Case::Camel.new)
|
25
|
-
config.handlebars.helper(:constant, Handlebarsjs::Helpers::Case::Constant.new)
|
26
|
-
config.handlebars.helper(:dash, Handlebarsjs::Helpers::Case::Dash.new)
|
27
|
-
config.handlebars.helper(:dot, Handlebarsjs::Helpers::Case::Dot.new)
|
23
|
+
config.handlebars.helper(:back_slash, Handlebarsjs::Helpers::Case::BackSlash.new, aliases: %i[backward_slash slash_backward])
|
24
|
+
config.handlebars.helper(:camel, Handlebarsjs::Helpers::Case::Camel.new, aliases: %i[camel_upper camelUpper camelU pascalcase])
|
25
|
+
config.handlebars.helper(:constant, Handlebarsjs::Helpers::Case::Constant.new, aliases: %i[constantize])
|
26
|
+
config.handlebars.helper(:dash, Handlebarsjs::Helpers::Case::Dash.new, aliases: %i[dasherize dashify dashcase hyphenate])
|
27
|
+
config.handlebars.helper(:dot, Handlebarsjs::Helpers::Case::Dot.new, aliases: %i[dotirize dotify dotcase hyphenate])
|
28
28
|
config.handlebars.helper(:double_colon, Handlebarsjs::Helpers::Case::DoubleColon.new)
|
29
|
-
config.handlebars.helper(:human, Handlebarsjs::Helpers::Case::Human.new)
|
30
|
-
config.handlebars.helper(:lamel, Handlebarsjs::Helpers::Case::Lamel.new)
|
31
|
-
config.handlebars.helper(:lower, Handlebarsjs::Helpers::Case::Lower.new)
|
32
|
-
config.handlebars.helper(:slash, Handlebarsjs::Helpers::Case::Slash.new)
|
29
|
+
config.handlebars.helper(:human, Handlebarsjs::Helpers::Case::Human.new, aliases: %i[humanize sentence])
|
30
|
+
config.handlebars.helper(:lamel, Handlebarsjs::Helpers::Case::Lamel.new, aliases: %i[camel_lower camelLower camelL])
|
31
|
+
config.handlebars.helper(:lower, Handlebarsjs::Helpers::Case::Lower.new, aliases: %i[lowercase downcase])
|
32
|
+
config.handlebars.helper(:slash, Handlebarsjs::Helpers::Case::Slash.new, aliases: %i[forward_slash slash_forward])
|
33
33
|
config.handlebars.helper(:snake, Handlebarsjs::Helpers::Case::Snake.new)
|
34
34
|
config.handlebars.helper(:title, Handlebarsjs::Helpers::Case::Title.new)
|
35
|
-
config.handlebars.helper(:upper, Handlebarsjs::Helpers::Case::Upper.new)
|
35
|
+
config.handlebars.helper(:upper, Handlebarsjs::Helpers::Case::Upper.new, aliases: %i[upcase uppercase])
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
data/lib/handlebarsjs/version.rb
CHANGED
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "handlebarsjs",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.7.0",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "handlebarsjs",
|
9
|
-
"version": "0.
|
9
|
+
"version": "0.7.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
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: handlebarsjs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.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-
|
11
|
+
date: 2022-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cmdlet
|