Hello community, here is the log from the commit of package rubygem-yajl-ruby for openSUSE:Factory checked in at 2014-07-28 16:21:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-yajl-ruby (Old) and /work/SRC/openSUSE:Factory/.rubygem-yajl-ruby.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-yajl-ruby" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-yajl-ruby/rubygem-yajl-ruby.changes 2014-02-12 20:54:34.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-yajl-ruby.new/rubygem-yajl-ruby.changes 2014-07-28 16:21:15.000000000 +0200 @@ -1,0 +2,5 @@ +Mon Jul 28 10:10:38 UTC 2014 - coolo@suse.com + +- updated to version 1.2.1, no changelog + +------------------------------------------------------------------- Old: ---- yajl-ruby-1.2.0.gem New: ---- yajl-ruby-1.2.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-yajl-ruby.spec ++++++ --- /var/tmp/diff_new_pack.ry0cJk/_old 2014-07-28 16:21:16.000000000 +0200 +++ /var/tmp/diff_new_pack.ry0cJk/_new 2014-07-28 16:21:16.000000000 +0200 @@ -17,7 +17,7 @@ Name: rubygem-yajl-ruby -Version: 1.2.0 +Version: 1.2.1 Release: 0 %define mod_name yajl-ruby %define mod_full_name %{mod_name}-%{version} @@ -25,7 +25,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: ruby-macros >= 3 Requires: ruby >= 1.8.6 -BuildRequires: ruby-devel >= 1.8.6 +BuildRequires: ruby >= 1.8.6 +BuildRequires: ruby-devel Url: http://github.com/brianmario/yajl-ruby Source: http://rubygems.org/gems/%{mod_full_name}.gem Summary: Ruby C bindings to the excellent Yajl JSON stream-based parser ++++++ yajl-ruby-1.2.0.gem -> yajl-ruby-1.2.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -3,12 +3,15 @@ - 1.8.7 - 1.9.2 - 1.9.3 - - rbx + - 2.0.0 + - 2.1.0 + - 2.1.1 - ree - ruby-head - rbx-18mode - rbx-19mode matrix: allow_failures: + - rvm: rbx - rvm: rbx-18mode - - rvm: rbx-19mode \ No newline at end of file + - rvm: rbx-19mode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -25,6 +25,12 @@ gem install yajl-ruby ``` +Or use your Gemfile: + +``` ruby +gem 'yajl-ruby', require: 'yajl' +``` + ## Example of use NOTE: I'm building up a collection of small examples in the examples (http://github.com/brianmario/yajl-ruby/tree/master/examples) folder. Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/yajl/extconf.rb new/ext/yajl/extconf.rb --- old/ext/yajl/extconf.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/ext/yajl/extconf.rb 1970-01-01 01:00:00.000000000 +0100 @@ -2,6 +2,6 @@ require 'rbconfig' $CFLAGS << ' -Wall -funroll-loops' -$CFLAGS << ' -Wextra -O0 -ggdb3' if ENV['DEBUG'] +$CFLAGS << ' -Werror-implicit-function-declaration -Wextra -O0 -ggdb3' if ENV['DEBUG'] create_makefile('yajl/yajl') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/yajl/yajl_ext.c new/ext/yajl/yajl_ext.c --- old/ext/yajl/yajl_ext.c 1970-01-01 01:00:00.000000000 +0100 +++ new/ext/yajl/yajl_ext.c 1970-01-01 01:00:00.000000000 +0100 @@ -275,7 +275,7 @@ } static int yajl_found_number(void * ctx, const char * numberVal, unsigned int numberLen) { - char buf[numberLen+1]; + char* buf = (char*)malloc(numberLen + 1); buf[numberLen] = 0; memcpy(buf, numberVal, numberLen); @@ -286,6 +286,7 @@ } else { yajl_set_static_value(ctx, rb_cstr2inum(buf, 10)); } + free(buf); return 1; } @@ -315,15 +316,13 @@ #endif if (wrapper->symbolizeKeys) { - char buf[stringLen+1]; - memcpy(buf, stringVal, stringLen); - buf[stringLen] = 0; - VALUE stringEncoded = rb_str_new2(buf); #ifdef HAVE_RUBY_ENCODING_H - rb_enc_associate(stringEncoded, rb_utf8_encoding()); + ID id = rb_intern3((const char *)stringVal, stringLen, utf8Encoding); + keyStr = ID2SYM(id); +#else + VALUE str = rb_str_new((const char *)stringVal, stringLen); + keyStr = rb_str_intern(str); #endif - - yajl_set_static_value(ctx, ID2SYM(rb_to_id(stringEncoded))); } else { keyStr = rb_str_new((const char *)stringVal, stringLen); #ifdef HAVE_RUBY_ENCODING_H @@ -332,8 +331,8 @@ keyStr = rb_str_export_to_enc(keyStr, default_internal_enc); } #endif - yajl_set_static_value(ctx, keyStr); } + yajl_set_static_value(ctx, keyStr); yajl_check_and_fire_callback(ctx); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/yajl/version.rb new/lib/yajl/version.rb --- old/lib/yajl/version.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/yajl/version.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +1,3 @@ module Yajl - VERSION = '1.2.0' + VERSION = '1.2.1' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 1970-01-01 01:00:00.000000000 +0100 +++ new/metadata 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: yajl-ruby version: !ruby/object:Gem::Version - version: 1.2.0 + version: 1.2.1 platform: ruby authors: - Brian Lopez @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2013-12-17 00:00:00.000000000 Z +date: 2014-06-05 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake-compiler @@ -29,30 +29,30 @@ name: rspec requirement: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ~> - !ruby/object:Gem::Version - version: 2.0.0 + version: '2.14' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ~> - !ruby/object:Gem::Version - version: 2.0.0 + version: '2.14' - !ruby/object:Gem::Dependency name: activesupport requirement: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ~> - !ruby/object:Gem::Version - version: '0' + version: 3.1.2 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ~> - !ruby/object:Gem::Version - version: '0' + version: 3.1.2 - !ruby/object:Gem::Dependency name: json requirement: !ruby/object:Gem::Requirement @@ -218,6 +218,7 @@ - spec/parsing/fixtures/pass2.json - spec/parsing/fixtures/pass3.json - spec/parsing/fixtures_spec.rb +- spec/parsing/large_number_spec.rb - spec/parsing/one_off_spec.rb - spec/rcov.opts - spec/spec_helper.rb @@ -225,7 +226,8 @@ - tasks/rspec.rake - yajl-ruby.gemspec homepage: http://github.com/brianmario/yajl-ruby -licenses: [] +licenses: +- MIT metadata: {} post_install_message: rdoc_options: [] @@ -332,6 +334,7 @@ - spec/parsing/fixtures/pass2.json - spec/parsing/fixtures/pass3.json - spec/parsing/fixtures_spec.rb +- spec/parsing/large_number_spec.rb - spec/parsing/one_off_spec.rb - spec/rcov.opts - spec/spec_helper.rb diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/json_gem_compatibility/compatibility_spec.rb new/spec/json_gem_compatibility/compatibility_spec.rb --- old/spec/json_gem_compatibility/compatibility_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/json_gem_compatibility/compatibility_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -192,7 +192,7 @@ it "should be able to parse #{File.basename(name)} as an IO" do lambda { JSON.parse(StringIO.new(source)) - }.should_not raise_error(JSON::ParserError) + }.should_not raise_error end end @@ -200,7 +200,7 @@ it "should be able to parse #{File.basename(name)} as a string" do lambda { JSON.parse(source) - }.should_not raise_error(JSON::ParserError) + }.should_not raise_error end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/parsing/active_support_spec.rb new/spec/parsing/active_support_spec.rb --- old/spec/parsing/active_support_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/parsing/active_support_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -38,7 +38,7 @@ it "should be able to parse #{json} as an IO" do lambda { Yajl::Parser.parse(StringIO.new(json)).should == expected - }.should_not raise_error(Yajl::ParseError) + }.should_not raise_error end end @@ -46,7 +46,7 @@ it "should be able to parse #{json} as a string" do lambda { Yajl::Parser.parse(json).should == expected - }.should_not raise_error(Yajl::ParseError) + }.should_not raise_error end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/parsing/chunked_spec.rb new/spec/parsing/chunked_spec.rb --- old/spec/parsing/chunked_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/parsing/chunked_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -67,7 +67,7 @@ @callback.should_receive(:call).exactly(430).times lambda { @parser.parse(json) - }.should_not raise_error(Yajl::ParseError) + }.should_not raise_error end it "should parse twitter_stream.json and fire callback 430 times, with a block as the callback" do @@ -81,7 +81,7 @@ times += 1 end times.should eql(430) - }.should_not raise_error(Yajl::ParseError) + }.should_not raise_error end it "should raise a Yajl::ParseError error if multiple JSON strings were found when no on_parse_complete callback assigned" do @@ -93,4 +93,4 @@ @parser.parse(json) }.should raise_error(Yajl::ParseError) end -end \ No newline at end of file +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/parsing/fixtures_spec.rb new/spec/parsing/fixtures_spec.rb --- old/spec/parsing/fixtures_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/parsing/fixtures_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -26,7 +26,7 @@ it "should be able to parse #{File.basename(name)} as an IO" do lambda { Yajl::Parser.parse(StringIO.new(source)) - }.should_not raise_error(Yajl::ParseError) + }.should_not raise_error end end @@ -34,7 +34,7 @@ it "should be able to parse #{File.basename(name)} as a string" do lambda { Yajl::Parser.parse(source) - }.should_not raise_error(Yajl::ParseError) + }.should_not raise_error end end -end \ No newline at end of file +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/parsing/large_number_spec.rb new/spec/parsing/large_number_spec.rb --- old/spec/parsing/large_number_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/parsing/large_number_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -0,0 +1,60 @@ +require 'spec_helper' + +describe 'Parsing very long text' do + shared_examples 'running script successfully' do |script| + def dup_pipe(parent_half, child_half, new_io) + parent_half.close + new_io.reopen(child_half) + child_half.close + end + + def capture(cmd, stdin_data) + child_in, child_out, child_err = IO::pipe, IO::pipe, IO::pipe + + child_pid = fork do + dup_pipe(child_in[1], child_in[0], STDIN) + dup_pipe(child_out[0], child_out[1], STDOUT) + dup_pipe(child_err[0], child_err[1], STDERR) + + exec(cmd) + end + + [ + child_in[0], + child_out[1], + child_err[1], + ].each(&:close) + + child_in[1].write(stdin_data) + child_in[1].close + _, status = Process.waitpid2(child_pid) + + return child_out[0].read, child_err[0].read, status + ensure + [ + child_in[1], + child_out[0], + child_err[0], + ].reject(&:closed?).each(&:close) + end + + it 'runs successfully' do + out, err, status = capture('ruby', script) + [err, status.exitstatus].should eq(['', 0]) + end + end + + context 'when parseing big floats' do + include_examples('running script successfully', <<-EOS) +require "yajl" +Yajl::Parser.parse('[0.' + '1' * 2**23 + ']') + EOS + end + + context 'when parseing long hash key with symbolize_keys option' do + include_examples('running script successfully', <<-EOS) +require "yajl" +Yajl::Parser.parse('{"' + 'a' * 2**23 + '": 0}', :symbolize_keys => true) + EOS + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/parsing/one_off_spec.rb new/spec/parsing/one_off_spec.rb --- old/spec/parsing/one_off_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/parsing/one_off_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -20,7 +20,7 @@ json = StringIO.new('{"key": /* this is a comment */ "value"}') lambda { Yajl::Parser.parse(json, :allow_comments => true) - }.should_not raise_error(Yajl::ParseError) + }.should_not raise_error end it "should not parse invalid UTF8 with :check_utf8 set to true" do @@ -67,6 +67,11 @@ end if RUBY_VERSION =~ /^1.9/ + it "should encode non-ascii symbols in utf-8" do + parsed = Yajl::Parser.parse('{"曦": 1234}', :symbolize_keys => true) + parsed.keys.fetch(0).encoding.should eq(Encoding::UTF_8) + end + it "should return strings and hash keys in utf-8 if Encoding.default_internal is nil" do Encoding.default_internal = nil Yajl::Parser.parse('{"key": "value"}').keys.first.encoding.should eql(Encoding.find('utf-8')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/spec_helper.rb new/spec/spec_helper.rb --- old/spec/spec_helper.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/spec_helper.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +1,3 @@ -$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/..') -$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') - require 'rspec' require 'yajl' require 'date' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yajl-ruby.gemspec new/yajl-ruby.gemspec --- old/yajl-ruby.gemspec 1970-01-01 01:00:00.000000000 +0100 +++ new/yajl-ruby.gemspec 1970-01-01 01:00:00.000000000 +0100 @@ -3,6 +3,7 @@ Gem::Specification.new do |s| s.name = %q{yajl-ruby} s.version = Yajl::VERSION + s.license = "MIT" s.authors = ["Brian Lopez", "Lloyd Hilaiel"] s.date = Time.now.utc.strftime("%Y-%m-%d") s.email = %q{seniorlopez@gmail.com} @@ -17,9 +18,9 @@ # tests s.add_development_dependency 'rake-compiler', ">= 0.7.5" - s.add_development_dependency 'rspec', ">= 2.0.0" + s.add_development_dependency 'rspec', "~> 2.14" # benchmarks - s.add_development_dependency 'activesupport' + s.add_development_dependency 'activesupport', '~> 3.1.2' s.add_development_dependency 'json' end -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org