handlebarsjs 0.5.4 → 0.5.5

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: 1ae80a08fb0257c2b9f0ad6f48cd7c907bc15388b8a68d02ddd1b05ac69bff96
4
- data.tar.gz: 84a1eb1d565250f52346f7454e3122759e795d7801a0c1d4cd106af71b7dae8b
3
+ metadata.gz: 54e7659dac2a8cf398062a6d60ab21cb9532fd1f5bdac94d8b1ba203b0f69718
4
+ data.tar.gz: 2af427025be5ca3b734be0bb3d184d9bdc17d7fe56e6a6ef2bcd7cdc6d59750e
5
5
  SHA512:
6
- metadata.gz: f308dce020f6a57b9d6c2b21997abb5add4b9ad040b8217ab033b7f1ac990a94ca2c74e2ad1ebde394a16ffce031dc40341333d50705d83b91fc62ac570cdf47
7
- data.tar.gz: 2a6253654fcbd9c3ca30a2b4c071667bfe16814d72fa1a465edc2845fc658b88d23482b3521e9520d0585301d6a757ee4c69a8088deb49454cb869e12ef3c8e9
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
- handlebars_snapshot.add_library('handlebars', path: Handlebarsjs::HANDLEBARS_LIBRARY_PATH)
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: Handlebarsjs::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 = {})
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Handlebarsjs
4
- VERSION = '0.5.4'
4
+ VERSION = '0.5.5'
5
5
  end
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.4",
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.4",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "handlebarsjs",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "handlebarsjs GEM wraps the handlebars.js library and provides ruby/javascript interoperability",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
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
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
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # module Handlebarsjs
4
- # class Handlebars
5
-
6
- # end
7
- # end