rack-oauth2-server 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -0
- data/Gemfile +0 -2
- data/Rakefile +16 -5
- data/VERSION +1 -1
- data/bin/oauth2-server +5 -6
- data/lib/rack/oauth2/admin/css/screen.css +8 -2
- data/lib/rack/oauth2/admin/js/jquery.tools.js +24 -0
- data/lib/rack/oauth2/admin/views/edit.tmpl +4 -4
- data/lib/rack/oauth2/server/railtie.rb +25 -0
- data/rails/init.rb +1 -0
- data/test/{rails → rails2}/app/controllers/api_controller.rb +0 -0
- data/test/{rails → rails2}/app/controllers/application_controller.rb +0 -0
- data/test/{rails → rails2}/app/controllers/oauth_controller.rb +0 -0
- data/test/{rails → rails2}/config/environment.rb +6 -0
- data/test/{rails → rails2}/config/environments/test.rb +0 -0
- data/test/{rails → rails2}/config/routes.rb +0 -0
- data/test/{rails → rails2}/log/test.log +11636 -0
- data/test/rails3/app/controllers/api_controller.rb +40 -0
- data/test/rails3/app/controllers/application_controller.rb +2 -0
- data/test/rails3/app/controllers/oauth_controller.rb +17 -0
- data/test/rails3/config/application.rb +20 -0
- data/test/rails3/config/environment.rb +2 -0
- data/test/rails3/config/routes.rb +12 -0
- data/test/rails3/log/test.log +34556 -0
- data/test/setup.rb +34 -17
- metadata +21 -12
data/test/setup.rb
CHANGED
@@ -7,6 +7,7 @@ require "timecop"
|
|
7
7
|
require "ap"
|
8
8
|
require "json"
|
9
9
|
$: << File.dirname(__FILE__) + "/../lib"
|
10
|
+
$: << File.expand_path(File.dirname(__FILE__) + "/..")
|
10
11
|
require "rack/oauth2/server"
|
11
12
|
|
12
13
|
|
@@ -37,29 +38,45 @@ when "sinatra", nil
|
|
37
38
|
|
38
39
|
when "rails"
|
39
40
|
|
40
|
-
require "initializer"
|
41
|
-
require "action_controller"
|
42
|
-
RAILS_ROOT = File.dirname(__FILE__) + "/rails"
|
43
41
|
RAILS_ENV = "test"
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
end
|
42
|
+
RAILS_ROOT = File.dirname(__FILE__) + "/rails3"
|
43
|
+
begin
|
44
|
+
require "rails"
|
45
|
+
rescue LoadError
|
49
46
|
end
|
50
|
-
|
51
|
-
|
47
|
+
|
48
|
+
if defined?(Rails::Railtie)
|
49
|
+
# Rails 3.x
|
50
|
+
require "rack/oauth2/server/railtie"
|
51
|
+
require File.dirname(__FILE__) + "/rails3/config/environment"
|
52
|
+
puts "Testing with Rails #{Rails.version}"
|
52
53
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
class Test::Unit::TestCase
|
55
|
+
def app
|
56
|
+
Rails.application
|
57
|
+
end
|
57
58
|
|
58
|
-
|
59
|
+
def config
|
60
|
+
Rails.configuration.oauth
|
61
|
+
end
|
59
62
|
end
|
60
63
|
|
61
|
-
|
62
|
-
|
64
|
+
else
|
65
|
+
# Rails 2.x
|
66
|
+
RAILS_ROOT = File.dirname(__FILE__) + "/rails2"
|
67
|
+
require "initializer"
|
68
|
+
require "action_controller"
|
69
|
+
require File.dirname(__FILE__) + "/rails2/config/environment"
|
70
|
+
puts "Testing with Rails #{Rails.version}"
|
71
|
+
|
72
|
+
class Test::Unit::TestCase
|
73
|
+
def app
|
74
|
+
ActionController::Dispatcher.new
|
75
|
+
end
|
76
|
+
|
77
|
+
def config
|
78
|
+
Rails.configuration.oauth
|
79
|
+
end
|
63
80
|
end
|
64
81
|
end
|
65
82
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-oauth2-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 1.4.
|
9
|
+
- 6
|
10
|
+
version: 1.4.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Assaf Arkin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-14 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -93,6 +93,7 @@ files:
|
|
93
93
|
- lib/rack/oauth2/admin/js/application.js
|
94
94
|
- lib/rack/oauth2/admin/js/jquery.js
|
95
95
|
- lib/rack/oauth2/admin/js/jquery.tmpl.js
|
96
|
+
- lib/rack/oauth2/admin/js/jquery.tools.js
|
96
97
|
- lib/rack/oauth2/admin/js/sammy.js
|
97
98
|
- lib/rack/oauth2/admin/js/sammy.json.js
|
98
99
|
- lib/rack/oauth2/admin/js/sammy.storage.js
|
@@ -114,6 +115,7 @@ files:
|
|
114
115
|
- lib/rack/oauth2/rails.rb
|
115
116
|
- lib/rack/oauth2/server/errors.rb
|
116
117
|
- lib/rack/oauth2/server/helper.rb
|
118
|
+
- lib/rack/oauth2/server/railtie.rb
|
117
119
|
- lib/rack/oauth2/server/utils.rb
|
118
120
|
- lib/rack/oauth2/server.rb
|
119
121
|
- lib/rack/oauth2/sinatra.rb
|
@@ -124,13 +126,20 @@ files:
|
|
124
126
|
- test/oauth/access_grant_test.rb
|
125
127
|
- test/oauth/access_token_test.rb
|
126
128
|
- test/oauth/authorization_test.rb
|
127
|
-
- test/
|
128
|
-
- test/
|
129
|
-
- test/
|
130
|
-
- test/
|
131
|
-
- test/
|
132
|
-
- test/
|
133
|
-
- test/
|
129
|
+
- test/rails2/app/controllers/api_controller.rb
|
130
|
+
- test/rails2/app/controllers/application_controller.rb
|
131
|
+
- test/rails2/app/controllers/oauth_controller.rb
|
132
|
+
- test/rails2/config/environment.rb
|
133
|
+
- test/rails2/config/environments/test.rb
|
134
|
+
- test/rails2/config/routes.rb
|
135
|
+
- test/rails2/log/test.log
|
136
|
+
- test/rails3/app/controllers/api_controller.rb
|
137
|
+
- test/rails3/app/controllers/application_controller.rb
|
138
|
+
- test/rails3/app/controllers/oauth_controller.rb
|
139
|
+
- test/rails3/config/application.rb
|
140
|
+
- test/rails3/config/environment.rb
|
141
|
+
- test/rails3/config/routes.rb
|
142
|
+
- test/rails3/log/test.log
|
134
143
|
- test/setup.rb
|
135
144
|
- test/sinatra/my_app.rb
|
136
145
|
- CHANGELOG
|
@@ -147,7 +156,7 @@ licenses: []
|
|
147
156
|
post_install_message: To get started, run the command oauth2-server
|
148
157
|
rdoc_options:
|
149
158
|
- --title
|
150
|
-
- rack-oauth2-server 1.4.
|
159
|
+
- rack-oauth2-server 1.4.6
|
151
160
|
- --main
|
152
161
|
- README.rdoc
|
153
162
|
- --webcvs
|