turbostreamer 1.9.0 → 1.10.0
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 +4 -4
- data/README.md +17 -2
- data/lib/turbostreamer/template.rb +1 -1
- data/lib/turbostreamer/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63f1e21caf6c87b095cbd4528226ebbc0489dc7f58ef6de192ed222b1920863e
|
4
|
+
data.tar.gz: d7e9e7237f6fe49b46c114a39da1b6983db8cdc758a4b0d10cb9ce97d65a7ad4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69a4204a0598eb92fae7a08c1385241b0f648998eb5f6762c42bd61c8ded3689078ed1930b06e15383fc5ab744f5e1f8b85b6efd2eda58cbc125831683a8ca30
|
7
|
+
data.tar.gz: e8002ae1e4369b59071dff8a74f3f57d2e51d63c242c86023e174c6fb00b74b9777defa68e5e1241ace35bbf24e4a92d6dd275870155b18e4438d732e5807896
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# TurboStreamer
|
1
|
+
# TurboStreamer
|
2
2
|
|
3
3
|
TurboStreamer gives you a simple DSL for generating JSON that beats massaging giant
|
4
4
|
hash structures. This is particularly helpful when the generation process is
|
@@ -299,7 +299,8 @@ TurboStreamer.encode(encoder: TurboStreamer::WankelEncoder)
|
|
299
299
|
TurboStreamer.encode(encoder: MyEncoder)
|
300
300
|
```
|
301
301
|
|
302
|
-
|
302
|
+
Setting the default encoder and options
|
303
|
+
---------------------------------------
|
303
304
|
If you need explicitly set the default:
|
304
305
|
|
305
306
|
```ruby
|
@@ -339,6 +340,20 @@ All backends must have the following functions:
|
|
339
340
|
- `inject(string)` Inject a (usually cached) string into the output; instering any delimiters as needed.
|
340
341
|
- `capture(&block)` Capture the output of the block (w/o any delimiters)
|
341
342
|
|
343
|
+
Benchmark
|
344
|
+
---------
|
345
|
+
`gnuplot` is required to run benchmark, to install:
|
346
|
+
- `brew install gnuplot` (MacOS)
|
347
|
+
|
348
|
+
`yajl` is required to install a development dependency [`wankel`](https://github.com/malomalo/wankel), to install:
|
349
|
+
- `brew install yajl` (MacOS)
|
350
|
+
|
351
|
+
To run benchmark: `bundle exec rake performance`
|
352
|
+
|
353
|
+
This will produce 2 graph images on in folders
|
354
|
+
- `performance/dirk`
|
355
|
+
- `performance/rolftimmermans`
|
356
|
+
|
342
357
|
Special Thanks & Contributors
|
343
358
|
-----------------------------
|
344
359
|
|
@@ -215,7 +215,7 @@ class TurboStreamer::Template < TurboStreamer
|
|
215
215
|
if @context.respond_to?(:cache_fragment_name)
|
216
216
|
# Current compatibility, fragment_name_with_digest is private again and cache_fragment_name
|
217
217
|
# should be used instead.
|
218
|
-
@context.cache_fragment_name(key, options)
|
218
|
+
@context.cache_fragment_name(key, **options)
|
219
219
|
elsif @context.respond_to?(:fragment_name_with_digest)
|
220
220
|
# Backwards compatibility for period of time when fragment_name_with_digest was made public.
|
221
221
|
@context.fragment_name_with_digest(key)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbostreamer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Bracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -192,6 +192,20 @@ dependencies:
|
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: multi_json
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
195
209
|
description:
|
196
210
|
email:
|
197
211
|
- jonbracy@gmail.com
|
@@ -234,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
234
248
|
- !ruby/object:Gem::Version
|
235
249
|
version: '0'
|
236
250
|
requirements: []
|
237
|
-
rubygems_version: 3.
|
251
|
+
rubygems_version: 3.2.22
|
238
252
|
signing_key:
|
239
253
|
specification_version: 4
|
240
254
|
summary: Stream JSON via a Builder-style DSL
|