Skip to content

Commit

Permalink
Merge pull request #17 from mdsol/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
sakhtermdsol committed Nov 23, 2015
2 parents c74e686 + 5f07448 commit 74eeed4
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 45 deletions.
91 changes: 47 additions & 44 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
GEM
remote: http://rubygems.org/
specs:
actionpack (2.3.11)
activesupport (= 2.3.11)
actionpack (2.3.18)
activesupport (= 2.3.18)
rack (~> 1.1.0)
activerecord (2.3.11)
activesupport (= 2.3.11)
activerecord-jdbc-adapter (1.2.2)
activerecord-jdbcsqlite3-adapter (1.2.2)
activerecord-jdbc-adapter (~> 1.2.2)
jdbc-sqlite3 (~> 3.7.2)
activesupport (2.3.11)
bouncy-castle-java (1.5.0146.1)
database_cleaner (0.7.1)
diff-lcs (1.1.3)
ffi (1.0.11)
ffi (1.0.11-java)
git (1.2.5)
guard (1.0.0)
activerecord (2.3.18)
activesupport (= 2.3.18)
activerecord-jdbc-adapter (1.3.19)
activerecord (>= 2.2)
activerecord-jdbcsqlite3-adapter (1.3.19)
activerecord-jdbc-adapter (~> 1.3.19)
jdbc-sqlite3 (>= 3.7.2, < 3.9)
activesupport (2.3.18)
database_cleaner (0.9.1)
diff-lcs (1.2.5)
docile (1.1.5)
ffi (1.9.10)
ffi (1.9.10-java)
git (1.2.9.1)
guard (1.0.3)
ffi (>= 0.5.0)
thor (~> 0.14.6)
guard-rspec (0.6.0)
thor (>= 0.14.6)
guard-rspec (0.7.3)
guard (>= 0.10.0)
jdbc-sqlite3 (3.7.2)
jeweler (1.8.3)
jdbc-sqlite3 (3.8.11.2)
jeweler (1.8.4)
bundler (~> 1.0)
git (>= 1.2.5)
rake
rdoc
jruby-openssl (0.7.5)
bouncy-castle-java (>= 1.5.0146.1)
json (1.6.5)
json (1.6.5-java)
jruby-openssl (0.9.12-java)
json (1.8.3)
json (1.8.3-java)
mini_portile (0.6.2)
multi_json (1.0.4)
nokogiri (1.6.6.2)
nokogiri (1.6.6.4)
mini_portile (~> 0.6.0)
rack (1.1.2)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
rspec-mocks (~> 2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
simplecov (0.5.4)
multi_json (~> 1.0.3)
simplecov-html (~> 0.5.3)
simplecov-html (0.5.3)
sqlite3 (1.3.5)
thor (0.14.6)
nokogiri (1.6.6.4-java)
rack (1.1.6)
rake (0.9.6)
rdoc (4.2.0)
rspec (2.99.0)
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.99.0)
rspec-core (2.99.2)
rspec-expectations (2.99.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.99.4)
simplecov (0.10.0)
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sqlite3 (1.3.11)
thor (0.19.1)

PLATFORMS
java
Expand All @@ -76,3 +76,6 @@ DEPENDENCIES
rspec (~> 2.8)
simplecov (~> 0.5)
sqlite3 (~> 1.3)

BUNDLED WITH
1.10.6
6 changes: 5 additions & 1 deletion lib/casclient/tickets/storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ def get_session_for_service_ticket(st)
session_id = read_service_session_lookup(st)
unless session_id.nil?
# This feels a bit hackish, but there isn't really a better way to go about it that I am aware of yet
session = ActiveRecord::SessionStore.session_class.find_by_session_id(session_id)
if Rails::VERSION::MAJOR > 3
session = ActionDispatch::Session::ActiveRecordStore.session_class.find_by_session_id(session_id)
else
session = ActiveRecord::SessionStore.session_class.find_by_session_id(session_id)
end
else
log.warn("Couldn't destroy session service ticket #{st} because no corresponding session id could be found.")
end
Expand Down
5 changes: 5 additions & 0 deletions spec/support/shared_examples_for_ticket_stores.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
shared_examples "a ticket store interacting with sessions" do

before do
stub_const("Rails::VERSION::MAJOR", 3)
end

describe "#store_service_session_lookup" do
it "should raise CASException if the Service Ticket is nil" do
expect { subject.store_service_session_lookup(nil, "controller") }.to raise_exception(CASClient::CASException, /No service_ticket specified/)
Expand Down

0 comments on commit 74eeed4

Please sign in to comment.