Skip to content

Commit

Permalink
Use https://cal.syoboi.jp instead of http
Browse files Browse the repository at this point in the history
  • Loading branch information
sue445 committed May 3, 2024
1 parent 7926852 commit a9c7442
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/syobocalite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def self.fetch(start_at:, end_at:)
"User-Agent" => user_agent,
}

URI.open("http://cal.syoboi.jp/cal_chk.php?#{params.to_param}", headers).read
URI.open("https://cal.syoboi.jp/cal_chk.php?#{params.to_param}", headers).read
end
private_class_method :fetch
end
6 changes: 3 additions & 3 deletions spec/syobocalite_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
subject(:programs) { Syobocalite.search(start_at: start_at, end_at: end_at) }

before do
stub_request(:get, "http://cal.syoboi.jp/cal_chk.php?days=1&start=2017-05-07").
stub_request(:get, "https://cal.syoboi.jp/cal_chk.php?days=1&start=2017-05-07").
to_return(status: 200, body: fixture("cal_chk_20170507.xml"))

stub_request(:get, "http://cal.syoboi.jp/cal_chk.php?days=2&start=2017-05-06").
stub_request(:get, "https://cal.syoboi.jp/cal_chk.php?days=2&start=2017-05-06").
to_return(status: 200, body: fixture("cal_chk_20170506-20170507.xml"))
end

Expand Down Expand Up @@ -50,7 +50,7 @@

context "contains html entity" do
before do
stub_request(:get, "http://cal.syoboi.jp/cal_chk.php?days=1&start=2018-05-02").
stub_request(:get, "https://cal.syoboi.jp/cal_chk.php?days=1&start=2018-05-02").
to_return(status: 200, body: fixture("cal_chk_20180502.xml"))
end

Expand Down

0 comments on commit a9c7442

Please sign in to comment.