ffi-yajl 0.1.1-universal-java → 0.1.2-universal-java
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/Rakefile +2 -0
- data/ext/ffi_yajl/ext/encoder/extconf.rb +2 -2
- data/ext/ffi_yajl/ext/parser/extconf.rb +2 -2
- data/lib/ffi_yajl/ext.rb +11 -4
- data/lib/ffi_yajl/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe659eeb4fe808b50322e19cdc22d7416d0e922e
|
4
|
+
data.tar.gz: 461f634749b19eafbbc770e869e79e85a4d7a73b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5c99000809053379b114ed9e2438233b326e147771989d865866e66db8e132ec5876b5f0ab6df83f29e5d1d499687034773d35270cf4d08bf41dbf41a48bf5c
|
7
|
+
data.tar.gz: 7b7655a1cb1d46b4ab13202ad33f9b08dcae4b14eb9d6b52319e685daf753d9ebe9efb18144b34535b031016389993f9d7e4e02301ebaa33c2550719cb12cd47
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
|
|
9
9
|
|
10
10
|
# pick up the vendored libyajl2 out of the libyajl2 gem
|
11
11
|
$CFLAGS = "-I#{Libyajl2.include_path} -L#{Libyajl2.opt_path} #{$CFLAGS}"
|
12
|
-
$LDFLAGS = "-L#{Libyajl2.opt_path} #{$
|
12
|
+
$LDFLAGS = "-L#{Libyajl2.opt_path} #{$LDFLAGS}"
|
13
13
|
|
14
14
|
puts $CFLAGS
|
15
15
|
puts $LDFLAGS
|
@@ -22,7 +22,7 @@ if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc|clang/
|
|
22
22
|
$CFLAGS << " -Wall"
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
#$LDFLAGS << " -lyajl"
|
26
26
|
|
27
27
|
dir_config 'encoder'
|
28
28
|
|
@@ -9,7 +9,7 @@ RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
|
|
9
9
|
|
10
10
|
# pick up the vendored libyajl2 out of the libyajl2 gem
|
11
11
|
$CFLAGS = "-I#{Libyajl2.include_path} -L#{Libyajl2.opt_path} #{$CFLAGS}"
|
12
|
-
$LDFLAGS = "-L#{Libyajl2.opt_path} #{$
|
12
|
+
$LDFLAGS = "-L#{Libyajl2.opt_path} #{$LDFLAGS}"
|
13
13
|
|
14
14
|
puts $CFLAGS
|
15
15
|
puts $LDFLAGS
|
@@ -22,7 +22,7 @@ if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc|clang/
|
|
22
22
|
$CFLAGS << " -Wall"
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
#$LDFLAGS << " -lyajl"
|
26
26
|
|
27
27
|
dir_config 'parser'
|
28
28
|
|
data/lib/ffi_yajl/ext.rb
CHANGED
@@ -2,19 +2,26 @@ require 'rubygems'
|
|
2
2
|
|
3
3
|
require 'ffi_yajl/encoder'
|
4
4
|
require 'ffi_yajl/parser'
|
5
|
+
require 'dl'
|
6
|
+
require 'ffi'
|
7
|
+
require 'libyajl2'
|
5
8
|
|
6
|
-
#unless RUBY_VERSION.to_f >= 1.9
|
7
|
-
# # segfaults on ruby 1.8 and this is an exceedingly low priority to fix, use ffi instead
|
8
|
-
# raise NotImplementedError, "The C-extension is disabled on Ruby 1.8"
|
9
|
-
#end
|
10
9
|
|
11
10
|
module FFI_Yajl
|
12
11
|
class Parser
|
12
|
+
# FIXME: DRY with ffi_yajl/ffi.rb
|
13
|
+
libname = ::FFI.map_library_name("yajl")
|
14
|
+
libpath = File.expand_path(File.join(Libyajl2.opt_path, libname))
|
15
|
+
::DL.dlopen(libpath)
|
13
16
|
require 'ffi_yajl/ext/parser'
|
14
17
|
include FFI_Yajl::Ext::Parser
|
15
18
|
end
|
16
19
|
|
17
20
|
class Encoder
|
21
|
+
# FIXME: DRY with ffi_yajl/ffi.rb
|
22
|
+
libname = ::FFI.map_library_name("yajl")
|
23
|
+
libpath = File.expand_path(File.join(Libyajl2.opt_path, libname))
|
24
|
+
::DL.dlopen(libpath)
|
18
25
|
require 'ffi_yajl/ext/encoder'
|
19
26
|
include FFI_Yajl::Ext::Encoder
|
20
27
|
end
|
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: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: universal-java
|
6
6
|
authors:
|
7
7
|
- Lamont Granquist
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
165
|
version: '0'
|
166
166
|
requirements: []
|
167
167
|
rubyforge_project:
|
168
|
-
rubygems_version: 2.2.
|
168
|
+
rubygems_version: 2.2.2
|
169
169
|
signing_key:
|
170
170
|
specification_version: 4
|
171
171
|
summary: Ruby FFI wrapper around YAJL 2.x
|