handlebarsjs 0.5.4 → 0.5.5
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/CHANGELOG.md +7 -0
- data/lib/handlebarsjs/configuration.rb +32 -0
- data/lib/handlebarsjs/handlebars.rb +7 -2
- data/lib/handlebarsjs/version.rb +1 -1
- data/lib/handlebarsjs.rb +1 -0
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +2 -2
- data/lib/handlebarsjs/api.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54e7659dac2a8cf398062a6d60ab21cb9532fd1f5bdac94d8b1ba203b0f69718
|
4
|
+
data.tar.gz: 2af427025be5ca3b734be0bb3d184d9bdc17d7fe56e6a6ef2bcd7cdc6d59750e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d180450d15b7d6a700189d147e850466e78d8252fe0d4bed01e335cd294a2cda3f2bd206bc8bc34cfd334c2f102c28e50862d10846f55e47d9d4fcca2019827
|
7
|
+
data.tar.gz: 51d88ab43e2a2c5c3bc80a453dcf9178d1c39859bdb5540d86bb667032f2ec197d0eb64a6cdf6861464296591e570df64cd7a13eb458d1cdafa274cd90acb557
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.5.4](https://github.com/klueless-io/handlebarsjs/compare/v0.5.3...v0.5.4) (2022-07-12)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* add inflection: pluralize_number and pluralize_number_word ([33ba59a](https://github.com/klueless-io/handlebarsjs/commit/33ba59a7b0ec86e29ed8ddd5bfd3bb5e91d18123))
|
7
|
+
|
1
8
|
## [0.5.3](https://github.com/klueless-io/handlebarsjs/compare/v0.5.2...v0.5.3) (2022-07-12)
|
2
9
|
|
3
10
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Handlebarsjs
|
4
|
+
# Register this configuration access extension for Handlebars configuration
|
5
|
+
module HandlebarsConfigurationExtension
|
6
|
+
def handlebars
|
7
|
+
return @handlebars if defined? @handlebars
|
8
|
+
|
9
|
+
@handlebars = HandlebarsConfiguration.new
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
# handlebars.handlebars_snapshot.add_helper(helper_name, helper)
|
14
|
+
# Structure for storing Cmdlet configuration
|
15
|
+
class HandlebarsConfiguration
|
16
|
+
include KLog::Logging
|
17
|
+
|
18
|
+
attr_accessor :helpers
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
@helpers = []
|
22
|
+
end
|
23
|
+
|
24
|
+
HelperConfig = Struct.new(:name, :helper)
|
25
|
+
|
26
|
+
def helper(name, helper)
|
27
|
+
@helpers << HelperConfig.new(name, helper)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
KConfig::Configuration.register(:handlebars, Handlebarsjs::HandlebarsConfigurationExtension)
|
@@ -6,10 +6,15 @@ module Handlebarsjs
|
|
6
6
|
def initialize
|
7
7
|
super
|
8
8
|
# Handlebars 4.7.7
|
9
|
-
|
9
|
+
gem_path = Gem.loaded_specs['handlebarsjs'].full_gem_path
|
10
|
+
|
11
|
+
handlebars_lib_path = File.join(gem_path, Handlebarsjs::HANDLEBARS_LIBRARY_PATH)
|
12
|
+
handlebars_api_path = File.join(gem_path, Handlebarsjs::HANDLEBARS_API_PATH)
|
13
|
+
|
14
|
+
handlebars_snapshot.add_library('handlebars', path: handlebars_lib_path)
|
10
15
|
|
11
16
|
# Support functions for working with
|
12
|
-
handlebars_snapshot.add_library('handlebars-api', path:
|
17
|
+
handlebars_snapshot.add_library('handlebars-api', path: handlebars_api_path)
|
13
18
|
end
|
14
19
|
|
15
20
|
def process_template(template, options = {})
|
data/lib/handlebarsjs/version.rb
CHANGED
data/lib/handlebarsjs.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'mini_racer'
|
4
4
|
require 'cmdlet'
|
5
5
|
require_relative 'handlebarsjs/version'
|
6
|
+
require_relative 'handlebarsjs/configuration'
|
6
7
|
require_relative 'handlebarsjs/javascript'
|
7
8
|
require_relative 'handlebarsjs/handlebars_snapshot'
|
8
9
|
require_relative 'handlebarsjs/handlebars'
|
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "handlebarsjs",
|
3
|
-
"version": "0.5.
|
3
|
+
"version": "0.5.5",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "handlebarsjs",
|
9
|
-
"version": "0.5.
|
9
|
+
"version": "0.5.5",
|
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: handlebarsjs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
@@ -91,8 +91,8 @@ files:
|
|
91
91
|
- docs/project-plan/project_in_progress.svg
|
92
92
|
- lib/_.rb
|
93
93
|
- lib/handlebarsjs.rb
|
94
|
-
- lib/handlebarsjs/api.rb
|
95
94
|
- lib/handlebarsjs/base_helper.rb
|
95
|
+
- lib/handlebarsjs/configuration.rb
|
96
96
|
- lib/handlebarsjs/handlebars.rb
|
97
97
|
- lib/handlebarsjs/handlebars_snapshot.rb
|
98
98
|
- lib/handlebarsjs/helpers/array/join.rb
|