casino 3.0.0.pre.2 → 3.0.0
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/.travis.yml +0 -2
- data/app/authenticators/casino/static_authenticator.rb +1 -1
- data/app/models/casino/service_ticket/single_sign_out_notifier.rb +1 -1
- data/casino.gemspec +3 -2
- data/config/routes.rb +1 -1
- data/lib/casino/version.rb +1 -1
- data/spec/model/login_ticket_spec.rb +1 -1
- data/spec/model/proxy_ticket_spec.rb +2 -2
- data/spec/model/service_ticket_spec.rb +3 -3
- data/spec/model/ticket_granting_ticket_spec.rb +3 -3
- data/spec/processor/api/login_credential_acceptor_spec.rb +1 -1
- data/spec/processor/api/service_ticket_provider_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/support/rspec.rb +12 -1
- metadata +25 -9
data/.travis.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'casino/authenticator'
|
2
2
|
|
3
3
|
# The static authenticator is just a simple example.
|
4
|
-
# Never
|
4
|
+
# Never use this authenticator in a productive environment!
|
5
5
|
class CASino::StaticAuthenticator < CASino::Authenticator
|
6
6
|
|
7
7
|
# @param [Hash] options
|
@@ -34,7 +34,7 @@ class CASino::ServiceTicket::SingleSignOutNotifier
|
|
34
34
|
Rails.logger.info "Logout notification successfully posted to #{url}."
|
35
35
|
true
|
36
36
|
else
|
37
|
-
Rails.logger.warn "Service #{url}
|
37
|
+
Rails.logger.warn "Service #{url} responded to logout notification with code '#{result.status}'!"
|
38
38
|
false
|
39
39
|
end
|
40
40
|
rescue Faraday::Error::ClientError => error
|
data/casino.gemspec
CHANGED
@@ -25,8 +25,9 @@ Gem::Specification.new do |s|
|
|
25
25
|
|
26
26
|
s.add_development_dependency 'capybara', '~> 2.1'
|
27
27
|
s.add_development_dependency 'rake', '~> 10.0'
|
28
|
-
s.add_development_dependency 'rspec', '~>
|
29
|
-
s.add_development_dependency 'rspec-
|
28
|
+
s.add_development_dependency 'rspec', '~> 3.0'
|
29
|
+
s.add_development_dependency 'rspec-its', '~> 1.0'
|
30
|
+
s.add_development_dependency 'rspec-rails', '~> 3.0'
|
30
31
|
s.add_development_dependency 'sqlite3', '~> 1.3'
|
31
32
|
s.add_development_dependency 'factory_girl', '~> 4.1'
|
32
33
|
s.add_development_dependency 'webmock', '~> 1.9'
|
data/config/routes.rb
CHANGED
data/lib/casino/version.rb
CHANGED
@@ -10,7 +10,7 @@ describe CASino::LoginTicket do
|
|
10
10
|
lambda do
|
11
11
|
described_class.cleanup
|
12
12
|
end.should change(described_class, :count).by(-1)
|
13
|
-
described_class.find_by_ticket('LT-12345').should
|
13
|
+
described_class.find_by_ticket('LT-12345').should be_falsey
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -46,7 +46,7 @@ describe CASino::ProxyTicket do
|
|
46
46
|
lambda do
|
47
47
|
described_class.cleanup_unconsumed
|
48
48
|
end.should change(described_class, :count).by(-1)
|
49
|
-
described_class.find_by_ticket('PT-12345').should
|
49
|
+
described_class.find_by_ticket('PT-12345').should be_falsey
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
@@ -57,7 +57,7 @@ describe CASino::ProxyTicket do
|
|
57
57
|
lambda do
|
58
58
|
described_class.cleanup_consumed
|
59
59
|
end.should change(described_class, :count).by(-1)
|
60
|
-
described_class.find_by_ticket('PT-12345').should
|
60
|
+
described_class.find_by_ticket('PT-12345').should be_falsey
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
@@ -48,7 +48,7 @@ describe CASino::ServiceTicket do
|
|
48
48
|
lambda do
|
49
49
|
described_class.cleanup_unconsumed
|
50
50
|
end.should change(described_class, :count).by(-1)
|
51
|
-
described_class.find_by_ticket('ST-12345').should
|
51
|
+
described_class.find_by_ticket('ST-12345').should be_falsey
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -77,7 +77,7 @@ describe CASino::ServiceTicket do
|
|
77
77
|
lambda do
|
78
78
|
described_class.cleanup_consumed
|
79
79
|
end.should change(described_class, :count).by(-1)
|
80
|
-
described_class.find_by_ticket('ST-12345').should
|
80
|
+
described_class.find_by_ticket('ST-12345').should be_falsey
|
81
81
|
end
|
82
82
|
|
83
83
|
it 'deletes consumed service tickets without ticket_granting_ticket' do
|
@@ -86,7 +86,7 @@ describe CASino::ServiceTicket do
|
|
86
86
|
lambda do
|
87
87
|
described_class.cleanup_consumed
|
88
88
|
end.should change(described_class, :count).by(-1)
|
89
|
-
described_class.find_by_ticket('ST-12345').should
|
89
|
+
described_class.find_by_ticket('ST-12345').should be_falsey
|
90
90
|
end
|
91
91
|
|
92
92
|
it 'does not delete unexpired service tickets' do
|
@@ -160,7 +160,7 @@ describe CASino::TicketGrantingTicket do
|
|
160
160
|
lambda do
|
161
161
|
described_class.cleanup
|
162
162
|
end.should change(described_class, :count).by(-1)
|
163
|
-
described_class.find_by_ticket(ticket_granting_ticket.ticket).should
|
163
|
+
described_class.find_by_ticket(ticket_granting_ticket.ticket).should be_falsey
|
164
164
|
end
|
165
165
|
|
166
166
|
it 'does not delete almost expired long-term ticket-granting tickets' do
|
@@ -179,7 +179,7 @@ describe CASino::TicketGrantingTicket do
|
|
179
179
|
lambda do
|
180
180
|
described_class.cleanup
|
181
181
|
end.should change(described_class, :count).by(-1)
|
182
|
-
described_class.find_by_ticket(ticket_granting_ticket.ticket).should
|
182
|
+
described_class.find_by_ticket(ticket_granting_ticket.ticket).should be_falsey
|
183
183
|
end
|
184
184
|
|
185
185
|
it 'does not delete almost expired ticket-granting tickets with pending two-factor authentication' do
|
@@ -198,7 +198,7 @@ describe CASino::TicketGrantingTicket do
|
|
198
198
|
lambda do
|
199
199
|
described_class.cleanup
|
200
200
|
end.should change(described_class, :count).by(-1)
|
201
|
-
described_class.find_by_ticket(ticket_granting_ticket.ticket).should
|
201
|
+
described_class.find_by_ticket(ticket_granting_ticket.ticket).should be_falsey
|
202
202
|
end
|
203
203
|
end
|
204
204
|
end
|
@@ -15,7 +15,7 @@ describe CASino::API::LoginCredentialAcceptorProcessor do
|
|
15
15
|
|
16
16
|
it 'calls the #invalid_login_credentials_via_api method on the listener' do
|
17
17
|
listener.should_receive(:invalid_login_credentials_via_api)
|
18
|
-
processor.process(login_data, user_agent).should
|
18
|
+
processor.process(login_data, user_agent).should be_falsey
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'does not generate a ticket-granting ticket' do
|
@@ -13,7 +13,7 @@ describe CASino::API::ServiceTicketProviderProcessor do
|
|
13
13
|
|
14
14
|
it 'calls the #invalid_tgt_via_api method on the listener' do
|
15
15
|
listener.should_receive(:invalid_ticket_granting_ticket_via_api)
|
16
|
-
processor.process(ticket_granting_ticket, parameters).should
|
16
|
+
processor.process(ticket_granting_ticket, parameters).should be_falsey
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
data/spec/spec_helper.rb
CHANGED
data/spec/support/rspec.rb
CHANGED
@@ -1,8 +1,19 @@
|
|
1
1
|
RSpec.configure do |config|
|
2
2
|
config.use_transactional_fixtures = true
|
3
3
|
config.infer_base_class_for_anonymous_controllers = false
|
4
|
-
config.treat_symbols_as_metadata_keys_with_true_values = true
|
5
4
|
config.run_all_when_everything_filtered = true
|
6
5
|
config.filter_run focus: true
|
7
6
|
config.order = 'random'
|
7
|
+
config.infer_spec_type_from_file_location!
|
8
|
+
|
9
|
+
config.mock_with :rspec do |mocks|
|
10
|
+
mocks.yield_receiver_to_any_instance_implementation_blocks = false
|
11
|
+
# TODO: we should maybe port existing tests to the new expect syntax
|
12
|
+
mocks.syntax = [:should, :expect]
|
13
|
+
end
|
14
|
+
|
15
|
+
config.expect_with :rspec do |c|
|
16
|
+
# TODO: we should maybe port existing tests to the new expect syntax
|
17
|
+
c.syntax = [:should, :expect]
|
18
|
+
end
|
8
19
|
end
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: casino
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0
|
5
|
-
prerelease:
|
4
|
+
version: 3.0.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Nils Caspar
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-
|
14
|
+
date: 2014-07-19 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: capybara
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '3.0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -60,7 +60,23 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - ~>
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: '
|
63
|
+
version: '3.0'
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: rspec-its
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ~>
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '1.0'
|
72
|
+
type: :development
|
73
|
+
prerelease: false
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ~>
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '1.0'
|
64
80
|
- !ruby/object:Gem::Dependency
|
65
81
|
name: rspec-rails
|
66
82
|
requirement: !ruby/object:Gem::Requirement
|
@@ -68,7 +84,7 @@ dependencies:
|
|
68
84
|
requirements:
|
69
85
|
- - ~>
|
70
86
|
- !ruby/object:Gem::Version
|
71
|
-
version: '
|
87
|
+
version: '3.0'
|
72
88
|
type: :development
|
73
89
|
prerelease: false
|
74
90
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -76,7 +92,7 @@ dependencies:
|
|
76
92
|
requirements:
|
77
93
|
- - ~>
|
78
94
|
- !ruby/object:Gem::Version
|
79
|
-
version: '
|
95
|
+
version: '3.0'
|
80
96
|
- !ruby/object:Gem::Dependency
|
81
97
|
name: sqlite3
|
82
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -531,9 +547,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
531
547
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
532
548
|
none: false
|
533
549
|
requirements:
|
534
|
-
- - ! '
|
550
|
+
- - ! '>='
|
535
551
|
- !ruby/object:Gem::Version
|
536
|
-
version:
|
552
|
+
version: '0'
|
537
553
|
requirements: []
|
538
554
|
rubyforge_project:
|
539
555
|
rubygems_version: 1.8.23
|