ruby-openid 2.6.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ruby-openid might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/openid/association.rb +1 -1
- data/lib/openid/cryptutil.rb +5 -5
- data/lib/openid/message.rb +1 -1
- data/lib/openid/trustroot.rb +2 -2
- data/lib/openid/urinorm.rb +4 -6
- data/lib/openid/util.rb +0 -2
- data/lib/openid/version.rb +1 -1
- data/test/discoverdata.rb +1 -2
- data/test/test_accept.rb +4 -5
- data/test/test_association.rb +4 -3
- data/test/test_associationmanager.rb +22 -24
- data/test/test_ax.rb +9 -9
- data/test/test_checkid_request.rb +6 -8
- data/test/test_consumer.rb +5 -5
- data/test/test_cryptutil.rb +5 -5
- data/test/test_dh.rb +2 -2
- data/test/test_discover.rb +19 -23
- data/test/test_discovery_manager.rb +6 -7
- data/test/test_extension.rb +2 -2
- data/test/test_fetchers.rb +16 -16
- data/test/test_filters.rb +7 -7
- data/test/test_idres.rb +25 -40
- data/test/test_kvform.rb +5 -5
- data/test/test_kvpost.rb +2 -2
- data/test/test_linkparse.rb +3 -5
- data/test/test_message.rb +19 -19
- data/test/test_nonce.rb +2 -2
- data/test/test_oauth.rb +3 -3
- data/test/test_openid_yadis.rb +2 -2
- data/test/test_pape.rb +4 -4
- data/test/test_parsehtml.rb +3 -3
- data/test/test_responses.rb +2 -2
- data/test/test_server.rb +53 -53
- data/test/test_sreg.rb +6 -6
- data/test/test_stores.rb +12 -12
- data/test/test_trustroot.rb +2 -2
- data/test/test_ui.rb +2 -2
- data/test/test_urinorm.rb +2 -2
- data/test/test_util.rb +2 -2
- data/test/test_xrds.rb +15 -15
- data/test/test_xri.rb +4 -4
- data/test/test_xrires.rb +2 -2
- data/test/test_yadis_discovery.rb +5 -5
- data/test/testutil.rb +8 -1
- metadata +18 -7
- data/lib/openid/extras.rb +0 -13
- data/test/test_extras.rb +0 -35
data/test/test_sreg.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'minitest/autorun'
|
2
2
|
require 'openid/extensions/sreg'
|
3
3
|
require 'openid/message'
|
4
4
|
require 'openid/server'
|
@@ -17,7 +17,7 @@ module OpenID
|
|
17
17
|
'language'=>'en-us',
|
18
18
|
}
|
19
19
|
|
20
|
-
class SRegTest < Test
|
20
|
+
class SRegTest < Minitest::Test
|
21
21
|
|
22
22
|
def test_is11
|
23
23
|
assert_equal(NS_URI, NS_URI_1_1)
|
@@ -78,7 +78,7 @@ module OpenID
|
|
78
78
|
|
79
79
|
end
|
80
80
|
|
81
|
-
class GetNSTest < Test
|
81
|
+
class GetNSTest < Minitest::Test
|
82
82
|
def setup
|
83
83
|
@msg = FakeMessage.new
|
84
84
|
end
|
@@ -149,7 +149,7 @@ module OpenID
|
|
149
149
|
|
150
150
|
end
|
151
151
|
|
152
|
-
class SRegRequestTest < Test
|
152
|
+
class SRegRequestTest < Minitest::Test
|
153
153
|
def test_construct_empty
|
154
154
|
req = Request.new
|
155
155
|
assert_equal([], req.optional)
|
@@ -413,7 +413,7 @@ module OpenID
|
|
413
413
|
end
|
414
414
|
|
415
415
|
|
416
|
-
class SRegResponseTest < Test
|
416
|
+
class SRegResponseTest < Minitest::Test
|
417
417
|
def test_construct
|
418
418
|
resp = Response.new(SOME_DATA)
|
419
419
|
assert_equal(SOME_DATA, resp.get_extension_args)
|
@@ -444,7 +444,7 @@ module OpenID
|
|
444
444
|
end
|
445
445
|
end
|
446
446
|
|
447
|
-
class SendFieldsTest < Test
|
447
|
+
class SendFieldsTest < Minitest::Test
|
448
448
|
# class SendFieldsTest < Object
|
449
449
|
def test_send_fields
|
450
450
|
# create a request message with simple reg fields
|
data/test/test_stores.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'minitest/autorun'
|
2
2
|
require 'openid/store/interface'
|
3
3
|
require 'openid/store/filesystem'
|
4
4
|
require 'openid/store/memcache'
|
@@ -214,7 +214,7 @@ module OpenID
|
|
214
214
|
end
|
215
215
|
end
|
216
216
|
|
217
|
-
class FileStoreTestCase < Test
|
217
|
+
class FileStoreTestCase < Minitest::Test
|
218
218
|
include StoreTestCase
|
219
219
|
|
220
220
|
def setup
|
@@ -227,7 +227,7 @@ module OpenID
|
|
227
227
|
end
|
228
228
|
end
|
229
229
|
|
230
|
-
class MemoryStoreTestCase < Test
|
230
|
+
class MemoryStoreTestCase < Minitest::Test
|
231
231
|
include StoreTestCase
|
232
232
|
|
233
233
|
def setup
|
@@ -239,7 +239,7 @@ module OpenID
|
|
239
239
|
::TESTING_MEMCACHE
|
240
240
|
rescue NameError
|
241
241
|
else
|
242
|
-
class MemcacheStoreTestCase < Test
|
242
|
+
class MemcacheStoreTestCase < Minitest::Test
|
243
243
|
include StoreTestCase
|
244
244
|
def setup
|
245
245
|
store_uniq = OpenID::CryptUtil.random_string(6, "0123456789")
|
@@ -255,38 +255,38 @@ module OpenID
|
|
255
255
|
end
|
256
256
|
end
|
257
257
|
|
258
|
-
class AbstractStoreTestCase < Test
|
258
|
+
class AbstractStoreTestCase < Minitest::Test
|
259
259
|
def test_abstract_class
|
260
260
|
# the abstract made concrete
|
261
261
|
abc = Interface.new()
|
262
262
|
server_url = "http://server.com/"
|
263
263
|
association = OpenID::Association.new("foo", "bar", Time.now, Time.now + 10, "dummy")
|
264
264
|
|
265
|
-
|
265
|
+
assert_raises(NotImplementedError) {
|
266
266
|
abc.store_association(server_url, association)
|
267
267
|
}
|
268
268
|
|
269
|
-
|
269
|
+
assert_raises(NotImplementedError) {
|
270
270
|
abc.get_association(server_url)
|
271
271
|
}
|
272
272
|
|
273
|
-
|
273
|
+
assert_raises(NotImplementedError) {
|
274
274
|
abc.remove_association(server_url, association.handle)
|
275
275
|
}
|
276
276
|
|
277
|
-
|
277
|
+
assert_raises(NotImplementedError) {
|
278
278
|
abc.use_nonce(server_url, Time.now.to_i, "foo")
|
279
279
|
}
|
280
280
|
|
281
|
-
|
281
|
+
assert_raises(NotImplementedError) {
|
282
282
|
abc.cleanup_nonces()
|
283
283
|
}
|
284
284
|
|
285
|
-
|
285
|
+
assert_raises(NotImplementedError) {
|
286
286
|
abc.cleanup_associations()
|
287
287
|
}
|
288
288
|
|
289
|
-
|
289
|
+
assert_raises(NotImplementedError) {
|
290
290
|
abc.cleanup()
|
291
291
|
}
|
292
292
|
|
data/test/test_trustroot.rb
CHANGED
data/test/test_ui.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
require 'openid/extensions/ui'
|
2
2
|
require 'openid/message'
|
3
3
|
require 'openid/server'
|
4
|
-
require '
|
4
|
+
require 'minitest/autorun'
|
5
5
|
|
6
6
|
module OpenID
|
7
7
|
module UITest
|
8
|
-
class UIRequestTestCase < Test
|
8
|
+
class UIRequestTestCase < Minitest::Test
|
9
9
|
|
10
10
|
def setup
|
11
11
|
@req = UI::Request.new
|
data/test/test_urinorm.rb
CHANGED
data/test/test_util.rb
CHANGED
data/test/test_xrds.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'minitest/autorun'
|
2
2
|
require 'testutil'
|
3
3
|
require 'openid/yadis/xrds'
|
4
4
|
|
@@ -19,24 +19,24 @@ module OpenID
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
class ParseXRDSTestCase < Test
|
22
|
+
class ParseXRDSTestCase < Minitest::Test
|
23
23
|
include XRDSTestMixin
|
24
24
|
|
25
25
|
# Check that parsing succeeds at all.
|
26
26
|
def test_parse
|
27
27
|
result = Yadis.parseXRDS(read_xrds_data_file(XRD_FILE))
|
28
|
-
|
28
|
+
refute_nil result
|
29
29
|
end
|
30
30
|
|
31
31
|
def test_parse_no_xrds_xml
|
32
32
|
xmldoc = read_xrds_data_file(NOXRDS_FILE)
|
33
|
-
|
33
|
+
assert_raises(Yadis::XRDSError) {
|
34
34
|
Yadis.parseXRDS(xmldoc)
|
35
35
|
}
|
36
36
|
end
|
37
37
|
|
38
38
|
def test_parse_no_xrds_empty
|
39
|
-
|
39
|
+
assert_raises(Yadis::XRDSError) {
|
40
40
|
Yadis.parseXRDS('')
|
41
41
|
}
|
42
42
|
end
|
@@ -49,14 +49,14 @@ module OpenID
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
-
class GetYadisXRDTestCase < Test
|
52
|
+
class GetYadisXRDTestCase < Minitest::Test
|
53
53
|
include XRDSTestMixin
|
54
54
|
|
55
55
|
# XXX: Test to make sure this really gets the _right_ XRD.
|
56
56
|
def test_get_xrd
|
57
57
|
doc = Yadis.parseXRDS(read_xrds_data_file(XRD_FILE))
|
58
58
|
result = Yadis::get_yadis_xrd(doc)
|
59
|
-
|
59
|
+
refute_nil result
|
60
60
|
assert_equal 'XRD', result.name
|
61
61
|
assert_equal Yadis::XRD_NS_2_0, result.namespace
|
62
62
|
end
|
@@ -64,13 +64,13 @@ module OpenID
|
|
64
64
|
def test_no_xrd
|
65
65
|
xmldoc = read_xrds_data_file(NOXRD_FILE)
|
66
66
|
doc = Yadis.parseXRDS(xmldoc)
|
67
|
-
|
67
|
+
assert_raises(Yadis::XRDSError) {
|
68
68
|
Yadis.get_yadis_xrd(doc)
|
69
69
|
}
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
class EachServiceTestCase < Test
|
73
|
+
class EachServiceTestCase < Minitest::Test
|
74
74
|
include XRDSTestMixin
|
75
75
|
|
76
76
|
def test_get_xrd
|
@@ -80,14 +80,14 @@ module OpenID
|
|
80
80
|
assert_equal 'Service', e.name
|
81
81
|
count += 1
|
82
82
|
}
|
83
|
-
|
83
|
+
refute_nil result
|
84
84
|
assert_equal 5, count
|
85
85
|
end
|
86
86
|
|
87
87
|
def test_no_xrd
|
88
88
|
xmldoc = read_xrds_data_file(NOXRD_FILE)
|
89
89
|
doc = Yadis.parseXRDS(xmldoc)
|
90
|
-
|
90
|
+
assert_raises(Yadis::XRDSError) {
|
91
91
|
Yadis.each_service(doc)
|
92
92
|
}
|
93
93
|
end
|
@@ -99,14 +99,14 @@ module OpenID
|
|
99
99
|
assert_equal 'Service', e.name
|
100
100
|
count += 1
|
101
101
|
}
|
102
|
-
|
102
|
+
refute_nil result
|
103
103
|
assert_equal 2, count
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
107
|
# XXX: test prioSort!
|
108
108
|
|
109
|
-
class ExpandServiceTestCase < Test
|
109
|
+
class ExpandServiceTestCase < Minitest::Test
|
110
110
|
@@service_xml = <<END
|
111
111
|
<Service>
|
112
112
|
<Type>urn://foo</Type>
|
@@ -133,7 +133,7 @@ END
|
|
133
133
|
end
|
134
134
|
end
|
135
135
|
|
136
|
-
class PrioSortTestCase < Test
|
136
|
+
class PrioSortTestCase < Minitest::Test
|
137
137
|
def new_uri(priority)
|
138
138
|
e = REXML::Element.new("URI")
|
139
139
|
e.add_attribute("priority", priority.to_s) unless e.nil?
|
@@ -155,7 +155,7 @@ END
|
|
155
155
|
end
|
156
156
|
end
|
157
157
|
|
158
|
-
class GetCanonicalIDTestCase < Test
|
158
|
+
class GetCanonicalIDTestCase < Minitest::Test
|
159
159
|
include XRDSTestMixin
|
160
160
|
|
161
161
|
def test_multisegment_xri
|
data/test/test_xri.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
require '
|
1
|
+
require 'minitest/autorun'
|
2
2
|
require 'openid/yadis/xri'
|
3
3
|
|
4
4
|
module OpenID
|
5
5
|
|
6
6
|
module Yadis
|
7
7
|
|
8
|
-
class XriDiscoveryTestCase < Test
|
8
|
+
class XriDiscoveryTestCase < Minitest::Test
|
9
9
|
|
10
10
|
def test_isXRI?
|
11
11
|
assert_equal(:xri, XRI.identifier_scheme('=john.smith'))
|
@@ -18,7 +18,7 @@ module OpenID
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
class XriEscapingTestCase < Test
|
21
|
+
class XriEscapingTestCase < Minitest::Test
|
22
22
|
def test_escaping_percents
|
23
23
|
assert_equal('@example/abc%252Fd/ef',
|
24
24
|
XRI.escape_for_iri('@example/abc%2Fd/ef'))
|
@@ -37,7 +37,7 @@ module OpenID
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
class XriTransformationTestCase < Test
|
40
|
+
class XriTransformationTestCase < Minitest::Test
|
41
41
|
def test_to_iri_normal
|
42
42
|
assert_equal('xri://@example', XRI.to_iri_normal('@example'))
|
43
43
|
end
|
data/test/test_xrires.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'minitest/autorun'
|
2
2
|
require 'openid/yadis/xrires'
|
3
3
|
|
4
4
|
module OpenID
|
@@ -18,7 +18,7 @@ module OpenID
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
class ProxyQueryTestCase < Test
|
21
|
+
class ProxyQueryTestCase < Minitest::Test
|
22
22
|
def setup
|
23
23
|
@proxy_url = 'http://xri.example.com/'
|
24
24
|
@proxy = XRI::ProxyResolver.new(@proxy_url)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'minitest/autorun'
|
2
2
|
require 'testutil'
|
3
3
|
require 'uri'
|
4
4
|
require 'openid/yadis/discovery'
|
@@ -78,12 +78,12 @@ module OpenID
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
-
class TestSecondGet < Test
|
81
|
+
class TestSecondGet < Minitest::Test
|
82
82
|
include FetcherMixin
|
83
83
|
|
84
84
|
def test_404
|
85
85
|
uri = "http://something.unittest/"
|
86
|
-
|
86
|
+
assert_raises(DiscoveryFailure) {
|
87
87
|
with_fetcher(MockFetcher.new) { Yadis.discover(uri) }
|
88
88
|
}
|
89
89
|
end
|
@@ -120,7 +120,7 @@ module OpenID
|
|
120
120
|
setup
|
121
121
|
|
122
122
|
if @expected.respond_to?("ancestors") and @expected.ancestors.member?(DiscoveryFailure)
|
123
|
-
@testcase.
|
123
|
+
@testcase.assert_raises(DiscoveryFailure) {
|
124
124
|
do_discovery
|
125
125
|
}
|
126
126
|
else
|
@@ -164,7 +164,7 @@ module OpenID
|
|
164
164
|
end
|
165
165
|
end
|
166
166
|
|
167
|
-
class TestYadisDiscovery < Test
|
167
|
+
class TestYadisDiscovery < Minitest::Test
|
168
168
|
include FetcherMixin
|
169
169
|
|
170
170
|
def test_yadis_discovery
|
data/test/testutil.rb
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
require "pathname"
|
2
2
|
|
3
|
+
if defined? Minitest::Test
|
4
|
+
# We're on Minitest 5+. Nothing to do here.
|
5
|
+
else
|
6
|
+
# Minitest 4 doesn't have Minitest::Test yet.
|
7
|
+
Minitest::Test = MiniTest::Unit::TestCase
|
8
|
+
end
|
9
|
+
|
3
10
|
module OpenID
|
4
11
|
module TestDataMixin
|
5
12
|
TESTS_DIR = Pathname.new(__FILE__).dirname
|
@@ -52,7 +59,7 @@ module OpenID
|
|
52
59
|
rescue ProtocolError => why
|
53
60
|
message = "Expected prefix #{str_prefix.inspect}, got "\
|
54
61
|
"#{why.message.inspect}"
|
55
|
-
assert(why.message.
|
62
|
+
assert(why.message.start_with?(str_prefix), message)
|
56
63
|
else
|
57
64
|
fail("Expected ProtocolError. Got #{result.inspect}")
|
58
65
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-openid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JanRain, Inc
|
8
8
|
autorequire: openid
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
11
|
+
date: 2015-03-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: minitest
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5'
|
13
27
|
description:
|
14
28
|
email: openid@janrain.com
|
15
29
|
executables: []
|
@@ -117,7 +131,6 @@ files:
|
|
117
131
|
- lib/openid/extensions/pape.rb
|
118
132
|
- lib/openid/extensions/sreg.rb
|
119
133
|
- lib/openid/extensions/ui.rb
|
120
|
-
- lib/openid/extras.rb
|
121
134
|
- lib/openid/fetchers.rb
|
122
135
|
- lib/openid/kvform.rb
|
123
136
|
- lib/openid/kvpost.rb
|
@@ -199,7 +212,6 @@ files:
|
|
199
212
|
- test/test_discover.rb
|
200
213
|
- test/test_discovery_manager.rb
|
201
214
|
- test/test_extension.rb
|
202
|
-
- test/test_extras.rb
|
203
215
|
- test/test_fetchers.rb
|
204
216
|
- test/test_filters.rb
|
205
217
|
- test/test_idres.rb
|
@@ -249,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
261
|
version: '0'
|
250
262
|
requirements: []
|
251
263
|
rubyforge_project:
|
252
|
-
rubygems_version: 2.
|
264
|
+
rubygems_version: 2.4.5
|
253
265
|
signing_key:
|
254
266
|
specification_version: 4
|
255
267
|
summary: A library for consuming and serving OpenID identities.
|
@@ -310,7 +322,6 @@ test_files:
|
|
310
322
|
- test/test_discover.rb
|
311
323
|
- test/test_discovery_manager.rb
|
312
324
|
- test/test_extension.rb
|
313
|
-
- test/test_extras.rb
|
314
325
|
- test/test_fetchers.rb
|
315
326
|
- test/test_filters.rb
|
316
327
|
- test/test_idres.rb
|