hamlit 2.2.0 → 2.2.1

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: 17985d049789075f9ccaa498376e506980a85eba
4
- data.tar.gz: 31d451aa5c850358ab1c752ab8bb670666b5a8fe
3
+ metadata.gz: ae467344339ea7b431086ed4b87764ae4b0a580e
4
+ data.tar.gz: 2fbd25588f7006d077e6dfd96ba2cf239dc49c0b
5
5
  SHA512:
6
- metadata.gz: 2c7a0f41cc218efdfd399363b6c00cdee940b864056208ffb4f02207c0579e8eda75f6f2d77f0bef4fceb3570e79d4ae7b34544d00c1805ece39295b85c7e35b
7
- data.tar.gz: 3065e24a52cc9ad34854ac0d3b4d17353fae2acdc2dd50d5a1c5b5cf4754a4137866be58c9e01b1a3d762644930384076c9d98648ac2bc00cc143147e8425627
6
+ metadata.gz: 8e9fd2852146dc3e1a89d4a473ee2ab3be195c9fedd4b10f94b3dfc93bb9a9b093c3b8320658e1d658ed3b440dbdd8939d0e1f6dc6cb6ecfeca1dbc934bd89ab
7
+ data.tar.gz: d63c28302915ff6b297899f93a60e95fa587b99bef7ea4e12509e3a0c3f711f8c806a7c987401790a64e59e056c43bb952a2452508c945a844436fd7c1a3d06c
@@ -1,3 +1,3 @@
1
1
  [submodule "ext/hamlit/houdini"]
2
2
  path = ext/hamlit/houdini
3
- url = https://github.com/vmg/houdini
3
+ url = https://github.com/k0kubun/houdini
@@ -1,5 +1,4 @@
1
1
  language: ruby
2
- sudo: false
3
2
  cache: bundler
4
3
  branches:
5
4
  only:
@@ -14,21 +13,21 @@ matrix:
14
13
  env: TASK=test
15
14
  - rvm: 2.2
16
15
  env: TASK=test
17
- - rvm: ruby-head
16
+ - rvm: 2.3.0
18
17
  env: TASK=test
19
- - rvm: 2.2
18
+ - rvm: 2.3.0
20
19
  env: TASK=bench TEMPLATE=benchmark/boolean_attribute.haml,benchmark/class_attribute.haml,benchmark/id_attribute.haml,benchmark/data_attribute.haml,benchmark/common_attribute.haml
21
- - rvm: 2.2
20
+ - rvm: 2.3.0
22
21
  env: TASK=bench TEMPLATE=benchmark/dynamic_attributes/boolean_attribute.haml,benchmark/dynamic_attributes/class_attribute.haml,benchmark/dynamic_attributes/id_attribute.haml,benchmark/dynamic_attributes/data_attribute.haml,benchmark/dynamic_attributes/common_attribute.haml
23
- - rvm: 2.2
22
+ - rvm: 2.3.0
24
23
  env: TASK=bench SLIM_BENCH=1
25
- - rvm: 2.2
24
+ - rvm: 2.3.0
26
25
  env: TASK=bench TEMPLATE=benchmark/etc/attribute_builder.haml
27
- - rvm: 2.2
26
+ - rvm: 2.3.0
28
27
  env: TASK=bench TEMPLATE=benchmark/etc/static_analyzer.haml
29
- - rvm: 2.2
28
+ - rvm: 2.3.0
30
29
  env: TASK=bench TEMPLATE=benchmark/etc/string_interpolation.haml
31
- - rvm: 2.2
30
+ - rvm: 2.3.0
32
31
  env: TASK=bench TEMPLATE=test/haml/templates/standard.haml COMPILE=1
33
32
  allow_failures:
34
33
  - env: TASK=bench TEMPLATE=benchmark/boolean_attribute.haml,benchmark/class_attribute.haml,benchmark/id_attribute.haml,benchmark/data_attribute.haml,benchmark/common_attribute.haml
@@ -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.2.1](https://github.com/k0kubun/hamlit/compare/v2.1.2...v2.2.0) - 2016-02-06
8
+
9
+ ### Added
10
+
11
+ - Support Windows
12
+ [#54](https://github.com/k0kubun/hamlit/issues/54). *Thanks to @francesco-loreti*
13
+
7
14
  ## [2.2.0](https://github.com/k0kubun/hamlit/compare/v2.1.2...v2.2.0) - 2015-12-24
8
15
 
9
16
  ### Added
data/Gemfile CHANGED
@@ -3,18 +3,13 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in hamlit.gemspec
4
4
  gemspec
5
5
 
6
- # maintain compatibility against master
7
- gem 'haml', github: 'haml/haml'
8
-
9
6
  gem 'benchmark-ips', '2.3.0'
10
7
  gem 'minitest-line'
11
8
  gem 'pry-byebug'
12
9
 
13
- if File.exist?('hamlit1')
14
- gem 'hamlit1', path: 'hamlit1'
15
- end
16
-
17
- if RUBY_VERSION >= '2.1.0'
10
+ is_windows = RUBY_PLATFORM =~ /mswin|mingw|bccwin|wince/
11
+ if RUBY_VERSION >= '2.1.0' && !is_windows
12
+ gem 'faml'
18
13
  gem 'lineprof'
19
14
  gem 'stackprof'
20
15
  end
data/README.md CHANGED
@@ -2,6 +2,7 @@
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)
5
6
 
6
7
  Hamlit is a high performance [Haml](https://github.com/haml/haml) implementation.
7
8
 
data/Rakefile CHANGED
@@ -1,5 +1,21 @@
1
1
  require 'bundler/setup'
2
2
  require 'bundler/gem_tasks'
3
+
4
+ #
5
+ # Prepend DevKit into compilation phase
6
+ #
7
+ if Gem.win_platform?
8
+ desc 'Activates DevKit'
9
+ task :devkit do
10
+ begin
11
+ require 'devkit'
12
+ rescue LoadError
13
+ abort 'Failed to load DevKit required for compilation'
14
+ end
15
+ end
16
+ task compile: :devkit
17
+ end
18
+
3
19
  require 'rake/testtask'
4
20
  require 'rake/extensiontask'
5
21
 
@@ -0,0 +1,41 @@
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
data/bin/test CHANGED
@@ -4,6 +4,7 @@ VERSIONS=(
4
4
  2.0.0
5
5
  2.1.7
6
6
  2.2.3
7
+ 2.3.0
7
8
  )
8
9
 
9
10
  set -e
@@ -7,7 +7,13 @@ $CFLAGS << ' -Wall -Wextra'
7
7
  $srcs = %w[hamlit.c]
8
8
  Dir[File.join(houdini_dir, '*.c')].each do |path|
9
9
  src = File.basename(path)
10
- FileUtils.ln_s(path, src, force: true)
10
+ begin
11
+ FileUtils.ln_s(path, src, force: true)
12
+ rescue NotImplementedError
13
+ # For the error on windows:
14
+ # symlink() function is unimplemented on this machine (NotImplementedError)
15
+ FileUtils.cp(path, src)
16
+ end
11
17
  $srcs << src
12
18
  end
13
19
 
@@ -242,7 +242,7 @@ void gh_buf_attach(gh_buf *buf, char *ptr, size_t asize)
242
242
 
243
243
  int gh_buf_cmp(const gh_buf *a, const gh_buf *b)
244
244
  {
245
- int result = memcmp(a->ptr, b->ptr, MIN(a->size, b->size));
245
+ int result = memcmp(a->ptr, b->ptr, a->size < b->size ? a->size : b->size);
246
246
  return (result != 0) ? result :
247
247
  (a->size < b->size) ? -1 : (a->size > b->size) ? 1 : 0;
248
248
  }
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = 'https://github.com/k0kubun/hamlit'
15
15
  spec.license = 'MIT'
16
16
 
17
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|hamlit1|sample)/}) } + `git -C ext/hamlit/houdini ls-files -z`.split("\x0").map { |path| "ext/hamlit/houdini/#{path}" }
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|sample)/}) } + `git -C ext/hamlit/houdini ls-files -z`.split("\x0").map { |path| "ext/hamlit/houdini/#{path}" }
18
18
  spec.bindir = 'exe'
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.extensions = ['ext/hamlit/extconf.rb']
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency 'bundler'
28
28
  spec.add_development_dependency 'coffee-script'
29
29
  spec.add_development_dependency 'erubis'
30
- spec.add_development_dependency 'faml'
30
+ spec.add_development_dependency 'haml', '4.1.0.beta.1'
31
31
  spec.add_development_dependency 'less'
32
32
  spec.add_development_dependency 'minitest-reporters', '~> 1.1'
33
33
  spec.add_development_dependency 'rails', '>= 4.0.0'
@@ -36,6 +36,5 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency 'redcarpet'
37
37
  spec.add_development_dependency 'sass'
38
38
  spec.add_development_dependency 'slim'
39
- spec.add_development_dependency 'therubyracer'
40
39
  spec.add_development_dependency 'unindent'
41
40
  end
@@ -73,10 +73,9 @@ module Hamlit
73
73
  ]
74
74
  else
75
75
  [:multi,
76
- [:code, "#{var} = #{node.value[:text]}"],
77
- [:newline],
78
- yield(node),
79
- [:code, 'end'.freeze],
76
+ [:block, "#{var} = #{node.value[:text]}",
77
+ [:multi, [:newline], yield(node)],
78
+ ],
80
79
  ]
81
80
  end
82
81
  end
@@ -12,12 +12,11 @@ module Hamlit
12
12
  private
13
13
 
14
14
  def compile_with_children(node, &block)
15
- temple = [:multi]
16
- temple << [:code, node.value[:text]]
17
- temple << [:newline]
18
- temple << yield(node)
19
- temple << [:code, 'end']
20
- temple
15
+ [:multi,
16
+ [:block, node.value[:text],
17
+ [:multi, [:newline], yield(node)],
18
+ ],
19
+ ]
21
20
  end
22
21
  end
23
22
  end
@@ -1,3 +1,8 @@
1
+ # LESS support is deprecated since it requires therubyracer.gem,
2
+ # which is hard to maintain.
3
+ #
4
+ # It's not supported in Sprockets 3.0+ too.
5
+ # https://github.com/sstephenson/sprockets/pull/547
1
6
  module Hamlit
2
7
  class Filters
3
8
  class Less < TiltBase
@@ -1,3 +1,3 @@
1
1
  module Hamlit
2
- VERSION = '2.2.0'
2
+ VERSION = '2.2.1'
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.0
4
+ version: 2.2.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: 2015-12-23 00:00:00.000000000 Z
11
+ date: 2016-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: temple
@@ -95,19 +95,19 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: faml
98
+ name: haml
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 4.1.0.beta.1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 4.1.0.beta.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: less
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -220,20 +220,6 @@ dependencies:
220
220
  - - ">="
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
- - !ruby/object:Gem::Dependency
224
- name: therubyracer
225
- requirement: !ruby/object:Gem::Requirement
226
- requirements:
227
- - - ">="
228
- - !ruby/object:Gem::Version
229
- version: '0'
230
- type: :development
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- requirements:
234
- - - ">="
235
- - !ruby/object:Gem::Version
236
- version: '0'
237
223
  - !ruby/object:Gem::Dependency
238
224
  name: unindent
239
225
  requirement: !ruby/object:Gem::Requirement
@@ -266,6 +252,7 @@ files:
266
252
  - README.md
267
253
  - REFERENCE.md
268
254
  - Rakefile
255
+ - appveyor.yml
269
256
  - benchmark/boolean_attribute.haml
270
257
  - benchmark/class_attribute.haml
271
258
  - benchmark/common_attribute.haml