ffi-yajl 2.7.5 → 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 +4 -4
- data/README.md +1 -8
- data/ext/ffi_yajl/ext/encoder/encoder.c +0 -1
- 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 +1 -2
- data/lib/ffi_yajl/map_library_name.rb +11 -11
- data/lib/ffi_yajl/parser.rb +0 -1
- data/lib/ffi_yajl/version.rb +1 -1
- metadata +13 -38
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 27162c0934fd134ebcef9c76ad3599841b7400b14fbfaf804abd1006f6527bdf
|
|
4
|
+
data.tar.gz: b72ba7e4623d29b9d6526e86db2fb564ae1f4cf70e1a800f5899b56ef415cc30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 51a0bd24b6bd5c1bf74ea34a8b41b35f117c2c1616f1d9369a59792fe0fc832c171d2c20e153b010dcc130f37fe18251bce418b724b2b46be18550ee4f8fc6de
|
|
7
|
+
data.tar.gz: 8545b3422aea11ef6b6705a599812f48cd57ee2252e0da5956cd848df1045f8d3348e16ed2d041abb60b282075e4ade1a09ae12fcb6364edd6c92fa6fa92c9c4
|
data/README.md
CHANGED
|
@@ -15,14 +15,7 @@ ffi-yajl is a Ruby adapter for the [yajl](http://lloyd.github.io/yajl/) JSON par
|
|
|
15
15
|
|
|
16
16
|
## How to Install
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
`cannot find -lyajldll: No such file or directory`
|
|
21
|
-
|
|
22
|
-
If your build script ends up up in this state, a short term fix is `gem uninstall -I libyajl2` before the failing `bundle install`
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Install from the command-line:
|
|
18
|
+
Install from the command-line:
|
|
26
19
|
|
|
27
20
|
```
|
|
28
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__,
|
|
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.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"
|
data/lib/ffi_yajl/encoder.rb
CHANGED
|
@@ -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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
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:
|
|
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:
|
|
11
|
+
date: 2023-06-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: libyajl2
|
|
@@ -16,47 +16,22 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '2
|
|
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
|
|
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:
|
|
58
30
|
- ffi-yajl-bench
|
|
59
|
-
extensions:
|
|
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
|
|
60
35
|
extra_rdoc_files:
|
|
61
36
|
- README.md
|
|
62
37
|
- LICENSE
|
|
@@ -106,7 +81,7 @@ homepage: http://github.com/chef/ffi-yajl
|
|
|
106
81
|
licenses:
|
|
107
82
|
- MIT
|
|
108
83
|
metadata: {}
|
|
109
|
-
post_install_message:
|
|
84
|
+
post_install_message:
|
|
110
85
|
rdoc_options: []
|
|
111
86
|
require_paths:
|
|
112
87
|
- lib
|
|
@@ -114,15 +89,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
114
89
|
requirements:
|
|
115
90
|
- - ">="
|
|
116
91
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '
|
|
92
|
+
version: '2.2'
|
|
118
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
94
|
requirements:
|
|
120
95
|
- - ">="
|
|
121
96
|
- !ruby/object:Gem::Version
|
|
122
97
|
version: '0'
|
|
123
98
|
requirements: []
|
|
124
|
-
rubygems_version: 3.3.
|
|
125
|
-
signing_key:
|
|
99
|
+
rubygems_version: 3.3.7
|
|
100
|
+
signing_key:
|
|
126
101
|
specification_version: 4
|
|
127
102
|
summary: Ruby FFI wrapper around YAJL 2.x
|
|
128
103
|
test_files: []
|