ffi-yajl 2.6.0 → 2.7.5
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/ext/ffi_yajl/ext/encoder/encoder.c +1 -0
- data/ext/ffi_yajl/ext/encoder/extconf.rb +1 -1
- data/ext/ffi_yajl/ext/parser/extconf.rb +1 -1
- data/lib/ffi_yajl/benchmark.rb +5 -5
- data/lib/ffi_yajl/encoder.rb +2 -1
- data/lib/ffi_yajl/map_library_name.rb +11 -11
- data/lib/ffi_yajl/parser.rb +1 -0
- data/lib/ffi_yajl/version.rb +1 -1
- metadata +38 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 36eb8453fae1ee5e3be035ff951f44e9cdedf82aa1741d17ad53337e724802d2
|
|
4
|
+
data.tar.gz: 38f7bb44043d5a3d7c0220de3cb2690e193062e459befa1f93f7704aaedd310a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ee931bf2998f8f11ed0ec592a077d27541c7ca39b319eed2fbb01f2b07dbadf70980f3df8b20844784d171988a818733f952d9f2b47aa4c366e0e466de840a8
|
|
7
|
+
data.tar.gz: 1fcce6171cc934967fcad4b92283902770154734be56d5bf1475b078da78ab6fa21d716e867dd72b5040f0396809149fda76e275d457e37d7d029629bd7680bf
|
|
@@ -360,6 +360,7 @@ 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);
|
|
363
364
|
rb_define_method(mEncoder, "do_yajl_encode", mEncoder_do_yajl_encode, 3);
|
|
364
365
|
|
|
365
366
|
/* 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__,
|
|
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__,
|
|
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}"
|
data/lib/ffi_yajl/benchmark.rb
CHANGED
|
@@ -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"
|
|
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"
|
data/lib/ffi_yajl/encoder.rb
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
module FFI_Yajl
|
|
24
24
|
class EncodeError < StandardError; end
|
|
25
|
+
|
|
25
26
|
class Encoder
|
|
26
27
|
attr_accessor :opts
|
|
27
28
|
|
|
@@ -35,7 +36,7 @@ module FFI_Yajl
|
|
|
35
36
|
|
|
36
37
|
if opts[:pretty]
|
|
37
38
|
yajl_gen_opts[:yajl_gen_beautify] = true
|
|
38
|
-
yajl_gen_opts[:yajl_gen_indent_string] = opts[:indent]
|
|
39
|
+
yajl_gen_opts[:yajl_gen_indent_string] = opts[:indent] || " "
|
|
39
40
|
end
|
|
40
41
|
|
|
41
42
|
# 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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
|
|
83
|
+
dlopen(libname)
|
|
84
|
+
found = true
|
|
85
|
+
break
|
|
86
|
+
rescue ArgumentError
|
|
87
|
+
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
|
|
101
|
+
ffi_lib libname
|
|
102
|
+
found = true
|
|
103
|
+
rescue LoadError
|
|
104
|
+
|
|
105
105
|
end
|
|
106
106
|
ffi_lib "yajl" unless found
|
|
107
107
|
end
|
data/lib/ffi_yajl/parser.rb
CHANGED
data/lib/ffi_yajl/version.rb
CHANGED
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.
|
|
4
|
+
version: 2.7.5
|
|
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:
|
|
11
|
+
date: 2025-11-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: libyajl2
|
|
@@ -16,22 +16,47 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '1
|
|
19
|
+
version: '2.1'
|
|
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: '1
|
|
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'
|
|
27
55
|
description: Ruby FFI wrapper around YAJL 2.x
|
|
28
56
|
email: lamont@chef.io
|
|
29
57
|
executables:
|
|
30
58
|
- ffi-yajl-bench
|
|
31
|
-
extensions:
|
|
32
|
-
- ext/ffi_yajl/ext/encoder/extconf.rb
|
|
33
|
-
- ext/ffi_yajl/ext/parser/extconf.rb
|
|
34
|
-
- ext/ffi_yajl/ext/dlopen/extconf.rb
|
|
59
|
+
extensions: []
|
|
35
60
|
extra_rdoc_files:
|
|
36
61
|
- README.md
|
|
37
62
|
- LICENSE
|
|
@@ -81,7 +106,7 @@ homepage: http://github.com/chef/ffi-yajl
|
|
|
81
106
|
licenses:
|
|
82
107
|
- MIT
|
|
83
108
|
metadata: {}
|
|
84
|
-
post_install_message:
|
|
109
|
+
post_install_message:
|
|
85
110
|
rdoc_options: []
|
|
86
111
|
require_paths:
|
|
87
112
|
- lib
|
|
@@ -89,15 +114,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
89
114
|
requirements:
|
|
90
115
|
- - ">="
|
|
91
116
|
- !ruby/object:Gem::Version
|
|
92
|
-
version: '
|
|
117
|
+
version: '3.1'
|
|
93
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
119
|
requirements:
|
|
95
120
|
- - ">="
|
|
96
121
|
- !ruby/object:Gem::Version
|
|
97
122
|
version: '0'
|
|
98
123
|
requirements: []
|
|
99
|
-
rubygems_version: 3.3.
|
|
100
|
-
signing_key:
|
|
124
|
+
rubygems_version: 3.3.27
|
|
125
|
+
signing_key:
|
|
101
126
|
specification_version: 4
|
|
102
127
|
summary: Ruby FFI wrapper around YAJL 2.x
|
|
103
128
|
test_files: []
|