template-ruby 0.6.2 → 0.6.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 563310c18f63131c45c4e8fb05a002765c9fe67b5d118d0bbd1683d9ba52fe8c
4
- data.tar.gz: 5d135daf4766e24fbff6ac875050432510f5408e1e105d7834985ff540e0e0f7
3
+ metadata.gz: fd86e9a8f7b032f9cba8130850b0e1318837ae12b409bf05e0d3084f7b87a1f8
4
+ data.tar.gz: 4ffad807a8904a9914f48b69c0e63de4d9e2e829f67ed7209b25cc79688744e5
5
5
  SHA512:
6
- metadata.gz: b28803d77e9e60bb4f38377c8f81755f23e3d89bbb9cf35bf779337a3ecf86854db6acfa2f018fd126cbf234b8307640aa1d0567b4747c7df432d4a6aa157a30
7
- data.tar.gz: 48c9939a07e16a0f400970554938296f5e6faa7114226e641814f4442ebc0bd0ee898e0a00a7c5ff5c624495d871806771c1cbf6316b8c517bc0eedc175abfd8
6
+ metadata.gz: c73de839e8882af7e41610a9875b6e7bec6773a0f7980fe2df469f25fcf4edf9d628730f531c051fb958d36d93b276b20b5823302cddd555890434e67a02020e
7
+ data.tar.gz: 6b37fe976195028ed03eff1f371a18253a25f599161382d66607f402614643845cdb76363d54ed2f93b3746f2576e83d00a125ee42df762ee6323a6e97ac9538
@@ -1,3 +1,3 @@
1
1
  require_relative "../template"
2
2
 
3
- Template::Version = Gem::Version.new("0.6.2")
3
+ Template::Version = Gem::Version.new("0.6.3")
data/lib/template.rb CHANGED
@@ -3,7 +3,7 @@ class Template
3
3
  GLOBALS = %i[io context object].freeze
4
4
  DEFAULT_TIMEOUT = 0
5
5
 
6
- def initialize(input, io: StringIO.new, timeout: DEFAULT_TIMEOUT, ruby: {})
6
+ def initialize(input, io: ::StringIO.new, timeout: DEFAULT_TIMEOUT, ruby: {})
7
7
  @input = input
8
8
  @parsed = Timeout.timeout(timeout) { ::Template::Parser.parse(@input).to_raw }
9
9
  @io = io
@@ -14,7 +14,7 @@ class Template
14
14
  def self.evaluate(
15
15
  input,
16
16
  context = "",
17
- io: StringIO.new,
17
+ io: ::StringIO.new,
18
18
  timeout: DEFAULT_TIMEOUT,
19
19
  ruby: {}
20
20
  )
@@ -25,9 +25,9 @@ class Template
25
25
  Timeout.timeout(timeout) do
26
26
  context =
27
27
  if context == EMPTY_STRING
28
- Object::Context.new
28
+ ::Code::Object::Context.new
29
29
  else
30
- Code.evaluate(context, timeout:, io:, ruby:).code_to_context
30
+ ::Code.evaluate(context, timeout:, io:, ruby:).code_to_context
31
31
  end
32
32
 
33
33
  raise(Error::IncompatibleContext) unless context.is_a?(::Code::Object::Context)
@@ -36,7 +36,7 @@ class Template
36
36
 
37
37
  ::Template::Node::Template.new(parsed).evaluate(context:, io:)
38
38
 
39
- io.is_a?(StringIO) ? io.string : nil
39
+ io.is_a?(::StringIO) ? io.string : nil
40
40
  end
41
41
  end
42
42
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: template-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié