hamlit 2.15.0-java → 2.15.1-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/bench.yml +46 -0
  3. data/CHANGELOG.md +7 -0
  4. data/hamlit.gemspec +1 -1
  5. data/lib/hamlit/version.rb +1 -1
  6. metadata +21 -54
  7. data/benchmark/boolean_attribute.haml +0 -6
  8. data/benchmark/class_attribute.haml +0 -5
  9. data/benchmark/common_attribute.haml +0 -3
  10. data/benchmark/data_attribute.haml +0 -4
  11. data/benchmark/dynamic_attributes/boolean_attribute.haml +0 -4
  12. data/benchmark/dynamic_attributes/class_attribute.haml +0 -4
  13. data/benchmark/dynamic_attributes/common_attribute.haml +0 -2
  14. data/benchmark/dynamic_attributes/data_attribute.haml +0 -2
  15. data/benchmark/dynamic_attributes/id_attribute.haml +0 -2
  16. data/benchmark/dynamic_boolean_attribute.haml +0 -4
  17. data/benchmark/dynamic_merger/benchmark.rb +0 -25
  18. data/benchmark/dynamic_merger/hello.haml +0 -50
  19. data/benchmark/dynamic_merger/hello.string +0 -50
  20. data/benchmark/etc/attribute_builder.haml +0 -5
  21. data/benchmark/etc/real_sample.haml +0 -888
  22. data/benchmark/etc/real_sample.rb +0 -11
  23. data/benchmark/etc/static_analyzer.haml +0 -1
  24. data/benchmark/etc/string_interpolation.haml +0 -2
  25. data/benchmark/etc/tags.haml +0 -3
  26. data/benchmark/etc/tags_loop.haml +0 -2
  27. data/benchmark/ext/build_data.rb +0 -17
  28. data/benchmark/ext/build_id.rb +0 -13
  29. data/benchmark/graph/graph.key +0 -0
  30. data/benchmark/graph/graph.png +0 -0
  31. data/benchmark/id_attribute.haml +0 -3
  32. data/benchmark/plain.haml +0 -4
  33. data/benchmark/script.haml +0 -4
  34. data/benchmark/slim/LICENSE +0 -21
  35. data/benchmark/slim/context.rb +0 -11
  36. data/benchmark/slim/run-benchmarks.rb +0 -94
  37. data/benchmark/slim/view.erb +0 -23
  38. data/benchmark/slim/view.haml +0 -18
  39. data/benchmark/slim/view.slim +0 -17
  40. data/benchmark/utils/benchmark_ips_extension.rb +0 -43
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86a728b5b4d4092dd1ba4c21e7bd306aacbc11a5386a76596ae54ff923d1fc55
4
- data.tar.gz: 332a601582738bcee8dd7a56a23e7930af140b777453511e5e658a94a1c66c85
3
+ metadata.gz: 7ad29f71336e1e71fab1716562eb6e17dc21ab89536318f7be91e56991c42a76
4
+ data.tar.gz: 19592da7e2ab8cf613933dcd838ecea68c9b843cfd06d9ac67f31c6eec1a71a1
5
5
  SHA512:
6
- metadata.gz: 1b79fe7a6fcda0fd6cc57ed6480e728225a4ad87f44074dcd31f6606b09d253c64a469ab82a50af0aa33044268cc6a1b5e5ea3ea8f436424e969df67b7bf5d2d
7
- data.tar.gz: 465ec7e9ae995146684103fa2a85cb2564adb7538d24ef7d75e84b020c023382c7945e0ecd788aa4896ab7625b6b775caa458a88fbfce52921f6f6de7e32e9f6
6
+ metadata.gz: 34de923109facf23d50039433576861f6ae669b4b37771be879bd9a11ae94f190456435256c20d3ff5ca3d47e5f97e31ecbcc4c9df3e16b53e635ae8a435e4c1
7
+ data.tar.gz: f0a89c63f0c777b1b236260d43d8e077c948dcddc477341abedd91d03f3d20d9a296a3c62de39548cc878739f65b57ccbe4196b9f6b52443e99b70c0fcb38841
@@ -0,0 +1,46 @@
1
+ name: bench
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ pull_request:
7
+ types:
8
+ - opened
9
+ - synchronize
10
+ - reopened
11
+ schedule:
12
+ - cron: "00 15 * * *" # 7:00 PST (-8), 8:00 PDT (-7)
13
+ jobs:
14
+ bench:
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ include:
20
+ - slim: 1
21
+ - template: 'benchmark/boolean_attribute.haml,benchmark/class_attribute.haml,benchmark/id_attribute.haml,benchmark/data_attribute.haml,benchmark/common_attribute.haml'
22
+ - 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
+ - template: 'benchmark/etc/attribute_builder.haml'
24
+ - template: 'benchmark/etc/static_analyzer.haml'
25
+ - template: 'benchmark/etc/string_interpolation.haml'
26
+ - template: 'test/haml/templates/standard.haml'
27
+ compile: 1
28
+ steps:
29
+ - uses: actions/checkout@v2
30
+ - name: Set up Ruby
31
+ uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: 3.0
34
+ - uses: actions/cache@v2
35
+ with:
36
+ path: vendor/bundle
37
+ key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
38
+ restore-keys: ${{ runner.os }}-gems-
39
+ - run: sudo apt-get update && sudo apt-get install -y nodejs libxslt-dev # nodejs for execjs, libxslt for TruffleRuby nokogiri
40
+ - name: bundle install
41
+ run: bundle config path vendor/bundle && bundle install -j$(nproc) --retry 3
42
+ - run: bundle exec rake bench
43
+ env:
44
+ SLIM_BENCH: ${{ matrix.slim }}
45
+ TEMPLATE: ${{ matrix.template }}
46
+ COMPILE: ${{ matrix.compile }}
data/CHANGELOG.md CHANGED
@@ -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.15.1](https://github.com/k0kubun/hamlit/compare/v2.15.0...v2.15.1) - 2021-07-23
8
+
9
+ ### Fixed
10
+
11
+ - Remove `benchmark` from the gem package to reduce its size [#186](https://github.com/k0kubun/hamlit/issues/186)
12
+ *Thanks to @pocke*
13
+
7
14
  ## [2.15.0](https://github.com/k0kubun/hamlit/compare/v2.14.6...v2.15.0) - 2021-04-12
8
15
 
9
16
  ### Added
data/hamlit.gemspec CHANGED
@@ -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|sample)/}) }
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|sample|benchmark)/}) }
18
18
  spec.bindir = 'exe'
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ['lib']
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hamlit
3
- VERSION = '2.15.0'
3
+ VERSION = '2.15.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.15.0
4
+ version: 2.15.1
5
5
  platform: java
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-13 00:00:00.000000000 Z
11
+ date: 2021-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -17,8 +17,8 @@ dependencies:
17
17
  - !ruby/object:Gem::Version
18
18
  version: 0.8.2
19
19
  name: temple
20
- type: :runtime
21
20
  prerelease: false
21
+ type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
@@ -31,8 +31,8 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: '0'
33
33
  name: thor
34
- type: :runtime
35
34
  prerelease: false
35
+ type: :runtime
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
@@ -45,8 +45,8 @@ dependencies:
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  name: tilt
48
- type: :runtime
49
48
  prerelease: false
49
+ type: :runtime
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
@@ -59,8 +59,8 @@ dependencies:
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  name: benchmark_driver
62
- type: :development
63
62
  prerelease: false
63
+ type: :development
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
@@ -73,8 +73,8 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  name: bundler
76
- type: :development
77
76
  prerelease: false
77
+ type: :development
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
@@ -87,8 +87,8 @@ dependencies:
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  name: coffee-script
90
- type: :development
91
90
  prerelease: false
91
+ type: :development
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
@@ -101,8 +101,8 @@ dependencies:
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  name: erubi
104
- type: :development
105
104
  prerelease: false
105
+ type: :development
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ">="
@@ -115,8 +115,8 @@ dependencies:
115
115
  - !ruby/object:Gem::Version
116
116
  version: '5'
117
117
  name: haml
118
- type: :development
119
118
  prerelease: false
119
+ type: :development
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
@@ -129,8 +129,8 @@ dependencies:
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  name: less
132
- type: :development
133
132
  prerelease: false
133
+ type: :development
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
@@ -143,8 +143,8 @@ dependencies:
143
143
  - !ruby/object:Gem::Version
144
144
  version: '1.1'
145
145
  name: minitest-reporters
146
- type: :development
147
146
  prerelease: false
147
+ type: :development
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
@@ -157,8 +157,8 @@ dependencies:
157
157
  - !ruby/object:Gem::Version
158
158
  version: '4.0'
159
159
  name: rails
160
- type: :development
161
160
  prerelease: false
161
+ type: :development
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - ">="
@@ -171,8 +171,8 @@ dependencies:
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0'
173
173
  name: rake
174
- type: :development
175
174
  prerelease: false
175
+ type: :development
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - ">="
@@ -185,8 +185,8 @@ dependencies:
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
187
  name: rake-compiler
188
- type: :development
189
188
  prerelease: false
189
+ type: :development
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - ">="
@@ -199,8 +199,8 @@ dependencies:
199
199
  - !ruby/object:Gem::Version
200
200
  version: '0'
201
201
  name: sass
202
- type: :development
203
202
  prerelease: false
203
+ type: :development
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - ">="
@@ -213,8 +213,8 @@ dependencies:
213
213
  - !ruby/object:Gem::Version
214
214
  version: '0'
215
215
  name: slim
216
- type: :development
217
216
  prerelease: false
217
+ type: :development
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - ">="
@@ -227,8 +227,8 @@ dependencies:
227
227
  - !ruby/object:Gem::Version
228
228
  version: '0'
229
229
  name: string_template
230
- type: :development
231
230
  prerelease: false
231
+ type: :development
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - ">="
@@ -241,8 +241,8 @@ dependencies:
241
241
  - !ruby/object:Gem::Version
242
242
  version: '0'
243
243
  name: unindent
244
- type: :development
245
244
  prerelease: false
245
+ type: :development
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
248
  - - ">="
@@ -257,6 +257,7 @@ extensions: []
257
257
  extra_rdoc_files: []
258
258
  files:
259
259
  - ".github/FUNDING.yml"
260
+ - ".github/workflows/bench.yml"
260
261
  - ".github/workflows/test.yml"
261
262
  - ".gitignore"
262
263
  - CHANGELOG.md
@@ -265,40 +266,6 @@ files:
265
266
  - README.md
266
267
  - REFERENCE.md
267
268
  - Rakefile
268
- - benchmark/boolean_attribute.haml
269
- - benchmark/class_attribute.haml
270
- - benchmark/common_attribute.haml
271
- - benchmark/data_attribute.haml
272
- - benchmark/dynamic_attributes/boolean_attribute.haml
273
- - benchmark/dynamic_attributes/class_attribute.haml
274
- - benchmark/dynamic_attributes/common_attribute.haml
275
- - benchmark/dynamic_attributes/data_attribute.haml
276
- - benchmark/dynamic_attributes/id_attribute.haml
277
- - benchmark/dynamic_boolean_attribute.haml
278
- - benchmark/dynamic_merger/benchmark.rb
279
- - benchmark/dynamic_merger/hello.haml
280
- - benchmark/dynamic_merger/hello.string
281
- - benchmark/etc/attribute_builder.haml
282
- - benchmark/etc/real_sample.haml
283
- - benchmark/etc/real_sample.rb
284
- - benchmark/etc/static_analyzer.haml
285
- - benchmark/etc/string_interpolation.haml
286
- - benchmark/etc/tags.haml
287
- - benchmark/etc/tags_loop.haml
288
- - benchmark/ext/build_data.rb
289
- - benchmark/ext/build_id.rb
290
- - benchmark/graph/graph.key
291
- - benchmark/graph/graph.png
292
- - benchmark/id_attribute.haml
293
- - benchmark/plain.haml
294
- - benchmark/script.haml
295
- - benchmark/slim/LICENSE
296
- - benchmark/slim/context.rb
297
- - benchmark/slim/run-benchmarks.rb
298
- - benchmark/slim/view.erb
299
- - benchmark/slim/view.haml
300
- - benchmark/slim/view.slim
301
- - benchmark/utils/benchmark_ips_extension.rb
302
269
  - bin/bench
303
270
  - bin/console
304
271
  - bin/ruby
@@ -392,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
392
359
  - !ruby/object:Gem::Version
393
360
  version: '0'
394
361
  requirements: []
395
- rubygems_version: 3.0.6
362
+ rubygems_version: 3.1.6
396
363
  signing_key:
397
364
  specification_version: 4
398
365
  summary: High Performance Haml Implementation
@@ -1,6 +0,0 @@
1
- %input{ disabled: false }
2
- %input{ disabled: true }
3
- - disabled = false
4
- %input{ disabled: disabled }
5
- - disabled = true
6
- %input{ disabled: disabled }
@@ -1,5 +0,0 @@
1
- .book{ class: 'content active' }
2
- .book(class='content active')
3
-
4
- - klass = %w[content active]
5
- .book{ class: klass }
@@ -1,3 +0,0 @@
1
- %a{ href: '&"\'<>' }
2
- - href = '&"\'<>'
3
- %a{ href: href }
@@ -1,4 +0,0 @@
1
- %div{ data: { disabled: false } }
2
- %div{ data: { disabled: true } }
3
- - hash = { 'user' => { id: 1234, name: 'k0kubun' }, book_id: 5432 }
4
- %div{ data: hash } data
@@ -1,4 +0,0 @@
1
- - hash = { disabled: false }
2
- %input{ hash }
3
- - hash = { disabled: true }
4
- %input{ hash }
@@ -1,4 +0,0 @@
1
- - hash = { class: %w[content active] }
2
- .book{ hash }
3
- - arr = %w[foo bar]
4
- .book(class=arr){ hash }
@@ -1,2 +0,0 @@
1
- - hash = { href: '&"\'<>' }
2
- %a{ hash }
@@ -1,2 +0,0 @@
1
- - hash = { data: { 'user' => { id: 1234, name: 'k0kubun' }, book_id: 5432 } }
2
- %div{ hash } data
@@ -1,2 +0,0 @@
1
- - hash = { id: %w[content active] }
2
- #book{ hash }
@@ -1,4 +0,0 @@
1
- - disabled = false
2
- %input{ disabled: disabled }
3
- - disabled = true
4
- %input{ disabled: disabled }
@@ -1,25 +0,0 @@
1
- # Original: https://github.com/amatsuda/string_template/blob/master/benchmark.rb
2
- require 'benchmark_driver'
3
-
4
- Benchmark.driver(repeat_count: 8) do |x|
5
- x.prelude %{
6
- require 'rails'
7
- require 'action_view'
8
- require 'string_template'
9
- StringTemplate::Railtie.run_initializers
10
- require 'hamlit'
11
- Hamlit::Railtie.run_initializers
12
- Hamlit::RailsTemplate.set_options(escape_html: false, generator: Temple::Generators::ArrayBuffer)
13
- require 'action_view/base'
14
-
15
- (view = Class.new(ActionView::Base).new(ActionView::LookupContext.new(''))).instance_variable_set(:@world, 'world!')
16
-
17
- # compile template
18
- hello = 'benchmark/dynamic_merger/hello'
19
- view.render(template: hello, handlers: 'string')
20
- view.render(template: hello, handlers: 'haml')
21
- }
22
- x.report 'string', %{ view.render(template: hello, handlers: 'string') }
23
- x.report 'hamlit', %{ view.render(template: hello, handlers: 'haml') }
24
- x.loop_count 100_000
25
- end
@@ -1,50 +0,0 @@
1
- hello, #{ @world }
2
- hello, #{ @world }
3
- hello, #{ @world }
4
- hello, #{ @world }
5
- hello, #{ @world }
6
- hello, #{ @world }
7
- hello, #{ @world }
8
- hello, #{ @world }
9
- hello, #{ @world }
10
- hello, #{ @world }
11
- hello, #{ @world }
12
- hello, #{ @world }
13
- hello, #{ @world }
14
- hello, #{ @world }
15
- hello, #{ @world }
16
- hello, #{ @world }
17
- hello, #{ @world }
18
- hello, #{ @world }
19
- hello, #{ @world }
20
- hello, #{ @world }
21
- hello, #{ @world }
22
- hello, #{ @world }
23
- hello, #{ @world }
24
- hello, #{ @world }
25
- hello, #{ @world }
26
- hello, #{ @world }
27
- hello, #{ @world }
28
- hello, #{ @world }
29
- hello, #{ @world }
30
- hello, #{ @world }
31
- hello, #{ @world }
32
- hello, #{ @world }
33
- hello, #{ @world }
34
- hello, #{ @world }
35
- hello, #{ @world }
36
- hello, #{ @world }
37
- hello, #{ @world }
38
- hello, #{ @world }
39
- hello, #{ @world }
40
- hello, #{ @world }
41
- hello, #{ @world }
42
- hello, #{ @world }
43
- hello, #{ @world }
44
- hello, #{ @world }
45
- hello, #{ @world }
46
- hello, #{ @world }
47
- hello, #{ @world }
48
- hello, #{ @world }
49
- hello, #{ @world }
50
- hello, #{ @world }