Initial import of multi_json needed for the new version of oauth2. The tests are...
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Sat, 19 Jun 2010 11:35:43 +0000 (11:35 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Sat, 19 Jun 2010 11:35:43 +0000 (11:35 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

dev-ruby/multi_json/ChangeLog [new file with mode: 0644]
dev-ruby/multi_json/Manifest [new file with mode: 0644]
dev-ruby/multi_json/files/multi_json-0.0.3-gentoo.patch [new file with mode: 0644]
dev-ruby/multi_json/metadata.xml [new file with mode: 0644]
dev-ruby/multi_json/multi_json-0.0.3.ebuild [new file with mode: 0644]

diff --git a/dev-ruby/multi_json/ChangeLog b/dev-ruby/multi_json/ChangeLog
new file mode 100644 (file)
index 0000000..b3747ef
--- /dev/null
@@ -0,0 +1,13 @@
+# ChangeLog for dev-ruby/multi_json
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/multi_json/ChangeLog,v 1.1 2010/06/19 11:35:43 flameeyes Exp $
+
+*multi_json-0.0.3 (19 Jun 2010)
+
+  19 Jun 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+  +multi_json-0.0.3.ebuild, +files/multi_json-0.0.3-gentoo.patch,
+  +metadata.xml:
+  Initial import of multi_json needed for the new version of oauth2. The
+  tests are particularly patched (and not all of it is upstreamed yet) so
+  that they pass on Ruby 1.9 and JRuby properly.
+
diff --git a/dev-ruby/multi_json/Manifest b/dev-ruby/multi_json/Manifest
new file mode 100644 (file)
index 0000000..04153c2
--- /dev/null
@@ -0,0 +1,15 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX multi_json-0.0.3-gentoo.patch 2386 RMD160 b1dab58563b50da79961a8b833158aee91b4d691 SHA1 66e123c7e37a526800ec2c28d48006fc4ed9cf04 SHA256 7c4077c9ba056eed17f2cc03487df381d339464635fceca6fc48fcaab8fe2bfa
+DIST multi_json-0.0.3.gem 8192 RMD160 89494eddce10c3143c7688ce2662f04342d7a9c0 SHA1 1e63f1dc54eeb5a4c77069ae4c61291d3f6a7748 SHA256 4cf0cc7ff1fa3c064853b4d2a8467481189bc0b4407c15feeb0114799d55773c
+EBUILD multi_json-0.0.3.ebuild 947 RMD160 36cdd89219c1c3e51ead04c9419417fc0dbaa005 SHA1 27205aceed8aa77e38dcc9550d1dd45068fda19f SHA256 4e6160e444fa99f2a9ba3496c92566073f68234782a88b7624a1ad00bbc6b3d0
+MISC ChangeLog 583 RMD160 a90493907d1483079ff5fc81757033e6a47c3f86 SHA1 437c694528f0e63474ede867acf65271516426a1 SHA256 ace69b20aab5b7d3fbe4200d240b6fd1366bc1072ef09224f5ed1d6ddc1b6263
+MISC metadata.xml 157 RMD160 5d9e2c7ecba96ffebd936d38acedf859cdea84e1 SHA1 8ce15dcc608eeb5616aeec610dc695cbe6f93e02 SHA256 11fba03a217e2d996f5cd8895493a5692ece8ddac2c1a2dfc71d0e830555121c
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.15 (GNU/Linux)
+
+iEYEARECAAYFAkwcqvwACgkQAiZjviIA2XgNBACfS+FnUFTyxbXlrm8AyE+O9NJe
+TVYAoJVz+SFqm6VRhnVCUhulQ52vWcEM
+=nrHN
+-----END PGP SIGNATURE-----
diff --git a/dev-ruby/multi_json/files/multi_json-0.0.3-gentoo.patch b/dev-ruby/multi_json/files/multi_json-0.0.3-gentoo.patch
new file mode 100644 (file)
index 0000000..f143b6a
--- /dev/null
@@ -0,0 +1,84 @@
+diff --git a/Rakefile b/Rakefile
+index fbf6a4a..3669b7b 100644
+--- a/Rakefile
++++ b/Rakefile
+@@ -14,10 +14,13 @@ begin
+     # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
+   end
+   Jeweler::GemcutterTasks.new
++
++  task :spec => :check_dependencies
+ rescue LoadError
+   puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
+ end
+ 
++begin
+ require 'spec/rake/spectask'
+ Spec::Rake::SpecTask.new(:spec) do |spec|
+   spec.libs << 'lib' << 'spec'
+@@ -30,9 +33,10 @@ Spec::Rake::SpecTask.new(:rcov) do |spec|
+   spec.rcov = true
+ end
+ 
+-task :spec => :check_dependencies
+-
+ task :default => :spec
++rescue LoadError
++  puts "RSpec (or a dependency) not available. Install it with: gem install rspec"
++end
+ 
+ require 'rake/rdoctask'
+ Rake::RDocTask.new do |rdoc|
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index a198d34..c0338a1 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -4,8 +4,12 @@ require 'multi_json'
+ require 'spec'
+ require 'spec/autorun'
+ require 'rubygems'
++begin
+ require 'bundler'
+ Bundler.setup
++rescue LoadError
++  $stderr.puts "Bundler (or a dependency) not available."
++end
+ 
+ Spec::Runner.configure do |config|
+   
+diff --git a/spec/x_to_json_spec.rb b/spec/x_to_json_spec.rb
+index 69bffc8..9d2a376 100644
+--- a/spec/x_to_json_spec.rb
++++ b/spec/x_to_json_spec.rb
+@@ -13,13 +13,17 @@ end
+ describe "MultiJson" do
+   context 'engines' do
+     it 'should default to the best available gem' do
++      begin
+       require 'yajl'
+       MultiJson.engine.name.should == 'MultiJson::Engines::Yajl'
++      rescue LoadError
++        pending "YAJL (or a dependency) not available."
++      end
+     end
+ 
+     it 'should be settable via a symbol' do
+-      MultiJson.engine = :yajl
+-      MultiJson.engine.name.should == 'MultiJson::Engines::Yajl'
++      MultiJson.engine = :json_pure
++      MultiJson.engine.name.should == 'MultiJson::Engines::JsonPure'
+     end
+     
+     it 'should be settable via a class' do
+@@ -31,7 +35,11 @@ describe "MultiJson" do
+   %w(active_support json_gem json_pure yajl).each do |engine|
+     context engine do
+       before do
++        begin
+         MultiJson.engine = engine
++        rescue LoadError
++          pending "Engine #{engine} couldn't be loaded (not installed?)"
++        end
+       end
+       
+       describe '.encode' do
diff --git a/dev-ruby/multi_json/metadata.xml b/dev-ruby/multi_json/metadata.xml
new file mode 100644 (file)
index 0000000..8521361
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>ruby</herd>
+</pkgmetadata>
diff --git a/dev-ruby/multi_json/multi_json-0.0.3.ebuild b/dev-ruby/multi_json/multi_json-0.0.3.ebuild
new file mode 100644 (file)
index 0000000..18c4e81
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/multi_json/multi_json-0.0.3.ebuild,v 1.1 2010/06/19 11:35:43 flameeyes Exp $
+
+EAPI=2
+
+USE_RUBY="ruby18 ruby19 ree18 jruby"
+
+RUBY_FAKEGEM_TASK_TEST="spec"
+RUBY_FAKEGEM_TASK_DOC="rdoc"
+
+RUBY_FAKEGEM_DOCDIR="rdoc"
+RUBY_FAKEGEM_EXTRADOC="README.rdoc"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A gem to provide swappable JSON backends"
+HOMEPAGE="http://github.com/intridea/multi_json"
+LICENSE="MIT"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE=""
+
+ruby_add_rdepend "|| ( dev-ruby/json dev-ruby/yajl-ruby dev-ruby/activesupport )"
+
+# I've switched one of the tests from requiring yajl to requiring
+# json-pure since it's the only implementation that is available for
+# all the Ruby interpreters we support.
+ruby_add_bdepend "test? ( dev-ruby/rspec dev-ruby/json )"
+
+RUBY_PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )