rack-rest_api_versioning 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -0
- data/VERSION +1 -1
- data/lib/rack/rest_api_versioning.rb +8 -0
- data/test/request_test.rb +13 -0
- data/test/rest_api_versioning_test.rb +1 -5
- data/test/test_helper.rb +5 -0
- metadata +8 -3
data/.gitignore
ADDED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/test_helper'
|
2
|
+
|
3
|
+
class RequestTest < Test::Unit::TestCase
|
4
|
+
def test_api_version
|
5
|
+
request = Rack::Request.new('api_version' => '1.2.3')
|
6
|
+
assert_equal '1.2.3', request.api_version
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_api_version_is_nil_if_not_present
|
10
|
+
request = Rack::Request.new({})
|
11
|
+
assert_nil request.api_version
|
12
|
+
end
|
13
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- "Adam Cig\xC3\xA1nek"
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-09 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -38,11 +38,14 @@ extensions: []
|
|
38
38
|
extra_rdoc_files:
|
39
39
|
- README.rdoc
|
40
40
|
files:
|
41
|
+
- .gitignore
|
41
42
|
- README.rdoc
|
42
43
|
- Rakefile
|
43
44
|
- VERSION
|
44
45
|
- lib/rack/rest_api_versioning.rb
|
46
|
+
- test/request_test.rb
|
45
47
|
- test/rest_api_versioning_test.rb
|
48
|
+
- test/test_helper.rb
|
46
49
|
has_rdoc: true
|
47
50
|
homepage: http://github.com/madadam/rack-rest_api_versioning
|
48
51
|
licenses: []
|
@@ -75,3 +78,5 @@ specification_version: 3
|
|
75
78
|
summary: A Rack middleware to support "the proper way" to version a RESTful API.
|
76
79
|
test_files:
|
77
80
|
- test/rest_api_versioning_test.rb
|
81
|
+
- test/test_helper.rb
|
82
|
+
- test/request_test.rb
|