template-ruby 0.2.1 → 0.2.4

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: fc096165f8db9f20877bbd67a8d326ecdcaa546bcf9fda19479a267d9e559504
4
- data.tar.gz: ae616ed093aded9378204f0231c2b4be787c3d62d0f9859d8971ea01c4fc8a8f
3
+ metadata.gz: 477a0d0d70a09f5118391d5288031811436a520c8faac5794da2ff3dcee996ad
4
+ data.tar.gz: e3e24d79c50c1058f619b63d09154b823acc3f0cd7b3c7ac75029c86df9e1bee
5
5
  SHA512:
6
- metadata.gz: 317b2f1d710abef57552f540fe756fcd7d8761d485d93332f091672b354cc9339d6f3ce1d2da009807ef0093944fa1ed41b4f4cdce3e666730d1632b88d056dc
7
- data.tar.gz: ffa81e7c9700f6dd30a9d09f18cfc17769446770364ab8dddfdcc8f90fd4ffd9caf35d5c0402106d45af3e9531a0d487a8d9b35a62f3c0f5abf26f290c24df7b
6
+ metadata.gz: ca7d9deac26c98d399d190a11192b8448a1c2bec8119a1dbfae6cca905554fd25d9bdfd91ffdbd2ad8ac73f743c07d30d5f97fab81d5d7d508ac7c8a09832217
7
+ data.tar.gz: d6da812be0c57c0c943ef44a46a7e0df3dd45f687251305c9cba5ada1d1f997dd57723405b129e5e2458139c9f2ef3baec31d9b66f4a850d01b5b8b1320cca37
@@ -0,0 +1,14 @@
1
+ name: RSpec
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ name: RSpec
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v1
12
+ - uses: actions/setup-ruby@v1
13
+ - run: bundle install
14
+ - run: bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -5,9 +5,22 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 0.2.4 / 2022-08-02
9
+
10
+ - Add method `String#*`, e.g. `{"Dorian " \* 2}" -> "Dorian Dorian "
11
+ - Add executable to gem, e.g. `template --help`
12
+
13
+ ## 0.2.3 / 2022-08-31
14
+
15
+ - Add default timeout for code and template parsing and evaluation
16
+
17
+ ## 0.2.2 / 2022-08-31
18
+
19
+ - Fix parsing error when the template is empty, e.g. ""
20
+
8
21
  ## 0.2.1 / 2022-08-31
9
22
 
10
- - Fix error on empty code like `Hello {`
23
+ - Fix parsing error on empty code like `Hello {`
11
24
 
12
25
  ## 0.2.0 / 2022-08-30
13
26
 
@@ -16,4 +29,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
16
29
  ## 0.1.0 / 2022-07-28
17
30
 
18
31
  - Initial version with interpolation
19
-
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- template-ruby (0.1.0)
4
+ template-ruby (0.2.3)
5
5
  activesupport (~> 7)
6
6
  parslet (~> 2)
7
7
  zeitwerk (~> 2.6)
@@ -21,7 +21,7 @@ GEM
21
21
  tilt
22
22
  i18n (1.12.0)
23
23
  concurrent-ruby (~> 1.0)
24
- minitest (5.16.2)
24
+ minitest (5.16.3)
25
25
  parslet (2.0.0)
26
26
  prettier (3.2.0)
27
27
  syntax_tree (>= 2.7.1)
@@ -42,9 +42,9 @@ GEM
42
42
  diff-lcs (>= 1.2.0, < 2.0)
43
43
  rspec-support (~> 3.11.0)
44
44
  rspec-support (3.11.0)
45
- syntax_tree (3.2.1)
45
+ syntax_tree (3.5.0)
46
46
  prettier_print
47
- syntax_tree-haml (1.3.0)
47
+ syntax_tree-haml (1.3.1)
48
48
  haml (>= 5.2)
49
49
  prettier_print
50
50
  syntax_tree (>= 2.0.1)
data/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2022 Dorian Marié <dorian@dorianmarie.fr>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,10 +1,103 @@
1
- # `template-ruby`
1
+ # Template
2
2
 
3
- A templating programming language
3
+ [![RSpec](https://github.com/dorianmariefr/template-ruby/actions/workflows/rspec.yml/badge.svg)](https://github.com/dorianmariefr/template-ruby/actions/workflows/rspec.yml)
4
4
 
5
- Like `Hello {name}` with `{name: "Dorian"}` gives `Hello Dorian`.
5
+ See [templatelang.com](https://templatelang.com) for the full documentation and
6
+ live code editing.
7
+
8
+ ## The programming language
9
+
10
+ Hi, I'm [Dorian Marié](https://dorianmarie.fr), I created Template to let users of my websites provide templates to customize their experience.
11
+
12
+ Template is meant to be:
13
+
14
+ - **Simple**: `Hello` and `Hello {name}`
15
+ - **Safe**: Can be provided user input
16
+ - **Powerful**: Functions, object-oriented, built-in methods
17
+
18
+ Template is currently written in Ruby and embeddable as a Ruby gem.
19
+
20
+ ## Install
21
+
22
+ ### As a command line tool:
23
+
24
+ ```bash
25
+ $ gem install template-ruby
26
+ $ template --input "Hello {name}" --context '{ name: "Dorian" }'
27
+ Hello Dorian
28
+ $ template --input "1 + 2 = {1 + 2}"
29
+ 1 + 2 = 3
30
+ ```
31
+
32
+ ### As a Ruby gem:
33
+
34
+ In a `Gemfile`:
6
35
 
7
36
  ```ruby
8
- > Template.render("Hello {name}", '{name: "Dorian"}')
9
- => "Hello Dorian"
37
+ gem "template-ruby"
10
38
  ```
39
+
40
+ Then `$ bundle install`
41
+
42
+ Then you can use Template like:
43
+
44
+ ```ruby
45
+ Template.render("Hello {name}", '{ name: "Dorian" }')
46
+ # => "Hello Dorian"
47
+ Template.render("1 + 2 = {1 + 2}")
48
+ # => "1 + 2 = 3"
49
+ Template.render(input, context, io: StringIO.new, timeout: 10)
50
+ ```
51
+
52
+ The context is a sub-language called Code, you can use it like:
53
+
54
+ ```ruby
55
+ Code.evaluate("1 + 2") # => 3
56
+ ```
57
+
58
+ ## Future work
59
+
60
+ - Extend standard library
61
+ - Global methods from Ruby, e.g. `{markdown "**bold**"}`
62
+ - Object methods from Ruby, e.g. `{"**bold**".markdown}`
63
+ - Classes, e.g. `{class User end}`
64
+ - Write JavaScript version
65
+ - Write Crystal version
66
+
67
+ ## Contributing
68
+
69
+ Feel free to open [issues](https://github.com/dorianmariefr/template-ruby/issues),
70
+ and [pull requests](https://github.com/dorianmariefr/template-ruby/pulls).
71
+
72
+ To develop locally:
73
+
74
+ ```text
75
+ $ git clone https://github.com/dorianmariefr/template-ruby
76
+ $ cd template-ruby
77
+ $ bundle
78
+ $ rspec
79
+ $ bin/template -i docs/...
80
+ ```
81
+
82
+ ## Credits
83
+
84
+ Thanks to [thoughtbot](https://thoughtbot.com) who let me work on this programming
85
+ language as a Friday project.
86
+
87
+ Thanks to [Kaspar Schiess](https://github.com/kschiess) who made
88
+ [Parslet](https://kschiess.github.io/parslet/), the gem that helped me write the parser.
89
+
90
+ Inspiration from [Ruby](https://www.ruby-lang.org/en/) and
91
+ [Liquid](https://shopify.github.io/liquid/).
92
+
93
+ ## License
94
+
95
+ MIT
96
+
97
+ Copyright 2022 Dorian Marié <dorian@dorianmarie.fr>
98
+
99
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
100
+
101
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
102
+
103
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/TODO.md ADDED
@@ -0,0 +1 @@
1
+ - Code gem
data/bin/template CHANGED
@@ -6,9 +6,9 @@ require_relative "../lib/template-ruby"
6
6
  options = {}
7
7
 
8
8
  OptionParser.new do |opts|
9
- opts.banner = "Usage: #{$PROGRAM_NAME} [options]"
9
+ opts.banner = "Usage: template [options]"
10
10
 
11
- opts.on("-i INPUT", "--input=INPUT", "Input in the template language") do |input|
11
+ opts.on("-i INPUT", "--input=INPUT", "Input in the template language (String or File)") do |input|
12
12
  if File.exists?(input)
13
13
  input = File.read(input)
14
14
  end
@@ -16,7 +16,7 @@ OptionParser.new do |opts|
16
16
  options[:input] = input
17
17
  end
18
18
 
19
- opts.on("-c CONTEXT", "--context=CONTEXT", "Context in the code language") do |context|
19
+ opts.on("-c CONTEXT", "--context=CONTEXT", "Context in the code language (String or File)") do |context|
20
20
  if File.exists?(context)
21
21
  context = File.read(context)
22
22
  end
@@ -8,9 +8,10 @@ class Code
8
8
  @arguments.map! { |argument| ::Code::Node::CallArgument.new(argument) }
9
9
 
10
10
  if call.key?(:right)
11
- @right = call.fetch(:right).map do |right|
12
- ::Code::Node::ChainedCall.new(right)
13
- end
11
+ @right =
12
+ call
13
+ .fetch(:right)
14
+ .map { |right| ::Code::Node::ChainedCall.new(right) }
14
15
  end
15
16
 
16
17
  if call.key?(:block)
@@ -59,7 +59,7 @@ class Code
59
59
  else
60
60
  acc + [element]
61
61
  end
62
- end
62
+ end,
63
63
  )
64
64
  end
65
65
 
@@ -138,7 +138,7 @@ class Code
138
138
  argument.call(
139
139
  arguments: [
140
140
  ::Code::Object::Argument.new(acc),
141
- ::Code::Object::Argument.new(element)
141
+ ::Code::Object::Argument.new(element),
142
142
  ],
143
143
  context: context,
144
144
  io: io,
@@ -169,7 +169,7 @@ class Code
169
169
  context: context,
170
170
  io: io,
171
171
  ).truthy?
172
- end
172
+ end,
173
173
  )
174
174
  end
175
175
 
@@ -183,7 +183,7 @@ class Code
183
183
  context: context,
184
184
  io: io,
185
185
  )
186
- end
186
+ end,
187
187
  )
188
188
  end
189
189
 
@@ -54,13 +54,11 @@ class Code
54
54
  argument = arguments.first.value
55
55
  ::Code::Object::Boolean.new(
56
56
  raw.any? do |element|
57
- argument
58
- .call(
59
- arguments: [::Code::Object::Argument.new(element)],
60
- context: context,
61
- io: io,
62
- )
63
- .truthy?
57
+ argument.call(
58
+ arguments: [::Code::Object::Argument.new(element)],
59
+ context: context,
60
+ io: io,
61
+ ).truthy?
64
62
  end,
65
63
  )
66
64
  end
@@ -70,13 +68,11 @@ class Code
70
68
  argument = arguments.first.value
71
69
  ::Code::Object::Boolean.new(
72
70
  raw.all? do |element|
73
- argument
74
- .call(
75
- arguments: [::Code::Object::Argument.new(element)],
76
- context: context,
77
- io: io,
78
- )
79
- .truthy?
71
+ argument.call(
72
+ arguments: [::Code::Object::Argument.new(element)],
73
+ context: context,
74
+ io: io,
75
+ ).truthy?
80
76
  end,
81
77
  )
82
78
  end
@@ -104,7 +100,7 @@ class Code
104
100
  context: context,
105
101
  io: io,
106
102
  ).truthy?
107
- end
103
+ end,
108
104
  )
109
105
  end
110
106
 
@@ -118,7 +114,7 @@ class Code
118
114
  context: context,
119
115
  io: io,
120
116
  )
121
- end
117
+ end,
122
118
  )
123
119
  end
124
120
 
@@ -131,9 +127,13 @@ class Code
131
127
  list << element
132
128
 
133
129
  if @exlucde_end
134
- list << element while (element = element + argument) < @right
130
+ while (element = element + argument) < @right
131
+ list << element
132
+ end
135
133
  else
136
- list << element while (element = element + argument) <= @right
134
+ while (element = element + argument) <= @right
135
+ list << element
136
+ end
137
137
  end
138
138
 
139
139
  list
@@ -15,6 +15,8 @@ class Code
15
15
  to_function(arguments)
16
16
  elsif operator == "+"
17
17
  plus(arguments)
18
+ elsif operator == "*"
19
+ multiplication(arguments)
18
20
  elsif operator == "reverse"
19
21
  reverse(arguments)
20
22
  else
@@ -51,6 +53,12 @@ class Code
51
53
  ::Code::Object::String.new(raw + other.raw)
52
54
  end
53
55
 
56
+ def multiplication(arguments)
57
+ sig(arguments, ::Code::Object::Number)
58
+ other = arguments.first.value
59
+ ::Code::Object::String.new(raw * other.raw)
60
+ end
61
+
54
62
  def reverse(arguments)
55
63
  sig(arguments)
56
64
  ::Code::Object::String.new(raw.reverse)
data/lib/code/object.rb CHANGED
@@ -45,11 +45,7 @@ class Code
45
45
 
46
46
  def <=>(other)
47
47
  if respond_to?(:raw)
48
- if other.respond_to?(:raw)
49
- raw <=> other.raw
50
- else
51
- raw <=> other
52
- end
48
+ other.respond_to?(:raw) ? raw <=> other.raw : raw <=> other
53
49
  else
54
50
  other <=> self
55
51
  end
@@ -57,11 +53,7 @@ class Code
57
53
 
58
54
  def ==(other)
59
55
  if respond_to?(:raw)
60
- if other.respond_to?(:raw)
61
- raw == other.raw
62
- else
63
- raw == other
64
- end
56
+ other.respond_to?(:raw) ? raw == other.raw : raw == other
65
57
  else
66
58
  other == self
67
59
  end
@@ -9,7 +9,8 @@ class Code
9
9
  rule(:whitespace?) { whitespace.maybe }
10
10
 
11
11
  rule(:code) do
12
- (whitespace?.ignore >> statement >> whitespace?.ignore).repeat(1) | whitespace?.ignore
12
+ (whitespace?.ignore >> statement >> whitespace?.ignore).repeat(1) |
13
+ whitespace?.ignore
13
14
  end
14
15
 
15
16
  root(:code)
data/lib/code.rb CHANGED
@@ -1,22 +1,26 @@
1
1
  class Code
2
- def initialize(input, io: $stdout)
2
+ def initialize(input, io: $stdout, timeout: 10)
3
3
  @input = input
4
- @parsed = ::Code::Parser::Code.new.parse(@input)
4
+ @parsed =
5
+ Timeout.timeout(timeout) { ::Code::Parser::Code.new.parse(@input) }
5
6
  @io = io
7
+ @timeout = timeout
6
8
  end
7
9
 
8
- def self.evaluate(input, context = "", io: $stdout)
9
- new(input, io: io).evaluate(context)
10
+ def self.evaluate(input, context = "", io: $stdout, timeout: 10)
11
+ new(input, io: io, timeout: timeout).evaluate(context)
10
12
  end
11
13
 
12
14
  def evaluate(context = "")
13
- if context.present?
14
- context = ::Code.evaluate(context)
15
- else
16
- context = ::Code::Object::Dictionnary.new
17
- end
15
+ Timeout.timeout(@timeout) do
16
+ if context.present?
17
+ context = ::Code.evaluate(context, timeout: @timeout)
18
+ else
19
+ context = ::Code::Object::Dictionnary.new
20
+ end
18
21
 
19
- ::Code::Node::Code.new(parsed).evaluate(context: context, io: @io)
22
+ ::Code::Node::Code.new(parsed).evaluate(context: context, io: @io)
23
+ end
20
24
  end
21
25
 
22
26
  private
@@ -15,10 +15,14 @@ class Template
15
15
  end
16
16
 
17
17
  rule(:code_part) do
18
- left_curly_bracket.ignore >> code >> (right_curly_bracket.ignore | any.absent?)
18
+ left_curly_bracket.ignore >> code >>
19
+ (right_curly_bracket.ignore | any.absent?)
19
20
  end
20
21
 
21
- rule(:template) { (text_part.as(:text) | code_part.as(:code)).repeat(1) }
22
+ rule(:template) do
23
+ (text_part.as(:text) | code_part.as(:code)).repeat(1) |
24
+ str("").as(:text).repeat(1, 1)
25
+ end
22
26
 
23
27
  root(:template)
24
28
  end
@@ -0,0 +1,3 @@
1
+ require_relative "../template"
2
+
3
+ Template::Version = Gem::Version.new("0.2.4")
data/lib/template-ruby.rb CHANGED
@@ -4,6 +4,7 @@ require "bigdecimal"
4
4
  require "active_support"
5
5
  require "active_support/core_ext/object/blank"
6
6
  require "stringio"
7
+ require "timeout"
7
8
 
8
9
  loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false)
9
10
  loader.ignore(__FILE__)
data/lib/template.rb CHANGED
@@ -1,25 +1,34 @@
1
1
  class Template
2
- VERSION = Gem::Version.new("0.2.1")
3
-
4
- def initialize(input, io: StringIO.new)
2
+ def initialize(input, io: StringIO.new, timeout: 10)
5
3
  @input = input
6
- @parsed = ::Template::Parser::Template.new.parse(@input)
4
+ @parsed =
5
+ Timeout.timeout(timeout) do
6
+ ::Template::Parser::Template.new.parse(@input)
7
+ end
7
8
  @io = io
9
+ @timeout = timeout
8
10
  end
9
11
 
10
- def self.render(input, context = "", io: StringIO.new)
11
- new(input, io: io).render(context)
12
+ def self.render(input, context = "", io: StringIO.new, timeout: 10)
13
+ new(input, io: io, timeout: timeout).render(context)
12
14
  end
13
15
 
14
16
  def render(context = "")
15
- if context.present?
16
- context = ::Code.evaluate(context)
17
- else
18
- context = ::Code::Object::Dictionnary.new
19
- end
17
+ Timeout.timeout(@timeout) do
18
+ if context.present?
19
+ context = ::Code.evaluate(context, timeout: @timeout)
20
+ else
21
+ context = ::Code::Object::Dictionnary.new
22
+ end
20
23
 
21
- ::Template::Node::Template.new(@parsed).evaluate(context: context, io: @io)
24
+ ::Template::Node::Template.new(@parsed).evaluate(
25
+ context: context,
26
+ io: @io,
27
+ )
22
28
 
23
- @io.is_a?(StringIO) ? @io.string : nil
29
+ @io.is_a?(StringIO) ? @io.string : nil
30
+ end
24
31
  end
25
32
  end
33
+
34
+ require_relative "template/version"
@@ -21,9 +21,7 @@ RSpec.describe Code::Parser::Call do
21
21
  },
22
22
  },
23
23
  },
24
- right: [{
25
- name: "times",
26
- }],
24
+ right: [{ name: "times" }],
27
25
  },
28
26
  },
29
27
  ],
data/spec/code_spec.rb CHANGED
@@ -95,6 +95,7 @@ RSpec.describe Code do
95
95
  ["until true end", ""],
96
96
  ["until true\nend", ""],
97
97
  %w[("Good".."Bad").first Good],
98
+ ['"Dorian " * 2', "Dorian Dorian "],
98
99
  ].each do |(input, expected)|
99
100
  context input.inspect do
100
101
  let(:input) { input }
@@ -12,9 +12,8 @@ RSpec.describe Template do
12
12
  '{ user: { first_name: "Dorian" } }',
13
13
  "Hello Dorian",
14
14
  ],
15
- [<<~TEMPLATE, "", "Hello "]
16
- Hello {
17
- TEMPLATE
15
+ ["Hello {", "", "Hello "],
16
+ ["", "", ""],
18
17
  ].each do |(input, input_context, expected)|
19
18
  context "#{input.inspect} #{input_context.inspect}" do
20
19
  let(:input) { input }
@@ -1,8 +1,8 @@
1
- require_relative "lib/template-ruby"
1
+ require_relative "lib/template/version"
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "template-ruby"
5
- s.version = ::Template::VERSION
5
+ s.version = ::Template::Version
6
6
  s.summary = "A templating programming language"
7
7
  s.description =
8
8
  'Like "Hello {name}" with {name: "Dorian"} gives "Hello Dorian"'
@@ -13,6 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.require_paths = ["lib"]
14
14
  s.homepage = "https://github.com/dorianmariefr/template-ruby"
15
15
  s.license = "MIT"
16
+ s.executables = "template"
16
17
 
17
18
  s.add_dependency "activesupport", "~> 7"
18
19
  s.add_dependency "parslet", "~> 2"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: template-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-31 00:00:00.000000000 Z
11
+ date: 2022-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -82,18 +82,22 @@ dependencies:
82
82
  version: '3'
83
83
  description: 'Like "Hello {name}" with {name: "Dorian"} gives "Hello Dorian"'
84
84
  email: dorian@dorianmarie.fr
85
- executables: []
85
+ executables:
86
+ - template
86
87
  extensions: []
87
88
  extra_rdoc_files: []
88
89
  files:
89
90
  - ".editorconfig"
91
+ - ".github/workflows/rspec.yml"
90
92
  - ".gitignore"
91
93
  - ".prettierrc"
92
94
  - ".rspec"
93
95
  - CHANGELOG.md
94
96
  - Gemfile
95
97
  - Gemfile.lock
98
+ - LICENSE
96
99
  - README.md
100
+ - TODO.md
97
101
  - bin/template
98
102
  - docs/euler/1.template
99
103
  - docs/euler/2.template
@@ -201,6 +205,7 @@ files:
201
205
  - lib/template/node/text_part.rb
202
206
  - lib/template/parser.rb
203
207
  - lib/template/parser/template.rb
208
+ - lib/template/version.rb
204
209
  - spec/call_spec.rb
205
210
  - spec/code/error/type_error_spec.rb
206
211
  - spec/code/parser/boolean_spec.rb