ruby-mojeid 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +22 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/examples/README +32 -0
- data/examples/rails_openid/Gemfile +7 -0
- data/examples/rails_openid/Gemfile.lock +41 -0
- data/examples/rails_openid/README +153 -0
- data/examples/rails_openid/Rakefile +10 -0
- data/examples/rails_openid/app/controllers/application_controller.rb +4 -0
- data/examples/rails_openid/app/controllers/consumer_controller.rb +79 -0
- data/examples/rails_openid/app/views/consumer/index.rhtml +88 -0
- data/examples/rails_openid/app/views/layouts/server.rhtml +68 -0
- data/examples/rails_openid/config/boot.rb +125 -0
- data/examples/rails_openid/config/database.sample.yml +14 -0
- data/examples/rails_openid/config/environment.rb +56 -0
- data/examples/rails_openid/config/environments/development.rb +16 -0
- data/examples/rails_openid/config/environments/production.rb +19 -0
- data/examples/rails_openid/config/environments/test.rb +19 -0
- data/examples/rails_openid/config/preinitializer.rb +20 -0
- data/examples/rails_openid/config/routes.rb +19 -0
- data/examples/rails_openid/public/.htaccess +40 -0
- data/examples/rails_openid/public/404.html +8 -0
- data/examples/rails_openid/public/500.html +8 -0
- data/examples/rails_openid/public/dispatch.cgi +12 -0
- data/examples/rails_openid/public/dispatch.fcgi +26 -0
- data/examples/rails_openid/public/dispatch.rb +12 -0
- data/examples/rails_openid/public/favicon.ico +0 -0
- data/examples/rails_openid/public/images/openid_login_bg.gif +0 -0
- data/examples/rails_openid/public/javascripts/controls.js +750 -0
- data/examples/rails_openid/public/javascripts/dragdrop.js +584 -0
- data/examples/rails_openid/public/javascripts/effects.js +854 -0
- data/examples/rails_openid/public/javascripts/prototype.js +1785 -0
- data/examples/rails_openid/public/robots.txt +1 -0
- data/examples/rails_openid/script/about +3 -0
- data/examples/rails_openid/script/breakpointer +3 -0
- data/examples/rails_openid/script/console +3 -0
- data/examples/rails_openid/script/destroy +3 -0
- data/examples/rails_openid/script/generate +3 -0
- data/examples/rails_openid/script/performance/benchmarker +3 -0
- data/examples/rails_openid/script/performance/profiler +3 -0
- data/examples/rails_openid/script/plugin +3 -0
- data/examples/rails_openid/script/process/reaper +3 -0
- data/examples/rails_openid/script/process/spawner +3 -0
- data/examples/rails_openid/script/process/spinner +3 -0
- data/examples/rails_openid/script/runner +3 -0
- data/examples/rails_openid/script/server +3 -0
- data/examples/rails_openid/test/functional/login_controller_test.rb +18 -0
- data/examples/rails_openid/test/functional/server_controller_test.rb +18 -0
- data/examples/rails_openid/test/test_helper.rb +28 -0
- data/lib/available_attributes.rb +69 -0
- data/lib/ruby-mojeid.rb +106 -0
- data/ruby-mojeid.gemspec +130 -0
- data/test/helper.rb +18 -0
- data/test/test_ruby-mojeid.rb +7 -0
- metadata +230 -0
@@ -0,0 +1 @@
|
|
1
|
+
# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'login_controller'
|
3
|
+
|
4
|
+
# Re-raise errors caught by the controller.
|
5
|
+
class LoginController; def rescue_action(e) raise e end; end
|
6
|
+
|
7
|
+
class LoginControllerTest < Test::Unit::TestCase
|
8
|
+
def setup
|
9
|
+
@controller = LoginController.new
|
10
|
+
@request = ActionController::TestRequest.new
|
11
|
+
@response = ActionController::TestResponse.new
|
12
|
+
end
|
13
|
+
|
14
|
+
# Replace this with your real tests.
|
15
|
+
def test_truth
|
16
|
+
assert true
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'server_controller'
|
3
|
+
|
4
|
+
# Re-raise errors caught by the controller.
|
5
|
+
class ServerController; def rescue_action(e) raise e end; end
|
6
|
+
|
7
|
+
class ServerControllerTest < Test::Unit::TestCase
|
8
|
+
def setup
|
9
|
+
@controller = ServerController.new
|
10
|
+
@request = ActionController::TestRequest.new
|
11
|
+
@response = ActionController::TestResponse.new
|
12
|
+
end
|
13
|
+
|
14
|
+
# Replace this with your real tests.
|
15
|
+
def test_truth
|
16
|
+
assert true
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
3
|
+
require 'test_help'
|
4
|
+
|
5
|
+
class Test::Unit::TestCase
|
6
|
+
# Transactional fixtures accelerate your tests by wrapping each test method
|
7
|
+
# in a transaction that's rolled back on completion. This ensures that the
|
8
|
+
# test database remains unchanged so your fixtures don't have to be reloaded
|
9
|
+
# between every test method. Fewer database queries means faster tests.
|
10
|
+
#
|
11
|
+
# Read Mike Clark's excellent walkthrough at
|
12
|
+
# http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
|
13
|
+
#
|
14
|
+
# Every Active Record database supports transactions except MyISAM tables
|
15
|
+
# in MySQL. Turn off transactional fixtures in this case; however, if you
|
16
|
+
# don't care one way or the other, switching from MyISAM to InnoDB tables
|
17
|
+
# is recommended.
|
18
|
+
self.use_transactional_fixtures = true
|
19
|
+
|
20
|
+
# Instantiated fixtures are slow, but give you @david where otherwise you
|
21
|
+
# would need people(:david). If you don't want to migrate your existing
|
22
|
+
# test cases which use the @david style and don't mind the speed hit (each
|
23
|
+
# instantiated fixtures translates to a database query per test method),
|
24
|
+
# then set this back to true.
|
25
|
+
self.use_instantiated_fixtures = false
|
26
|
+
|
27
|
+
# Add more helper methods to be used by all tests here...
|
28
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
#for more informations about attributes look at http://www.mojeid.cz/page/800/jak-zavest-mojeid-/
|
2
|
+
|
3
|
+
module MojeIDAttributes
|
4
|
+
AVAILABLE_ATTRIBUTES = %w(
|
5
|
+
http://axschema.org/namePerson
|
6
|
+
http://axschema.org/namePerson/first
|
7
|
+
http://axschema.org/namePerson/last
|
8
|
+
http://axschema.org/namePerson/friendly
|
9
|
+
http://axschema.org/company/name
|
10
|
+
http://axschema.org/contact/postalAddress/home
|
11
|
+
http://axschema.org/contact/postalAddressAdditional/
|
12
|
+
http://specs.nic.cz/attr/addr/main/street3
|
13
|
+
http://axschema.org/contact/city/home
|
14
|
+
http://axschema.org/contact/state/home
|
15
|
+
http://axschema.org/contact/country/home
|
16
|
+
http://axschema.org/contact/postalCode/home
|
17
|
+
http://specs.nic.cz/attr/addr/bill/street
|
18
|
+
http://specs.nic.cz/attr/addr/bill/street2
|
19
|
+
http://specs.nic.cz/attr/addr/bill/street3
|
20
|
+
http://specs.nic.cz/attr/addr/bill/city
|
21
|
+
http://specs.nic.cz/attr/addr/bill/sp
|
22
|
+
http://specs.nic.cz/attr/addr/bill/cc
|
23
|
+
http://specs.nic.cz/attr/addr/bill/pc
|
24
|
+
http://specs.nic.cz/attr/addr/ship/street
|
25
|
+
http://specs.nic.cz/attr/addr/ship/street2
|
26
|
+
http://specs.nic.cz/attr/addr/ship/street3
|
27
|
+
http://specs.nic.cz/attr/addr/ship/city
|
28
|
+
http://specs.nic.cz/attr/addr/ship/sp
|
29
|
+
http://specs.nic.cz/attr/addr/ship/cc
|
30
|
+
http://specs.nic.cz/attr/addr/ship/pc
|
31
|
+
http://specs.nic.cz/attr/addr/mail/street
|
32
|
+
http://specs.nic.cz/attr/addr/mail/street2
|
33
|
+
http://specs.nic.cz/attr/addr/mail/street3
|
34
|
+
http://specs.nic.cz/attr/addr/mail/city
|
35
|
+
http://specs.nic.cz/attr/addr/mail/sp
|
36
|
+
http://specs.nic.cz/attr/addr/mail/cc
|
37
|
+
http://specs.nic.cz/attr/addr/mail/pc
|
38
|
+
http://axschema.org/contact/phone/default
|
39
|
+
http://axschema.org/contact/phone/home
|
40
|
+
http://axschema.org/contact/phone/business
|
41
|
+
http://axschema.org/contact/phone/cell
|
42
|
+
http://axschema.org/contact/phone/fax
|
43
|
+
http://axschema.org/contact/email
|
44
|
+
http://specs.nic.cz/attr/email/notify
|
45
|
+
http://specs.nic.cz/attr/email/next
|
46
|
+
http://axschema.org/contact/web/default
|
47
|
+
http://axschema.org/contact/web/blog
|
48
|
+
http://specs.nic.cz/attr/url/personal
|
49
|
+
http://specs.nic.cz/attr/url/work
|
50
|
+
http://specs.nic.cz/attr/url/rss
|
51
|
+
http://specs.nic.cz/attr/url/facebook
|
52
|
+
http://specs.nic.cz/attr/url/twitter
|
53
|
+
http://specs.nic.cz/attr/url/linkedin
|
54
|
+
http://axschema.org/contact/IM/ICQ
|
55
|
+
http://axschema.org/contact/IM/Jabber
|
56
|
+
http://axschema.org/contact/IM/Skype
|
57
|
+
http://specs.nic.cz/attr/im/google_talk
|
58
|
+
http://specs.nic.cz/attr/im/windows_live
|
59
|
+
http://specs.nic.cz/attr/contact/ident/vat_id
|
60
|
+
http://specs.nic.cz/attr/contact/vat
|
61
|
+
http://specs.nic.cz/attr/contact/ident/card
|
62
|
+
http://specs.nic.cz/attr/contact/ident/pass
|
63
|
+
http://specs.nic.cz/attr/contact/ident/ssn
|
64
|
+
http://specs.nic.cz/attr/contact/student
|
65
|
+
http://specs.nic.cz/attr/contact/valid
|
66
|
+
http://specs.nic.cz/attr/contact/adult
|
67
|
+
http://specs.nic.cz/attr/contact/image
|
68
|
+
)
|
69
|
+
end
|
data/lib/ruby-mojeid.rb
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
require 'openid'
|
2
|
+
require 'openid/extensions/ax'
|
3
|
+
require 'available_attributes'
|
4
|
+
|
5
|
+
class MojeID
|
6
|
+
attr_accessor :moje_id_request, :moje_id_response, :fetch_request, :fetch_response, :realm, :return_to
|
7
|
+
|
8
|
+
def self.fetch_request(consumer, openid_identifier, request_type = :get)
|
9
|
+
moje_id = MojeID.new
|
10
|
+
moje_id.moje_id_request = consumer.begin(openid_identifier)
|
11
|
+
moje_id.set_fetch_request_by_type(request_type)
|
12
|
+
moje_id
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.fetch_response(consumer, params, request, current_url, request_type = :get)
|
16
|
+
moje_id = MojeID.new
|
17
|
+
parameters = params.reject{|k,v| request.path_parameters[k]}
|
18
|
+
moje_id.fetch_response = consumer.complete(parameters, current_url)
|
19
|
+
moje_id.set_response_by_type(request_type) if moje_id.response_status == OpenID::Consumer::SUCCESS
|
20
|
+
moje_id
|
21
|
+
end
|
22
|
+
|
23
|
+
def response_status
|
24
|
+
fetch_response.status
|
25
|
+
end
|
26
|
+
|
27
|
+
def identifier
|
28
|
+
fetch_response.display_identifier
|
29
|
+
end
|
30
|
+
|
31
|
+
def message
|
32
|
+
fetch_response.display_identifier
|
33
|
+
end
|
34
|
+
|
35
|
+
def data
|
36
|
+
(!moje_id_response.nil? && moje_id_response.respond_to?('data') ) ? moje_id_response.data : {}
|
37
|
+
end
|
38
|
+
|
39
|
+
def add_attributes(attributes = [])
|
40
|
+
attributes.each{ |attribute| add_attribute(attribute)}
|
41
|
+
end
|
42
|
+
|
43
|
+
def update_attributes(data = {})
|
44
|
+
data.each{ |attribute,value| set_attribute(attribute, value)}
|
45
|
+
end
|
46
|
+
|
47
|
+
def add_additional_data(data = {})
|
48
|
+
data.each{|k,v| moje_id_request.return_to_args[k.to_s] = v}
|
49
|
+
bundle_to_request
|
50
|
+
end
|
51
|
+
|
52
|
+
def send_redirect?(immediate = false)
|
53
|
+
moje_id_request.send_redirect?(realm, return_to, immediate)
|
54
|
+
end
|
55
|
+
|
56
|
+
def redirect_url(immediate = false)
|
57
|
+
moje_id_request.redirect_url(realm, return_to, immediate)
|
58
|
+
end
|
59
|
+
|
60
|
+
def html_markup(realm, return_to, immediate = false, form_tag_attrs = {})
|
61
|
+
moje_id_request.html_markup(realm, return_to, immediate, form_tag_attrs)
|
62
|
+
end
|
63
|
+
|
64
|
+
def get_attribute_value(attribute)
|
65
|
+
data[attribute]
|
66
|
+
end
|
67
|
+
|
68
|
+
def set_fetch_request_by_type(request_type)
|
69
|
+
self.fetch_request = case request_type
|
70
|
+
when :get then OpenID::AX::FetchRequest.new
|
71
|
+
when :put then OpenID::AX::StoreRequest.new
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def set_response_by_type(request_type)
|
76
|
+
self.moje_id_response = case request_type
|
77
|
+
when :get then OpenID::AX::FetchResponse.from_success_response(self.fetch_response)
|
78
|
+
when :put then OpenID::AX::StoreResponse.from_success_response(self.fetch_response)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
private
|
83
|
+
|
84
|
+
def bundle_to_request
|
85
|
+
moje_id_request.add_extension(fetch_request)
|
86
|
+
end
|
87
|
+
|
88
|
+
def add_attribute(attribute)
|
89
|
+
if MojeID.is_attribute_available?(attribute)
|
90
|
+
fetch_request.add(OpenID::AX::AttrInfo.new(attribute))
|
91
|
+
bundle_to_request
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def set_attribute(attribute, value)
|
96
|
+
if MojeID.is_attribute_available?(attribute)
|
97
|
+
fetch_request.set_values(attribute, value)
|
98
|
+
bundle_to_request
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def self.is_attribute_available?(attribute)
|
103
|
+
MojeIDAttributes::AVAILABLE_ATTRIBUTES.include?(attribute) ? true : raise("#{attribute} is not available")
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
data/ruby-mojeid.gemspec
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{ruby-mojeid}
|
8
|
+
s.version = "0.2.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Robin Bortlik"]
|
12
|
+
s.date = %q{2011-01-28}
|
13
|
+
s.description = %q{This gem extend ruby-openid gem}
|
14
|
+
s.email = %q{robinbortlik@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
"Gemfile",
|
22
|
+
"Gemfile.lock",
|
23
|
+
"LICENSE.txt",
|
24
|
+
"README.rdoc",
|
25
|
+
"Rakefile",
|
26
|
+
"VERSION",
|
27
|
+
"examples/README",
|
28
|
+
"examples/rails_openid/Gemfile",
|
29
|
+
"examples/rails_openid/Gemfile.lock",
|
30
|
+
"examples/rails_openid/README",
|
31
|
+
"examples/rails_openid/Rakefile",
|
32
|
+
"examples/rails_openid/app/controllers/application_controller.rb",
|
33
|
+
"examples/rails_openid/app/controllers/consumer_controller.rb",
|
34
|
+
"examples/rails_openid/app/views/consumer/index.rhtml",
|
35
|
+
"examples/rails_openid/app/views/layouts/server.rhtml",
|
36
|
+
"examples/rails_openid/config/boot.rb",
|
37
|
+
"examples/rails_openid/config/database.sample.yml",
|
38
|
+
"examples/rails_openid/config/environment.rb",
|
39
|
+
"examples/rails_openid/config/environments/development.rb",
|
40
|
+
"examples/rails_openid/config/environments/production.rb",
|
41
|
+
"examples/rails_openid/config/environments/test.rb",
|
42
|
+
"examples/rails_openid/config/preinitializer.rb",
|
43
|
+
"examples/rails_openid/config/routes.rb",
|
44
|
+
"examples/rails_openid/public/.htaccess",
|
45
|
+
"examples/rails_openid/public/404.html",
|
46
|
+
"examples/rails_openid/public/500.html",
|
47
|
+
"examples/rails_openid/public/dispatch.cgi",
|
48
|
+
"examples/rails_openid/public/dispatch.fcgi",
|
49
|
+
"examples/rails_openid/public/dispatch.rb",
|
50
|
+
"examples/rails_openid/public/favicon.ico",
|
51
|
+
"examples/rails_openid/public/images/openid_login_bg.gif",
|
52
|
+
"examples/rails_openid/public/javascripts/controls.js",
|
53
|
+
"examples/rails_openid/public/javascripts/dragdrop.js",
|
54
|
+
"examples/rails_openid/public/javascripts/effects.js",
|
55
|
+
"examples/rails_openid/public/javascripts/prototype.js",
|
56
|
+
"examples/rails_openid/public/robots.txt",
|
57
|
+
"examples/rails_openid/script/about",
|
58
|
+
"examples/rails_openid/script/breakpointer",
|
59
|
+
"examples/rails_openid/script/console",
|
60
|
+
"examples/rails_openid/script/destroy",
|
61
|
+
"examples/rails_openid/script/generate",
|
62
|
+
"examples/rails_openid/script/performance/benchmarker",
|
63
|
+
"examples/rails_openid/script/performance/profiler",
|
64
|
+
"examples/rails_openid/script/plugin",
|
65
|
+
"examples/rails_openid/script/process/reaper",
|
66
|
+
"examples/rails_openid/script/process/spawner",
|
67
|
+
"examples/rails_openid/script/process/spinner",
|
68
|
+
"examples/rails_openid/script/runner",
|
69
|
+
"examples/rails_openid/script/server",
|
70
|
+
"examples/rails_openid/test/functional/login_controller_test.rb",
|
71
|
+
"examples/rails_openid/test/functional/server_controller_test.rb",
|
72
|
+
"examples/rails_openid/test/test_helper.rb",
|
73
|
+
"lib/available_attributes.rb",
|
74
|
+
"lib/ruby-mojeid.rb",
|
75
|
+
"ruby-mojeid.gemspec",
|
76
|
+
"test/helper.rb",
|
77
|
+
"test/test_ruby-mojeid.rb"
|
78
|
+
]
|
79
|
+
s.homepage = %q{http://github.com/robinbortlik/ruby-mojeid}
|
80
|
+
s.licenses = ["MIT"]
|
81
|
+
s.require_paths = ["lib"]
|
82
|
+
s.rubygems_version = %q{1.3.7}
|
83
|
+
s.summary = %q{This gem help use ruby-openid more simple}
|
84
|
+
s.test_files = [
|
85
|
+
"examples/rails_openid/app/controllers/application_controller.rb",
|
86
|
+
"examples/rails_openid/app/controllers/consumer_controller.rb",
|
87
|
+
"examples/rails_openid/config/boot.rb",
|
88
|
+
"examples/rails_openid/config/environment.rb",
|
89
|
+
"examples/rails_openid/config/environments/development.rb",
|
90
|
+
"examples/rails_openid/config/environments/production.rb",
|
91
|
+
"examples/rails_openid/config/environments/test.rb",
|
92
|
+
"examples/rails_openid/config/preinitializer.rb",
|
93
|
+
"examples/rails_openid/config/routes.rb",
|
94
|
+
"examples/rails_openid/public/dispatch.rb",
|
95
|
+
"examples/rails_openid/test/functional/login_controller_test.rb",
|
96
|
+
"examples/rails_openid/test/functional/server_controller_test.rb",
|
97
|
+
"examples/rails_openid/test/test_helper.rb",
|
98
|
+
"test/helper.rb",
|
99
|
+
"test/test_ruby-mojeid.rb"
|
100
|
+
]
|
101
|
+
|
102
|
+
if s.respond_to? :specification_version then
|
103
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
104
|
+
s.specification_version = 3
|
105
|
+
|
106
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
107
|
+
s.add_runtime_dependency(%q<ruby-openid>, ["= 2.1.8"])
|
108
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
109
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
110
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
111
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
112
|
+
s.add_runtime_dependency(%q<ruby-openid>, ["= 2.1.8"])
|
113
|
+
else
|
114
|
+
s.add_dependency(%q<ruby-openid>, ["= 2.1.8"])
|
115
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
116
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
117
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
118
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
119
|
+
s.add_dependency(%q<ruby-openid>, ["= 2.1.8"])
|
120
|
+
end
|
121
|
+
else
|
122
|
+
s.add_dependency(%q<ruby-openid>, ["= 2.1.8"])
|
123
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
124
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
125
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
126
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
127
|
+
s.add_dependency(%q<ruby-openid>, ["= 2.1.8"])
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
data/test/helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'test/unit'
|
11
|
+
require 'shoulda'
|
12
|
+
|
13
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
+
require 'ruby-mojeid'
|
16
|
+
|
17
|
+
class Test::Unit::TestCase
|
18
|
+
end
|