Skip to content

Commit

Permalink
Merge pull request #3 from sul-dlss/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
mejackreed committed Feb 23, 2016
2 parents 959e630 + bc8f6b6 commit ecdce74
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ end


gem 'nokogiri'
gem 'hurley'
gem 'faraday'

# Use Capistrano for deployment
group :deployment do
Expand Down
28 changes: 7 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ GEM
config (1.0.0)
activesupport (>= 3.0)
deep_merge (~> 1.0.0)
coveralls (0.8.10)
coveralls (0.8.11)
json (~> 1.8)
rest-client (>= 1.6.8, < 2)
simplecov (~> 0.11.0)
term-ansicolor (~> 1.3)
thor (~> 0.19.1)
Expand All @@ -104,8 +103,6 @@ GEM
capistrano-one_time_key
capistrano-releaseboard
docile (1.1.5)
domain_name (0.5.20160128)
unf (>= 0.0.5, < 1.0.0)
erubis (2.7.0)
execjs (2.6.0)
factory_girl (4.5.0)
Expand All @@ -117,9 +114,6 @@ GEM
multipart-post (>= 1.2, < 3)
globalid (0.3.6)
activesupport (>= 4.1.0)
http-cookie (1.0.2)
domain_name (~> 0.5)
hurley (0.2)
i18n (0.7.0)
is_it_working (1.1.0)
jasmine-jquery-rails (2.0.3)
Expand All @@ -136,7 +130,7 @@ GEM
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.99)
mime-types (2.99.1)
mini_portile2 (2.0.0)
minitest (5.8.4)
multi_json (1.11.2)
Expand All @@ -145,11 +139,10 @@ GEM
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.0.2)
netrc (0.11.0)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
parallel (1.6.1)
parser (2.3.0.3)
parser (2.3.0.6)
ast (~> 2.2)
poltergeist (1.9.0)
capybara (~> 2.1)
Expand Down Expand Up @@ -189,11 +182,7 @@ GEM
rdoc (4.2.2)
json (~> 1.4)
ref (2.0.0)
rest-client (1.8.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rspec-core (3.4.2)
rspec-core (3.4.3)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
Expand All @@ -210,8 +199,8 @@ GEM
rspec-mocks (~> 3.4.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
rubocop (0.37.0)
parser (>= 2.3.0.2, < 3.0)
rubocop (0.37.2)
parser (>= 2.3.0.4, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
Expand Down Expand Up @@ -270,9 +259,6 @@ GEM
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
unicode-display_width (0.3.1)
web-console (2.3.0)
activemodel (>= 4.0)
Expand Down Expand Up @@ -302,7 +288,7 @@ DEPENDENCIES
database_cleaner
dlss-capistrano
factory_girl_rails
hurley
faraday
is_it_working
jasmine-jquery-rails
jbuilder (~> 2.0)
Expand Down
2 changes: 1 addition & 1 deletion app/models/organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def organizations

def budget_orgchart
url = 'http://registry.stanford.edu/reference/OrgTreeAdministrative.xml'
response = Hurley.get(url)
response = Faraday.get(url)
Nokogiri::XML(response.body)
end
end
Expand Down
13 changes: 9 additions & 4 deletions app/models/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ def lib_profile?

Rails.cache.fetch("people/drupal/#{org_code}/#{uid}", expires_in: 24.hours) do
benchmark "People Page (#{uid})" do
response = Hurley.head(Settings.library.profile_url + uid) do |req|
req.options.redirection_limit = 0
req.options.timeout = 6
end
response = profile_client.head uid

response.success?
end
Expand Down Expand Up @@ -98,4 +95,12 @@ def authed_data
def logger
Rails.logger
end

def profile_client
Faraday.new(Settings.library.profile_url) do |faraday|
faraday.use FaradayMiddleware::FollowRedirects, limit: 10
faraday.adapter :net_http
faraday.options.timeout = 6
end
end
end

0 comments on commit ecdce74

Please sign in to comment.