From 0c096ac8b9dae94d051439f98cbd6a21d2b1d212 Mon Sep 17 00:00:00 2001 From: Michael Mac-Vicar Date: Sun, 7 Dec 2014 15:17:17 -0200 Subject: [PATCH 1/7] Add test for format options used by the generator The space_before, space, indent, object_nl and array_nl options of the space were not covered. --- tests/test_json_generate.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_json_generate.rb b/tests/test_json_generate.rb index 117a1553..a39e161d 100755 --- a/tests/test_json_generate.rb +++ b/tests/test_json_generate.rb @@ -73,6 +73,19 @@ def test_generate_pretty assert_equal '666', pretty_generate(666, :quirks_mode => true) end + def test_generate_custom + state = State.new(space_before: " ", space: " ", indent:"", object_nl: "\n", array_nl: "") + json = generate({1=>{2=>3,4=>[5,6]}}, state) + assert_equal(<<'EOT'.chomp, json) +{ +"1" : { +"2" : 3, +"4" : [5,6] +} +} +EOT + end + def test_fast_generate json = fast_generate(@hash) assert_equal(JSON.parse(@json2), JSON.parse(json)) From c7b3a70cd649095ba46db5f8adcfcf5e688beb56 Mon Sep 17 00:00:00 2001 From: Michael Mac-Vicar Date: Sun, 7 Dec 2014 15:18:39 -0200 Subject: [PATCH 2/7] Use space_before as documented in the generator This option was already documented but not implemented, allows setting the separator used before the ":" during generation. --- ext/json/ext/generator/generator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/json/ext/generator/generator.c b/ext/json/ext/generator/generator.c index 976afc54..22d89524 100644 --- a/ext/json/ext/generator/generator.c +++ b/ext/json/ext/generator/generator.c @@ -871,6 +871,7 @@ static FBuffer *cState_prepare_buffer(VALUE self) } else { state->object_delim2 = fbuffer_alloc(16); } + if (state->space_before) fbuffer_append(state->object_delim2, state->space_before, state->space_before_len); fbuffer_append_char(state->object_delim2, ':'); if (state->space) fbuffer_append(state->object_delim2, state->space, state->space_len); From b3819dc971b700c58ecbbcded2450cd208a9400e Mon Sep 17 00:00:00 2001 From: Michael Mac-Vicar Date: Sun, 7 Dec 2014 15:48:40 -0200 Subject: [PATCH 3/7] Make generator format test backwards compatible --- tests/test_json_generate.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_json_generate.rb b/tests/test_json_generate.rb index a39e161d..c47ae881 100755 --- a/tests/test_json_generate.rb +++ b/tests/test_json_generate.rb @@ -74,7 +74,7 @@ def test_generate_pretty end def test_generate_custom - state = State.new(space_before: " ", space: " ", indent:"", object_nl: "\n", array_nl: "") + state = State.new(:space_before => " ", :space => " ", :indent => "", :object_nl => "\n", :array_nl => "") json = generate({1=>{2=>3,4=>[5,6]}}, state) assert_equal(<<'EOT'.chomp, json) { From eaac48419d196e909fcdf526c4e3dbec2cc3d19b Mon Sep 17 00:00:00 2001 From: Ben Browning Date: Tue, 16 Dec 2014 10:12:10 -0500 Subject: [PATCH 4/7] Improve JRuby perf. by removing source of multithreaded contention The RuntimeInfo.forRuntime method synchronizes all invocations and ParserSession#parseString was calling this many times when parsing large JSON strings. Thus, when running in a heavily multithreaded environment, threads were spending a large portion of their time waiting on that synchronization instead of doing work parsing the JSON. This fix simply passes in the RuntimeInfo object to the ParserSession when it's instantiated, since the RuntimeInfo is already known and we've already incurred the synchronization cost at that time. Using the test script at https://gist.github.com/bbrowning/0b89580b03a5f19e7a9f, I get the following results before and after this fix on my machine: Before: $ jruby ~/tmp/json_contention.rb 337.920000 0.570000 338.490000 ( 57.955000) After: $ jruby ~/tmp/json_contention.rb 326.400000 0.580000 326.980000 ( 43.084000) That's a 25% reduction in processing time for parsing the same JSON on my quad core machine. I'd expect an even higher percentage improvement on a machine with more CPUs. --- java/src/json/ext/Parser.java | 171 +++++++++++++++++----------------- java/src/json/ext/Parser.rl | 9 +- 2 files changed, 91 insertions(+), 89 deletions(-) diff --git a/java/src/json/ext/Parser.java b/java/src/json/ext/Parser.java index 6cb5886a..37423f54 100644 --- a/java/src/json/ext/Parser.java +++ b/java/src/json/ext/Parser.java @@ -130,7 +130,7 @@ public Parser(Ruby runtime, RubyClass metaClass) { * *
:create_additions *
If set to false, the Parser doesn't create additions - * even if a matchin class and create_id was found. This option + * even if a matching class and create_id was found. This option * defaults to true. * *
:object_class @@ -248,7 +248,7 @@ private RubyString reinterpretEncoding(ThreadContext context, */ @JRubyMethod public IRubyObject parse(ThreadContext context) { - return new ParserSession(this, context).parse(); + return new ParserSession(this, context, info).parse(); } /** @@ -304,6 +304,7 @@ private RubyString getCreateId(ThreadContext context) { private static class ParserSession { private final Parser parser; private final ThreadContext context; + private final RuntimeInfo info; private final ByteList byteList; private final ByteList view; private final byte[] data; @@ -315,9 +316,10 @@ private static class ParserSession { // no idea about the origins of this value, ask Flori ;) private static final int EVIL = 0x666; - private ParserSession(Parser parser, ThreadContext context) { + private ParserSession(Parser parser, ThreadContext context, RuntimeInfo info) { this.parser = parser; this.context = context; + this.info = info; this.byteList = parser.checkAndGetSource().getByteList(); this.data = byteList.unsafeBytes(); this.view = new ByteList(data, false); @@ -337,11 +339,11 @@ private Ruby getRuntime() { } -// line 363 "Parser.rl" +// line 365 "Parser.rl" -// line 345 "Parser.java" +// line 347 "Parser.java" private static byte[] init__JSON_value_actions_0() { return new byte [] { @@ -455,7 +457,7 @@ private static byte[] init__JSON_value_from_state_actions_0() static final int JSON_value_en_main = 1; -// line 469 "Parser.rl" +// line 471 "Parser.rl" void parseValue(ParserResult res, int p, int pe) { @@ -463,14 +465,14 @@ void parseValue(ParserResult res, int p, int pe) { IRubyObject result = null; -// line 467 "Parser.java" +// line 469 "Parser.java" { cs = JSON_value_start; } -// line 476 "Parser.rl" +// line 478 "Parser.rl" -// line 474 "Parser.java" +// line 476 "Parser.java" { int _klen; int _trans = 0; @@ -496,13 +498,13 @@ void parseValue(ParserResult res, int p, int pe) { while ( _nacts-- > 0 ) { switch ( _JSON_value_actions[_acts++] ) { case 9: -// line 454 "Parser.rl" +// line 456 "Parser.rl" { p--; { p += 1; _goto_targ = 5; if (true) continue _goto;} } break; -// line 506 "Parser.java" +// line 508 "Parser.java" } } @@ -565,25 +567,25 @@ else if ( data[p] > _JSON_value_trans_keys[_mid+1] ) switch ( _JSON_value_actions[_acts++] ) { case 0: -// line 371 "Parser.rl" +// line 373 "Parser.rl" { result = getRuntime().getNil(); } break; case 1: -// line 374 "Parser.rl" +// line 376 "Parser.rl" { result = getRuntime().getFalse(); } break; case 2: -// line 377 "Parser.rl" +// line 379 "Parser.rl" { result = getRuntime().getTrue(); } break; case 3: -// line 380 "Parser.rl" +// line 382 "Parser.rl" { if (parser.allowNaN) { result = getConstant(CONST_NAN); @@ -593,7 +595,7 @@ else if ( data[p] > _JSON_value_trans_keys[_mid+1] ) } break; case 4: -// line 387 "Parser.rl" +// line 389 "Parser.rl" { if (parser.allowNaN) { result = getConstant(CONST_INFINITY); @@ -603,7 +605,7 @@ else if ( data[p] > _JSON_value_trans_keys[_mid+1] ) } break; case 5: -// line 394 "Parser.rl" +// line 396 "Parser.rl" { if (pe > p + 9 - (parser.quirksMode ? 1 : 0) && absSubSequence(p, p + 9).equals(JSON_MINUS_INFINITY)) { @@ -632,7 +634,7 @@ else if ( data[p] > _JSON_value_trans_keys[_mid+1] ) } break; case 6: -// line 420 "Parser.rl" +// line 422 "Parser.rl" { parseString(res, p, pe); if (res.result == null) { @@ -645,7 +647,7 @@ else if ( data[p] > _JSON_value_trans_keys[_mid+1] ) } break; case 7: -// line 430 "Parser.rl" +// line 432 "Parser.rl" { currentNesting++; parseArray(res, p, pe); @@ -660,7 +662,7 @@ else if ( data[p] > _JSON_value_trans_keys[_mid+1] ) } break; case 8: -// line 442 "Parser.rl" +// line 444 "Parser.rl" { currentNesting++; parseObject(res, p, pe); @@ -674,7 +676,7 @@ else if ( data[p] > _JSON_value_trans_keys[_mid+1] ) } } break; -// line 678 "Parser.java" +// line 680 "Parser.java" } } } @@ -694,7 +696,7 @@ else if ( data[p] > _JSON_value_trans_keys[_mid+1] ) break; } } -// line 477 "Parser.rl" +// line 479 "Parser.rl" if (cs >= JSON_value_first_final && result != null) { res.update(result, p); @@ -704,7 +706,7 @@ else if ( data[p] > _JSON_value_trans_keys[_mid+1] ) } -// line 708 "Parser.java" +// line 710 "Parser.java" private static byte[] init__JSON_integer_actions_0() { return new byte [] { @@ -803,7 +805,7 @@ private static byte[] init__JSON_integer_trans_actions_0() static final int JSON_integer_en_main = 1; -// line 496 "Parser.rl" +// line 498 "Parser.rl" void parseInteger(ParserResult res, int p, int pe) { @@ -821,15 +823,15 @@ int parseIntegerInternal(int p, int pe) { int cs = EVIL; -// line 825 "Parser.java" +// line 827 "Parser.java" { cs = JSON_integer_start; } -// line 513 "Parser.rl" +// line 515 "Parser.rl" int memo = p; -// line 833 "Parser.java" +// line 835 "Parser.java" { int _klen; int _trans = 0; @@ -910,13 +912,13 @@ else if ( data[p] > _JSON_integer_trans_keys[_mid+1] ) switch ( _JSON_integer_actions[_acts++] ) { case 0: -// line 490 "Parser.rl" +// line 492 "Parser.rl" { p--; { p += 1; _goto_targ = 5; if (true) continue _goto;} } break; -// line 920 "Parser.java" +// line 922 "Parser.java" } } } @@ -936,7 +938,7 @@ else if ( data[p] > _JSON_integer_trans_keys[_mid+1] ) break; } } -// line 515 "Parser.rl" +// line 517 "Parser.rl" if (cs < JSON_integer_first_final) { return -1; @@ -958,7 +960,7 @@ RubyInteger bytesToInum(Ruby runtime, ByteList num) { } -// line 962 "Parser.java" +// line 964 "Parser.java" private static byte[] init__JSON_float_actions_0() { return new byte [] { @@ -1060,7 +1062,7 @@ private static byte[] init__JSON_float_trans_actions_0() static final int JSON_float_en_main = 1; -// line 550 "Parser.rl" +// line 552 "Parser.rl" void parseFloat(ParserResult res, int p, int pe) { @@ -1078,15 +1080,15 @@ int parseFloatInternal(int p, int pe) { int cs = EVIL; -// line 1082 "Parser.java" +// line 1084 "Parser.java" { cs = JSON_float_start; } -// line 567 "Parser.rl" +// line 569 "Parser.rl" int memo = p; -// line 1090 "Parser.java" +// line 1092 "Parser.java" { int _klen; int _trans = 0; @@ -1167,13 +1169,13 @@ else if ( data[p] > _JSON_float_trans_keys[_mid+1] ) switch ( _JSON_float_actions[_acts++] ) { case 0: -// line 541 "Parser.rl" +// line 543 "Parser.rl" { p--; { p += 1; _goto_targ = 5; if (true) continue _goto;} } break; -// line 1177 "Parser.java" +// line 1179 "Parser.java" } } } @@ -1193,7 +1195,7 @@ else if ( data[p] > _JSON_float_trans_keys[_mid+1] ) break; } } -// line 569 "Parser.rl" +// line 571 "Parser.rl" if (cs < JSON_float_first_final) { return -1; @@ -1209,7 +1211,7 @@ RubyFloat createFloat(int p, int new_p) { } -// line 1213 "Parser.java" +// line 1215 "Parser.java" private static byte[] init__JSON_string_actions_0() { return new byte [] { @@ -1311,7 +1313,7 @@ private static byte[] init__JSON_string_trans_actions_0() static final int JSON_string_en_main = 1; -// line 614 "Parser.rl" +// line 616 "Parser.rl" void parseString(ParserResult res, int p, int pe) { @@ -1319,15 +1321,15 @@ void parseString(ParserResult res, int p, int pe) { IRubyObject result = null; -// line 1323 "Parser.java" +// line 1325 "Parser.java" { cs = JSON_string_start; } -// line 621 "Parser.rl" +// line 623 "Parser.rl" int memo = p; -// line 1331 "Parser.java" +// line 1333 "Parser.java" { int _klen; int _trans = 0; @@ -1408,7 +1410,7 @@ else if ( data[p] > _JSON_string_trans_keys[_mid+1] ) switch ( _JSON_string_actions[_acts++] ) { case 0: -// line 589 "Parser.rl" +// line 591 "Parser.rl" { int offset = byteList.begin(); ByteList decoded = decoder.decode(byteList, memo + 1 - offset, @@ -1423,13 +1425,13 @@ else if ( data[p] > _JSON_string_trans_keys[_mid+1] ) } break; case 1: -// line 602 "Parser.rl" +// line 604 "Parser.rl" { p--; { p += 1; _goto_targ = 5; if (true) continue _goto;} } break; -// line 1433 "Parser.java" +// line 1435 "Parser.java" } } } @@ -1449,7 +1451,7 @@ else if ( data[p] > _JSON_string_trans_keys[_mid+1] ) break; } } -// line 623 "Parser.rl" +// line 625 "Parser.rl" if (parser.createAdditions) { RubyHash match_string = parser.match_string; @@ -1476,8 +1478,7 @@ public void visit(IRubyObject pattern, IRubyObject klass) { } } - if (cs >= JSON_string_first_final && result != null) { - RuntimeInfo info = RuntimeInfo.forRuntime(context.getRuntime()); + if (cs >= JSON_string_first_final && result != null) { if (info.encodingsSupported() && result instanceof RubyString) { ((RubyString)result).force_encoding(context, info.utf8.get()); } @@ -1488,7 +1489,7 @@ public void visit(IRubyObject pattern, IRubyObject klass) { } -// line 1492 "Parser.java" +// line 1493 "Parser.java" private static byte[] init__JSON_array_actions_0() { return new byte [] { @@ -1601,7 +1602,7 @@ private static byte[] init__JSON_array_trans_actions_0() static final int JSON_array_en_main = 1; -// line 697 "Parser.rl" +// line 698 "Parser.rl" void parseArray(ParserResult res, int p, int pe) { @@ -1621,14 +1622,14 @@ void parseArray(ParserResult res, int p, int pe) { } -// line 1625 "Parser.java" +// line 1626 "Parser.java" { cs = JSON_array_start; } -// line 716 "Parser.rl" +// line 717 "Parser.rl" -// line 1632 "Parser.java" +// line 1633 "Parser.java" { int _klen; int _trans = 0; @@ -1709,7 +1710,7 @@ else if ( data[p] > _JSON_array_trans_keys[_mid+1] ) switch ( _JSON_array_actions[_acts++] ) { case 0: -// line 666 "Parser.rl" +// line 667 "Parser.rl" { parseValue(res, p, pe); if (res.result == null) { @@ -1726,13 +1727,13 @@ else if ( data[p] > _JSON_array_trans_keys[_mid+1] ) } break; case 1: -// line 681 "Parser.rl" +// line 682 "Parser.rl" { p--; { p += 1; _goto_targ = 5; if (true) continue _goto;} } break; -// line 1736 "Parser.java" +// line 1737 "Parser.java" } } } @@ -1752,7 +1753,7 @@ else if ( data[p] > _JSON_array_trans_keys[_mid+1] ) break; } } -// line 717 "Parser.rl" +// line 718 "Parser.rl" if (cs >= JSON_array_first_final) { res.update(result, p + 1); @@ -1762,7 +1763,7 @@ else if ( data[p] > _JSON_array_trans_keys[_mid+1] ) } -// line 1766 "Parser.java" +// line 1767 "Parser.java" private static byte[] init__JSON_object_actions_0() { return new byte [] { @@ -1885,7 +1886,7 @@ private static byte[] init__JSON_object_trans_actions_0() static final int JSON_object_en_main = 1; -// line 776 "Parser.rl" +// line 777 "Parser.rl" void parseObject(ParserResult res, int p, int pe) { @@ -1910,14 +1911,14 @@ void parseObject(ParserResult res, int p, int pe) { } -// line 1914 "Parser.java" +// line 1915 "Parser.java" { cs = JSON_object_start; } -// line 800 "Parser.rl" +// line 801 "Parser.rl" -// line 1921 "Parser.java" +// line 1922 "Parser.java" { int _klen; int _trans = 0; @@ -1998,7 +1999,7 @@ else if ( data[p] > _JSON_object_trans_keys[_mid+1] ) switch ( _JSON_object_actions[_acts++] ) { case 0: -// line 731 "Parser.rl" +// line 732 "Parser.rl" { parseValue(res, p, pe); if (res.result == null) { @@ -2015,7 +2016,7 @@ else if ( data[p] > _JSON_object_trans_keys[_mid+1] ) } break; case 1: -// line 746 "Parser.rl" +// line 747 "Parser.rl" { parseString(res, p, pe); if (res.result == null) { @@ -2035,13 +2036,13 @@ else if ( data[p] > _JSON_object_trans_keys[_mid+1] ) } break; case 2: -// line 764 "Parser.rl" +// line 765 "Parser.rl" { p--; { p += 1; _goto_targ = 5; if (true) continue _goto;} } break; -// line 2045 "Parser.java" +// line 2046 "Parser.java" } } } @@ -2061,7 +2062,7 @@ else if ( data[p] > _JSON_object_trans_keys[_mid+1] ) break; } } -// line 801 "Parser.rl" +// line 802 "Parser.rl" if (cs < JSON_object_first_final) { res.update(null, p + 1); @@ -2094,7 +2095,7 @@ else if ( data[p] > _JSON_object_trans_keys[_mid+1] ) } -// line 2098 "Parser.java" +// line 2099 "Parser.java" private static byte[] init__JSON_actions_0() { return new byte [] { @@ -2198,7 +2199,7 @@ private static byte[] init__JSON_trans_actions_0() static final int JSON_en_main = 1; -// line 866 "Parser.rl" +// line 867 "Parser.rl" public IRubyObject parseStrict() { @@ -2208,16 +2209,16 @@ public IRubyObject parseStrict() { ParserResult res = new ParserResult(); -// line 2212 "Parser.java" +// line 2213 "Parser.java" { cs = JSON_start; } -// line 875 "Parser.rl" +// line 876 "Parser.rl" p = byteList.begin(); pe = p + byteList.length(); -// line 2221 "Parser.java" +// line 2222 "Parser.java" { int _klen; int _trans = 0; @@ -2298,7 +2299,7 @@ else if ( data[p] > _JSON_trans_keys[_mid+1] ) switch ( _JSON_actions[_acts++] ) { case 0: -// line 838 "Parser.rl" +// line 839 "Parser.rl" { currentNesting = 1; parseObject(res, p, pe); @@ -2312,7 +2313,7 @@ else if ( data[p] > _JSON_trans_keys[_mid+1] ) } break; case 1: -// line 850 "Parser.rl" +// line 851 "Parser.rl" { currentNesting = 1; parseArray(res, p, pe); @@ -2325,7 +2326,7 @@ else if ( data[p] > _JSON_trans_keys[_mid+1] ) } } break; -// line 2329 "Parser.java" +// line 2330 "Parser.java" } } } @@ -2345,7 +2346,7 @@ else if ( data[p] > _JSON_trans_keys[_mid+1] ) break; } } -// line 878 "Parser.rl" +// line 879 "Parser.rl" if (cs >= JSON_first_final && p == pe) { return result; @@ -2355,7 +2356,7 @@ else if ( data[p] > _JSON_trans_keys[_mid+1] ) } -// line 2359 "Parser.java" +// line 2360 "Parser.java" private static byte[] init__JSON_quirks_mode_actions_0() { return new byte [] { @@ -2458,7 +2459,7 @@ private static byte[] init__JSON_quirks_mode_trans_actions_0() static final int JSON_quirks_mode_en_main = 1; -// line 906 "Parser.rl" +// line 907 "Parser.rl" public IRubyObject parseQuirksMode() { @@ -2468,16 +2469,16 @@ public IRubyObject parseQuirksMode() { ParserResult res = new ParserResult(); -// line 2472 "Parser.java" +// line 2473 "Parser.java" { cs = JSON_quirks_mode_start; } -// line 915 "Parser.rl" +// line 916 "Parser.rl" p = byteList.begin(); pe = p + byteList.length(); -// line 2481 "Parser.java" +// line 2482 "Parser.java" { int _klen; int _trans = 0; @@ -2558,7 +2559,7 @@ else if ( data[p] > _JSON_quirks_mode_trans_keys[_mid+1] ) switch ( _JSON_quirks_mode_actions[_acts++] ) { case 0: -// line 892 "Parser.rl" +// line 893 "Parser.rl" { parseValue(res, p, pe); if (res.result == null) { @@ -2570,7 +2571,7 @@ else if ( data[p] > _JSON_quirks_mode_trans_keys[_mid+1] ) } } break; -// line 2574 "Parser.java" +// line 2575 "Parser.java" } } } @@ -2590,7 +2591,7 @@ else if ( data[p] > _JSON_quirks_mode_trans_keys[_mid+1] ) break; } } -// line 918 "Parser.rl" +// line 919 "Parser.rl" if (cs >= JSON_quirks_mode_first_final && p == pe) { return result; diff --git a/java/src/json/ext/Parser.rl b/java/src/json/ext/Parser.rl index 7dcdd2ec..6d659631 100644 --- a/java/src/json/ext/Parser.rl +++ b/java/src/json/ext/Parser.rl @@ -246,7 +246,7 @@ public class Parser extends RubyObject { */ @JRubyMethod public IRubyObject parse(ThreadContext context) { - return new ParserSession(this, context).parse(); + return new ParserSession(this, context, info).parse(); } /** @@ -302,6 +302,7 @@ public class Parser extends RubyObject { private static class ParserSession { private final Parser parser; private final ThreadContext context; + private final RuntimeInfo info; private final ByteList byteList; private final ByteList view; private final byte[] data; @@ -313,9 +314,10 @@ public class Parser extends RubyObject { // no idea about the origins of this value, ask Flori ;) private static final int EVIL = 0x666; - private ParserSession(Parser parser, ThreadContext context) { + private ParserSession(Parser parser, ThreadContext context, RuntimeInfo info) { this.parser = parser; this.context = context; + this.info = info; this.byteList = parser.checkAndGetSource().getByteList(); this.data = byteList.unsafeBytes(); this.view = new ByteList(data, false); @@ -646,8 +648,7 @@ public class Parser extends RubyObject { } } - if (cs >= JSON_string_first_final && result != null) { - RuntimeInfo info = RuntimeInfo.forRuntime(context.getRuntime()); + if (cs >= JSON_string_first_final && result != null) { if (info.encodingsSupported() && result instanceof RubyString) { ((RubyString)result).force_encoding(context, info.utf8.get()); } From 153fbab807989d5bf8456b334b0c7b8e870a8907 Mon Sep 17 00:00:00 2001 From: Juanito Fatas Date: Fri, 19 Dec 2014 00:47:47 +0800 Subject: [PATCH 5/7] Use the new build env on Travis. --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5907de76..cef5c53f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ # Passes arguments to bundle install (http://gembundler.com/man/bundle-install.1.html) #bundler_args: --binstubs +language: ruby # Specify which ruby versions you wish to run your tests on, each version will be used rvm: @@ -20,3 +21,5 @@ matrix: - rvm: rbx-19mode - rvm: ruby-head script: "bundle exec rake" + +sudo: false From f4f0ab8e0794322edaf923cd5814472f45a9450c Mon Sep 17 00:00:00 2001 From: Jesse Cooke Date: Thu, 25 Dec 2014 13:22:10 -0800 Subject: [PATCH 6/7] CI with current rbx-2 --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5907de76..3dff5341 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,14 +9,12 @@ rvm: - 2.0.0 - 2.1 - ree - - rbx-18mode - - rbx-19mode + - rbx-2 - jruby-18mode - jruby-19mode - ruby-head matrix: allow_failures: - - rvm: rbx-18mode - - rvm: rbx-19mode + - rvm: rbx-2 - rvm: ruby-head script: "bundle exec rake" From c37bb5cd494d75e348acf666ecd70b4eb628bffe Mon Sep 17 00:00:00 2001 From: Florian Frank Date: Thu, 8 Jan 2015 22:41:25 +0100 Subject: [PATCH 7/7] Bump version number to 1.8.2 --- VERSION | 2 +- json.gemspec | Bin 5008 -> 5008 bytes json_pure.gemspec | 6 +++--- lib/json/version.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index a8fdfda1..53adb84c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.1 +1.8.2 diff --git a/json.gemspec b/json.gemspec index 9fbc284eeeea6d140f570ed9fa7d081555695567..61f1c54826b62e7d94a8ba82ada6fcfb670c73f8 100644 GIT binary patch delta 23 ecmbQBK0$qgHlxu*oz+0%#y&=i&C?lw3IYIPRtT*C delta 23 ecmbQBK0$qgHlyK0oz+0%#y&=)&C?lw3IYIP7YL;Q diff --git a/json_pure.gemspec b/json_pure.gemspec index 9847e5e6..f66bde51 100644 --- a/json_pure.gemspec +++ b/json_pure.gemspec @@ -1,14 +1,14 @@ # -*- encoding: utf-8 -*- -# stub: json_pure 1.8.1 ruby lib +# stub: json_pure 1.8.2 ruby lib Gem::Specification.new do |s| s.name = "json_pure" - s.version = "1.8.1" + s.version = "1.8.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Florian Frank"] - s.date = "2015-01-02" + s.date = "2015-01-08" s.description = "This is a JSON implementation in pure Ruby." s.email = "flori@ping.de" s.extra_rdoc_files = ["README.rdoc"] diff --git a/lib/json/version.rb b/lib/json/version.rb index 47cdcd60..4549f5f2 100644 --- a/lib/json/version.rb +++ b/lib/json/version.rb @@ -1,6 +1,6 @@ module JSON # JSON version - VERSION = '1.8.1' + VERSION = '1.8.2' VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc: VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc: VERSION_MINOR = VERSION_ARRAY[1] # :nodoc: