hamlit 2.7.0 → 2.7.1

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
  SHA1:
3
- metadata.gz: 2cc9b6d89274a0d67b34821d9db5c3f8b030def3
4
- data.tar.gz: 53bd799f72ed3f007be514fa4c792a4e50aee750
3
+ metadata.gz: dcba4705c56d2c130668fb235560be337b5b4080
4
+ data.tar.gz: cd2cc85376d294046608a0e7c36b160f83971d8e
5
5
  SHA512:
6
- metadata.gz: f67f45ef08b9a44a27d3fb35aafd128d34797ecf1cb15ac7dc7647cbf916b296c6d457f1e937b0b7afc448a1d6fe229e2ac1839471f17914d6656eb282bc2ef6
7
- data.tar.gz: 3a5b6bf125cddd93639913653b29d7d66b58268003c109b13cccc7d352e9839ebdf4433a646122546a2a4822840fcdb2f48d56fc981f6545bfe7d1a60e3bb861
6
+ metadata.gz: 5b9c550bb834c50c714a7fab554d07a42e8007b1b7ccb3a6734295eb410056541106a14a183f4731e7c3c838832445d8eee0612da05eda28daa179f476117d00
7
+ data.tar.gz: a098b5ce23d3f7c99fdd814b665c289bde1c61bc4a54eeb58ebcfb2c1d50aae565b70e3fad00e4490c2ef71f828ed5af1cc60c650c2b13f769dcfbc5e17fabfd
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. This
4
4
  project adheres to [Semantic Versioning](http://semver.org/). This change log is based upon
5
5
  [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog).
6
6
 
7
+ ## [2.7.1](https://github.com/k0kubun/hamlit/compare/v2.7.0...v2.7.1) - 2016-09-19
8
+
9
+ ### Fixed
10
+
11
+ - Fix Rails handler to use `ActionView::OutputBuffer` instead of `ActionView::SafeBuffer` to justify encoding
12
+ [#89](https://github.com/k0kubun/hamlit/pull/89). *Thanks to @akelmanson*
13
+
7
14
  ## [2.7.0](https://github.com/k0kubun/hamlit/compare/v2.6.2...v2.7.0) - 2016-08-31
8
15
 
9
16
  ### Changed
@@ -4,6 +4,9 @@ require 'thor'
4
4
 
5
5
  module Hamlit
6
6
  class CLI < Thor
7
+ class_option :escape_html, type: :boolean, default: true
8
+ class_option :escape_attrs, type: :boolean, default: true
9
+
7
10
  desc 'render HAML', 'Render haml template'
8
11
  option :load_path, type: :string, aliases: %w[-I]
9
12
  option :require, type: :string, aliases: %w[-r]
@@ -65,7 +68,7 @@ module Hamlit
65
68
  end
66
69
  end_src
67
70
  else
68
- Hamlit::Engine.new.call(template)
71
+ Hamlit::Engine.new(engine_options).call(template)
69
72
  end
70
73
  end
71
74
 
@@ -80,7 +83,10 @@ module Hamlit
80
83
  end
81
84
 
82
85
  def engine_options
83
- Hamlit::Engine.options
86
+ Hamlit::Engine.options.to_h.merge(
87
+ escape_attrs: options[:escape_attrs],
88
+ escape_html: options[:escape_html],
89
+ )
84
90
  end
85
91
 
86
92
  # Flexible default_task, compatible with haml's CLI
@@ -12,6 +12,7 @@ module Hamlit
12
12
  register_as: :haml,
13
13
  use_html_safe: true,
14
14
  streaming: true,
15
+ buffer_class: 'ActionView::OutputBuffer',
15
16
  )
16
17
 
17
18
  # https://github.com/haml/haml/blob/4.0.7/lib/haml/template.rb
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hamlit
3
- VERSION = '2.7.0'
3
+ VERSION = '2.7.1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hamlit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-30 00:00:00.000000000 Z
11
+ date: 2016-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: temple