Infobox is parsing for an issue now

pull/8/head
Nemo 3 years ago
parent f11f64b9d5
commit 6b278531fd
  1. 14
      spec/issue_spec.cr
  2. 3
      src/issue.cr

@ -14,14 +14,14 @@ describe Muse::Dl::Issue do
issue.url.should eq "https://muse.jhu.edu/issue/41793"
end
# it "should parse info correctly" do
# issue.info["ISSN"].should eq "1530-7131"
# issue.info["Print ISSN"].should eq "1531-2542"
# issue.info["Launched on MUSE"].should eq "2020-02-05"
# issue.info["Open Access"].should eq "No"
it "should parse info correctly" do
issue.info["ISSN"].should eq "1530-7131"
issue.info["Print ISSN"].should eq "1531-2542"
issue.info["Launched on MUSE"].should eq "2020-02-05"
issue.info["Open Access"].should eq "No"
# issue.title.should eq "Volume 20, Number 1, January 2020"
# end
# issue.title.should eq "Volume 20, Number 1, January 2020"
end
# it "should parser summary" do
# issue.summary.should eq <<-EOT

@ -8,7 +8,7 @@ module Muse::Dl
@title : String | Nil
@articles : Array(Muse::Dl::Article)
@url : String
@info : Hash(String, String) | Nil
@info : Hash(String, String)
@summary : String | Nil
@publisher : String | Nil
@ -18,6 +18,7 @@ module Muse::Dl
@id = id
@url = "https://muse.jhu.edu/issue/#{id}"
@title = "NA"
@info = Hash(String, String).new
@articles = [] of Muse::Dl::Article
end

Loading…
Cancel
Save