twitter-auth 0.1.11 → 0.1.12
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/README.markdown +7 -0
- data/VERSION.yml +2 -2
- data/lib/twitter_auth/dispatcher/basic.rb +1 -1
- data/lib/twitter_auth/dispatcher/oauth.rb +2 -1
- data/lib/twitter_auth/dispatcher/shared.rb +6 -0
- data/spec/debug.log +5368 -0
- data/spec/twitter_auth/dispatcher/shared_spec.rb +26 -0
- metadata +4 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
2
|
+
|
|
3
|
+
describe TwitterAuth::Dispatcher::Shared do
|
|
4
|
+
include TwitterAuth::Dispatcher::Shared
|
|
5
|
+
|
|
6
|
+
describe '#append_extension_to' do
|
|
7
|
+
it 'should leave extensions alone if they exist' do
|
|
8
|
+
append_extension_to('/fake.json').should == '/fake.json'
|
|
9
|
+
append_extension_to('/fake.xml').should == '/fake.xml'
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
it 'should append .json if no extension is provided' do
|
|
13
|
+
append_extension_to('/fake').should == '/fake.json'
|
|
14
|
+
append_extension_to('/verify/fake').should == '/verify/fake.json'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'should leave extensions alone even with query strings' do
|
|
18
|
+
append_extension_to('/fake.json?since_id=123').should == '/fake.json?since_id=123'
|
|
19
|
+
append_extension_to('/fake.xml?since_id=123').should == '/fake.xml?since_id=123'
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'should add an extension even with query strings' do
|
|
23
|
+
append_extension_to('/fake?since_id=123').should == '/fake.json?since_id=123'
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twitter-auth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Bleigh
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-03-
|
|
12
|
+
date: 2009-03-27 00:00:00 -04:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -62,6 +62,7 @@ files:
|
|
|
62
62
|
- spec/controllers
|
|
63
63
|
- spec/controllers/controller_extensions_spec.rb
|
|
64
64
|
- spec/controllers/sessions_controller_spec.rb
|
|
65
|
+
- spec/debug.log
|
|
65
66
|
- spec/fixtures
|
|
66
67
|
- spec/fixtures/config
|
|
67
68
|
- spec/fixtures/config/twitter_auth.yml
|
|
@@ -81,6 +82,7 @@ files:
|
|
|
81
82
|
- spec/twitter_auth/dispatcher
|
|
82
83
|
- spec/twitter_auth/dispatcher/basic_spec.rb
|
|
83
84
|
- spec/twitter_auth/dispatcher/oauth_spec.rb
|
|
85
|
+
- spec/twitter_auth/dispatcher/shared_spec.rb
|
|
84
86
|
- spec/twitter_auth_spec.rb
|
|
85
87
|
- config/routes.rb
|
|
86
88
|
- app/controllers
|