Skip to content

Commit

Permalink
Use https instead of http for www.swissmedic.ch
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Feb 16, 2015
1 parent 86e33fc commit 4e6e2c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions History.txt
@@ -1,5 +1,6 @@
=== 1.9.5 /03.02.2015

* Use https instead of http for www.swissmedic.ch
* Added field CompositionSwissmedic to oddb_product.xml
* Unittests for upcoming oddb_calc.xml

Expand Down
2 changes: 1 addition & 1 deletion lib/oddb2xml/downloader.rb
Expand Up @@ -270,7 +270,7 @@ def initialize(type=:orphan, options = {})
action = "arzneimittel/00156/00221/00222/00230/index.html?lang=de"
@xpath = "//div[@id='sprungmarke10_7']//a[@title='Excel-Version Zugelassene Verpackungen*']"
end
url = "http://www.swissmedic.ch/#{action}"
url = "https://www.swissmedic.ch/#{action}"
super(@options, url)
end
def download
Expand Down
6 changes: 3 additions & 3 deletions spec/spec_helper.rb
Expand Up @@ -106,7 +106,7 @@ def setup_swissmedic_server_mock
:packages => {:html => '/arzneimittel/00156/00221/00222/00230/index.html?lang=de', :xls => '/download'},
}.each_pair do |type, urls|
# html (dummy)
stub_html_url = "http://#{host}" + urls[:html]
stub_html_url = "https://#{host}" + urls[:html]
filename = File.join(Oddb2xml::SpecData, "swissmedic_#{type.to_s}.html")

stub_response = File.read(filename)
Expand All @@ -122,10 +122,10 @@ def setup_swissmedic_server_mock
:body => stub_response)
# xls
if type == :orphans
stub_xls_url = "http://#{host}" + urls[:xls] + "/swissmedic_orphan.xlsx"
stub_xls_url = "https://#{host}" + urls[:xls] + "/swissmedic_orphan.xlsx"
stub_response = File.read(File.join(Oddb2xml::SpecData, "swissmedic_orphan.xlsx"))
else
stub_xls_url = "http://#{host}" + urls[:xls] + "/swissmedic_#{type.to_s}.xlsx"
stub_xls_url = "https://#{host}" + urls[:xls] + "/swissmedic_#{type.to_s}.xlsx"
stub_response = 'no_such_file'
end
stub_request(:get, stub_xls_url).
Expand Down

0 comments on commit 4e6e2c7

Please sign in to comment.