Gentoo Archives: gentoo-commits

From: "Tiziano Müller" <dev-zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/dev-zero:master commit in: dev-ruby/virtus/, dev-ruby/cookiejar/, dev-ruby/cookiejar/files/, ...
Date: Tue, 02 Jul 2013 07:21:20
Message-Id: 1372749656.364ffe6d9a9e607a4358319ca8484d6cf57431be.dev-zero@gentoo
1 commit: 364ffe6d9a9e607a4358319ca8484d6cf57431be
2 Author: Tiziano Müller <tm <AT> dev-zero <DOT> ch>
3 AuthorDate: Tue Jul 2 07:20:56 2013 +0000
4 Commit: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 2 07:20:56 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dev-zero.git;a=commit;h=364ffe6d
7
8 Add grape (and dependencies for grape) for gitlab.
9
10 ---
11 dev-ruby/cookiejar/Manifest | 6 +
12 dev-ruby/cookiejar/cookiejar-0.3.0.ebuild | 49 ++++
13 .../48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch | 271 +++++++++++++++++++++
14 .../60250a90cb9ca7dfa293146e75ff62924c822900.patch | 40 +++
15 .../78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch | 75 ++++++
16 .../f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch | 46 ++++
17 dev-ruby/grape/Manifest | 2 +
18 dev-ruby/grape/grape-0.5.0.ebuild | 50 ++++
19 dev-ruby/rack-contrib/Manifest | 2 +
20 dev-ruby/rack-contrib/rack-contrib-1.1.0.ebuild | 31 +++
21 dev-ruby/virtus/Manifest | 2 +
22 dev-ruby/virtus/virtus-0.5.5.ebuild | 40 +++
23 12 files changed, 614 insertions(+)
24
25 diff --git a/dev-ruby/cookiejar/Manifest b/dev-ruby/cookiejar/Manifest
26 new file mode 100644
27 index 0000000..085ce84
28 --- /dev/null
29 +++ b/dev-ruby/cookiejar/Manifest
30 @@ -0,0 +1,6 @@
31 +AUX 48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch 9171 SHA256 a7333576fc6290de0935501556e821a497cabf05416908bb40c2258e402599ff SHA512 4fbeba568514dd4aa4b42a61a189c988244a856196cbe6df455f95deecaee042fe1766c6b3771b99b5ea79146308511a140ff9389fdc91f8496e5ed01c842a18 WHIRLPOOL 2bf2398ae211d83f1145f3c6d6f3e7256692e354eb02d366c567b2386981c923870e0096a5d21ddec3dc7bec45437e756a591e63e103d0d1baf4e0f6c2bbb7fd
32 +AUX 60250a90cb9ca7dfa293146e75ff62924c822900.patch 1686 SHA256 22127d48936154f5a1df7d8c1f53061eb7d77afe0d74c9dbdf3bc3ad70edcb8c SHA512 9d3851fa03d46001ed0f2a4e7bca751be1eb9c3fd90a29f972b272bfdf0a72ac4d9de28b3b32ff0a5d50fac6fb6f50846bcaed0217526c9906cd799b39c27b78 WHIRLPOOL 79c594030db03eab1167da39ff91013e5be9ac1682d4ba89f4129f353287f711e44fa61a6bb6a75dfa686a18b1d17e2ed87b656660dcc59e72718b495e45f015
33 +AUX 78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch 3345 SHA256 a5826f37e98275fb959fe01e856e03fad667a426d08297bc4761a7ae6a39f226 SHA512 a52cd73f75e8254cc5962fa2affa6ed296445036f157c1b9ed6ed829e4a34c8f0270111f22edb45b02dae1bf242526fa1ec989e572733eab6cccef3eae0fc4cc WHIRLPOOL dcad1f4fdbe42ea4fb5a9b16d3211a90134504326320e13c30b20df36b6bf0cc00d5b619f6431f157d01ad034edbc2dc1439a1be8c43deada4cbfa4513e598c9
34 +AUX f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch 1601 SHA256 215bd5777973f8f8c8dbf59d7a37ecb03ebfaf25324824f2f5e495b54a4b9616 SHA512 e92f16399c9cd66336ea496102695864582e90a92d5f0814e98190fede689069c0bf928b3a30cb1c7ab9180f62ad6c1910ddc1e878773b3aac501c34e3a4c1c2 WHIRLPOOL f23dfc7255feaea48d5f075f7b40b11bfd1b7af7e9d99bcf9396c0bb43ee3909cdd6d1ed2c4af2f44bc43d2aaec4492594158f253f439d200c4e15a40692961f
35 +DIST cookiejar-0.3.0.gem 16896 SHA256 f783b8eb981da58db1cb38f8a49781eefd1b84af2b8b7f3d7755cbe8c9460c3f SHA512 c9d4570975b8bac335bfa2ef6456c6c38988135f042da28b5b0c479e8ad6bbb45e2653d55e1d303d7ba082ac2894199682e1522a980badbbdab083eee5a7ed6c WHIRLPOOL 3a608d8a0aba4add2370a621430b59dd7c041dacc28b533c4cb4778b875b20eed63ddadf6073c5fa1946c5b89ab0c7014b3b3a556fccf55e47474de315e1e50e
36 +EBUILD cookiejar-0.3.0.ebuild 1167 SHA256 9151707671f5e7e80bbf788e54f995d229007a7ee2ac865ec529bd7b08815e49 SHA512 1358641d67a6960047ca4f485f291cb623af5102798eeb92440d4ee8e0d56afd1845fbf2a5d79de25a9f8f015bb820b15e359c5fda017ab6ae42285bbd492132 WHIRLPOOL 9fb9b39c95e038c5d1e1e7395e190a7098ded9c4fc09b283474a302d95b98da74080fad6cec2cb4660d691f412429125424c62daed9eb9626f3accb3ce66f88b
37
38 diff --git a/dev-ruby/cookiejar/cookiejar-0.3.0.ebuild b/dev-ruby/cookiejar/cookiejar-0.3.0.ebuild
39 new file mode 100644
40 index 0000000..3bc7c18
41 --- /dev/null
42 +++ b/dev-ruby/cookiejar/cookiejar-0.3.0.ebuild
43 @@ -0,0 +1,49 @@
44 +# Copyright 1999-2013 Gentoo Foundation
45 +# Distributed under the terms of the GNU General Public License v2
46 +# $Header: $
47 +
48 +EAPI=5
49 +USE_RUBY="ruby18 ruby19"
50 +
51 +RUBY_FAKEGEM_RECIPE_TEST="none"
52 +RUBY_FAKEGEM_RECIPE_DOC="none"
53 +RUBY_FAKEGEM_EXTRADOC=""
54 +RUBY_FAKEGEM_DOCDIR="doc"
55 +
56 +inherit ruby-fakegem
57 +
58 +DESCRIPTION="Manage client-side HTTP cookies in Ruby"
59 +HOMEPAGE="https://github.com/dwaite/cookiejar"
60 +#SRC_URI="https://github.com/dwaite/cookiejar/archive/v${PV}.tar.gz -> ${P}.tar.gz"
61 +# no tags available
62 +
63 +LICENSE="MIT"
64 +SLOT="0"
65 +KEYWORDS="~amd64"
66 +IUSE="doc"
67 +
68 +# 1-3: fixes at upstream
69 +# 4: test fix from https://github.com/dwaite/cookiejar/pull/7
70 +RUBY_PATCHES=(
71 + f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch
72 + 48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch
73 + 78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch
74 + 60250a90cb9ca7dfa293146e75ff62924c822900.patch
75 + )
76 +
77 +ruby_add_bdepend "doc? ( dev-ruby/yard )
78 + test? ( dev-ruby/rspec:0 )"
79 +
80 +all_ruby_compile() {
81 + all_fakegem_compile
82 +
83 + if use doc ; then
84 + yard \
85 + --title 'CookieJar, a HTTP Client Cookie Parsing Library' \
86 + || die "yard failed"
87 + fi
88 +}
89 +
90 +each_ruby_test() {
91 + ${RUBY} -I lib -S spec test/*_test.rb || die "spec failed"
92 +}
93
94 diff --git a/dev-ruby/cookiejar/files/48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch b/dev-ruby/cookiejar/files/48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch
95 new file mode 100644
96 index 0000000..7abf240
97 --- /dev/null
98 +++ b/dev-ruby/cookiejar/files/48a1cca3d1e0fb9fc15508f227439ab76e6ea74c.patch
99 @@ -0,0 +1,271 @@
100 +From 48a1cca3d1e0fb9fc15508f227439ab76e6ea74c Mon Sep 17 00:00:00 2001
101 +From: David Waite <david@××××××××××××××××××.com>
102 +Date: Wed, 6 Oct 2010 00:07:30 -0600
103 +Subject: [PATCH] fix whitespace formatting and paren warnings from ruby 1.9.2
104 +
105 +---
106 + lib/cookiejar/cookie_validation.rb | 6 +-
107 + lib/cookiejar/jar.rb | 151 ++++++++++++++++++-------------------
108 + 2 files changed, 78 insertions(+), 79 deletions(-)
109 +
110 +diff --git a/lib/cookiejar/cookie_validation.rb b/lib/cookiejar/cookie_validation.rb
111 +index 40d3653..140571a 100644
112 +--- a/lib/cookiejar/cookie_validation.rb
113 ++++ b/lib/cookiejar/cookie_validation.rb
114 +@@ -275,7 +275,7 @@ def self.validate_cookie request_uri, cookie
115 + end
116 + end
117 +
118 +- raise (InvalidCookieError.new errors) unless errors.empty?
119 ++ raise InvalidCookieError.new(errors) unless errors.empty?
120 +
121 + # Note: 'secure' is not explicitly defined as an SSL channel, and no
122 + # test is defined around validity and the 'secure' attribute
123 +@@ -291,7 +291,7 @@ def self.validate_cookie request_uri, cookie
124 + # @return [Hash] Contains the parsed values of the cookie
125 + def self.parse_set_cookie set_cookie_value
126 + args = { }
127 +- params=set_cookie_value.split /;\s*/
128 ++ params=set_cookie_value.split(/;\s*/)
129 +
130 + first=true
131 + params.each do |param|
132 +@@ -387,7 +387,7 @@ def self.parse_set_cookie2 set_cookie_value
133 + args[:version] = keyvalue.to_i
134 + when :port
135 + # must be in format '"port,port"'
136 +- ports = keyvalue.split /,\s*/
137 ++ ports = keyvalue.split(/,\s*/)
138 + args[:ports] = ports.map do |portstr| portstr.to_i end
139 + else
140 + raise InvalidCookieError.new "Unknown cookie parameter '#{key}'"
141 +diff --git a/lib/cookiejar/jar.rb b/lib/cookiejar/jar.rb
142 +index fd03da6..40ea684 100644
143 +--- a/lib/cookiejar/jar.rb
144 ++++ b/lib/cookiejar/jar.rb
145 +@@ -46,7 +46,7 @@ module CookieJar
146 + class Jar
147 + # Create a new empty Jar
148 + def initialize
149 +- @domains = {}
150 ++ @domains = {}
151 + end
152 +
153 + # Given a request URI and a literal Set-Cookie header value, attempt to
154 +@@ -57,8 +57,8 @@ def initialize
155 + # @return [Cookie] which was created and stored
156 + # @raise [InvalidCookieError] if the cookie header did not validate
157 + def set_cookie request_uri, cookie_header_value
158 +- cookie = Cookie.from_set_cookie request_uri, cookie_header_value
159 +- add_cookie cookie
160 ++ cookie = Cookie.from_set_cookie request_uri, cookie_header_value
161 ++ add_cookie cookie
162 + end
163 +
164 + # Given a request URI and a literal Set-Cookie2 header value, attempt to
165 +@@ -69,8 +69,8 @@ def set_cookie request_uri, cookie_header_value
166 + # @return [Cookie] which was created and stored
167 + # @raise [InvalidCookieError] if the cookie header did not validate
168 + def set_cookie2 request_uri, cookie_header_value
169 +- cookie = Cookie.from_set_cookie2 request_uri, cookie_header_value
170 +- add_cookie cookie
171 ++ cookie = Cookie.from_set_cookie2 request_uri, cookie_header_value
172 ++ add_cookie cookie
173 + end
174 +
175 + # Given a request URI and some HTTP headers, attempt to add the cookie(s)
176 +@@ -123,35 +123,35 @@ def set_cookies_from_headers request_uri, http_headers
177 + # @return [Cookie] the cookie added to the store
178 + def add_cookie cookie
179 + domain_paths = find_or_add_domain_for_cookie cookie
180 +- add_cookie_to_path domain_paths, cookie
181 +- cookie
182 +- end
183 +-
184 +- # Return an array of all cookie objects in the jar
185 +- #
186 +- # @return [Array<Cookie>] all cookies. Includes any expired cookies
187 +- # which have not yet been removed with expire_cookies
188 +- def to_a
189 +- result = []
190 +- @domains.values.each do |paths|
191 +- paths.values.each do |cookies|
192 +- cookies.values.inject result, :<<
193 +- end
194 ++ add_cookie_to_path domain_paths, cookie
195 ++ cookie
196 ++ end
197 ++
198 ++ # Return an array of all cookie objects in the jar
199 ++ #
200 ++ # @return [Array<Cookie>] all cookies. Includes any expired cookies
201 ++ # which have not yet been removed with expire_cookies
202 ++ def to_a
203 ++ result = []
204 ++ @domains.values.each do |paths|
205 ++ paths.values.each do |cookies|
206 ++ cookies.values.inject result, :<<
207 ++ end
208 + end
209 + result
210 +- end
211 +-
212 +- # Return a JSON 'object' for the various data values. Allows for
213 ++ end
214 ++
215 ++ # Return a JSON 'object' for the various data values. Allows for
216 + # persistence of the cookie information
217 + #
218 + # @param [Array] a options controlling output JSON text
219 + # (usually a State and a depth)
220 + # @return [String] JSON representation of object data
221 +- def to_json *a
222 +- {
223 +- 'json_class' => self.class.name,
224 +- 'cookies' => (to_a.to_json *a)
225 +- }.to_json *a
226 ++ def to_json *a
227 ++ {
228 ++ 'json_class' => self.class.name,
229 ++ 'cookies' => to_a.to_json(*a)
230 ++ }.to_json(*a)
231 + end
232 +
233 + # Create a new Jar from a JSON-backed hash
234 +@@ -210,24 +210,24 @@ def expire_cookies session = false
235 + # if true
236 + # @return [Array<Cookie>] cookies which should be sent in the HTTP request
237 + def get_cookies request_uri, opts = { }
238 +- uri = to_uri request_uri
239 +- hosts = Cookie.compute_search_domains uri
240 +-
241 +- results = []
242 +- hosts.each do |host|
243 +- domain = find_domain host
244 +- domain.each do |path, cookies|
245 +- if uri.path.start_with? path
246 +- results += cookies.values.select do |cookie|
247 +- cookie.should_send? uri, opts[:script]
248 +- end
249 +- end
250 +- end
251 ++ uri = to_uri request_uri
252 ++ hosts = Cookie.compute_search_domains uri
253 ++
254 ++ results = []
255 ++ hosts.each do |host|
256 ++ domain = find_domain host
257 ++ domain.each do |path, cookies|
258 ++ if uri.path.start_with? path
259 ++ results += cookies.values.select do |cookie|
260 ++ cookie.should_send? uri, opts[:script]
261 ++ end
262 ++ end
263 ++ end
264 ++ end
265 ++ #Sort by path length, longest first
266 ++ results.sort do |lhs, rhs|
267 ++ rhs.path.length <=> lhs.path.length
268 + end
269 +- #Sort by path length, longest first
270 +- results.sort do |lhs, rhs|
271 +- rhs.path.length <=> lhs.path.length
272 +- end
273 + end
274 +
275 + # Given a request URI, return a string Cookie header.Cookies will be in
276 +@@ -242,34 +242,34 @@ def get_cookies request_uri, opts = { }
277 + # @return String value of the Cookie header which should be sent on the
278 + # HTTP request
279 + def get_cookie_header request_uri, opts = { }
280 +- cookies = get_cookies request_uri, opts
281 +- version = 0
282 +- ver = [[],[]]
283 +- cookies.each do |cookie|
284 +- ver[cookie.version] << cookie
285 +- end
286 +- if (ver[1].empty?)
287 +- # can do a netscape-style cookie header, relish the opportunity
288 +- cookies.map do |cookie|
289 +- cookie.to_s
290 +- end.join ";"
291 +- else
292 +- # build a RFC 2965-style cookie header. Split the cookies into
293 +- # version 0 and 1 groups so that we can reuse the '$Version' header
294 +- result = ''
295 +- unless ver[0].empty?
296 +- result << '$Version=0;'
297 +- result << ver[0].map do |cookie|
298 +- (cookie.to_s 1,false)
299 +- end.join(';')
300 +- # separate version 0 and 1 with a comma
301 +- result << ','
302 ++ cookies = get_cookies request_uri, opts
303 ++ version = 0
304 ++ ver = [[],[]]
305 ++ cookies.each do |cookie|
306 ++ ver[cookie.version] << cookie
307 ++ end
308 ++ if (ver[1].empty?)
309 ++ # can do a netscape-style cookie header, relish the opportunity
310 ++ cookies.map do |cookie|
311 ++ cookie.to_s
312 ++ end.join ";"
313 ++ else
314 ++ # build a RFC 2965-style cookie header. Split the cookies into
315 ++ # version 0 and 1 groups so that we can reuse the '$Version' header
316 ++ result = ''
317 ++ unless ver[0].empty?
318 ++ result << '$Version=0;'
319 ++ result << ver[0].map do |cookie|
320 ++ (cookie.to_s 1,false)
321 ++ end.join(';')
322 ++ # separate version 0 and 1 with a comma
323 ++ result << ','
324 + end
325 + result << '$Version=1;'
326 +- ver[1].map do |cookie|
327 +- result << (cookie.to_s 1,false)
328 ++ ver[1].map do |cookie|
329 ++ result << (cookie.to_s 1,false)
330 + end
331 +- result
332 ++ result
333 + end
334 + end
335 +
336 +@@ -277,7 +277,6 @@ def get_cookie_header request_uri, opts = { }
337 +
338 + def gather_header_values http_header_value, &block
339 + result = []
340 +- http_header_value
341 + if http_header_value.is_a? Array
342 + http_header_value.each do |value|
343 + result << block.call(value)
344 +@@ -293,16 +292,16 @@ def to_uri request_uri
345 + end
346 +
347 + def find_domain host
348 +- @domains[host] || {}
349 ++ @domains[host] || {}
350 + end
351 +
352 + def find_or_add_domain_for_cookie cookie
353 +- @domains[cookie.domain] ||= {}
354 ++ @domains[cookie.domain] ||= {}
355 + end
356 +-
357 ++
358 + def add_cookie_to_path paths, cookie
359 +- path_entry = (paths[cookie.path] ||= {})
360 +- path_entry[cookie.name] = cookie
361 ++ path_entry = (paths[cookie.path] ||= {})
362 ++ path_entry[cookie.name] = cookie
363 + end
364 + end
365 +-end
366 +\ No newline at end of file
367 ++end
368 +--
369 +1.8.1.6
370 +
371
372 diff --git a/dev-ruby/cookiejar/files/60250a90cb9ca7dfa293146e75ff62924c822900.patch b/dev-ruby/cookiejar/files/60250a90cb9ca7dfa293146e75ff62924c822900.patch
373 new file mode 100644
374 index 0000000..c15f984
375 --- /dev/null
376 +++ b/dev-ruby/cookiejar/files/60250a90cb9ca7dfa293146e75ff62924c822900.patch
377 @@ -0,0 +1,40 @@
378 +From 60250a90cb9ca7dfa293146e75ff62924c822900 Mon Sep 17 00:00:00 2001
379 +From: =?UTF-8?q?C=C3=A9dric=20Boutillier?= <boutil@××××××.org>
380 +Date: Thu, 6 Jun 2013 19:10:14 +0200
381 +Subject: [PATCH] use :create_additions to force creation of Ruby objects from
382 + JSON
383 +
384 +---
385 + test/cookie_test.rb | 2 +-
386 + test/jar_test.rb | 2 +-
387 + 2 files changed, 2 insertions(+), 2 deletions(-)
388 +
389 +diff --git a/test/cookie_test.rb b/test/cookie_test.rb
390 +index f855eaa..515b75f 100644
391 +--- a/test/cookie_test.rb
392 ++++ b/test/cookie_test.rb
393 +@@ -163,7 +163,7 @@
394 + end
395 + it "should automatically deserialize to a cookie" do
396 + 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}"
397 +- c = JSON.parse json
398 ++ c = JSON.parse json, :create_additions => true
399 + c.should be_a Cookie
400 + CookieValidation.validate_cookie 'https://localhost/', c
401 + end
402 +diff --git a/test/jar_test.rb b/test/jar_test.rb
403 +index 4252c60..5866b98 100644
404 +--- a/test/jar_test.rb
405 ++++ b/test/jar_test.rb
406 +@@ -223,7 +223,7 @@
407 +
408 + it "should automatically deserialize to a jar" do
409 + 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}]}"
410 +- jar = JSON.parse json
411 ++ jar = JSON.parse json, :create_additions => true
412 + jar.get_cookies('https://localhost/').should have(1).items
413 + end
414 + end
415 +--
416 +1.8.1.6
417 +
418
419 diff --git a/dev-ruby/cookiejar/files/78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch b/dev-ruby/cookiejar/files/78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch
420 new file mode 100644
421 index 0000000..94f998a
422 --- /dev/null
423 +++ b/dev-ruby/cookiejar/files/78d2ca2bbc52b583a37a882d52d71bc15f9c7e48.patch
424 @@ -0,0 +1,75 @@
425 +From 78d2ca2bbc52b583a37a882d52d71bc15f9c7e48 Mon Sep 17 00:00:00 2001
426 +From: Maurice Nonnekes <maurice@×××××××××.nl>
427 +Date: Thu, 26 Jul 2012 22:43:30 +0200
428 +Subject: [PATCH] Add support for multiple cookies in 1 Set-Cookie header
429 +
430 +---
431 + lib/cookiejar/jar.rb | 12 +++++++-----
432 + test/jar_test.rb | 9 +++++++++
433 + 2 files changed, 16 insertions(+), 5 deletions(-)
434 +
435 +diff --git a/lib/cookiejar/jar.rb b/lib/cookiejar/jar.rb
436 +index 40ea684..a0fefa8 100644
437 +--- a/lib/cookiejar/jar.rb
438 ++++ b/lib/cookiejar/jar.rb
439 +@@ -50,15 +50,17 @@ def initialize
440 + end
441 +
442 + # Given a request URI and a literal Set-Cookie header value, attempt to
443 +- # add the cookie to the cookie store.
444 ++ # add the cookie(s) to the cookie store.
445 + #
446 + # @param [String, URI] request_uri the resource returning the header
447 + # @param [String] cookie_header_value the contents of the Set-Cookie
448 + # @return [Cookie] which was created and stored
449 + # @raise [InvalidCookieError] if the cookie header did not validate
450 +- def set_cookie request_uri, cookie_header_value
451 +- cookie = Cookie.from_set_cookie request_uri, cookie_header_value
452 +- add_cookie cookie
453 ++ def set_cookie request_uri, cookie_header_values
454 ++ cookie_header_values.split(/, (?=[\w]+=)/).each do |cookie_header_value|
455 ++ cookie = Cookie.from_set_cookie request_uri, cookie_header_value
456 ++ add_cookie cookie
457 ++ end
458 + end
459 +
460 + # Given a request URI and a literal Set-Cookie2 header value, attempt to
461 +@@ -72,7 +74,7 @@ def set_cookie2 request_uri, cookie_header_value
462 + cookie = Cookie.from_set_cookie2 request_uri, cookie_header_value
463 + add_cookie cookie
464 + end
465 +-
466 ++
467 + # Given a request URI and some HTTP headers, attempt to add the cookie(s)
468 + # (from Set-Cookie or Set-Cookie2 headers) to the cookie store. If a
469 + # cookie is defined (by equivalent name, domain, and path) via Set-Cookie
470 +diff --git a/test/jar_test.rb b/test/jar_test.rb
471 +index 64ec6f3..4252c60 100644
472 +--- a/test/jar_test.rb
473 ++++ b/test/jar_test.rb
474 +@@ -17,6 +17,10 @@
475 + jar.set_cookie 'http://auth.foo.com/', 'foo=bar'
476 + jar.set_cookie 'http://auth.foo.com/', 'auth=135121...;domain=foo.com'
477 + end
478 ++ it "should allow me to set multiple cookies in 1 header" do
479 ++ jar = Jar.new
480 ++ 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'
481 ++ end
482 + end
483 + describe '.get_cookies' do
484 + it "should let me read back cookies which are set" do
485 +@@ -27,6 +31,11 @@
486 + jar.set_cookie 'http://auth.foo.com/', 'auth=135121...;domain=foo.com'
487 + jar.get_cookies('http://foo.com/').should have(3).items
488 + end
489 ++ it "should let me read back a multiple cookies from 1 header" do
490 ++ jar = Jar.new
491 ++ 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'
492 ++ jar.get_cookie_header('http://foo.com/').should == 'last_cookie=098765;my_cookie=123456;other_cookie=helloworld'
493 ++ end
494 + it "should return cookies longest path first" do
495 + jar = Jar.new
496 + uri = 'http://foo.com/a/b/c/d'
497 +--
498 +1.8.1.6
499 +
500
501 diff --git a/dev-ruby/cookiejar/files/f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch b/dev-ruby/cookiejar/files/f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch
502 new file mode 100644
503 index 0000000..05fd8a6
504 --- /dev/null
505 +++ b/dev-ruby/cookiejar/files/f29fd1c79ef79f977240ce97f96d6e7db9b52f0b.patch
506 @@ -0,0 +1,46 @@
507 +From f29fd1c79ef79f977240ce97f96d6e7db9b52f0b Mon Sep 17 00:00:00 2001
508 +From: "chpeck@×××××××××.com" <chpeck@×××××××××.com>
509 +Date: Wed, 7 Jul 2010 22:47:54 -0700
510 +Subject: [PATCH] handle y2k38 bug
511 +
512 +---
513 + lib/cookiejar/cookie_validation.rb | 7 ++++++-
514 + test/cookie_validation_test.rb | 5 +++++
515 + 2 files changed, 11 insertions(+), 1 deletion(-)
516 +
517 +diff --git a/lib/cookiejar/cookie_validation.rb b/lib/cookiejar/cookie_validation.rb
518 +index 2227290..40d3653 100644
519 +--- a/lib/cookiejar/cookie_validation.rb
520 ++++ b/lib/cookiejar/cookie_validation.rb
521 +@@ -308,7 +308,12 @@ def self.parse_set_cookie set_cookie_value
522 + else
523 + case key
524 + when :expires
525 +- args[:expires_at] = Time.parse keyvalue
526 ++ begin
527 ++ args[:expires_at] = Time.parse keyvalue
528 ++ rescue ArgumentError
529 ++ raise unless $!.message == "time out of range"
530 ++ args[:expires_at] = Time.at(0x7FFFFFFF)
531 ++ end
532 + when *[:domain, :path]
533 + args[key] = keyvalue
534 + when :secure
535 +diff --git a/test/cookie_validation_test.rb b/test/cookie_validation_test.rb
536 +index 1484eb5..b66fbdd 100644
537 +--- a/test/cookie_validation_test.rb
538 ++++ b/test/cookie_validation_test.rb
539 +@@ -236,4 +236,9 @@
540 + end
541 + end
542 + end
543 ++ describe '#parse_set_cookie' do
544 ++ it "should max out at 2038 on 32bit systems" do
545 ++ CookieValidation.parse_set_cookie("TRACK_USER_P=98237480810003948000782774;expires=Sat, 30-Jun-2040 05:39:49 GMT;path=/")[:expires_at].to_i.should >= 0x7FFFFFFF
546 ++ end
547 ++ end
548 + end
549 +\ No newline at end of file
550 +--
551 +1.8.1.6
552 +
553
554 diff --git a/dev-ruby/grape/Manifest b/dev-ruby/grape/Manifest
555 new file mode 100644
556 index 0000000..c7b1ccc
557 --- /dev/null
558 +++ b/dev-ruby/grape/Manifest
559 @@ -0,0 +1,2 @@
560 +DIST grape-0.5.0.tar.gz 68609 SHA256 0e78e7d1e393106740e75a4109789ba9c34b18f8eab2fa493bc75ad34502566d SHA512 ecdda5f88c1d5349a8b2a008f03cb4cc538f5caff1b02f6c999fcc01a6c7e0428f46993a48eeaf55878ecefafac65e0f55ec80f6e82bf9459f40dd69b6fe8f7b WHIRLPOOL 657524865633ff74b7a99802672d82ceeb832b9683060e3242bb05754f91df945f500cdb9596db3fd86d98e31c3200cadbb1b71c0111797796ddcb987fb442ef
561 +EBUILD grape-0.5.0.ebuild 1135 SHA256 100e360e107c48773eba57220ff8c9337d1528eb0e81fd8d1e26971d4805c844 SHA512 baaec1f9ae14a5fe098d5ec32b6f1f937a39de526a1b94ae96c5484951d588fc402a9a207071891ab1b480321393a0e275d61c963be28268128fa75781fddc19 WHIRLPOOL b294ed9f06368eb65defdc45e4bad8ac896ae26709ce455860253be6345ba06b8484c585cc03c5041bb0c70fbdd3dd4b2bbc11bad065edee0e5c0ca9497ef262
562
563 diff --git a/dev-ruby/grape/grape-0.5.0.ebuild b/dev-ruby/grape/grape-0.5.0.ebuild
564 new file mode 100644
565 index 0000000..d2597a7
566 --- /dev/null
567 +++ b/dev-ruby/grape/grape-0.5.0.ebuild
568 @@ -0,0 +1,50 @@
569 +# Copyright 1999-2013 Gentoo Foundation
570 +# Distributed under the terms of the GNU General Public License v2
571 +# $Header: $
572 +
573 +EAPI=5
574 +USE_RUBY="ruby19"
575 +
576 +RUBY_FAKEGEM_RECIPE_TEST="rspec"
577 +RUBY_FAKEGEM_RECIPE_DOC="none"
578 +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
579 +RUBY_FAKEGEM_DOCDIR="doc"
580 +
581 +inherit ruby-fakegem
582 +
583 +DESCRIPTION="An opinionated micro-framework for creating REST-like APIs in Ruby."
584 +HOMEPAGE="https://github.com/intridea/grape"
585 +SRC_URI="https://github.com/intridea/grape/archive/v${PV}.tar.gz -> ${P}.tar.gz"
586 +
587 +LICENSE="MIT"
588 +SLOT="0"
589 +KEYWORDS="~amd64"
590 +IUSE="doc"
591 +
592 +ruby_add_rdepend "
593 + dev-ruby/activesupport
594 + dev-ruby/builder
595 + >=dev-ruby/hashie-1.2
596 + >=dev-ruby/multi_json-1.3.2
597 + >=dev-ruby/multi_xml-0.5.2
598 + >=dev-ruby/rack-1.3.0
599 + dev-ruby/rack-accept
600 + dev-ruby/rack-mount
601 + dev-ruby/virtus"
602 +ruby_add_bdepend "doc? ( dev-ruby/yard dev-ruby/maruku )
603 + test? ( dev-ruby/cookiejar dev-ruby/rack-test dev-ruby/rack-contrib )"
604 +
605 +all_ruby_prepare() {
606 + sed -i \
607 + -e '/[Bb]undler/d' \
608 + -e '/pry/d' \
609 + spec/spec_helper.rb || die "sed failed"
610 +}
611 +
612 +all_ruby_compile() {
613 + all_fakegem_compile
614 +
615 + if use doc ; then
616 + yard || die "yard failed"
617 + fi
618 +}
619
620 diff --git a/dev-ruby/rack-contrib/Manifest b/dev-ruby/rack-contrib/Manifest
621 new file mode 100644
622 index 0000000..7383143
623 --- /dev/null
624 +++ b/dev-ruby/rack-contrib/Manifest
625 @@ -0,0 +1,2 @@
626 +DIST rack-contrib-1.1.0.tar.gz 35517 SHA256 180bbbc291a8de2b3dc4009f55aa1cc0b6155f1987064d7372fbe54f63123152 SHA512 399cf899eeb8f3b4280ec6e938e02ec701ef276b653f23d004e51ca80d6a9871cc51937f6d201531de0b992f75a5cfeb4e5a0b0ad65c29604820c95ed48060b9 WHIRLPOOL 5bce01200e5c1c1dfd20ce2378f0d7dcac5eafa04dd7bac74960984c2d1e5bd1ebdf9025cbcaaa5f1d7ac6a87421b8cbb9ffc8a4855c72c263ea8d7bedcc7987
627 +EBUILD rack-contrib-1.1.0.ebuild 951 SHA256 61883425dc62de85e7fe2edaa2d7fa73fabfd4dea6d9b597c3510260d20961ad SHA512 4c5e0be87ec4cdac20e0d04169d9c1a46c9902e5deef8c121a917141b6c9c0207e033bef5b62ce05341b1e1468e193902eb71e8f45a1674cbbe9c553ea71b308 WHIRLPOOL c93e9a367da705cc1290ad1ce6386c316de8b8a8bd95d54985c6d7541513110adbf2ec15f249e424cec41a04fc65eeb7cd63740e5d9ac11fb68c4999205ecb50
628
629 diff --git a/dev-ruby/rack-contrib/rack-contrib-1.1.0.ebuild b/dev-ruby/rack-contrib/rack-contrib-1.1.0.ebuild
630 new file mode 100644
631 index 0000000..a4f1505
632 --- /dev/null
633 +++ b/dev-ruby/rack-contrib/rack-contrib-1.1.0.ebuild
634 @@ -0,0 +1,31 @@
635 +# Copyright 1999-2013 Gentoo Foundation
636 +# Distributed under the terms of the GNU General Public License v2
637 +# $Header: $
638 +
639 +EAPI=5
640 +USE_RUBY="ruby18 ruby19"
641 +
642 +RUBY_FAKEGEM_RECIPE_TEST="rake"
643 +RUBY_FAKEGEM_RECIPE_DOC="rdoc"
644 +RUBY_FAKEGEM_EXTRADOC="AUTHORS README.rdoc"
645 +
646 +inherit ruby-fakegem
647 +
648 +DESCRIPTION="Contributed Rack Middleware and Utilities"
649 +HOMEPAGE="https://github.com/rack/rack-contrib"
650 +SRC_URI="https://github.com/rack/rack-contrib/archive/${PV}.tar.gz -> ${P}.tar.gz"
651 +
652 +LICENSE="MIT"
653 +SLOT="0"
654 +KEYWORDS="~amd64"
655 +IUSE="doc"
656 +
657 +ruby_add_rdepend ">=dev-ruby/rack-0.9.1"
658 +ruby_add_bdepend "test? ( dev-ruby/test-spec dev-ruby/tmail )"
659 +
660 +# there is something wrong with test-unit or test-spec:
661 +# most tests succeed when run on their own (specrb -Ilib:test -w test/...)
662 +# but when run together, I get this:
663 +# .../collector.rb:48:in `sort_by': comparison of Array with Array failed (ArgumentError)
664 +# for example the speck_rack_c* group of tests
665 +RESTRICT="test"
666
667 diff --git a/dev-ruby/virtus/Manifest b/dev-ruby/virtus/Manifest
668 new file mode 100644
669 index 0000000..5ae7b1a
670 --- /dev/null
671 +++ b/dev-ruby/virtus/Manifest
672 @@ -0,0 +1,2 @@
673 +DIST virtus-0.5.5.gem 56320 SHA256 b7de2f3be82838065033e5d1b7e93dc5ed913f1acb78a920badb8e0eb696c54f SHA512 90aa31d8b394ff2748befc650495c443d2078e992c155544108f24c0525e2c3234e90d2f1fba418500ebb3ccc6816602196ca146262a48b72b68b7ea8d7833fc WHIRLPOOL 6d241b1cbf0d0486cda828474f905074f3152ba575d081e8111c10d9aa03060304a0e10a59d0068259c488105d41884864cc122e801d6f9a8533b55639d71cbb
674 +EBUILD virtus-0.5.5.ebuild 971 SHA256 3c0990981cd8bcd3ed8f2c02b76f3aca368c27e46b4d8a630754fec17a77a001 SHA512 20fd26685367c2f1dfd939b97625679669cf6ff6b4bb94628ec0896187c9af1d1c495737299c25e020e8b5208cecff105434386f8950266e675d39e2f9a79592 WHIRLPOOL 74f326451db928e9284617b5cf14bdf64c953c750af023be0a1d1f7f2285bdbc3fa581fd0d33594b5c76392ae9d7adbb717e1b3086c5141bc4ffb4bcca916b7d
675
676 diff --git a/dev-ruby/virtus/virtus-0.5.5.ebuild b/dev-ruby/virtus/virtus-0.5.5.ebuild
677 new file mode 100644
678 index 0000000..10f35f6
679 --- /dev/null
680 +++ b/dev-ruby/virtus/virtus-0.5.5.ebuild
681 @@ -0,0 +1,40 @@
682 +# Copyright 1999-2013 Gentoo Foundation
683 +# Distributed under the terms of the GNU General Public License v2
684 +# $Header: $
685 +
686 +EAPI=5
687 +USE_RUBY="ruby19"
688 +
689 +RUBY_FAKEGEM_RECIPE_TEST="rspec"
690 +RUBY_FAKEGEM_RECIPE_DOC="none"
691 +RUBY_FAKEGEM_EXTRADOC="Changelog.md README.md"
692 +RUBY_FAKEGEM_DOCDIR="doc"
693 +
694 +inherit ruby-fakegem
695 +
696 +DESCRIPTION="Attributes on Steroids for Plain Old Ruby Objects"
697 +HOMEPAGE="https://github.com/solnic/virtus"
698 +#SRC_URI="https://github.com/solnic/virtus/archive/v${PV}.tar.gz -> ${P}.tar.gz"
699 +# no 0.5.5 tag on github
700 +
701 +LICENSE="MIT"
702 +SLOT="0"
703 +KEYWORDS="~amd64"
704 +IUSE="doc"
705 +
706 +ruby_add_rdepend ">=dev-ruby/descendants_tracker-0.0.1"
707 +ruby_add_bdepend "doc? ( dev-ruby/yard )"
708 +
709 +all_ruby_prepare() {
710 + # backports only needed with ruby <=1.8
711 + sed -i -e '/backports/d' lib/virtus.rb ${PN}.gemspec || die "sed failed"
712 + sed -i -e '/backports/,+15d' ../metadata || die "sed failed"
713 +}
714 +
715 +all_ruby_compile() {
716 + all_fakegem_compile
717 +
718 + if use doc ; then
719 + yard || die "yard failed"
720 + fi
721 +}