grease 0.3.1 → 0.3.2

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
  SHA1:
3
- metadata.gz: 54e6eb00d0149184d210574259a88637bbf648f8
4
- data.tar.gz: 360f466f955e5c7cc06a3eecbdbe2f5a5b34f462
3
+ metadata.gz: 7ac64128d88393b28c35c388d4677d3064b34dd7
4
+ data.tar.gz: 905c22357389fe5afe1f43e224960de4de54b041
5
5
  SHA512:
6
- metadata.gz: 74ad8f8978ac699172b4802025fcbcd8f3eae83ed1ce6af9436285d7bfd66876dad6544bccb88b884b8ee1a8d9259762e3389e234363838a54d05768b76f5135
7
- data.tar.gz: 4d33e50e7247834e6579906b64f75010967218a4d45ecccbe621a6cb8ce35236a0e06d619b79282351aa384ac7c9a9c2dd9dec1c6a2ddeefed74cf793aa938c0
6
+ metadata.gz: 69a1a2b4ca4f91f793f38f86495c2b72c872b550e74e11e0821e3b9859327d757d9cdab55e4278b960e02f5b3b65d4ac467236fcf68a2798b7d5d169acb64bfd
7
+ data.tar.gz: 14ae1ac6c30837c15a97ba008ff6a651eed16d0346fdf67d72b219cd761b4612763e70e6613271c3c11a26ba8863bddee6c359bec5a1697a2c4e193fae4ccd62
@@ -1,13 +1,24 @@
1
1
  # CHANGELOG
2
+
3
+ ## [0.3.2](https://github.com/yasaichi/grease/releases/tag/v0.3.2) (April 29, 2019)
4
+
5
+ - [Run tests in Ruby 2.2 ~ 2.6](https://github.com/yasaichi/grease/pull/15)
6
+ - [Remove an unnecessary argument passed to `Tilt::Template#render`](https://github.com/yasaichi/grease/pull/11) (Compatible change)
7
+ - [Check if asset helpers in templates work correctly](https://github.com/yasaichi/grease/pull/10)
8
+
2
9
  ## [0.3.1](https://github.com/yasaichi/grease/releases/tag/v0.3.1) (January 29, 2017)
3
- * [Improve dummy app's configuration](https://github.com/yasaichi/grease/pull/8)
4
- * [Fix coverage report settings](https://github.com/yasaichi/grease/pull/7)
10
+
11
+ - [Improve dummy app's configuration](https://github.com/yasaichi/grease/pull/8)
12
+ - [Fix coverage report settings](https://github.com/yasaichi/grease/pull/7)
5
13
 
6
14
  ## [0.3.0](https://github.com/yasaichi/grease/releases/tag/v0.3.0) (November 13, 2016)
7
- * [Improve Grease::Adapter#inspect](https://github.com/yasaichi/grease/pull/6)
15
+
16
+ - [Improve Grease::Adapter#inspect](https://github.com/yasaichi/grease/pull/6)
8
17
 
9
18
  ## [0.2.0](https://github.com/yasaichi/grease/releases/tag/v0.2.0) (September 18, 2016)
10
- * Implement core class and function
19
+
20
+ - Implement core class and function
11
21
 
12
22
  ## [0.1.0](https://github.com/yasaichi/grease/releases/tag/v0.1.0) (September 9, 2016)
13
- * The initial release to reserve the gem name
23
+
24
+ - The initial release to reserve the gem name
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Code Climate](https://codeclimate.com/github/yasaichi/grease/badges/gpa.svg)](https://codeclimate.com/github/yasaichi/grease)
6
6
  [![Test Coverage](https://codeclimate.com/github/yasaichi/grease/badges/coverage.svg)](https://codeclimate.com/github/yasaichi/grease/coverage)
7
7
 
8
- Grease provides an adapter to use Tilt as extension of Sprockets 3 or later.
8
+ Grease provides an adapter to use [Tilt](https://github.com/rtomayko/tilt) as extension of Sprockets 3 or later.
9
9
 
10
10
  ## Installation
11
11
 
@@ -29,11 +29,15 @@ $ gem install grease
29
29
 
30
30
  ## Usage
31
31
 
32
- If you'd like to use `Tilt::HamlTemplate` in Sprockets, add code like this:
32
+ When you'd like to use `Tilt::HamlTemplate` in Sprockets, add code like this:
33
33
 
34
34
  ```ruby
35
+ # Sprockets 3
36
+ register_engine ".haml", Grease.apply(Tilt::HamlTemplate), mime_type: Tilt::HamlTemplate.default_mime_type, silence_deprecation: true
37
+
38
+ # Sprockets 4 or later
35
39
  register_mime_type "text/haml", extensions: %w(.haml .html.haml)
36
- register_transformer "text/haml", "text/html", Grease.apply(Tilt::HamlTemplate)
40
+ register_transformer "text/haml", Tilt::HamlTemplate.default_mime_type, Grease.apply(Tilt::HamlTemplate)
37
41
  ```
38
42
 
39
43
  It works because `Grease.apply` returns a "callable" object.
@@ -8,9 +8,8 @@ module Grease
8
8
  context = input[:environment].context_class.new(input)
9
9
  template = @template_class.new { input[:data] }
10
10
 
11
- # TODO: Hack for converting ActiveSupport::SafeBuffer into String
12
- data = template.render(context, {}).to_str
13
- context.metadata.merge(data: data)
11
+ # NOTE: Call #to_str to convert ActiveSupport::SafeBuffer into String
12
+ context.metadata.merge(data: template.render(context).to_str)
14
13
  end
15
14
 
16
15
  def inspect
@@ -1,3 +1,3 @@
1
1
  module Grease
2
- VERSION = "0.3.1".freeze
2
+ VERSION = "0.3.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grease
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - yasaichi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-29 00:00:00.000000000 Z
11
+ date: 2019-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal