summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Resolve rubocop failuresJaymala Sinha2019-10-101-10/+10
| | | | Signed-off-by: Jaymala Sinha <jsinha@chef.io>
* add check for yajl-ruby vulnerabilityLamont Granquist2017-11-281-1/+8
| | | | | | it looks like this code is not vulnerable Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Switch from reek/rubocop to chefstyleTim Smith2017-06-204-23/+23
| | | | | | Reek doesn't work with modern Rake Signed-off-by: Tim Smith <tsmith@chef.io>
* use new ruby #scrub method where availableLamont Granquist2016-01-051-1/+1
|
* make sure utf-8 cleaning doesn't grow without boundsLamont Granquist2016-01-051-0/+7
| | | | | | we had a bug where we'd inject utf-8 characters that we'd mangle and then replace with even more utf-8 characters so that any normal attrs would grow without bounds with lots of utf-8 '?' characters.
* fix validate_utf8: false encoding coercionLamont Granquist2016-01-051-0/+6
| | | | | | | | | 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.
* rubocop on 2.2 needs to ignore this lineLamont Granquist2015-07-101-1/+1
| | | | it breaks 1.9 through 2.1 when rubocop fixes it.
* ruby 1.9/2.0/2.1 have unicode symbol issuesLamont Granquist2015-07-101-1/+1
|
* yet more copslcg/more-copsLamont Granquist2015-07-093-30/+30
|
* some more cop fixesLamont Granquist2015-07-091-7/+7
|
* fix lots of copsLamont Granquist2015-07-094-59/+53
| | | | and add a few more to be ignored
* derp, really force to utf8, really checkLamont Granquist2015-04-241-0/+4
|
* change :validate_utf8=false to still emit utf8lcg/utf8-string-replacementLamont Granquist2015-04-231-0/+4
| | | | | | | | | | | 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).
* dropping support for ruby 1.8.7Lamont Granquist2015-04-211-1/+0
| | | | | adding support for UTF-8 encoding issues and making it backcompat with 1.8.7 is too painful for words, goodbye...
* emit token that failed utf-8 validationLamont Granquist2015-04-211-1/+1
| | | | plus code cleanup of the c-extension
* Merge pull request #19 from chef/lcg/stringio-encodingLamont Granquist2015-04-201-0/+5
|\ | | | | support encoding StringIOs
| * fix ffi sideLamont Granquist2015-04-171-1/+1
| |
| * add busted specLamont Granquist2015-04-171-0/+5
| |
* | add :unique_key_checking flag to parserlcg/unique_key_checkingLamont Granquist2015-04-171-0/+15
|/ | | | | can be used to error out if keys are duplicated in input rather than silently replacing.
* add copyright noticesLamont Granquist2015-04-144-0/+85
|
* add specs for library mapping helperslcg/dlopen-extensionLamont Granquist2015-04-131-0/+96
|
* add explanatory commentLamont Granquist2015-04-131-0/+3
|
* test with yajl-ruby concurrently loadedLamont Granquist2015-04-111-0/+6
|
* add comment on why spec does not run on windowsLamont Granquist2015-03-251-0/+2
|
* Filter this test out of windows.Lamont Granquist2015-03-242-1/+2
| | | | | | For some reason on Ruby 2.0.0 on windows this test spins forever. Possibly a ruby-on-windows-bug. Might be a real issue, but without it being customer affecting don't have time for that.
* Removing JSON gem compatibility layerLamont Granquist2015-03-171-382/+0
| | | | | | | | | | | | | 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.
* fix typoLamont Granquist2015-01-221-1/+1
|
* support turning off validate_utf8Lamont Granquist2015-01-221-1/+27
|
* allow arbitrary Objects as keysLamont Granquist2014-11-241-0/+17
| | | | i fixed Hashes/Arrays/true/false/nil, but forgot Object.
* avoid these tests on ruby 1.8.7Lamont Granquist2014-11-221-2/+2
| | | | lol
* support calling #to_s on all types for keysLamont Granquist2014-11-221-0/+25
| | | | | | compatibility with JSON gem and yajl-ruby closes #14
* add busted specs for outstanding parser bugsLamont Granquist2014-11-221-1/+49
|
* Making necessary C changes to only call to_json if it is presenttyler-ball2014-10-071-1/+1
|
* If an object does not have .to_json, we no longer try to call ittyler-ball2014-10-061-0/+17
|
* WIPLamont Granquist2014-08-232-2/+4
|
* fix the timezone to UTC or Date specs will failLamont Granquist2014-08-232-6/+28
| | | | only works in -800 right now
* add datetime encodingLamont Granquist2014-08-232-8/+21
| | | | | | | | necessary for ohai json_gem spec complies with JSON gem format. this also arguably fixes issues with yajl-ruby where it does not encode date objects correctly.
* add spec for explicit nil optionLamont Granquist2014-08-091-1/+9
|
* fix for chef pretty printing issuesLamont Granquist2014-08-071-0/+11
|
* Revert "fix for chef pretty printing issues"Lamont Granquist2014-08-071-11/+0
| | | | This reverts commit 5d260103d3f11897e7873fb3fa796966896ff946.
* fix for chef pretty printing issuesLamont Granquist2014-08-071-0/+11
|
* change allow_comment default to trueLamont Granquist2014-08-071-0/+8
| | | | | this matches yajl-ruby's default and fixes a regression in Chef where we stopped accepting comments.
* add tests for prett_generate's options hash argumentLamont Granquist2014-07-121-0/+12
|
* handle StringIOs by being slurpy for nowLamont Granquist2014-06-151-1/+0
|
* fix very large floats in ffiLamont Granquist2014-06-151-1/+0
|
* support yajl parser optionsLamont Granquist2014-06-141-5/+103
|
* implementing allow_comments in ffiLamont Granquist2014-06-141-3/+1
|
* don't do the long tests on ruby <= 1.9.2Lamont Granquist2014-06-142-2/+3
| | | | seems to lock up rspec completely
* fix ordering deprecation warningLamont Granquist2014-06-141-1/+1
|
* fix some rspec deprecation warningsLamont Granquist2014-06-141-18/+18
|