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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97244a96c7a9bbe0b79ed421a8d31932c491b7f2ed1b0262e024e8aa300cb2ae
4
- data.tar.gz: faba4c8204d5a0b0c04781e7806216fb953a1838bd7069b2c6a380a52028735d
3
+ metadata.gz: f45703d9d83ab3b6c69788dcce0cdc47e164ef2f851bd17015319615cdf83d97
4
+ data.tar.gz: 216b93aa9a440063db859182002047bb4ce02b5977ff154e01a9c4ddef4ca7c7
5
5
  SHA512:
6
- metadata.gz: e9599fee49c68703901d7a6ff6ff48bd95f9c89a07cdd5986d2e61004590cb79489631d3e705c81c9ad35ca7292914aac00f443b30dcc494d50d7106fcdf86ec
7
- data.tar.gz: df276e96c9273e2e9adc66e117fe1d03290a678b669e93ae0e882bac56cb04db07e38f2b2da8ab4d65e4736fafe5d6dd4b7c6348a026a81aec7b7a867ceadf30
6
+ metadata.gz: 2fb95eb9aca6bc05324a7f97d8d461aac96311ce159ab3b6d321ba89fcebe9147a2c2b678df17e7421dadadeea6f367c8d2ea7288211baeb49d74461d89cd7d5
7
+ data.tar.gz: 83d5d6f3264e5f678441465897f5a127d6ecf2aa260423b1f299a6339532aac4b2e7d128190ce09e9e05bb95d938d96e1d168fd272fc2f2317a18c9f826a46f0
@@ -1,26 +1,44 @@
1
1
  name: CI
2
2
 
3
- on: [push, pull_request]
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
- runs-on: ubuntu-latest
12
- name: Test on Ruby ${{ matrix.ruby_version }}
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
- - uses: actions/checkout@v2
15
- - name: Setup Ruby ${{ matrix.ruby_version }}
16
- uses: actions/setup-ruby@v1
17
- with:
18
- ruby-version: ${{ matrix.ruby_version }}
19
- - name: Install dependencies
20
- run: bundle install
21
- - name: Build gem
22
- run: gem build yajl-ruby.gemspec
23
- - name: Install gem
24
- run: gem install yajl-ruby
25
- - name: Run tests
26
- run: bundle exec rake spec
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 = Data_Make_Struct(klass, yajl_parser_wrapper, yajl_parser_wrapper_mark, yajl_parser_wrapper_free, wrapper);
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 = Data_Make_Struct(klass, yajl_encoder_wrapper, yajl_encoder_wrapper_mark, yajl_encoder_wrapper_free, wrapper);
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
- #define GetParser(obj, sval) Data_Get_Struct(obj, yajl_parser_wrapper, sval);
62
- #define GetEncoder(obj, sval) Data_Get_Struct(obj, yajl_encoder_wrapper, sval);
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
@@ -1,3 +1,3 @@
1
1
  module Yajl
2
- VERSION = '1.4.3'
2
+ VERSION = '1.4.4'
3
3
  end
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.3
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: 2022-05-26 00:00:00.000000000 Z
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: 3.3.3
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/**/*