From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id CCEB11381F3 for ; Tue, 2 Jul 2013 07:21:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 465F4E0A96; Tue, 2 Jul 2013 07:21:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AD551E0A96 for ; Tue, 2 Jul 2013 07:21:16 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 98B3133E2EB for ; Tue, 2 Jul 2013 07:21:15 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 72664E468F for ; Tue, 2 Jul 2013 07:21:13 +0000 (UTC) From: "Tiziano Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Tiziano Müller" Message-ID: <1372749656.364ffe6d9a9e607a4358319ca8484d6cf57431be.dev-zero@gentoo> Subject: [gentoo-commits] dev/dev-zero:master commit in: dev-ruby/virtus/, dev-ruby/cookiejar/, dev-ruby/cookiejar/files/, ... X-VCS-Repository: dev/dev-zero X-VCS-Files: dev-ruby/cookiejar/Manifest dev-ruby/cookiejar/cookiejar-0.3.0.ebuild dev-ruby/cookiejar/files/48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch dev-ruby/cookiejar/files/60250a90cb9ca7dfa293146e75ff62924c822900.patch dev-ruby/cookiejar/files/78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch dev-ruby/cookiejar/files/f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch dev-ruby/grape/Manifest dev-ruby/grape/grape-0.5.0.ebuild dev-ruby/rack-contrib/Manifest dev-ruby/rack-contrib/rack-contrib-1.1.0.ebuild dev-ruby/virtus/Manifest dev-ruby/virtus/virtus-0.5.5.ebuild X-VCS-Directories: dev-ruby/virtus/ dev-ruby/cookiejar/ dev-ruby/cookiejar/files/ dev-ruby/rack-contrib/ dev-ruby/grape/ X-VCS-Committer: dev-zero X-VCS-Committer-Name: Tiziano Müller X-VCS-Revision: 364ffe6d9a9e607a4358319ca8484d6cf57431be X-VCS-Branch: master Date: Tue, 2 Jul 2013 07:21:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c3173515-310d-4e9b-a390-16142bb11211 X-Archives-Hash: 3f1e25ba43c55a7fd5c205e7325e6e35 commit: 364ffe6d9a9e607a4358319ca8484d6cf57431be Author: Tiziano Müller dev-zero ch> AuthorDate: Tue Jul 2 07:20:56 2013 +0000 Commit: Tiziano Müller gentoo org> CommitDate: Tue Jul 2 07:20:56 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dev-zero.git;a=commit;h=364ffe6d Add grape (and dependencies for grape) for gitlab. --- dev-ruby/cookiejar/Manifest | 6 + dev-ruby/cookiejar/cookiejar-0.3.0.ebuild | 49 ++++ .../48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch | 271 +++++++++++++++++++++ .../60250a90cb9ca7dfa293146e75ff62924c822900.patch | 40 +++ .../78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch | 75 ++++++ .../f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch | 46 ++++ dev-ruby/grape/Manifest | 2 + dev-ruby/grape/grape-0.5.0.ebuild | 50 ++++ dev-ruby/rack-contrib/Manifest | 2 + dev-ruby/rack-contrib/rack-contrib-1.1.0.ebuild | 31 +++ dev-ruby/virtus/Manifest | 2 + dev-ruby/virtus/virtus-0.5.5.ebuild | 40 +++ 12 files changed, 614 insertions(+) diff --git a/dev-ruby/cookiejar/Manifest b/dev-ruby/cookiejar/Manifest new file mode 100644 index 0000000..085ce84 --- /dev/null +++ b/dev-ruby/cookiejar/Manifest @@ -0,0 +1,6 @@ +AUX 48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch 9171 SHA256 a7333576fc6290de0935501556e821a497cabf05416908bb40c2258e402599ff SHA512 4fbeba568514dd4aa4b42a61a189c988244a856196cbe6df455f95deecaee042fe1766c6b3771b99b5ea79146308511a140ff9389fdc91f8496e5ed01c842a18 WHIRLPOOL 2bf2398ae211d83f1145f3c6d6f3e7256692e354eb02d366c567b2386981c923870e0096a5d21ddec3dc7bec45437e756a591e63e103d0d1baf4e0f6c2bbb7fd +AUX 60250a90cb9ca7dfa293146e75ff62924c822900.patch 1686 SHA256 22127d48936154f5a1df7d8c1f53061eb7d77afe0d74c9dbdf3bc3ad70edcb8c SHA512 9d3851fa03d46001ed0f2a4e7bca751be1eb9c3fd90a29f972b272bfdf0a72ac4d9de28b3b32ff0a5d50fac6fb6f50846bcaed0217526c9906cd799b39c27b78 WHIRLPOOL 79c594030db03eab1167da39ff91013e5be9ac1682d4ba89f4129f353287f711e44fa61a6bb6a75dfa686a18b1d17e2ed87b656660dcc59e72718b495e45f015 +AUX 78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch 3345 SHA256 a5826f37e98275fb959fe01e856e03fad667a426d08297bc4761a7ae6a39f226 SHA512 a52cd73f75e8254cc5962fa2affa6ed296445036f157c1b9ed6ed829e4a34c8f0270111f22edb45b02dae1bf242526fa1ec989e572733eab6cccef3eae0fc4cc WHIRLPOOL dcad1f4fdbe42ea4fb5a9b16d3211a90134504326320e13c30b20df36b6bf0cc00d5b619f6431f157d01ad034edbc2dc1439a1be8c43deada4cbfa4513e598c9 +AUX f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch 1601 SHA256 215bd5777973f8f8c8dbf59d7a37ecb03ebfaf25324824f2f5e495b54a4b9616 SHA512 e92f16399c9cd66336ea496102695864582e90a92d5f0814e98190fede689069c0bf928b3a30cb1c7ab9180f62ad6c1910ddc1e878773b3aac501c34e3a4c1c2 WHIRLPOOL f23dfc7255feaea48d5f075f7b40b11bfd1b7af7e9d99bcf9396c0bb43ee3909cdd6d1ed2c4af2f44bc43d2aaec4492594158f253f439d200c4e15a40692961f +DIST cookiejar-0.3.0.gem 16896 SHA256 f783b8eb981da58db1cb38f8a49781eefd1b84af2b8b7f3d7755cbe8c9460c3f SHA512 c9d4570975b8bac335bfa2ef6456c6c38988135f042da28b5b0c479e8ad6bbb45e2653d55e1d303d7ba082ac2894199682e1522a980badbbdab083eee5a7ed6c WHIRLPOOL 3a608d8a0aba4add2370a621430b59dd7c041dacc28b533c4cb4778b875b20eed63ddadf6073c5fa1946c5b89ab0c7014b3b3a556fccf55e47474de315e1e50e +EBUILD cookiejar-0.3.0.ebuild 1167 SHA256 9151707671f5e7e80bbf788e54f995d229007a7ee2ac865ec529bd7b08815e49 SHA512 1358641d67a6960047ca4f485f291cb623af5102798eeb92440d4ee8e0d56afd1845fbf2a5d79de25a9f8f015bb820b15e359c5fda017ab6ae42285bbd492132 WHIRLPOOL 9fb9b39c95e038c5d1e1e7395e190a7098ded9c4fc09b283474a302d95b98da74080fad6cec2cb4660d691f412429125424c62daed9eb9626f3accb3ce66f88b diff --git a/dev-ruby/cookiejar/cookiejar-0.3.0.ebuild b/dev-ruby/cookiejar/cookiejar-0.3.0.ebuild new file mode 100644 index 0000000..3bc7c18 --- /dev/null +++ b/dev-ruby/cookiejar/cookiejar-0.3.0.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 +USE_RUBY="ruby18 ruby19" + +RUBY_FAKEGEM_RECIPE_TEST="none" +RUBY_FAKEGEM_RECIPE_DOC="none" +RUBY_FAKEGEM_EXTRADOC="" +RUBY_FAKEGEM_DOCDIR="doc" + +inherit ruby-fakegem + +DESCRIPTION="Manage client-side HTTP cookies in Ruby" +HOMEPAGE="https://github.com/dwaite/cookiejar" +#SRC_URI="https://github.com/dwaite/cookiejar/archive/v${PV}.tar.gz -> ${P}.tar.gz" +# no tags available + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc" + +# 1-3: fixes at upstream +# 4: test fix from https://github.com/dwaite/cookiejar/pull/7 +RUBY_PATCHES=( + f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch + 48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch + 78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch + 60250a90cb9ca7dfa293146e75ff62924c822900.patch + ) + +ruby_add_bdepend "doc? ( dev-ruby/yard ) + test? ( dev-ruby/rspec:0 )" + +all_ruby_compile() { + all_fakegem_compile + + if use doc ; then + yard \ + --title 'CookieJar, a HTTP Client Cookie Parsing Library' \ + || die "yard failed" + fi +} + +each_ruby_test() { + ${RUBY} -I lib -S spec test/*_test.rb || die "spec failed" +} diff --git a/dev-ruby/cookiejar/files/48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch b/dev-ruby/cookiejar/files/48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch new file mode 100644 index 0000000..7abf240 --- /dev/null +++ b/dev-ruby/cookiejar/files/48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch @@ -0,0 +1,271 @@ +From 48a1cca3d1e0fb9fc15508f227439ab76e6ea74c Mon Sep 17 00:00:00 2001 +From: David Waite +Date: Wed, 6 Oct 2010 00:07:30 -0600 +Subject: [PATCH] fix whitespace formatting and paren warnings from ruby 1.9.2 + +--- + lib/cookiejar/cookie_validation.rb | 6 +- + lib/cookiejar/jar.rb | 151 ++++++++++++++++++------------------- + 2 files changed, 78 insertions(+), 79 deletions(-) + +diff --git a/lib/cookiejar/cookie_validation.rb b/lib/cookiejar/cookie_validation.rb +index 40d3653..140571a 100644 +--- a/lib/cookiejar/cookie_validation.rb ++++ b/lib/cookiejar/cookie_validation.rb +@@ -275,7 +275,7 @@ def self.validate_cookie request_uri, cookie + end + end + +- raise (InvalidCookieError.new errors) unless errors.empty? ++ raise InvalidCookieError.new(errors) unless errors.empty? + + # Note: 'secure' is not explicitly defined as an SSL channel, and no + # test is defined around validity and the 'secure' attribute +@@ -291,7 +291,7 @@ def self.validate_cookie request_uri, cookie + # @return [Hash] Contains the parsed values of the cookie + def self.parse_set_cookie set_cookie_value + args = { } +- params=set_cookie_value.split /;\s*/ ++ params=set_cookie_value.split(/;\s*/) + + first=true + params.each do |param| +@@ -387,7 +387,7 @@ def self.parse_set_cookie2 set_cookie_value + args[:version] = keyvalue.to_i + when :port + # must be in format '"port,port"' +- ports = keyvalue.split /,\s*/ ++ ports = keyvalue.split(/,\s*/) + args[:ports] = ports.map do |portstr| portstr.to_i end + else + raise InvalidCookieError.new "Unknown cookie parameter '#{key}'" +diff --git a/lib/cookiejar/jar.rb b/lib/cookiejar/jar.rb +index fd03da6..40ea684 100644 +--- a/lib/cookiejar/jar.rb ++++ b/lib/cookiejar/jar.rb +@@ -46,7 +46,7 @@ module CookieJar + class Jar + # Create a new empty Jar + def initialize +- @domains = {} ++ @domains = {} + end + + # Given a request URI and a literal Set-Cookie header value, attempt to +@@ -57,8 +57,8 @@ def initialize + # @return [Cookie] which was created and stored + # @raise [InvalidCookieError] if the cookie header did not validate + def set_cookie request_uri, cookie_header_value +- cookie = Cookie.from_set_cookie request_uri, cookie_header_value +- add_cookie cookie ++ cookie = Cookie.from_set_cookie request_uri, cookie_header_value ++ add_cookie cookie + end + + # Given a request URI and a literal Set-Cookie2 header value, attempt to +@@ -69,8 +69,8 @@ def set_cookie request_uri, cookie_header_value + # @return [Cookie] which was created and stored + # @raise [InvalidCookieError] if the cookie header did not validate + def set_cookie2 request_uri, cookie_header_value +- cookie = Cookie.from_set_cookie2 request_uri, cookie_header_value +- add_cookie cookie ++ cookie = Cookie.from_set_cookie2 request_uri, cookie_header_value ++ add_cookie cookie + end + + # Given a request URI and some HTTP headers, attempt to add the cookie(s) +@@ -123,35 +123,35 @@ def set_cookies_from_headers request_uri, http_headers + # @return [Cookie] the cookie added to the store + def add_cookie cookie + domain_paths = find_or_add_domain_for_cookie cookie +- add_cookie_to_path domain_paths, cookie +- cookie +- end +- +- # Return an array of all cookie objects in the jar +- # +- # @return [Array] all cookies. Includes any expired cookies +- # which have not yet been removed with expire_cookies +- def to_a +- result = [] +- @domains.values.each do |paths| +- paths.values.each do |cookies| +- cookies.values.inject result, :<< +- end ++ add_cookie_to_path domain_paths, cookie ++ cookie ++ end ++ ++ # Return an array of all cookie objects in the jar ++ # ++ # @return [Array] all cookies. Includes any expired cookies ++ # which have not yet been removed with expire_cookies ++ def to_a ++ result = [] ++ @domains.values.each do |paths| ++ paths.values.each do |cookies| ++ cookies.values.inject result, :<< ++ end + end + result +- end +- +- # Return a JSON 'object' for the various data values. Allows for ++ end ++ ++ # Return a JSON 'object' for the various data values. Allows for + # persistence of the cookie information + # + # @param [Array] a options controlling output JSON text + # (usually a State and a depth) + # @return [String] JSON representation of object data +- def to_json *a +- { +- 'json_class' => self.class.name, +- 'cookies' => (to_a.to_json *a) +- }.to_json *a ++ def to_json *a ++ { ++ 'json_class' => self.class.name, ++ 'cookies' => to_a.to_json(*a) ++ }.to_json(*a) + end + + # Create a new Jar from a JSON-backed hash +@@ -210,24 +210,24 @@ def expire_cookies session = false + # if true + # @return [Array] cookies which should be sent in the HTTP request + def get_cookies request_uri, opts = { } +- uri = to_uri request_uri +- hosts = Cookie.compute_search_domains uri +- +- results = [] +- hosts.each do |host| +- domain = find_domain host +- domain.each do |path, cookies| +- if uri.path.start_with? path +- results += cookies.values.select do |cookie| +- cookie.should_send? uri, opts[:script] +- end +- end +- end ++ uri = to_uri request_uri ++ hosts = Cookie.compute_search_domains uri ++ ++ results = [] ++ hosts.each do |host| ++ domain = find_domain host ++ domain.each do |path, cookies| ++ if uri.path.start_with? path ++ results += cookies.values.select do |cookie| ++ cookie.should_send? uri, opts[:script] ++ end ++ end ++ end ++ end ++ #Sort by path length, longest first ++ results.sort do |lhs, rhs| ++ rhs.path.length <=> lhs.path.length + end +- #Sort by path length, longest first +- results.sort do |lhs, rhs| +- rhs.path.length <=> lhs.path.length +- end + end + + # Given a request URI, return a string Cookie header.Cookies will be in +@@ -242,34 +242,34 @@ def get_cookies request_uri, opts = { } + # @return String value of the Cookie header which should be sent on the + # HTTP request + def get_cookie_header request_uri, opts = { } +- cookies = get_cookies request_uri, opts +- version = 0 +- ver = [[],[]] +- cookies.each do |cookie| +- ver[cookie.version] << cookie +- end +- if (ver[1].empty?) +- # can do a netscape-style cookie header, relish the opportunity +- cookies.map do |cookie| +- cookie.to_s +- end.join ";" +- else +- # build a RFC 2965-style cookie header. Split the cookies into +- # version 0 and 1 groups so that we can reuse the '$Version' header +- result = '' +- unless ver[0].empty? +- result << '$Version=0;' +- result << ver[0].map do |cookie| +- (cookie.to_s 1,false) +- end.join(';') +- # separate version 0 and 1 with a comma +- result << ',' ++ cookies = get_cookies request_uri, opts ++ version = 0 ++ ver = [[],[]] ++ cookies.each do |cookie| ++ ver[cookie.version] << cookie ++ end ++ if (ver[1].empty?) ++ # can do a netscape-style cookie header, relish the opportunity ++ cookies.map do |cookie| ++ cookie.to_s ++ end.join ";" ++ else ++ # build a RFC 2965-style cookie header. Split the cookies into ++ # version 0 and 1 groups so that we can reuse the '$Version' header ++ result = '' ++ unless ver[0].empty? ++ result << '$Version=0;' ++ result << ver[0].map do |cookie| ++ (cookie.to_s 1,false) ++ end.join(';') ++ # separate version 0 and 1 with a comma ++ result << ',' + end + result << '$Version=1;' +- ver[1].map do |cookie| +- result << (cookie.to_s 1,false) ++ ver[1].map do |cookie| ++ result << (cookie.to_s 1,false) + end +- result ++ result + end + end + +@@ -277,7 +277,6 @@ def get_cookie_header request_uri, opts = { } + + def gather_header_values http_header_value, &block + result = [] +- http_header_value + if http_header_value.is_a? Array + http_header_value.each do |value| + result << block.call(value) +@@ -293,16 +292,16 @@ def to_uri request_uri + end + + def find_domain host +- @domains[host] || {} ++ @domains[host] || {} + end + + def find_or_add_domain_for_cookie cookie +- @domains[cookie.domain] ||= {} ++ @domains[cookie.domain] ||= {} + end +- ++ + def add_cookie_to_path paths, cookie +- path_entry = (paths[cookie.path] ||= {}) +- path_entry[cookie.name] = cookie ++ path_entry = (paths[cookie.path] ||= {}) ++ path_entry[cookie.name] = cookie + end + end +-end +\ No newline at end of file ++end +-- +1.8.1.6 + diff --git a/dev-ruby/cookiejar/files/60250a90cb9ca7dfa293146e75ff62924c822900.patch b/dev-ruby/cookiejar/files/60250a90cb9ca7dfa293146e75ff62924c822900.patch new file mode 100644 index 0000000..c15f984 --- /dev/null +++ b/dev-ruby/cookiejar/files/60250a90cb9ca7dfa293146e75ff62924c822900.patch @@ -0,0 +1,40 @@ +From 60250a90cb9ca7dfa293146e75ff62924c822900 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?C=C3=A9dric=20Boutillier?= +Date: Thu, 6 Jun 2013 19:10:14 +0200 +Subject: [PATCH] use :create_additions to force creation of Ruby objects from + JSON + +--- + test/cookie_test.rb | 2 +- + test/jar_test.rb | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/cookie_test.rb b/test/cookie_test.rb +index f855eaa..515b75f 100644 +--- a/test/cookie_test.rb ++++ b/test/cookie_test.rb +@@ -163,7 +163,7 @@ + end + it "should automatically deserialize to a cookie" do + json = "{\"json_class\":\"CookieJar::Cookie\",\"name\":\"foo\",\"value\":\"bar\",\"domain\":\"localhost.local\",\"path\":\"\\/\",\"created_at\":\"2009-09-11 12:51:03 -0600\",\"expiry\":\"2009-09-11 19:10:00 -0600\",\"secure\":true}" +- c = JSON.parse json ++ c = JSON.parse json, :create_additions => true + c.should be_a Cookie + CookieValidation.validate_cookie 'https://localhost/', c + end +diff --git a/test/jar_test.rb b/test/jar_test.rb +index 4252c60..5866b98 100644 +--- a/test/jar_test.rb ++++ b/test/jar_test.rb +@@ -223,7 +223,7 @@ + + it "should automatically deserialize to a jar" do + json = "{\"json_class\":\"CookieJar::Jar\",\"cookies\":[{\"name\":\"foo\",\"value\":\"bar\",\"domain\":\"localhost.local\",\"path\":\"\\/\",\"created_at\":\"2009-09-11 12:51:03 -0600\",\"expiry\":\"2028-11-01 12:00:00 GMT\",\"secure\":true}]}" +- jar = JSON.parse json ++ jar = JSON.parse json, :create_additions => true + jar.get_cookies('https://localhost/').should have(1).items + end + end +-- +1.8.1.6 + diff --git a/dev-ruby/cookiejar/files/78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch b/dev-ruby/cookiejar/files/78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch new file mode 100644 index 0000000..94f998a --- /dev/null +++ b/dev-ruby/cookiejar/files/78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch @@ -0,0 +1,75 @@ +From 78d2ca2bbc52b583a37a882d52d71bc15f9c7e48 Mon Sep 17 00:00:00 2001 +From: Maurice Nonnekes +Date: Thu, 26 Jul 2012 22:43:30 +0200 +Subject: [PATCH] Add support for multiple cookies in 1 Set-Cookie header + +--- + lib/cookiejar/jar.rb | 12 +++++++----- + test/jar_test.rb | 9 +++++++++ + 2 files changed, 16 insertions(+), 5 deletions(-) + +diff --git a/lib/cookiejar/jar.rb b/lib/cookiejar/jar.rb +index 40ea684..a0fefa8 100644 +--- a/lib/cookiejar/jar.rb ++++ b/lib/cookiejar/jar.rb +@@ -50,15 +50,17 @@ def initialize + end + + # Given a request URI and a literal Set-Cookie header value, attempt to +- # add the cookie to the cookie store. ++ # add the cookie(s) to the cookie store. + # + # @param [String, URI] request_uri the resource returning the header + # @param [String] cookie_header_value the contents of the Set-Cookie + # @return [Cookie] which was created and stored + # @raise [InvalidCookieError] if the cookie header did not validate +- def set_cookie request_uri, cookie_header_value +- cookie = Cookie.from_set_cookie request_uri, cookie_header_value +- add_cookie cookie ++ def set_cookie request_uri, cookie_header_values ++ cookie_header_values.split(/, (?=[\w]+=)/).each do |cookie_header_value| ++ cookie = Cookie.from_set_cookie request_uri, cookie_header_value ++ add_cookie cookie ++ end + end + + # Given a request URI and a literal Set-Cookie2 header value, attempt to +@@ -72,7 +74,7 @@ def set_cookie2 request_uri, cookie_header_value + cookie = Cookie.from_set_cookie2 request_uri, cookie_header_value + add_cookie cookie + end +- ++ + # Given a request URI and some HTTP headers, attempt to add the cookie(s) + # (from Set-Cookie or Set-Cookie2 headers) to the cookie store. If a + # cookie is defined (by equivalent name, domain, and path) via Set-Cookie +diff --git a/test/jar_test.rb b/test/jar_test.rb +index 64ec6f3..4252c60 100644 +--- a/test/jar_test.rb ++++ b/test/jar_test.rb +@@ -17,6 +17,10 @@ + jar.set_cookie 'http://auth.foo.com/', 'foo=bar' + jar.set_cookie 'http://auth.foo.com/', 'auth=135121...;domain=foo.com' + end ++ it "should allow me to set multiple cookies in 1 header" do ++ jar = Jar.new ++ jar.set_cookie 'http://foo.com/', 'my_cookie=123456; Domain=foo.com; expires=Thu, 31 Dec 2037 23:59:59 GMT; Path=/, other_cookie=helloworld; Domain=foo.com; expires=Thu, 31 Dec 2037 23:59:59 GMT, last_cookie=098765' ++ end + end + describe '.get_cookies' do + it "should let me read back cookies which are set" do +@@ -27,6 +31,11 @@ + jar.set_cookie 'http://auth.foo.com/', 'auth=135121...;domain=foo.com' + jar.get_cookies('http://foo.com/').should have(3).items + end ++ it "should let me read back a multiple cookies from 1 header" do ++ jar = Jar.new ++ jar.set_cookie 'http://foo.com/', 'my_cookie=123456; Domain=foo.com; expires=Thu, 31 Dec 2037 23:59:59 GMT; Path=/, other_cookie=helloworld; Domain=foo.com; expires=Thu, 31 Dec 2037 23:59:59 GMT, last_cookie=098765' ++ jar.get_cookie_header('http://foo.com/').should == 'last_cookie=098765;my_cookie=123456;other_cookie=helloworld' ++ end + it "should return cookies longest path first" do + jar = Jar.new + uri = 'http://foo.com/a/b/c/d' +-- +1.8.1.6 + diff --git a/dev-ruby/cookiejar/files/f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch b/dev-ruby/cookiejar/files/f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch new file mode 100644 index 0000000..05fd8a6 --- /dev/null +++ b/dev-ruby/cookiejar/files/f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch @@ -0,0 +1,46 @@ +From f29fd1c79ef79f977240ce97f96d6e7db9b52f0b Mon Sep 17 00:00:00 2001 +From: "chpeck@thingbuzz.com" +Date: Wed, 7 Jul 2010 22:47:54 -0700 +Subject: [PATCH] handle y2k38 bug + +--- + lib/cookiejar/cookie_validation.rb | 7 ++++++- + test/cookie_validation_test.rb | 5 +++++ + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/lib/cookiejar/cookie_validation.rb b/lib/cookiejar/cookie_validation.rb +index 2227290..40d3653 100644 +--- a/lib/cookiejar/cookie_validation.rb ++++ b/lib/cookiejar/cookie_validation.rb +@@ -308,7 +308,12 @@ def self.parse_set_cookie set_cookie_value + else + case key + when :expires +- args[:expires_at] = Time.parse keyvalue ++ begin ++ args[:expires_at] = Time.parse keyvalue ++ rescue ArgumentError ++ raise unless $!.message == "time out of range" ++ args[:expires_at] = Time.at(0x7FFFFFFF) ++ end + when *[:domain, :path] + args[key] = keyvalue + when :secure +diff --git a/test/cookie_validation_test.rb b/test/cookie_validation_test.rb +index 1484eb5..b66fbdd 100644 +--- a/test/cookie_validation_test.rb ++++ b/test/cookie_validation_test.rb +@@ -236,4 +236,9 @@ + end + end + end ++ describe '#parse_set_cookie' do ++ it "should max out at 2038 on 32bit systems" do ++ CookieValidation.parse_set_cookie("TRACK_USER_P=98237480810003948000782774;expires=Sat, 30-Jun-2040 05:39:49 GMT;path=/")[:expires_at].to_i.should >= 0x7FFFFFFF ++ end ++ end + end +\ No newline at end of file +-- +1.8.1.6 + diff --git a/dev-ruby/grape/Manifest b/dev-ruby/grape/Manifest new file mode 100644 index 0000000..c7b1ccc --- /dev/null +++ b/dev-ruby/grape/Manifest @@ -0,0 +1,2 @@ +DIST grape-0.5.0.tar.gz 68609 SHA256 0e78e7d1e393106740e75a4109789ba9c34b18f8eab2fa493bc75ad34502566d SHA512 ecdda5f88c1d5349a8b2a008f03cb4cc538f5caff1b02f6c999fcc01a6c7e0428f46993a48eeaf55878ecefafac65e0f55ec80f6e82bf9459f40dd69b6fe8f7b WHIRLPOOL 657524865633ff74b7a99802672d82ceeb832b9683060e3242bb05754f91df945f500cdb9596db3fd86d98e31c3200cadbb1b71c0111797796ddcb987fb442ef +EBUILD grape-0.5.0.ebuild 1135 SHA256 100e360e107c48773eba57220ff8c9337d1528eb0e81fd8d1e26971d4805c844 SHA512 baaec1f9ae14a5fe098d5ec32b6f1f937a39de526a1b94ae96c5484951d588fc402a9a207071891ab1b480321393a0e275d61c963be28268128fa75781fddc19 WHIRLPOOL b294ed9f06368eb65defdc45e4bad8ac896ae26709ce455860253be6345ba06b8484c585cc03c5041bb0c70fbdd3dd4b2bbc11bad065edee0e5c0ca9497ef262 diff --git a/dev-ruby/grape/grape-0.5.0.ebuild b/dev-ruby/grape/grape-0.5.0.ebuild new file mode 100644 index 0000000..d2597a7 --- /dev/null +++ b/dev-ruby/grape/grape-0.5.0.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 +USE_RUBY="ruby19" + +RUBY_FAKEGEM_RECIPE_TEST="rspec" +RUBY_FAKEGEM_RECIPE_DOC="none" +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md" +RUBY_FAKEGEM_DOCDIR="doc" + +inherit ruby-fakegem + +DESCRIPTION="An opinionated micro-framework for creating REST-like APIs in Ruby." +HOMEPAGE="https://github.com/intridea/grape" +SRC_URI="https://github.com/intridea/grape/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc" + +ruby_add_rdepend " + dev-ruby/activesupport + dev-ruby/builder + >=dev-ruby/hashie-1.2 + >=dev-ruby/multi_json-1.3.2 + >=dev-ruby/multi_xml-0.5.2 + >=dev-ruby/rack-1.3.0 + dev-ruby/rack-accept + dev-ruby/rack-mount + dev-ruby/virtus" +ruby_add_bdepend "doc? ( dev-ruby/yard dev-ruby/maruku ) + test? ( dev-ruby/cookiejar dev-ruby/rack-test dev-ruby/rack-contrib )" + +all_ruby_prepare() { + sed -i \ + -e '/[Bb]undler/d' \ + -e '/pry/d' \ + spec/spec_helper.rb || die "sed failed" +} + +all_ruby_compile() { + all_fakegem_compile + + if use doc ; then + yard || die "yard failed" + fi +} diff --git a/dev-ruby/rack-contrib/Manifest b/dev-ruby/rack-contrib/Manifest new file mode 100644 index 0000000..7383143 --- /dev/null +++ b/dev-ruby/rack-contrib/Manifest @@ -0,0 +1,2 @@ +DIST rack-contrib-1.1.0.tar.gz 35517 SHA256 180bbbc291a8de2b3dc4009f55aa1cc0b6155f1987064d7372fbe54f63123152 SHA512 399cf899eeb8f3b4280ec6e938e02ec701ef276b653f23d004e51ca80d6a9871cc51937f6d201531de0b992f75a5cfeb4e5a0b0ad65c29604820c95ed48060b9 WHIRLPOOL 5bce01200e5c1c1dfd20ce2378f0d7dcac5eafa04dd7bac74960984c2d1e5bd1ebdf9025cbcaaa5f1d7ac6a87421b8cbb9ffc8a4855c72c263ea8d7bedcc7987 +EBUILD rack-contrib-1.1.0.ebuild 951 SHA256 61883425dc62de85e7fe2edaa2d7fa73fabfd4dea6d9b597c3510260d20961ad SHA512 4c5e0be87ec4cdac20e0d04169d9c1a46c9902e5deef8c121a917141b6c9c0207e033bef5b62ce05341b1e1468e193902eb71e8f45a1674cbbe9c553ea71b308 WHIRLPOOL c93e9a367da705cc1290ad1ce6386c316de8b8a8bd95d54985c6d7541513110adbf2ec15f249e424cec41a04fc65eeb7cd63740e5d9ac11fb68c4999205ecb50 diff --git a/dev-ruby/rack-contrib/rack-contrib-1.1.0.ebuild b/dev-ruby/rack-contrib/rack-contrib-1.1.0.ebuild new file mode 100644 index 0000000..a4f1505 --- /dev/null +++ b/dev-ruby/rack-contrib/rack-contrib-1.1.0.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 +USE_RUBY="ruby18 ruby19" + +RUBY_FAKEGEM_RECIPE_TEST="rake" +RUBY_FAKEGEM_RECIPE_DOC="rdoc" +RUBY_FAKEGEM_EXTRADOC="AUTHORS README.rdoc" + +inherit ruby-fakegem + +DESCRIPTION="Contributed Rack Middleware and Utilities" +HOMEPAGE="https://github.com/rack/rack-contrib" +SRC_URI="https://github.com/rack/rack-contrib/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc" + +ruby_add_rdepend ">=dev-ruby/rack-0.9.1" +ruby_add_bdepend "test? ( dev-ruby/test-spec dev-ruby/tmail )" + +# there is something wrong with test-unit or test-spec: +# most tests succeed when run on their own (specrb -Ilib:test -w test/...) +# but when run together, I get this: +# .../collector.rb:48:in `sort_by': comparison of Array with Array failed (ArgumentError) +# for example the speck_rack_c* group of tests +RESTRICT="test" diff --git a/dev-ruby/virtus/Manifest b/dev-ruby/virtus/Manifest new file mode 100644 index 0000000..5ae7b1a --- /dev/null +++ b/dev-ruby/virtus/Manifest @@ -0,0 +1,2 @@ +DIST virtus-0.5.5.gem 56320 SHA256 b7de2f3be82838065033e5d1b7e93dc5ed913f1acb78a920badb8e0eb696c54f SHA512 90aa31d8b394ff2748befc650495c443d2078e992c155544108f24c0525e2c3234e90d2f1fba418500ebb3ccc6816602196ca146262a48b72b68b7ea8d7833fc WHIRLPOOL 6d241b1cbf0d0486cda828474f905074f3152ba575d081e8111c10d9aa03060304a0e10a59d0068259c488105d41884864cc122e801d6f9a8533b55639d71cbb +EBUILD virtus-0.5.5.ebuild 971 SHA256 3c0990981cd8bcd3ed8f2c02b76f3aca368c27e46b4d8a630754fec17a77a001 SHA512 20fd26685367c2f1dfd939b97625679669cf6ff6b4bb94628ec0896187c9af1d1c495737299c25e020e8b5208cecff105434386f8950266e675d39e2f9a79592 WHIRLPOOL 74f326451db928e9284617b5cf14bdf64c953c750af023be0a1d1f7f2285bdbc3fa581fd0d33594b5c76392ae9d7adbb717e1b3086c5141bc4ffb4bcca916b7d diff --git a/dev-ruby/virtus/virtus-0.5.5.ebuild b/dev-ruby/virtus/virtus-0.5.5.ebuild new file mode 100644 index 0000000..10f35f6 --- /dev/null +++ b/dev-ruby/virtus/virtus-0.5.5.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 +USE_RUBY="ruby19" + +RUBY_FAKEGEM_RECIPE_TEST="rspec" +RUBY_FAKEGEM_RECIPE_DOC="none" +RUBY_FAKEGEM_EXTRADOC="Changelog.md README.md" +RUBY_FAKEGEM_DOCDIR="doc" + +inherit ruby-fakegem + +DESCRIPTION="Attributes on Steroids for Plain Old Ruby Objects" +HOMEPAGE="https://github.com/solnic/virtus" +#SRC_URI="https://github.com/solnic/virtus/archive/v${PV}.tar.gz -> ${P}.tar.gz" +# no 0.5.5 tag on github + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc" + +ruby_add_rdepend ">=dev-ruby/descendants_tracker-0.0.1" +ruby_add_bdepend "doc? ( dev-ruby/yard )" + +all_ruby_prepare() { + # backports only needed with ruby <=1.8 + sed -i -e '/backports/d' lib/virtus.rb ${PN}.gemspec || die "sed failed" + sed -i -e '/backports/,+15d' ../metadata || die "sed failed" +} + +all_ruby_compile() { + all_fakegem_compile + + if use doc ; then + yard || die "yard failed" + fi +}