yajl-ruby 1.4.3 → 1.4.4
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/.github/workflows/ci.yml +36 -18
- data/ext/yajl/yajl_ext.c +18 -2
- data/ext/yajl/yajl_ext.h +4 -2
- data/lib/yajl/version.rb +1 -1
- metadata +3 -8
- data/.codeclimate.yml +0 -40
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f45703d9d83ab3b6c69788dcce0cdc47e164ef2f851bd17015319615cdf83d97
|
|
4
|
+
data.tar.gz: 216b93aa9a440063db859182002047bb4ce02b5977ff154e01a9c4ddef4ca7c7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2fb95eb9aca6bc05324a7f97d8d461aac96311ce159ab3b6d321ba89fcebe9147a2c2b678df17e7421dadadeea6f367c8d2ea7288211baeb49d74461d89cd7d5
|
|
7
|
+
data.tar.gz: 83d5d6f3264e5f678441465897f5a127d6ecf2aa260423b1f299a6339532aac4b2e7d128190ce09e9e05bb95d938d96e1d168fd272fc2f2317a18c9f826a46f0
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -1,26 +1,44 @@
|
|
|
1
1
|
name: CI
|
|
2
2
|
|
|
3
|
-
on:
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
4
11
|
|
|
5
12
|
jobs:
|
|
6
13
|
test:
|
|
14
|
+
name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
continue-on-error: ${{ matrix.ruby == 'head' }}
|
|
7
17
|
strategy:
|
|
8
|
-
matrix:
|
|
9
|
-
ruby_version: [2.6.x, 2.7.x, 3.0.x]
|
|
10
18
|
fail-fast: false
|
|
11
|
-
|
|
12
|
-
|
|
19
|
+
matrix:
|
|
20
|
+
os: [ubuntu-latest]
|
|
21
|
+
# 2.6 is the required_ruby_version floor in the gemspec; 3.3 and up are
|
|
22
|
+
# the versions Ruby core still maintains. Keep these quoted: YAML reads
|
|
23
|
+
# a bare 4.0 as the number 4, which selects the newest 4.x instead.
|
|
24
|
+
ruby: ['2.6', '3.3', '3.4', '4.0', head]
|
|
25
|
+
include:
|
|
26
|
+
- os: macos-latest
|
|
27
|
+
ruby: '4.0'
|
|
13
28
|
steps:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
- uses: actions/checkout@v7
|
|
30
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
|
31
|
+
uses: ruby/setup-ruby@v1
|
|
32
|
+
with:
|
|
33
|
+
ruby-version: ${{ matrix.ruby }}
|
|
34
|
+
bundler-cache: true
|
|
35
|
+
- name: Run tests
|
|
36
|
+
run: bundle exec rake spec
|
|
37
|
+
- name: Build and install gem
|
|
38
|
+
run: |
|
|
39
|
+
gem build yajl-ruby.gemspec
|
|
40
|
+
gem install --local --no-document yajl-ruby-*.gem
|
|
41
|
+
- name: Smoke test installed gem
|
|
42
|
+
working-directory: ${{ runner.temp }}
|
|
43
|
+
run: |
|
|
44
|
+
ruby -ryajl -e 'raise "round trip failed" unless Yajl::Parser.parse(Yajl::Encoder.encode({"a" => 1})) == {"a" => 1}'
|
data/ext/yajl/yajl_ext.c
CHANGED
|
@@ -159,6 +159,14 @@ static void yajl_encoder_wrapper_mark(void * wrapper) {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
static const rb_data_type_t yajl_encoder_wrapper_type = {
|
|
163
|
+
"YAJL::Encoder",
|
|
164
|
+
{
|
|
165
|
+
yajl_encoder_wrapper_mark,
|
|
166
|
+
yajl_encoder_wrapper_free,
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
162
170
|
static VALUE yajl_key_to_string(VALUE obj) {
|
|
163
171
|
switch (TYPE(obj)) {
|
|
164
172
|
case T_STRING:
|
|
@@ -309,6 +317,14 @@ void yajl_parser_wrapper_mark(void * wrapper) {
|
|
|
309
317
|
}
|
|
310
318
|
}
|
|
311
319
|
|
|
320
|
+
static const rb_data_type_t yajl_parser_wrapper_type = {
|
|
321
|
+
"YAJL::Parser",
|
|
322
|
+
{
|
|
323
|
+
yajl_parser_wrapper_mark,
|
|
324
|
+
yajl_parser_wrapper_free,
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
|
|
312
328
|
void yajl_parse_chunk(const unsigned char * chunk, unsigned int len, yajl_handle parser) {
|
|
313
329
|
yajl_status stat;
|
|
314
330
|
|
|
@@ -486,7 +502,7 @@ static VALUE rb_yajl_parser_new(int argc, VALUE * argv, VALUE klass) {
|
|
|
486
502
|
}
|
|
487
503
|
cfg = (yajl_parser_config){allowComments, checkUTF8};
|
|
488
504
|
|
|
489
|
-
obj =
|
|
505
|
+
obj = TypedData_Make_Struct(klass, yajl_parser_wrapper, &yajl_parser_wrapper_type, wrapper);
|
|
490
506
|
wrapper->parser = yajl_alloc(&callbacks, &cfg, &rb_alloc_funcs, (void *)obj);
|
|
491
507
|
wrapper->nestedArrayLevel = 0;
|
|
492
508
|
wrapper->nestedHashLevel = 0;
|
|
@@ -1089,7 +1105,7 @@ static VALUE rb_yajl_encoder_new(int argc, VALUE * argv, VALUE klass) {
|
|
|
1089
1105
|
}
|
|
1090
1106
|
cfg = (yajl_gen_config){beautify, (const char *)indentString, htmlSafe};
|
|
1091
1107
|
|
|
1092
|
-
obj =
|
|
1108
|
+
obj = TypedData_Make_Struct(klass, yajl_encoder_wrapper, &yajl_encoder_wrapper_type, wrapper);
|
|
1093
1109
|
wrapper->indentString = actualIndent;
|
|
1094
1110
|
wrapper->encoder = yajl_gen_alloc(&cfg, &rb_alloc_funcs);
|
|
1095
1111
|
wrapper->on_progress_callback = Qnil;
|
data/ext/yajl/yajl_ext.h
CHANGED
|
@@ -58,8 +58,10 @@ static ID intern_io_read, intern_call, intern_keys, intern_to_s,
|
|
|
58
58
|
intern_to_json, intern_has_key, intern_to_sym, intern_as_json;
|
|
59
59
|
static ID sym_allow_comments, sym_check_utf8, sym_pretty, sym_indent, sym_terminator, sym_symbolize_keys, sym_symbolize_names, sym_html_safe, sym_entities;
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
static const rb_data_type_t yajl_parser_wrapper_type, yajl_encoder_wrapper_type;
|
|
62
|
+
|
|
63
|
+
#define GetParser(obj, sval) TypedData_Get_Struct(obj, yajl_parser_wrapper, &yajl_parser_wrapper_type, sval)
|
|
64
|
+
#define GetEncoder(obj, sval) TypedData_Get_Struct(obj, yajl_encoder_wrapper, &yajl_encoder_wrapper_type, sval)
|
|
63
65
|
|
|
64
66
|
static void yajl_check_and_fire_callback(void * ctx);
|
|
65
67
|
static void yajl_set_static_value(void * ctx, VALUE val);
|
data/lib/yajl/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yajl-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brian Lopez
|
|
8
8
|
- Lloyd Hilaiel
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: rake-compiler
|
|
@@ -81,14 +80,12 @@ dependencies:
|
|
|
81
80
|
- - ">="
|
|
82
81
|
- !ruby/object:Gem::Version
|
|
83
82
|
version: '0'
|
|
84
|
-
description:
|
|
85
83
|
email: seniorlopez@gmail.com
|
|
86
84
|
executables: []
|
|
87
85
|
extensions:
|
|
88
86
|
- ext/yajl/extconf.rb
|
|
89
87
|
extra_rdoc_files: []
|
|
90
88
|
files:
|
|
91
|
-
- ".codeclimate.yml"
|
|
92
89
|
- ".github/workflows/ci.yml"
|
|
93
90
|
- ".gitignore"
|
|
94
91
|
- ".rspec"
|
|
@@ -246,7 +243,6 @@ homepage: https://github.com/brianmario/yajl-ruby
|
|
|
246
243
|
licenses:
|
|
247
244
|
- MIT
|
|
248
245
|
metadata: {}
|
|
249
|
-
post_install_message:
|
|
250
246
|
rdoc_options: []
|
|
251
247
|
require_paths:
|
|
252
248
|
- lib
|
|
@@ -261,8 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
261
257
|
- !ruby/object:Gem::Version
|
|
262
258
|
version: '0'
|
|
263
259
|
requirements: []
|
|
264
|
-
rubygems_version:
|
|
265
|
-
signing_key:
|
|
260
|
+
rubygems_version: 4.0.20
|
|
266
261
|
specification_version: 4
|
|
267
262
|
summary: Ruby C bindings to the excellent Yajl JSON stream-based parser library.
|
|
268
263
|
test_files: []
|
data/.codeclimate.yml
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# This is a sample .codeclimate.yml configured for Engine analysis on Code
|
|
2
|
-
# Climate Platform. For an overview of the Code Climate Platform, see here:
|
|
3
|
-
# http://docs.codeclimate.com/article/300-the-codeclimate-platform
|
|
4
|
-
|
|
5
|
-
# Under the engines key, you can configure which engines will analyze your repo.
|
|
6
|
-
# Each key is an engine name. For each value, you need to specify enabled: true
|
|
7
|
-
# to enable the engine as well as any other engines-specific configuration.
|
|
8
|
-
|
|
9
|
-
# For more details, see here:
|
|
10
|
-
# http://docs.codeclimate.com/article/289-configuring-your-repository-via-codeclimate-yml#platform
|
|
11
|
-
|
|
12
|
-
# For a list of all available engines, see here:
|
|
13
|
-
# http://docs.codeclimate.com/article/296-engines-available-engines
|
|
14
|
-
|
|
15
|
-
engines:
|
|
16
|
-
# to turn on an engine, add it here and set enabled to `true`
|
|
17
|
-
# to turn off an engine, set enabled to `false` or remove it
|
|
18
|
-
rubocop:
|
|
19
|
-
enabled: true
|
|
20
|
-
|
|
21
|
-
# Engines can analyze files and report issues on them, but you can separately
|
|
22
|
-
# decide which files will receive ratings based on those issues. This is
|
|
23
|
-
# specified by path patterns under the ratings key.
|
|
24
|
-
|
|
25
|
-
# For more details see here:
|
|
26
|
-
# http://docs.codeclimate.com/article/289-configuring-your-repository-via-codeclimate-yml#platform
|
|
27
|
-
|
|
28
|
-
# Note: If the ratings key is not specified, this will result in a 0.0 GPA on your dashboard.
|
|
29
|
-
|
|
30
|
-
ratings:
|
|
31
|
-
paths:
|
|
32
|
-
- ext/**
|
|
33
|
-
- lib/**
|
|
34
|
-
|
|
35
|
-
# You can globally exclude files from being analyzed by any engine using the
|
|
36
|
-
# exclude_paths key.
|
|
37
|
-
|
|
38
|
-
#exclude_paths:
|
|
39
|
-
#- spec/**/*
|
|
40
|
-
#- vendor/**/*
|