oj 3.6.2 → 3.6.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d0f7d6dbca5f0271c4a6e2296c56881940e85b4b
4
- data.tar.gz: 879796b3fdfee0aa99c3a8913a13bd6047e7f957
2
+ SHA256:
3
+ metadata.gz: e3bd53d19ca0596197ef568e62ecd42cc06bf50da464f3d12e8c930a8b522e63
4
+ data.tar.gz: c86a9bb989dda968386361ef7ec598d60728f135fc4215d94155e86c560f7236
5
5
  SHA512:
6
- metadata.gz: c919d3e606b41de048d2d150834e6b795494ef6b9d9c80676c217e773e23126a928638dccbf96bb372c4e473997c1811ebc46ab3189b323a1ff00abc5b8a73e4
7
- data.tar.gz: 13114820906d6af519314be9dee39224f79071490b5ee23bbf7b1a7bb01d89725fd751f4c056f88f1f7e837457df49885f31f556ca03f25a2767bae0fa77eea0
6
+ metadata.gz: 6f5db14003bb717967c40273ea6e2dc3d2605490fa54c3b9130ba7543bc3ce8b36aa86f1ea514d6c509ffd1313f4ed88dae32326a0585c84407cd1e3c0275220
7
+ data.tar.gz: 302da9f08e30fe0c6bd5f3aeea668328975d4f153befd4812b1c3b50a8720d6d255f216e8bb22451672947d23f3c0fa3d7837415813950f87717b02a0238d291
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # [![{}j](http://www.ohler.com/dev/images/oj_comet_64.svg)](http://www.ohler.com/oj) gem
2
2
 
3
- [![Build Status](https://img.shields.io/travis/ohler55/oj/master.svg)](http://travis-ci.org/ohler55/oj?branch=master) [![AppVeyor](https://img.shields.io/appveyor/ci/ohler55/oj/master.svg)](https://ci.appveyor.com/project/ohler55/oj) ![Gem](https://img.shields.io/gem/v/oj.svg) ![Gem](https://img.shields.io/gem/dt/oj.svg)
3
+ [![Build Status](https://img.shields.io/travis/ohler55/oj/master.svg)](http://travis-ci.org/ohler55/oj?branch=master) [![AppVeyor](https://img.shields.io/appveyor/ci/ohler55/oj/master.svg)](https://ci.appveyor.com/project/ohler55/oj) ![Gem](https://img.shields.io/gem/v/oj.svg) ![Gem](https://img.shields.io/gem/dt/oj.svg) [![SemVer compatibility](https://api.dependabot.com/badges/compatibility_score?dependency-name=oj&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=oj&package-manager=bundler&version-scheme=semver)
4
4
 
5
5
  A *fast* JSON parser and Object marshaller as a Ruby gem.
6
6
 
@@ -471,10 +471,21 @@ time_alt(VALUE obj, int depth, Out out) {
471
471
  { "n", 1, Qundef, 0, Qundef },
472
472
  { NULL, 0, Qnil },
473
473
  };
474
+ #if HAS_RB_TIME_TIMESPEC
474
475
  struct timespec ts = rb_time_timespec(obj);
476
+ time_t sec = ts.tv_sec;
477
+ long nsec = ts.tv_nsec;
478
+ #else
479
+ time_t sec = NUM2LONG(rb_funcall2(obj, oj_tv_sec_id, 0, 0));
480
+ #if HAS_NANO_TIME
481
+ long long nsec = rb_num2ll(rb_funcall2(obj, oj_tv_nsec_id, 0, 0));
482
+ #else
483
+ long long nsec = rb_num2ll(rb_funcall2(obj, oj_tv_usec_id, 0, 0)) * 1000;
484
+ #endif
485
+ #endif
475
486
 
476
- attrs[0].num = ts.tv_sec;
477
- attrs[1].num = ts.tv_nsec;
487
+ attrs[0].num = sec;
488
+ attrs[1].num = nsec;
478
489
 
479
490
  oj_code_attrs(obj, attrs, depth, out, true);
480
491
  }
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Oj
3
3
  # Current version of the module.
4
- VERSION = '3.6.2'
4
+ VERSION = '3.6.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oj
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.2
4
+ version: 3.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-30 00:00:00.000000000 Z
11
+ date: 2018-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -79,16 +79,16 @@ extensions:
79
79
  - ext/oj/extconf.rb
80
80
  extra_rdoc_files:
81
81
  - README.md
82
+ - pages/Modes.md
82
83
  - pages/Advanced.md
84
+ - pages/Options.md
85
+ - pages/Custom.md
86
+ - pages/Compatibility.md
83
87
  - pages/WAB.md
84
- - pages/Encoding.md
85
- - pages/Modes.md
86
88
  - pages/Security.md
89
+ - pages/Encoding.md
87
90
  - pages/JsonGem.md
88
91
  - pages/Rails.md
89
- - pages/Compatibility.md
90
- - pages/Custom.md
91
- - pages/Options.md
92
92
  files:
93
93
  - LICENSE
94
94
  - README.md
@@ -270,85 +270,85 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  version: '0'
271
271
  requirements: []
272
272
  rubyforge_project:
273
- rubygems_version: 2.5.1
273
+ rubygems_version: 2.7.6
274
274
  signing_key:
275
275
  specification_version: 4
276
276
  summary: A fast JSON parser and serializer.
277
277
  test_files:
278
- - test/activesupport5/test_helper.rb
279
- - test/activesupport5/time_zone_test_helpers.rb
280
- - test/activesupport5/decoding_test.rb
281
- - test/activesupport5/encoding_test_cases.rb
282
- - test/activesupport5/encoding_test.rb
283
- - test/test_file.rb
284
- - test/files.rb
285
- - test/perf_scp.rb
286
- - test/test_debian.rb
287
- - test/test_gc.rb
288
- - test/_test_mimic_rails.rb
289
- - test/test_writer.rb
278
+ - test/perf_file.rb
290
279
  - test/test_hash.rb
291
- - test/sample/file.rb
292
- - test/sample/hasprops.rb
293
- - test/sample/layer.rb
294
- - test/sample/change.rb
295
- - test/sample/doc.rb
296
- - test/sample/oval.rb
297
- - test/sample/shape.rb
298
- - test/sample/text.rb
299
- - test/sample/group.rb
300
- - test/sample/dir.rb
301
- - test/sample/line.rb
302
- - test/sample/rect.rb
303
- - test/tests.rb
280
+ - test/perf.rb
304
281
  - test/test_object.rb
305
- - test/perf_wab.rb
306
- - test/tests_mimic.rb
307
- - test/activerecord/result_test.rb
308
- - test/perf_saj.rb
309
- - test/tests_mimic_addition.rb
310
- - test/test_saj.rb
311
- - test/sample.rb
312
- - test/test_scp.rb
313
- - test/perf_object.rb
314
- - test/perf_simple.rb
315
282
  - test/test_null.rb
316
- - test/_test_active_mimic.rb
317
- - test/_test_active.rb
318
283
  - test/test_compat.rb
319
- - test/sample_json.rb
320
- - test/big.rb
321
- - test/json_gem/test_helper.rb
322
- - test/json_gem/json_generic_object_test.rb
323
- - test/json_gem/json_common_interface_test.rb
284
+ - test/test_custom.rb
285
+ - test/perf_scp.rb
286
+ - test/test_gc.rb
287
+ - test/sample.rb
324
288
  - test/json_gem/json_string_matching_test.rb
325
289
  - test/json_gem/json_addition_test.rb
326
- - test/json_gem/json_fixtures_test.rb
290
+ - test/json_gem/test_helper.rb
327
291
  - test/json_gem/json_generator_test.rb
328
- - test/json_gem/json_ext_parser_test.rb
329
292
  - test/json_gem/json_parser_test.rb
330
293
  - test/json_gem/json_encoding_test.rb
331
- - test/helper.rb
294
+ - test/json_gem/json_common_interface_test.rb
295
+ - test/json_gem/json_generic_object_test.rb
296
+ - test/json_gem/json_ext_parser_test.rb
297
+ - test/json_gem/json_fixtures_test.rb
298
+ - test/tests_mimic_addition.rb
299
+ - test/test_wab.rb
332
300
  - test/activesupport4/test_helper.rb
333
301
  - test/activesupport4/decoding_test.rb
334
302
  - test/activesupport4/encoding_test.rb
335
- - test/test_wab.rb
336
- - test/perf_file.rb
337
- - test/foo.rb
338
- - test/perf_compat.rb
339
- - test/test_various.rb
303
+ - test/activerecord/result_test.rb
304
+ - test/_test_active.rb
305
+ - test/test_file.rb
306
+ - test/activesupport5/encoding_test_cases.rb
307
+ - test/activesupport5/time_zone_test_helpers.rb
308
+ - test/activesupport5/test_helper.rb
309
+ - test/activesupport5/decoding_test.rb
310
+ - test/activesupport5/encoding_test.rb
311
+ - test/tests.rb
312
+ - test/_test_active_mimic.rb
313
+ - test/perf_object.rb
340
314
  - test/test_strict.rb
341
- - test/test_custom.rb
342
- - test/perf_strict.rb
343
- - test/perf_fast.rb
315
+ - test/test_scp.rb
316
+ - test/perf_wab.rb
317
+ - test/test_saj.rb
318
+ - test/perf_compat.rb
319
+ - test/helper.rb
344
320
  - test/isolated/test_mimic_alone.rb
345
- - test/isolated/test_mimic_after.rb
346
- - test/isolated/test_mimic_as_json.rb
321
+ - test/isolated/test_mimic_define.rb
347
322
  - test/isolated/test_mimic_rails_after.rb
348
- - test/isolated/test_mimic_before.rb
323
+ - test/isolated/test_mimic_after.rb
349
324
  - test/isolated/test_mimic_rails_before.rb
350
- - test/isolated/test_mimic_define.rb
351
- - test/isolated/shared.rb
325
+ - test/isolated/test_mimic_as_json.rb
352
326
  - test/isolated/test_mimic_redefine.rb
353
- - test/perf.rb
327
+ - test/isolated/shared.rb
328
+ - test/isolated/test_mimic_before.rb
329
+ - test/sample_json.rb
330
+ - test/test_debian.rb
331
+ - test/perf_fast.rb
332
+ - test/test_writer.rb
354
333
  - test/test_fast.rb
334
+ - test/sample/line.rb
335
+ - test/sample/change.rb
336
+ - test/sample/dir.rb
337
+ - test/sample/text.rb
338
+ - test/sample/layer.rb
339
+ - test/sample/rect.rb
340
+ - test/sample/group.rb
341
+ - test/sample/oval.rb
342
+ - test/sample/doc.rb
343
+ - test/sample/hasprops.rb
344
+ - test/sample/shape.rb
345
+ - test/sample/file.rb
346
+ - test/files.rb
347
+ - test/big.rb
348
+ - test/perf_saj.rb
349
+ - test/foo.rb
350
+ - test/tests_mimic.rb
351
+ - test/perf_strict.rb
352
+ - test/test_various.rb
353
+ - test/_test_mimic_rails.rb
354
+ - test/perf_simple.rb