diff options
author | 2013-11-21 07:32:19 +0000 | |
---|---|---|
committer | 2013-11-21 07:32:19 +0000 | |
commit | 1bf5ba56797500a7d99b06586dd0fbb0fcc77a70 (patch) | |
tree | e30dcdfbdae39baa5092e19c0413542334eb9f81 /dev-ruby/sinatra | |
parent | Add ruby20. (diff) | |
download | gentoo-2-1bf5ba56797500a7d99b06586dd0fbb0fcc77a70.tar.gz gentoo-2-1bf5ba56797500a7d99b06586dd0fbb0fcc77a70.tar.bz2 gentoo-2-1bf5ba56797500a7d99b06586dd0fbb0fcc77a70.zip |
Version bump. Add ruby20.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)
Diffstat (limited to 'dev-ruby/sinatra')
-rw-r--r-- | dev-ruby/sinatra/ChangeLog | 8 | ||||
-rw-r--r-- | dev-ruby/sinatra/files/sinatra-1.4.4-fix-tests.patch | 25 | ||||
-rw-r--r-- | dev-ruby/sinatra/sinatra-1.4.4.ebuild | 44 |
3 files changed, 76 insertions, 1 deletions
diff --git a/dev-ruby/sinatra/ChangeLog b/dev-ruby/sinatra/ChangeLog index 53c55692e848..4eea2f35acf8 100644 --- a/dev-ruby/sinatra/ChangeLog +++ b/dev-ruby/sinatra/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-ruby/sinatra # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/sinatra/ChangeLog,v 1.44 2013/08/17 06:26:23 graaff Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/sinatra/ChangeLog,v 1.45 2013/11/21 07:32:19 graaff Exp $ + +*sinatra-1.4.4 (21 Nov 2013) + + 21 Nov 2013; Hans de Graaff <graaff@gentoo.org> +sinatra-1.4.4.ebuild, + +files/sinatra-1.4.4-fix-tests.patch: + Version bump. Add ruby20. *sinatra-1.4.3 (17 Aug 2013) diff --git a/dev-ruby/sinatra/files/sinatra-1.4.4-fix-tests.patch b/dev-ruby/sinatra/files/sinatra-1.4.4-fix-tests.patch new file mode 100644 index 000000000000..25ed73097bf6 --- /dev/null +++ b/dev-ruby/sinatra/files/sinatra-1.4.4-fix-tests.patch @@ -0,0 +1,25 @@ +commit c5c9f6b5501a366d5809faa44e50fad371c14870 +Author: Jon Rowe <hello@jonrowe.co.uk> +Date: Tue Oct 29 14:18:46 2013 +1100 + + fixes the build by disabling path traversal protection for this test + + Seems that this test is in direct competition with the desired + behaviour of path traversal protection. + +diff --git a/test/routing_test.rb b/test/routing_test.rb +index 410bfda..5584601 100644 +--- a/test/routing_test.rb ++++ b/test/routing_test.rb +@@ -90,7 +90,10 @@ class RoutingTest < Test::Unit::TestCase + end + + it "it handles encoded slashes correctly" do +- mock_app { get("/:a") { |a| a } } ++ mock_app { ++ set :protection, :except => :path_traversal ++ get("/:a") { |a| a } ++ } + get '/foo%2Fbar' + assert_equal 200, status + assert_body "foo/bar" diff --git a/dev-ruby/sinatra/sinatra-1.4.4.ebuild b/dev-ruby/sinatra/sinatra-1.4.4.ebuild new file mode 100644 index 000000000000..7e2796527b06 --- /dev/null +++ b/dev-ruby/sinatra/sinatra-1.4.4.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/sinatra/sinatra-1.4.4.ebuild,v 1.1 2013/11/21 07:32:19 graaff Exp $ + +EAPI=5 +USE_RUBY="ruby18 ruby19 ruby20" + +# no documentation is generable, it needs hanna, which is broken +RUBY_FAKEGEM_TASK_DOC="" + +RUBY_FAKEGEM_EXTRADOC="README.md AUTHORS CHANGES" + +inherit ruby-fakegem + +DESCRIPTION="Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort." +HOMEPAGE="http://www.sinatrarb.com/" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RUBY_PATCHES=( "${P}"-fix-tests.patch ) + +ruby_add_rdepend "=dev-ruby/rack-1* >=dev-ruby/rack-1.4 + >=dev-ruby/rack-protection-1.4:1 + =dev-ruby/tilt-1* >=dev-ruby/tilt-1.3.4" +ruby_add_bdepend "test? ( >=dev-ruby/rack-test-0.5.6 dev-ruby/erubis dev-ruby/builder )" + +# haml tests are optional and not yet marked for ruby20. +USE_RUBY="ruby18 ruby19" ruby_add_bdepend "test? ( >=dev-ruby/haml-3.0 )" + +all_ruby_prepare() { + # Remove slim tests since only version 1.x is supported and we only + # have version 2.x + rm test/slim_test.rb || die + + # Remove markdown tests since these fail due to encoding issues. Not + # clear where the actual problem is. + rm test/markdown_test.rb || die + + # Remove implicit build dependency on git. + sed -i -e '/\(s.files\|s.test_files\|s.extra_rdoc_files\)/d' sinatra.gemspec || die +} |