public
Description: URITemplate is a parser for URI Templates as defined in the URI Template specification (http://bitworking.org/projects/URI-Templates).
Homepage: http://uri-templates.rubyforge.org/
Clone URL: git://github.com/juretta/uri-templates.git
structuring the gem files
juretta (author)
Fri Mar 14 01:54:08 -0700 2008
commit  c6641686e4add86146eed869d04995f3cd06e799
tree    b10f1375069499dfcc396d84779864bb4056193e
parent  9a400c2995f9578162c7369a6f7891c6af948f3a
...
1
2
3
4
5
6
...
28
29
30
31
32
33
34
35
36
 
37
38
39
...
1
 
 
2
3
4
...
26
27
28
 
29
30
31
 
32
33
34
35
36
0
@@ -1,6 +1,4 @@
0
 #--
0
-# $Id$
0
-#
0
 # Copyright (C) 2007, 2008 by Stefan Saasen <s@juretta.com>
0
 #
0
 # Permission is hereby granted, free of charge, to any person obtaining
0
@@ -28,12 +26,11 @@ require 'cgi'
0
 
0
 Dir[File.join(File.dirname(__FILE__), 'uri_template/**/*.rb')].sort.each { |lib| require lib }
0
 
0
-
0
 module UriTemplate
0
   class Encoder
0
     RESERVED = %r{:/?#\[\]@!$&'()\*\+,;=}
0
- class << self
0
     
0
+ class << self
0
       def unreserved(c)
0
         (c >= ?a and c <= ?z) or (c >= ?A and c <= ?Z) or (c >= ?0 and c <= ?9) or (c.chr !~ RESERVED)
0
       end
...
1
 
 
 
 
2
3
4
5
6
7
 
8
9
10
...
 
1
2
3
4
5
6
7
8
9
 
10
11
12
13
0
@@ -1,10 +1,13 @@
0
-class NilClass
0
+# Created by Stefan Saasen.
0
+# Copyright (c) 2008. All rights reserved.
0
+
0
+class NilClass #:nodoc:
0
   def blank?
0
     true
0
   end
0
 end
0
 
0
-class String
0
+class String #:nodoc:
0
   def ord
0
     self[0]
0
   end
...
 
 
 
 
1
2
3
...
1
2
3
4
5
6
7
0
@@ -1,3 +1,7 @@
0
+# Created by Stefan Saasen.
0
+# Copyright (c) 2008. All rights reserved.
0
+#
0
+# ! This file is generated from
0
 module UriTemplate
0
   include Treetop::Runtime
0
 
...
 
 
1
2
3
...
1
2
3
4
5
0
@@ -1,3 +1,5 @@
0
+# Created by Stefan Saasen.
0
+# Copyright (c) 2008. All rights reserved.
0
 module UriTemplate
0
   module VERSION #:nodoc:
0
     MAJOR = 0
...
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
114
115
...
97
98
99
 
 
 
 
 
 
 
 
 
 
 
 
 
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
0
@@ -97,19 +97,20 @@ class TestUriTemplateGrammar < Test::Unit::TestCase
0
     assert_equal "http://example.org/news/joe/", @parser.parse("http://example.org/news/{id}/").value("id" => "joe")
0
   end
0
   
0
- # +----------+--------------------+
0
- # | Name | Value |
0
- # +----------+--------------------+
0
- # | a | foo |
0
- # | b | bar |
0
- # | data | 10,20,30 |
0
- # | points | ["10","20", "30"] |
0
- # | list0 | [] |
0
- # | str0 | |
0
- # | reserved | :/?#[]@!$&'()*+,;= |
0
- # | u | \u2654\u2655 |
0
- # | a_b | baz |
0
- # +----------+--------------------+
0
+ # +----------+--------------------+
0
+ # | Name | Value |
0
+ # +----------+--------------------+
0
+ # | a | foo |
0
+ # | b | bar |
0
+ # | data | 10,20,30 |
0
+ # | points | ["10","20", "30"] |
0
+ # | list0 | [] |
0
+ # | str0 | |
0
+ # | reserved | :/?#[]@!$&'()*+,;= |
0
+ # | u | \u2654\u2655 |
0
+ # | a_b | baz |
0
+ # +----------+--------------------+
0
+ #
0
   # The name 'foo' has not been defined, the value of 'str0' is the empty
0
   # string, and both list0 and points are lists. The variable 'u' is a
0
   # string of two unicode characters, the WHITE CHESS KING (0x2654) and

Comments

    No one has commented yet.