| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
Reek doesn't work with modern Rake
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
|
| |
|
|
|
|
|
| |
this is kind of shitty code, but once 2.0 and 1.9 are dropped and we
can use #scrub then all the shitty code can go away...
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
the string we get back from ffi is tagged as ascii encoded by default,
so we must force encode it first.
then we don't want to convert from binary to utf-8 since that will wind
up mangling all the utf-8 characters, we want to convert from utf-8
to utf-8 while replacing invalid characters.
|
| |
|
|
|
|
|
| |
c extension needs stringio and date required first in order to find
those constants.
|
| |
|
|
|
|
| |
but 30 cops disabled, lol...
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
and add a few more to be ignored
|
|\
| |
| | |
Suppress method redefined warnings
|
| |
| |
| |
| |
| |
| |
| | |
% FORCE_FFI_YAJL=ffi ruby -w -I lib -e 'require "ffi_yajl"'
lib/ffi_yajl/parser.rb:33: warning: method redefined; discarding old stack
lib/ffi_yajl/parser.rb:40: warning: method redefined; discarding old key_stack
...
|
| | |
|
| |
| |
| |
| |
| |
| | |
% ruby -I lib -r ffi_yajl/ffi -r stringio -e ''
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': superclass mismatch for class StringIO (TypeError)
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
|
|\ \
| | |
| | | |
Suppress assigned but unused variable warning
|
| |/
| |
| |
| |
| |
| | |
% FORCE_FFI_YAJL=ffi ruby -w -I lib -e 'require "ffi_yajl"'
...
lib/ffi_yajl/ffi/encoder.rb:56: warning: assigned but unused variable - length
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
% FORCE_FFI_YAJL=ffi ruby -w -I lib -e 'require "ffi_yajl"'
...
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55: warning: loading in progress, circular require considered harmful - lib/ffi_yajl/ffi.rb
from -e:1:in `<main>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from lib/ffi_yajl.rb:40:in `<top (required)>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from lib/ffi_yajl/ffi.rb:144:in `<top (required)>'
from lib/ffi_yajl/ffi.rb:145:in `<module:FFI_Yajl>'
from lib/ffi_yajl/ffi.rb:146:in `<class:Parser>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from lib/ffi_yajl/ffi/parser.rb:23:in `<top (required)>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
lib/ffi_yajl/ffi/encoder.rb:56: warning: assigned but unused variable - length
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55: warning: loading in progress, circular require considered harmful - lib/ffi_yajl/ffi.rb
from -e:1:in `<main>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from lib/ffi_yajl.rb:40:in `<top (required)>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from lib/ffi_yajl/ffi.rb:144:in `<top (required)>'
from lib/ffi_yajl/ffi.rb:150:in `<module:FFI_Yajl>'
from lib/ffi_yajl/ffi.rb:151:in `<class:Encoder>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from lib/ffi_yajl/ffi/encoder.rb:23:in `<top (required)>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
...
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
validate_utf8=true raises on bad input
validate_utf8=false now does not raise, but still produces valid
UTF-8 clean JSON by replacing characters.
the previous behavior of emitting bad JSON that was not UTF-8 clean
when validate_utf8 was false is dropped (and this was behavior only
of the C extension and not the ffi extension since the ffi layer must
do some scrubbing of its own).
|
|
|
|
| |
plus code cleanup of the c-extension
|
| |
|
|\
| |
| | |
support encoding StringIOs
|
| | |
|
|/
|
|
|
| |
can be used to error out if keys are duplicated in input rather than
silently replacing.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
jruby can't load this
|
|
|
|
|
| |
run through multiple different possible library names and extensions,
favoring the libyajl2 gem versions first.
|
|
|
|
|
| |
This will get dlopen in a consistent place on all the platforms
which need it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Copies the algorithm out of FFI.map_library_name into the
FFI_Yajl#map_library_name function so that when we're loading up the
C extension we don't need to also slurp in the ffi gem just to run
that. The ffi gem is moved to a hard dependency of only the jruby
version of the gem, and its a development dependency for the other
ruby VMs (so rake spec will work against the ffi library), but its
an optional library to install to make the ffi library work on VMs
that support C extensions (MRI, RBX).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This causes issues because JSON and ffi-yajl get into fights over who
monkeypatched the classes last and this causes random issues with
whitespace disagreement between the JSON gem and the underlying libyajl
C library. For deterministic output its better not to have fighting
monkeypatches, it generates considerable chaos.
If anyone wants to extract the json_gem.rb file into a gem of its own
and support these monkeypatches going forwards that would be fine
(there is, in fact, literally nothing that could be done to stop you),
but we do not want to support these.
|
| |
|
|
|
|
|
| |
its useful to be able to include/extend the platform class and then
use this sugar directly
|
| |
|
| |
|