Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #37 from ualbertalib/development
Browse files Browse the repository at this point in the history
Add Opinionated Metadata functionality
  • Loading branch information
redlibrarian committed Aug 29, 2014
2 parents 26bd226 + 90b3ce5 commit b277151
Show file tree
Hide file tree
Showing 149 changed files with 6,882 additions and 7,617 deletions.
3 changes: 1 addition & 2 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
---
BUNDLE_PATH: vendor
BUNDLE_DISABLE_SHARED_GEMS: '1'
BUNDLE_FROZEN: '1'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
/tmp
APIauthentication.txt
/vendor
token.txt
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ gem "ebsco-discovery-service-api", "1.0.4"
gem "addressable", "2.3.2"
gem "htmlentities"
gem "activerecord-session_store"

gem "factory_girl", "~> 4.0", group: [:test, :development]
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ GEM
ensure_valid_encoding (0.5.3)
erubis (2.7.0)
execjs (2.2.1)
factory_girl (4.4.0)
activesupport (>= 3.0.0)
ffi (1.9.3)
hike (1.2.3)
htmlentities (4.3.2)
Expand Down Expand Up @@ -184,6 +186,7 @@ DEPENDENCIES
devise
devise-guests (~> 0.3)
ebsco-discovery-service-api (= 1.0.4)
factory_girl (~> 4.0)
htmlentities
jbuilder (~> 2.0)
jettywrapper (~> 1.7)
Expand Down
26 changes: 26 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,30 @@ class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception

def after_sign_in_path_for(resource)
if session[:session_key].present?
connection = EDSApi::ConnectionHandler.new(2)
connection.end_session(session[:session_key])
session[:session_key] = nil
end
if session[:results].present?
session[:results] = nil
end
if session[:current_url].present?
session[:current_url]
end
end

def after_sign_out_path_for(resource)
if session[:session_key].present?
connection = EDSApi::ConnectionHandler.new(2)
connection.end_session(session[:session_key])
session[:session_key] = nil
end
if session[:results].present?
session[:results] = nil
end
root_path
end
end
9 changes: 9 additions & 0 deletions app/controllers/articles_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- encoding : utf-8 -*-
require 'blacklight/catalog'

class ArticlesController < ApplicationController
#before_filter :authenticate_user!

include Blacklight::Catalog

end
3 changes: 3 additions & 0 deletions app/helpers/articles_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module ArticlesHelper
include Blacklight::ArticlesHelperBehavior
end
Loading

0 comments on commit b277151

Please sign in to comment.