handlebarsjs 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,41 @@
1
+ KManager.action :project_plan do
2
+ action do
3
+
4
+ DrawioDsl::Drawio
5
+ .init(k_builder, on_exist: :write, on_action: :execute)
6
+ .diagram(rounded: 1, glass: 1)
7
+ .page('In progress', theme: :style_03, margin_left: 0, margin_top: 0) do
8
+
9
+ h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
10
+ # p(x: 350, y: 40, w: 400, h: 80, title: 'Project plan - In progress')
11
+
12
+ grid_layout(y: 90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
13
+
14
+ todo(title: 'add miniracer to gem and test sample JS with snapshot')
15
+ todo(title: 'add handlebarsjs file and load into snapshot')
16
+ todo(title: 'get handlebars working with simple templates')
17
+ todo(title: 'write a simple handlebars help in ruby')
18
+ end
19
+ .page('To Do', theme: :style_02, margin_left: 0, margin_top: 0) do
20
+
21
+ # h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
22
+ # p(x: 350, y: 40, w: 400, h: 80, title: 'Project plan')
23
+
24
+ grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
25
+
26
+ end
27
+ .page('Done', theme: :style_06, margin_left: 0, margin_top: 0) do
28
+
29
+ # h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
30
+ # p(x: 350, y: 40, w: 400, h: 80, title: 'Done')
31
+
32
+ grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
33
+
34
+ end
35
+ .cd(:docs)
36
+ .save('project-plan/project.drawio')
37
+ .export_svg('project-plan/project_in_progress', page: 1)
38
+ .export_svg('project-plan/project_todo' , page: 2)
39
+ .export_svg('project-plan/project_done' , page: 3)
40
+ end
41
+ end
data/.releaserc.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "branches": [
3
+ "main"
4
+ ],
5
+ "plugins": [
6
+ "@semantic-release/commit-analyzer",
7
+ "@semantic-release/release-notes-generator",
8
+ [
9
+ "@semantic-release/npm",
10
+ {
11
+ "npmPublish": false
12
+ }
13
+ ],
14
+ [
15
+ "@klueless-js/semantic-release-rubygem",
16
+ {
17
+ "gemPublish": true
18
+ }
19
+ ],
20
+ [
21
+ "@semantic-release/changelog",
22
+ {
23
+ "changelogFile": "CHANGELOG.md",
24
+ "changelogFileTitle": "Handlebarsjs Changelog"
25
+ }
26
+ ],
27
+ [
28
+ "@semantic-release/git",
29
+ {
30
+ "assets": [
31
+ "lib/handlebarsjs/version.rb",
32
+ "CHANGELOG.md"
33
+ ],
34
+ "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
35
+ }
36
+ ],
37
+ "@semantic-release/github"
38
+ ],
39
+ "repositoryUrl": "git@github.com:klueless-io/handlebarsjs.git"
40
+ }
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,89 @@
1
+ inherit_mode:
2
+ merge:
3
+ - Exclude # see: https://stackoverflow.com/a/70818366/473923
4
+ - AllowedNames
5
+ AllCops:
6
+ TargetRubyVersion: 2.7
7
+ DisplayCopNames: true
8
+ ExtraDetails: true
9
+ NewCops: enable
10
+ Exclude:
11
+ - ".builders/**/*"
12
+ - "spec/samples/**/*"
13
+
14
+ Metrics/BlockLength:
15
+ Exclude:
16
+ - "**/spec/**/*"
17
+ - "*.gemspec"
18
+ IgnoredMethods:
19
+ - configure
20
+ - context
21
+ - define
22
+ - describe
23
+ - draw
24
+ - factory
25
+ - feature
26
+ - guard
27
+ - included
28
+ - it
29
+ - let
30
+ - let!
31
+ - scenario
32
+ - setup
33
+ - shared_context
34
+ - shared_examples
35
+ - shared_examples_for
36
+ - transaction
37
+
38
+ Metrics/MethodLength:
39
+ Max: 25
40
+
41
+ Layout/LineLength:
42
+ Max: 200
43
+ # Ignores annotate output
44
+ IgnoredPatterns: ['\A# \*\*']
45
+ IgnoreCopDirectives: true
46
+
47
+ Lint/UnusedMethodArgument:
48
+ AllowUnusedKeywordArguments: true
49
+
50
+ Style/BlockComments:
51
+ Enabled: false
52
+ Include:
53
+ - "**/spec/*"
54
+
55
+ # My Preferences - Start
56
+ Metrics/ClassLength:
57
+ Enabled: false
58
+ Metrics/ModuleLength:
59
+ Exclude:
60
+ - "**/spec/**/*"
61
+ Naming/MemoizedInstanceVariableName:
62
+ Enabled: false
63
+ Naming/VariableNumber:
64
+ Exclude:
65
+ - "**/spec/**/*"
66
+ Naming/MethodParameterName:
67
+ AllowedNames:
68
+ - as
69
+ Style/EmptyMethod:
70
+ Exclude:
71
+ - "**/spec/**/*"
72
+ Metrics/ParameterLists:
73
+ Exclude:
74
+ - "**/spec/**/*"
75
+ Layout/EmptyLineBetweenDefs:
76
+ Exclude:
77
+ - "**/spec/**/*"
78
+
79
+ Lint/AmbiguousBlockAssociation:
80
+ Exclude:
81
+ - "**/spec/**/*"
82
+
83
+ Style/AccessorGrouping:
84
+ Enabled: false
85
+
86
+ Layout/SpaceBeforeComma:
87
+ Enabled: false
88
+ # My Preferences - End
89
+
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2022-04-18
4
+
5
+ - Initial release
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ - Using welcoming and inclusive language
18
+ - Being respectful of differing viewpoints and experiences
19
+ - Gracefully accepting constructive criticism
20
+ - Focusing on what is best for the community
21
+ - Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ - The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ - Trolling, insulting/derogatory comments, and personal or political attacks
28
+ - Public or private harassment
29
+ - Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ - Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at david.cruwys@bugcrowd.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
6
+
7
+ group :development, :test do
8
+ gem 'guard-bundler'
9
+ gem 'guard-rspec'
10
+ gem 'guard-rubocop'
11
+ gem 'rake', '~> 12.0'
12
+ gem 'rake-compiler', require: false
13
+ gem 'rspec', '~> 3.0'
14
+ gem 'rubocop'
15
+ gem 'rubocop-rake', require: false
16
+ gem 'rubocop-rspec', require: false
17
+ end
18
+
19
+ group :test do
20
+ gem 'simplecov', require: false
21
+ end
data/Guardfile ADDED
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ guard :bundler, cmd: 'bundle install' do
4
+ watch('Gemfile')
5
+ watch('.gemspec')
6
+ end
7
+
8
+ group :green_pass_then_cop, halt_on_fail: true do
9
+ guard :rspec, cmd: 'bundle exec rspec -f doc' do
10
+ require 'guard/rspec/dsl'
11
+ dsl = Guard::RSpec::Dsl.new(self)
12
+
13
+ # RSpec files
14
+ rspec = dsl.rspec
15
+ watch(rspec.spec_helper) { rspec.spec_dir }
16
+ watch(rspec.spec_support) { rspec.spec_dir }
17
+ watch(rspec.spec_files)
18
+
19
+ # Ruby files
20
+ ruby = dsl.ruby
21
+ dsl.watch_spec_files_for(ruby.lib_files)
22
+ watch(%r{^lib//(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
23
+ watch(%r{^lib//commands/(.+)\.rb$}) { |m| "spec/unit/commands/#{m[1]}_spec.rb" }
24
+ end
25
+
26
+ guard :rubocop, all_on_start: false, cli: ['--format', 'clang'] do
27
+ watch(/{.+\.rb$/)
28
+ watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
29
+ end
30
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 David Cruwys
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,82 @@
1
+ # Handlebarsjs
2
+
3
+ > handlebarsjs GEM wraps the handlebars.js library and provides ruby/javascript interoperability
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'handlebarsjs'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ ```bash
16
+ bundle install
17
+ ```
18
+
19
+ Or install it yourself as:
20
+
21
+ ```bash
22
+ gem install handlebarsjs
23
+ ```
24
+
25
+ ## Stories
26
+
27
+ ### Main Story
28
+
29
+ As a Ruby Developer, I want to use handlebarsjs from my ruby applications, so that I can easily access javascript templating
30
+
31
+ See [project plan](./docs/project-plan.md)
32
+
33
+
34
+ ## Usage
35
+
36
+ See all [usage examples](./USAGE.md)
37
+
38
+
39
+
40
+ ## Development
41
+
42
+ Checkout the repo
43
+
44
+ ```bash
45
+ git clone
46
+ ```
47
+
48
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
49
+
50
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
51
+
52
+ ```bash
53
+ bin/console
54
+
55
+ Aaa::Bbb::Program.execute()
56
+ # => ""
57
+ ```
58
+
59
+ `handlebarsjs` is setup with Guard, run `guard`, this will watch development file changes and run tests automatically, if successful, it will then run rubocop for style quality.
60
+
61
+ To release a new version, update the version number in `version.rb`, build the gem and push the `.gem` file to [rubygems.org](https://rubygems.org).
62
+
63
+ ```bash
64
+ rake publish
65
+ rake clean
66
+ ```
67
+
68
+ ## Contributing
69
+
70
+ Bug reports and pull requests are welcome on GitHub at https://github.com/klueless-io/handlebarsjs. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
71
+
72
+ ## License
73
+
74
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
75
+
76
+ ## Code of Conduct
77
+
78
+ Everyone interacting in the Handlebarsjs project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/klueless-io/handlebarsjs/blob/master/CODE_OF_CONDUCT.md).
79
+
80
+ ## Copyright
81
+
82
+ Copyright (c) David Cruwys. See [MIT License](LICENSE.txt) for further details.
data/Rakefile ADDED
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ # source: https://stephenagrice.medium.com/making-a-command-line-ruby-gem-write-build-and-push-aec24c6c49eb
4
+
5
+ GEM_NAME = 'handlebarsjs'
6
+
7
+ require 'bundler/gem_tasks'
8
+ require 'rspec/core/rake_task'
9
+ require 'handlebarsjs/version'
10
+
11
+ RSpec::Core::RakeTask.new(:spec)
12
+
13
+ require 'rake/extensiontask'
14
+
15
+ desc 'Compile all the extensions'
16
+ task build: :compile
17
+
18
+ Rake::ExtensionTask.new('handlebarsjs') do |ext|
19
+ ext.lib_dir = 'lib/handlebarsjs'
20
+ end
21
+
22
+ desc 'Publish the gem to RubyGems.org'
23
+ task :publish do
24
+ version = Handlebarsjs::VERSION
25
+ system 'gem build'
26
+ system "gem push #{GEM_NAME}-#{version}.gem"
27
+ end
28
+
29
+ desc 'Remove old *.gem files'
30
+ task :clean do
31
+ system 'rm *.gem'
32
+ end
33
+
34
+ task default: %i[clobber compile spec]
data/bin/console ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # frozen_string_literal: true
4
+
5
+ require 'bundler/setup'
6
+ require 'handlebarsjs'
7
+
8
+ # You can add fixtures and/or initialization code here to make experimenting
9
+ # with your gem easier. You can also use a different console, if you like.
10
+
11
+ # (If you use this, don't forget to add pry to your Gemfile!)
12
+ # require 'pry'
13
+ # Pry.start
14
+
15
+ require 'irb'
16
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # frozen_string_literal: true
4
+
5
+ set -euo pipefail
6
+ IFS=$'\n\t'
7
+ set -vx
8
+
9
+ bundle install
10
+
11
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,41 @@
1
+ <mxfile host="5eX">
2
+ <diagram id="URK" name="In progress">
3
+ <mxGraphModel dx="0" dy="0" background="#FFFAFA" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
4
+ <root>
5
+ <mxCell id="page_root_URK" parent="URK"/>
6
+ <mxCell id="node_root_URK" parent="page_root_URK"/>
7
+ <mxCell id="URK-1" value="DrawIO DSL" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fontColor=#1F2D3D;text;fontSize=28;fontStyle=1;fillColor=none" vertex="1" parent="node_root_URK">
8
+ <mxGeometry x="300" y="0" width="400" height="80" as="geometry"/>
9
+ </mxCell>
10
+ <mxCell id="URK-3" value="add miniracer to gem and test sample JS with snapshot" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#333333" vertex="1" parent="node_root_URK">
11
+ <mxGeometry x="10" y="10" width="300" height="60" as="geometry"/>
12
+ </mxCell>
13
+ <mxCell id="URK-4" value="add handlebarsjs file and load into snapshot" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#333333" vertex="1" parent="node_root_URK">
14
+ <mxGeometry x="330" y="10" width="300" height="60" as="geometry"/>
15
+ </mxCell>
16
+ <mxCell id="URK-5" value="get handlebars working with simple templates" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#333333" vertex="1" parent="node_root_URK">
17
+ <mxGeometry x="650" y="10" width="300" height="60" as="geometry"/>
18
+ </mxCell>
19
+ <mxCell id="URK-6" value="write a simple handlebars help in ruby" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#333333" vertex="1" parent="node_root_URK">
20
+ <mxGeometry x="10" y="90" width="300" height="60" as="geometry"/>
21
+ </mxCell>
22
+ </root>
23
+ </mxGraphModel>
24
+ </diagram>
25
+ <diagram id="Wz9" name="To Do">
26
+ <mxGraphModel dx="0" dy="0" background="#FFFAFA" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
27
+ <root>
28
+ <mxCell id="page_root_Wz9" parent="Wz9"/>
29
+ <mxCell id="node_root_Wz9" parent="page_root_Wz9"/>
30
+ </root>
31
+ </mxGraphModel>
32
+ </diagram>
33
+ <diagram id="XYc" name="Done">
34
+ <mxGraphModel dx="0" dy="0" background="#FFFAFA" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
35
+ <root>
36
+ <mxCell id="page_root_XYc" parent="XYc"/>
37
+ <mxCell id="node_root_XYc" parent="page_root_XYc"/>
38
+ </root>
39
+ </mxGraphModel>
40
+ </diagram>
41
+ </mxfile>
@@ -0,0 +1,3 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="942px" height="152px" viewBox="-0.5 -0.5 942 152"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-0.9-ffffff-0.1-s-0"><stop offset="0%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.9;"/><stop offset="100%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"/></linearGradient></defs><g><rect x="290" y="0" width="400" height="80" rx="12" ry="12" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 398px; height: 1px; padding-top: 7px; margin-left: 292px;"><div data-drawio-colors="color: #1F2D3D; " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 28px; font-family: Helvetica; color: rgb(31, 45, 61); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">DrawIO DSL</div></div></div></foreignObject><text x="292" y="35" fill="#1F2D3D" font-family="Helvetica" font-size="28px" font-weight="bold">DrawIO DSL</text></switch></g><rect x="0" y="10" width="300" height="60" rx="9" ry="9" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/><path d="M 10.15 9 Q -1 9 -1 20.15 L -1 34 Q 150 52 301 34 L 301 20.15 Q 301 9 289.85 9 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 40px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">add miniracer to gem and test sample JS with snapshot</div></div></div></foreignObject><text x="150" y="44" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add miniracer to gem and test sample JS with snaps...</text></switch></g><rect x="320" y="10" width="300" height="60" rx="9" ry="9" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/><path d="M 330.15 9 Q 319 9 319 20.15 L 319 34 Q 470 52 621 34 L 621 20.15 Q 621 9 609.85 9 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 40px; margin-left: 321px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">add handlebarsjs file and load into snapshot</div></div></div></foreignObject><text x="470" y="44" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add handlebarsjs file and load into snapshot</text></switch></g><rect x="640" y="10" width="300" height="60" rx="9" ry="9" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/><path d="M 650.15 9 Q 639 9 639 20.15 L 639 34 Q 790 52 941 34 L 941 20.15 Q 941 9 929.85 9 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 40px; margin-left: 641px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">get handlebars working with simple templates</div></div></div></foreignObject><text x="790" y="44" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">get handlebars working with simple templates</text></switch></g><rect x="0" y="90" width="300" height="60" rx="9" ry="9" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/><path d="M 10.15 89 Q -1 89 -1 100.15 L -1 114 Q 150 132 301 114 L 301 100.15 Q 301 89 289.85 89 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 120px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">write a simple handlebars help in ruby</div></div></div></foreignObject><text x="150" y="124" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">write a simple handlebars help in ruby</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Handlebarsjs
4
+ VERSION = '0.1.0'
5
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'handlebarsjs/version'
4
+
5
+ module Handlebarsjs
6
+ # raise Handlebarsjs::Error, 'Sample message'
7
+ Error = Class.new(StandardError)
8
+
9
+ # Your code goes here...
10
+ end
11
+
12
+ if ENV['KLUE_DEBUG']&.to_s&.downcase == 'true'
13
+ namespace = 'Handlebarsjs::Version'
14
+ file_path = $LOADED_FEATURES.find { |f| f.include?('handlebarsjs/version') }
15
+ version = Handlebarsjs::VERSION.ljust(9)
16
+ puts "#{namespace.ljust(35)} : #{version.ljust(9)} : #{file_path}"
17
+ end