Skip to content

Commit

Permalink
Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
stephaniewilkinson committed Dec 17, 2024
1 parent 5848a3d commit 19667fe
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.3.5
ruby-3.3.6
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ ruby File.read(File.join(__dir__, '.ruby-version')).chomp.delete_prefix('ruby-')
gem 'area'
gem 'async-http'
gem 'csv'
gem 'drb'
gem 'dotenv'
gem 'drb'
gem 'falcon'
gem 'falcon-capybara'
gem 'gender_detector'
Expand Down
30 changes: 15 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ GEM
selenium-webdriver
coderay (1.1.3)
concurrent-ruby (1.3.4)
console (1.29.0)
console (1.29.2)
fiber-annotation
fiber-local (~> 1.1)
json
csv (3.3.0)
dotenv (3.1.4)
csv (3.3.1)
dotenv (3.1.6)
drb (2.2.1)
falcon (0.48.3)
async
Expand All @@ -70,7 +70,7 @@ GEM
capybara (~> 3.37)
falcon
selenium-webdriver
faraday (2.12.1)
faraday (2.12.2)
faraday-net_http (>= 2.0, < 3.5)
json
logger
Expand All @@ -86,14 +86,14 @@ GEM
i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-endpoint (0.14.0)
io-event (1.7.4)
io-event (1.7.5)
io-stream (0.6.1)
json (2.9.0)
jwt (2.9.3)
base64
language_server-protocol (3.17.0.3)
localhost (1.3.1)
logger (1.6.2)
logger (1.6.3)
mapping (1.1.1)
matrix (0.4.2)
method_source (1.1.0)
Expand All @@ -108,9 +108,9 @@ GEM
bigdecimal (~> 3.1)
net-http (0.6.0)
uri
nokogiri (1.16.8-x86_64-darwin)
nokogiri (1.17.2-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.8-x86_64-linux)
nokogiri (1.17.2-x86_64-linux)
racc (~> 1.4)
oauth (1.1.0)
oauth-tty (~> 1.0, >= 1.0.1)
Expand All @@ -126,7 +126,7 @@ GEM
snaky_hash (~> 2.0)
version_gem (~> 1.1)
openssl (3.2.0)
ostruct (0.6.0)
ostruct (0.6.1)
parallel (1.26.3)
parser (3.3.6.0)
ast (~> 2.4.1)
Expand All @@ -142,7 +142,7 @@ GEM
protocol-http2 (0.22.0)
protocol-hpack (~> 1.4)
protocol-http (~> 0.18)
protocol-rack (0.11.0)
protocol-rack (0.11.1)
protocol-http (~> 0.43)
rack (>= 1.0)
pry (0.15.0)
Expand All @@ -161,13 +161,13 @@ GEM
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.3)
rexml (3.3.9)
rexml (3.4.0)
roda (3.86.0)
rack
roda-route_list (2.1.0)
roda
rollbar (3.6.0)
rubocop (1.69.1)
rubocop (1.69.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -177,7 +177,7 @@ GEM
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.2)
rubocop-ast (1.37.0)
parser (>= 3.3.1.0)
rubocop-performance (1.23.0)
rubocop (>= 1.48.1, < 2.0)
Expand Down Expand Up @@ -249,7 +249,7 @@ DEPENDENCIES
webdrivers

RUBY VERSION
ruby 3.3.5p100
ruby 3.3.6p108

BUNDLED WITH
2.5.23
2.5.22
2 changes: 1 addition & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class App < Roda

r.redirect '/auth/shelves'
rescue OAuth::Unauthorized
flash[:error] = 'Please authenticate first'
flash[:error] = 'Fetched details! Click login'
r.redirect '/'
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/goodreads.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def fetch_user request_token
response = access_token.get uri.to_s
xml = Nokogiri::XML response.body
user_id = xml.xpath('//user').first.attributes.first[1].value
name = xml.xpath('//user').first.children[1].children.text
xml.xpath('//user').first.children[1].children.text

[user_id, goodreads_token, goodreads_secret]
end
Expand Down
5 changes: 3 additions & 2 deletions lib/overdrive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def self.local_libraries zip_code
def initialize book_info, consortium_id
@book_info = book_info
@token = token

@collection_token = collection_token consortium_id, @token
@books = async_books_with_overdrive_info.wait
end
Expand Down Expand Up @@ -113,9 +114,9 @@ def add_library_availability_to_books
body['availability'].each do |result|
# fail occurs here

book = @books.find { |title, _|
book = @books.find do |title, _|
title.id = result['reserveId']
}.first
end.first
book.copies_available = result['copiesAvailable']
book.copies_owned = result['copiesOwned']
end
Expand Down

0 comments on commit 19667fe

Please sign in to comment.