plos 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,51 @@
1
+ require 'plos'
2
+
3
+ describe PLOS do
4
+ context "Article 2" do
5
+ let(:article) { PLOS::Article.new(Nokogiri::XML(File.read("spec/article2.xml"))) }
6
+
7
+ it "should have the proper article title" do
8
+ article.article_title.should == "Clinical Xenotransplantation of Organs: Why Aren't We There Yet?"
9
+ end
10
+
11
+ it "should have the proper journal title" do
12
+ article.journal_title.should == "PLoS Medicine"
13
+ end
14
+
15
+ it "should have the proper issn" do
16
+ article.issns.should == {"ppub"=>"1549-1277", "epub"=>"1549-1676"}
17
+ end
18
+
19
+ it "should have no affiliations" do
20
+ article.affiliations.should be_empty
21
+ end
22
+
23
+ it "should have a single contributors" do
24
+ article.contributors.size.should == 1
25
+ end
26
+
27
+ it "should have a single authors" do
28
+ article.authors.size.should == 1
29
+ end
30
+
31
+ it "should not have an editor" do
32
+ article.editors.should be_empty
33
+ end
34
+
35
+ it "should have 1 figures" do
36
+ article.figures.size.should == 1
37
+ end
38
+
39
+ it "should have 75 references" do
40
+ article.references.size.should == 75
41
+ end
42
+
43
+ it "should have 17 sections" do
44
+ article.sections.size.should == 17
45
+ end
46
+
47
+ it "should not have named content" do
48
+ article.named_content.should be_empty
49
+ end
50
+ end
51
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-28 00:00:00.000000000 Z
12
+ date: 2013-02-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -90,10 +90,23 @@ files:
90
90
  - README.md
91
91
  - Rakefile
92
92
  - lib/plos.rb
93
+ - lib/plos/affiliation.rb
94
+ - lib/plos/article.rb
93
95
  - lib/plos/article_ref.rb
96
+ - lib/plos/article_set.rb
94
97
  - lib/plos/client.rb
98
+ - lib/plos/contributor.rb
99
+ - lib/plos/figure.rb
100
+ - lib/plos/name.rb
101
+ - lib/plos/reference.rb
102
+ - lib/plos/section.rb
95
103
  - lib/plos/version.rb
104
+ - lib/plos/xml_helpers.rb
96
105
  - plos.gemspec
106
+ - spec/article1.xml
107
+ - spec/article1_spec.rb
108
+ - spec/article2.xml
109
+ - spec/article2_spec.rb
97
110
  - spec/plos_spec.rb
98
111
  homepage: https://github.com/cpetersen/plos
99
112
  licenses: []
@@ -109,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
122
  version: '0'
110
123
  segments:
111
124
  - 0
112
- hash: 3325667330743682461
125
+ hash: 2041436036673742898
113
126
  required_rubygems_version: !ruby/object:Gem::Requirement
114
127
  none: false
115
128
  requirements:
@@ -118,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
131
  version: '0'
119
132
  segments:
120
133
  - 0
121
- hash: 3325667330743682461
134
+ hash: 2041436036673742898
122
135
  requirements: []
123
136
  rubyforge_project:
124
137
  rubygems_version: 1.8.24
@@ -127,4 +140,8 @@ specification_version: 3
127
140
  summary: A Ruby library for interacting with the Public Library of Science (PLoS)
128
141
  API
129
142
  test_files:
143
+ - spec/article1.xml
144
+ - spec/article1_spec.rb
145
+ - spec/article2.xml
146
+ - spec/article2_spec.rb
130
147
  - spec/plos_spec.rb