votd 2.2.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,48 +9,61 @@ describe "Votd::NETBible" do
9
9
  end
10
10
 
11
11
  it "is a type of NETBible" do
12
- votd.should be_a(Votd::NetBible)
12
+ expect(votd).to be_a(Votd::NetBible)
13
13
  end
14
14
 
15
15
  describe ".text" do
16
16
  it "returns the correct scripture verse" do
17
- votd.text.should == "For by grace you are saved through faith... it is not from works, so that no one can boast."
17
+ expect(votd.text).to eq "For by grace you are saved through faith... it is not from works, so that no one can boast."
18
18
  end
19
19
 
20
20
  it "contains no HTML tags" do
21
21
  fake_a_uri(Votd::NetBible::URI, "netbible/netbible_with_html.json")
22
- votd.text.should_not =~ /<\/?[^>]*>/
22
+ expect(votd.text).to_not match /<\/?[^>]*>/
23
23
  end
24
24
  end
25
25
 
26
26
  describe ".reference" do
27
27
  it "returns the correct scripture reference" do
28
- votd.reference.should == "Ephesians 2:8-9"
28
+ expect(votd.reference).to eq "Ephesians 2:8-9"
29
29
  end
30
30
  end
31
31
 
32
32
  describe ".version / .translation" do
33
33
  it "returns the correct bible version" do
34
- votd.version.should == "NETBible"
35
- votd.translation.should == "NETBible"
34
+ expect(votd.version).to eq "NETBible"
35
+ expect(votd.translation).to eq "NETBible"
36
+ end
37
+ end
38
+
39
+ describe ".version_name / .translation_name" do
40
+ it "returns the correct bible version" do
41
+ expect(votd.version_name).to eq "NET Bible"
42
+ expect(votd.translation_name).to eq "NET Bible"
36
43
  end
37
44
  end
38
45
 
39
46
  describe ".date" do
40
47
  it "returns the correct date" do
41
- votd.date.should == Date.today
48
+ expect(votd.date).to eq Date.today
42
49
  end
43
50
  end
44
51
 
45
52
  describe ".copyright" do
46
53
  it "returns nil copyright information" do
47
- votd.copyright.should be_nil
54
+ expect(votd.copyright).to be_nil
55
+ end
56
+ end
57
+
58
+ describe ".link" do
59
+ it 'returns the link' do
60
+ expect(votd.link).to eq 'https://netbible.org/bible/Ephesians+2:8'
48
61
  end
49
62
  end
50
63
 
51
64
  describe ".to_html" do
52
65
  it "returns a HTML version" do
53
- votd.to_html.should == read_fixture("netbible/netbible.html")
66
+ expect(votd.to_html).to eq read_fixture("netbible/netbible.html")
54
67
  end
55
68
  end
56
69
 
@@ -59,21 +72,21 @@ describe "Votd::NETBible" do
59
72
  votd.custom_html do |votd|
60
73
  "<p>#{votd.reference}|#{votd.text}|#{votd.version}</p>"
61
74
  end
62
- votd.to_html.should == read_fixture("netbible/netbible_custom.html")
75
+ expect(votd.to_html).to eq read_fixture("netbible/netbible_custom.html")
63
76
  end
64
77
 
65
78
  it "generates a VotdError when not used with a block" do
66
- expect{votd.custom_html}.to raise_error(Votd::VotdError)
79
+ expect{ votd.custom_html }.to raise_error(Votd::VotdError)
67
80
  end
68
81
  end
69
82
 
70
83
  describe ".to_text" do
71
84
  it "returns a text-formatted version" do
72
- votd.to_text.should == read_fixture("netbible/netbible.txt")
85
+ expect(votd.to_text).to eq read_fixture("netbible/netbible.txt")
73
86
  end
74
87
 
75
88
  it "is aliased to .to_s" do
76
- votd.to_s.should == read_fixture("netbible/netbible.txt")
89
+ expect(votd.to_s).to eq read_fixture("netbible/netbible.txt")
77
90
  end
78
91
  end
79
92
 
@@ -83,12 +96,12 @@ describe "Votd::NETBible" do
83
96
  "#{votd.reference}|#{votd.text}|#{votd.version}"
84
97
  end
85
98
  desired_output = read_fixture("netbible/netbible_custom.txt")
86
- text_from_block.should == desired_output
87
- votd.to_text.should == desired_output
99
+ expect(text_from_block).to eq desired_output
100
+ expect(votd.to_text).to eq desired_output
88
101
  end
89
102
 
90
103
  it "generates a VotdError when not used with a block" do
91
- expect{votd.custom_text}.to raise_error(Votd::VotdError)
104
+ expect{ votd.custom_text }.to raise_error(Votd::VotdError)
92
105
  end
93
106
  end
94
107
 
@@ -98,9 +111,9 @@ describe "Votd::NETBible" do
98
111
  end
99
112
 
100
113
  it "falls back to default VotD values" do
101
- votd.version.should == Votd::Base::DEFAULT_BIBLE_VERSION
102
- votd.reference.should == Votd::Base::DEFAULT_BIBLE_REFERENCE
103
- votd.text.should == Votd::Base::DEFAULT_BIBLE_TEXT
114
+ expect(votd.version).to eq Votd::Base::DEFAULT_BIBLE_VERSION
115
+ expect(votd.reference).to eq Votd::Base::DEFAULT_BIBLE_REFERENCE
116
+ expect(votd.text).to eq Votd::Base::DEFAULT_BIBLE_TEXT
104
117
  end
105
118
  end
106
119
 
@@ -110,11 +123,11 @@ describe "Votd::NETBible" do
110
123
  end
111
124
 
112
125
  it "prepends an ellipsis if first letter is not a capital letter" do
113
- votd.text.should =~ /^\.{3}\w/
126
+ expect(votd.text).to match /^\.{3}\w/
114
127
  end
115
128
 
116
129
  it "appends an ellipsis if last character is not a period" do
117
- votd.text.should =~ /\w\.{1,3}$/
130
+ expect(votd.text).to match /\w\.{1,3}$/
118
131
  end
119
132
 
120
133
  end
@@ -2,6 +2,6 @@ require 'spec_helper'
2
2
 
3
3
  describe "Votd::VERSION" do
4
4
  it "has a VERSION number" do
5
- Votd::VERSION.should be
5
+ expect(Votd::VERSION).to be
6
6
  end
7
- end
7
+ end
data/votd.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.required_ruby_version = ">= 1.9.3"
19
19
 
20
20
  gem.add_runtime_dependency "httparty"
21
- gem.add_runtime_dependency "feedzirra", "~> 0.2.0.rc2"
21
+ gem.add_runtime_dependency "feedjira"
22
22
  gem.add_development_dependency "rake"
23
23
  gem.add_development_dependency "webmock"
24
24
  gem.add_development_dependency "rspec"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: votd
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Clarke
@@ -9,132 +9,132 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-31 00:00:00.000000000 Z
12
+ date: 2019-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
- name: feedzirra
29
+ name: feedjira
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 0.2.0.rc2
34
+ version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: 0.2.0.rc2
41
+ version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rake
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: webmock
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rspec
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: guard-rspec
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - '>='
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: guard-bundler
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - '>='
109
+ - - ">="
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: yard
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - '>='
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - '>='
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: redcarpet
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - '>='
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  type: :development
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - '>='
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  description:
@@ -146,10 +146,11 @@ executables:
146
146
  extensions: []
147
147
  extra_rdoc_files: []
148
148
  files:
149
- - .gitignore
150
- - .rspec
151
- - .travis.yml
152
- - .yardopts
149
+ - ".gitignore"
150
+ - ".rspec"
151
+ - ".ruby-version"
152
+ - ".travis.yml"
153
+ - ".yardopts"
153
154
  - CHANGELOG.md
154
155
  - CONTRIBUTING.md
155
156
  - Gemfile
@@ -178,6 +179,7 @@ files:
178
179
  - spec/fixtures/bible_gateway/bible_gateway.txt
179
180
  - spec/fixtures/bible_gateway/bible_gateway_custom.html
180
181
  - spec/fixtures/bible_gateway/bible_gateway_custom.txt
182
+ - spec/fixtures/bible_gateway/bible_gateway_nlt.rss
181
183
  - spec/fixtures/bible_gateway/bible_gateway_with_partial.rss
182
184
  - spec/fixtures/esvbible/esvbible.html
183
185
  - spec/fixtures/esvbible/esvbible.rss
@@ -214,17 +216,16 @@ require_paths:
214
216
  - lib
215
217
  required_ruby_version: !ruby/object:Gem::Requirement
216
218
  requirements:
217
- - - '>='
219
+ - - ">="
218
220
  - !ruby/object:Gem::Version
219
221
  version: 1.9.3
220
222
  required_rubygems_version: !ruby/object:Gem::Requirement
221
223
  requirements:
222
- - - '>='
224
+ - - ">="
223
225
  - !ruby/object:Gem::Version
224
226
  version: '0'
225
227
  requirements: []
226
- rubyforge_project:
227
- rubygems_version: 2.0.6
228
+ rubygems_version: 3.0.6
228
229
  signing_key:
229
230
  specification_version: 4
230
231
  summary: Generate a (Bible) Verse of the Day using various web service wrappers
@@ -238,6 +239,7 @@ test_files:
238
239
  - spec/fixtures/bible_gateway/bible_gateway.txt
239
240
  - spec/fixtures/bible_gateway/bible_gateway_custom.html
240
241
  - spec/fixtures/bible_gateway/bible_gateway_custom.txt
242
+ - spec/fixtures/bible_gateway/bible_gateway_nlt.rss
241
243
  - spec/fixtures/bible_gateway/bible_gateway_with_partial.rss
242
244
  - spec/fixtures/esvbible/esvbible.html
243
245
  - spec/fixtures/esvbible/esvbible.rss
@@ -263,4 +265,3 @@ test_files:
263
265
  - spec/lib/votd/votd_error_spec.rb
264
266
  - spec/lib/votd_spec.rb
265
267
  - spec/spec_helper.rb
266
- has_rdoc: