hamlit 2.2.4 → 2.3.0

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
- SHA256:
3
- metadata.gz: b2a2760ea6428a499759735a80f47ea7967665779963b20080c72cb4b8db71b6
4
- data.tar.gz: 2193a9f3baadb7d00049d1253821d0c87de39faf5546f3bf7e69556802282486
2
+ SHA1:
3
+ metadata.gz: 200445d32ba9d3c7fa8cbbd00e8a5a6b4cefb99e
4
+ data.tar.gz: 2fad42ca1c57079dff4707766f4f4b0a692ff523
5
5
  SHA512:
6
- metadata.gz: d49a7a49412b9b581c33da71241763935f3f517503390a29a7dc80e68f5d87824f715fdff3db896f18a5403988a68970756c803046f106bdbfacf0256ea4cebf
7
- data.tar.gz: a5b11211d8b4c9b90be1e3b9bb709da4ea45744bb7eefdfee30d60da0b050c0b1425d4c18a2d9222fdb15acc35dd45241c85224a425ef210b70e4bbcb14e8244
6
+ metadata.gz: 2d59839436a6133bba9c295330ddf5229edfedb4a88f33801aae3ff7d34e7dc2cdaf2a575c97b07d6d20658a6828b7f48662072773adf66cbe82336f730a4395
7
+ data.tar.gz: f7eaaadc2a3d76b57f1f74463f57b9513353648c858a7bd1131c76ea73fe0223b008dc4d4c5c3a536e9ca43b3f96f2a23f70db741ee4d1651094414bb7377c5c
@@ -4,6 +4,17 @@ 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.3.0](https://github.com/k0kubun/hamlit/compare/v2.2.3...v2.3.0) - 2016-04-24
8
+
9
+ ### Added
10
+
11
+ - Add `Hamlit::Filters.remove_filter` method
12
+ [#66](https://github.com/k0kubun/hamlit/issues/66). *Thanks to @connorshea*
13
+
14
+ ### Changed
15
+
16
+ - `:coffeescript` filter's internal class name is changed from `Coffee` to `CoffeeScript`
17
+
7
18
  ## [2.2.3](https://github.com/k0kubun/hamlit/compare/v2.2.2...v2.2.3) - 2016-03-10
8
19
 
9
20
  ### Added
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/hamlit.svg)](http://badge.fury.io/rb/hamlit)
4
4
  [![Build Status](https://travis-ci.org/k0kubun/hamlit.svg?branch=master)](https://travis-ci.org/k0kubun/hamlit)
5
- [![Build status](https://ci.appveyor.com/api/projects/status/2l936fqv7fkd1s0s/branch/master?svg=true)](https://ci.appveyor.com/project/k0kubun/hamlit/branch/master)
6
5
 
7
6
  Hamlit is a high performance [Haml](https://github.com/haml/haml) implementation.
8
7
 
@@ -74,7 +74,7 @@ for full features in original implementation.
74
74
 
75
75
  ### No pretty mode
76
76
  Haml has :pretty mode and :ugly mode. :pretty mode is used on development and indented beautifully.
77
- On production environemnt, :ugly mode is used and Hamlit currently supports only this mode.
77
+ On production environment, :ugly mode is used and Hamlit currently supports only this mode.
78
78
 
79
79
  So you'll see difference rendering result on development environment, but it'll be the same on production.
80
80
 
@@ -17,7 +17,7 @@ module Hamlit
17
17
  tokens = Ripper.lex(exp)[1..-2] || []
18
18
  each_attr(tokens) do |attr_tokens|
19
19
  key = parse_key!(attr_tokens)
20
- hash[key] = attr_tokens.map { |t| t[2] }.join.strip
20
+ hash[key] = attr_tokens.map(&:last).join.strip
21
21
  end
22
22
  hash
23
23
  rescue ParseSkip
@@ -21,6 +21,13 @@ module Hamlit
21
21
  class << self
22
22
  attr_reader :registered
23
23
 
24
+ def remove_filter(name)
25
+ registered.delete(name.to_s.downcase.to_sym)
26
+ if constants.map(&:to_s).include?(name.to_s)
27
+ remove_const name.to_sym
28
+ end
29
+ end
30
+
24
31
  private
25
32
 
26
33
  def register(name, compiler)
@@ -29,7 +36,7 @@ module Hamlit
29
36
  end
30
37
 
31
38
  register :coffee, Coffee
32
- register :coffeescript, Coffee
39
+ register :coffeescript, CoffeeScript
33
40
  register :css, Css
34
41
  register :erb, Erb
35
42
  register :escaped, Escaped
@@ -10,5 +10,7 @@ module Hamlit
10
10
  temple
11
11
  end
12
12
  end
13
+
14
+ CoffeeScript = Coffee
13
15
  end
14
16
  end
@@ -1,3 +1,3 @@
1
1
  module Hamlit
2
- VERSION = '2.2.4'
2
+ VERSION = '2.3.0'
3
3
  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.2.4
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-05 00:00:00.000000000 Z
11
+ date: 2016-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: temple
@@ -252,7 +252,6 @@ files:
252
252
  - README.md
253
253
  - REFERENCE.md
254
254
  - Rakefile
255
- - appveyor.yml
256
255
  - benchmark/boolean_attribute.haml
257
256
  - benchmark/class_attribute.haml
258
257
  - benchmark/common_attribute.haml
@@ -386,7 +385,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
386
385
  version: '0'
387
386
  requirements: []
388
387
  rubyforge_project:
389
- rubygems_version: 2.7.3
388
+ rubygems_version: 2.5.1
390
389
  signing_key:
391
390
  specification_version: 4
392
391
  summary: High Performance Haml Implementation
@@ -1,41 +0,0 @@
1
- ---
2
-
3
- version: "{build}"
4
-
5
- branches:
6
- only:
7
- - master
8
-
9
- install:
10
- - set PATH=C:\Ruby%ruby_version%\bin;%PATH%
11
- - echo %PATH%
12
-
13
- - ruby --version
14
- - where ruby
15
-
16
- - gem update --system --no-document
17
- - gem --version
18
- - where gem
19
-
20
- - gem install bundler --no-document
21
- - bundler --version
22
- - where bundler
23
-
24
- - bundle install --jobs 3 --retry 3
25
-
26
- build_script:
27
- - git submodule init
28
- - git submodule update
29
- - bundle exec rake compile
30
-
31
- test_script:
32
- - bundle exec rake test
33
-
34
- environment:
35
- matrix:
36
- - ruby_version: 21-x64
37
- - ruby_version: '22'
38
- - ruby_version: 22-x64
39
-
40
- matrix:
41
- fast_finish: true