Skip to content

Commit

Permalink
Merge branch 'master' of github.com:next-l/enju_manifestation_viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed Aug 15, 2019
2 parents e9559fb + fc2cc28 commit e955b6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions app/helpers/enju_manifestation_viewer/book_jacket_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def book_jacket_tag(manifestation, generator = LibraryGroup.site_config.book_jac

book_jacket = manifestation.amazon_book_jacket
if book_jacket
link_to image_tag(book_jacket[:url], width: book_jacket[:width], height: book_jacket[:height], alt: manifestation.original_title, class: 'book_jacket', itemprop: 'image'), "http://#{LibraryGroup.site_config.settings[:amazon_hostname]}/dp/#{book_jacket[:asin]}"
link_to image_tag(book_jacket[:url], width: book_jacket[:width], height: book_jacket[:height], alt: manifestation.original_title, class: 'book_jacket', itemprop: 'image'), "https://#{LibraryGroup.site_config.settings[:amazon_hostname]}/dp/#{book_jacket[:asin]}"
end
when "google"
render partial: 'manifestations/google_book_thumbnail', locals: {manifestation: manifestation}
Expand All @@ -60,15 +60,15 @@ def book_jacket_tag(manifestation, generator = LibraryGroup.site_config.book_jac
def amazon_link(asin, hostname = LibraryGroup.site_config.settings[:amazon_hostname])
return nil if asin.blank?

"http://#{hostname}/dp/#{asin}"
"https://#{hostname}/dp/#{asin}"
end

def book_jacket_source_link(source = LibraryGroup.site_config.book_jacket_source)
case source
when "google"
link_to "Google Books", "http://books.google.com/"
link_to "Google Books", "https://books.google.com/"
when "amazon"
link_to "Amazon Web Services", "http://aws.amazon.com/"
link_to "Amazon Web Services", "https://aws.amazon.com/"
end
end

Expand All @@ -87,13 +87,13 @@ def book_jacket_header(source = LibraryGroup.site_config.book_jacket_source)
def screenshot_generator_link(generator = LibraryGroup.site_config.screenshot_generator)
case generator
when "mozshot"
link_to "MozShot", "http://mozshot.nemui.org/"
link_to "MozShot", "https://blinky.nemui.org/"
when "simpleapi"
link_to "SimpleAPI", "http://img.simpleapi.net/"
when "heartrails"
link_to "HeartRails Capture", "http://capture.heartrails.com/"
when "thumbalizr"
link_to "thumbalizr", "http://www.thumbalizr.com/"
link_to "thumbalizr", "https://www.thumbalizr.com/"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/book_jacket_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
end

it "should generate a link to Amazon" do
helper.amazon_link(manifestations(:manifestation_00001).identifier_contents(:isbn).first).should =~ /http:\/\/www.amazon.co.jp\/dp\/4798002062/
helper.amazon_link(manifestations(:manifestation_00001).identifier_contents(:isbn).first).should =~ /https:\/\/www.amazon.co.jp\/dp\/4798002062/
end

it "should get honmoto.com book jacket" do
Expand Down

0 comments on commit e955b6d

Please sign in to comment.