ffi-yajl 2.7.6 → 3.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2a53f5a8577f80f48f79ac85f83a94895a0da875c2581bb34edbc81e4e5946a
4
- data.tar.gz: cd563b850efd2bfd29d5a892d5950635c9e8a25f39e50cbf05bec9e1b36ae9e7
3
+ metadata.gz: 27162c0934fd134ebcef9c76ad3599841b7400b14fbfaf804abd1006f6527bdf
4
+ data.tar.gz: b72ba7e4623d29b9d6526e86db2fb564ae1f4cf70e1a800f5899b56ef415cc30
5
5
  SHA512:
6
- metadata.gz: f586937eca86f67660a067cc419c33d7798728ff4c726a9151d8f999b3187c39970c3feaf3a4dabd2ef2ded5978e07c2c9b5137d22e8b319c334d842573072c8
7
- data.tar.gz: b966847cac924d87a391bf680f3e76d46a8e29f5fd6460083a000b3c9205b06ea95ff6692a416843cb00849e73c22e3ca140e2c9d3523b78361a3c5fe75ab6cc
6
+ metadata.gz: 51a0bd24b6bd5c1bf74ea34a8b41b35f117c2c1616f1d9369a59792fe0fc832c171d2c20e153b010dcc130f37fe18251bce418b724b2b46be18550ee4f8fc6de
7
+ data.tar.gz: 8545b3422aea11ef6b6705a599812f48cd57ee2252e0da5956cd848df1045f8d3348e16ed2d041abb60b282075e4ade1a09ae12fcb6364edd6c92fa6fa92c9c4
data/README.md CHANGED
@@ -2,18 +2,20 @@
2
2
 
3
3
  [![Build status](https://badge.buildkite.com/35c43155d637f5201a5030cd4e7d8025573c0042094e00bbb3.svg?branch=master)](https://buildkite.com/chef-oss/chef-ffi-yajl-master-verify) [![Gem Version](https://badge.fury.io/rb/ffi-yajl.svg)](https://badge.fury.io/rb/ffi-yajl)
4
4
 
5
- ffi-yajl is a Ruby adapter for the [yajl](http://lloyd.github.io/yajl/) JSON parser/generator library. ffi-yajl supports multiple Ruby C extension mechanisms, including both MRI native extensions and FFI in order to be compatible with as many Ruby implementations as possible while providing good performance where possible.
5
+ **Umbrella Project**: [Chef Foundation](https://github.com/chef/chef-oss-practices/blob/master/projects/chef-foundation.md)
6
6
 
7
- ## How to Install
7
+ **Project State**: [Active](https://github.com/chef/chef-oss-practices/blob/master/repo-management/repo-states.md#active)
8
8
 
9
- **Warning** if building through Omnibus, a preinstalled ffi-yajl and libyajl2-gem version not matching the bundled version of the project you're attempting to build (e.g., Chef) may cause:
9
+ **Issues [Response Time Maximum](https://github.com/chef/chef-oss-practices/blob/master/repo-management/repo-states.md)**: 14 days
10
10
 
11
- `cannot find -lyajldll: No such file or directory`
11
+ **Pull Request [Response Time Maximum](https://github.com/chef/chef-oss-practices/blob/master/repo-management/repo-states.md)**: 14 days
12
12
 
13
- If your build script ends up up in this state, a short term fix is `gem uninstall -I libyajl2` before the failing `bundle install`
14
13
 
14
+ ffi-yajl is a Ruby adapter for the [yajl](http://lloyd.github.io/yajl/) JSON parser/generator library. ffi-yajl supports multiple Ruby C extension mechanisms, including both MRI native extensions and FFI in order to be compatible with as many Ruby implementations as possible while providing good performance where possible.
15
+
16
+ ## How to Install
15
17
 
16
- ### Install from the command-line:
18
+ Install from the command-line:
17
19
 
18
20
  ```
19
21
  gem install ffi-yajl
@@ -360,7 +360,6 @@ void Init_encoder() {
360
360
  mExt = rb_define_module_under(mFFI_Yajl, "Ext");
361
361
  mEncoder = rb_define_module_under(mExt, "Encoder");
362
362
  cYajl_Gen = rb_define_class_under(mEncoder, "YajlGen", rb_cObject);
363
- rb_undef_alloc_func(cYajl_Gen);
364
363
  rb_define_method(mEncoder, "do_yajl_encode", mEncoder_do_yajl_encode, 3);
365
364
 
366
365
  /* use rb_const_get instead of rb_define_class so that we don't get superclass mismatches */
@@ -41,7 +41,7 @@ end
41
41
  # this flag by default in DLDFLAGS. Let's specify the list of dynamic symbols
42
42
  # here to avoid compilation failures.
43
43
  if clang? && macos?
44
- symfile = File.join(__dir__, "../dlopen/yajl.sym")
44
+ symfile = File.join(__dir__, '../dlopen/yajl.sym')
45
45
  dynamic_symbols = File.readlines(symfile)
46
46
  dynamic_symbols.each do |sym|
47
47
  $DLDFLAGS << " -Wl,-U,#{sym.strip}"
@@ -41,7 +41,7 @@ end
41
41
  # this flag by default in DLDFLAGS. Let's specify the list of dynamic symbols
42
42
  # here to avoid compilation failures.
43
43
  if clang? && macos?
44
- symfile = File.join(__dir__, "../dlopen/yajl.sym")
44
+ symfile = File.join(__dir__, '../dlopen/yajl.sym')
45
45
  dynamic_symbols = File.readlines(symfile)
46
46
  dynamic_symbols.each do |sym|
47
47
  $DLDFLAGS << " -Wl,-U,#{sym.strip}"
@@ -20,8 +20,8 @@
20
20
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
21
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
 
23
- require "ffi_yajl/benchmark/encode"
24
- require "ffi_yajl/benchmark/encode_profile"
25
- require "ffi_yajl/benchmark/parse"
26
- require "ffi_yajl/benchmark/parse_profile"
27
- require "ffi_yajl/benchmark/parse_profile_ruby_prof"
23
+ require "ffi_yajl/benchmark/encode.rb"
24
+ require "ffi_yajl/benchmark/encode_profile.rb"
25
+ require "ffi_yajl/benchmark/parse.rb"
26
+ require "ffi_yajl/benchmark/parse_profile.rb"
27
+ require "ffi_yajl/benchmark/parse_profile_ruby_prof.rb"
@@ -22,7 +22,6 @@
22
22
 
23
23
  module FFI_Yajl
24
24
  class EncodeError < StandardError; end
25
-
26
25
  class Encoder
27
26
  attr_accessor :opts
28
27
 
@@ -36,7 +35,7 @@ module FFI_Yajl
36
35
 
37
36
  if opts[:pretty]
38
37
  yajl_gen_opts[:yajl_gen_beautify] = true
39
- yajl_gen_opts[:yajl_gen_indent_string] = opts[:indent] || " "
38
+ yajl_gen_opts[:yajl_gen_indent_string] = opts[:indent] ? opts[:indent] : " "
40
39
  end
41
40
 
42
41
  # call either the ext or ffi hook
@@ -79,12 +79,12 @@ module FFI_Yajl
79
79
  def dlopen_yajl_library
80
80
  found = false
81
81
  ( expanded_library_names + library_names ).each do |libname|
82
-
83
- dlopen(libname)
84
- found = true
85
- break
86
- rescue ArgumentError
87
-
82
+ begin
83
+ dlopen(libname)
84
+ found = true
85
+ break
86
+ rescue ArgumentError
87
+ end
88
88
  end
89
89
  raise "cannot find yajl library for platform" unless found
90
90
  end
@@ -97,11 +97,11 @@ module FFI_Yajl
97
97
  def ffi_open_yajl_library
98
98
  found = false
99
99
  expanded_library_names.each do |libname|
100
-
101
- ffi_lib libname
102
- found = true
103
- rescue LoadError
104
-
100
+ begin
101
+ ffi_lib libname
102
+ found = true
103
+ rescue LoadError
104
+ end
105
105
  end
106
106
  ffi_lib "yajl" unless found
107
107
  end
@@ -22,7 +22,6 @@
22
22
 
23
23
  module FFI_Yajl
24
24
  class ParseError < StandardError; end
25
-
26
25
  class Parser
27
26
  attr_writer :stack, :key_stack
28
27
  attr_accessor :key, :finished
@@ -21,5 +21,5 @@
21
21
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
 
23
23
  module FFI_Yajl
24
- VERSION = "2.7.6".freeze
24
+ VERSION = "3.0.0".freeze
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-yajl
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.6
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lamont Granquist
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-12 00:00:00.000000000 Z
11
+ date: 2023-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libyajl2
@@ -16,42 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.1'
19
+ version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '2.1'
27
- - !ruby/object:Gem::Dependency
28
- name: yajl
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: cookstyle
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '8.1'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '8.1'
26
+ version: '1.2'
55
27
  description: Ruby FFI wrapper around YAJL 2.x
56
28
  email: lamont@chef.io
57
29
  executables:
@@ -109,7 +81,7 @@ homepage: http://github.com/chef/ffi-yajl
109
81
  licenses:
110
82
  - MIT
111
83
  metadata: {}
112
- post_install_message:
84
+ post_install_message:
113
85
  rdoc_options: []
114
86
  require_paths:
115
87
  - lib
@@ -117,15 +89,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
117
89
  requirements:
118
90
  - - ">="
119
91
  - !ruby/object:Gem::Version
120
- version: '3.1'
92
+ version: '2.2'
121
93
  required_rubygems_version: !ruby/object:Gem::Requirement
122
94
  requirements:
123
95
  - - ">="
124
96
  - !ruby/object:Gem::Version
125
97
  version: '0'
126
98
  requirements: []
127
- rubygems_version: 3.3.27
128
- signing_key:
99
+ rubygems_version: 3.3.7
100
+ signing_key:
129
101
  specification_version: 4
130
102
  summary: Ruby FFI wrapper around YAJL 2.x
131
103
  test_files: []