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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a357db3a32e45d9bfc7af7f1f6e545666058273f
4
- data.tar.gz: 4bf9286b6dfa15e6d202118ddda7e91eb78988e2
3
+ metadata.gz: fe659eeb4fe808b50322e19cdc22d7416d0e922e
4
+ data.tar.gz: 461f634749b19eafbbc770e869e79e85a4d7a73b
5
5
  SHA512:
6
- metadata.gz: 603cdebb51b26424c24b6c15d71e667bcd399892a4407999d3cedde03dccccff74cabed0a4ed27c35a9e456b31a248abb17207a673b43a344c0fc554ff14ce66
7
- data.tar.gz: 28c4f097656b8f464e12401f96eb34fc94a9a210aea6eb0ecbbe836914a38cb040f3711de9eb7b6575d65f1e8d0f07b73c3d68dd3289b5cf867f2bb946bd6198
6
+ metadata.gz: b5c99000809053379b114ed9e2438233b326e147771989d865866e66db8e132ec5876b5f0ab6df83f29e5d1d499687034773d35270cf4d08bf41dbf41a48bf5c
7
+ data.tar.gz: 7b7655a1cb1d46b4ab13202ad33f9b08dcae4b14eb9d6b52319e685daf753d9ebe9efb18144b34535b031016389993f9d7e4e02301ebaa33c2550719cb12cd47
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ $: << File.expand_path(File.join(File.dirname( __FILE__ ), "lib"))
2
+
1
3
  require 'rspec/core/rake_task'
2
4
  require 'rubygems/package_task'
3
5
  require 'rake/extensiontask'
@@ -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} #{$CFLAGS}"
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
- $LDFLAGS << " -lyajl"
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} #{$CFLAGS}"
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
- $LDFLAGS << " -lyajl"
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
@@ -1,3 +1,3 @@
1
1
  module FFI_Yajl
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  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: 0.1.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-06 00:00:00.000000000 Z
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.1
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