votd 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/lib/votd/bible_gateway.rb +2 -0
- data/lib/votd/version.rb +1 -1
- data/lib/votd/votd_error.rb +4 -1
- data/spec/lib/votd/bible_gateway_spec.rb +17 -13
- data/votd.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57bcf6e57b91887386c042964ec51f28f4ab4c14b9e90a148b2912b0f5068fe6
|
4
|
+
data.tar.gz: 80b0bf8a03ff966a8db709ae04e1607cc2b8cbae184b3d0a5160eec14bcb058b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ececd1be7cdddd745cd30c1ebf5820174b28256630909b5b6a76943df9458a7e7f05df35a0de12ab0a43aa0f68b1914d95e410e3f55b9a62de70c9650e50e2be
|
7
|
+
data.tar.gz: ccbc79d8895676c15f7b7bfef738e87cc6a2ceecc43355c665db3bb0e7cd4df900e6c102b290b38c698926ce22adb46745a386a064d41d2ad676d4cdaff25163
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
3.0.1
|
5
|
+
-----
|
6
|
+
*November 27, 2019*
|
7
|
+
|
8
|
+
* Throw error when invalid version option passed to BibleGateway initializer
|
9
|
+
|
4
10
|
3.0.0
|
5
11
|
-----
|
6
12
|
*November 27, 2019*
|
@@ -9,7 +15,7 @@ Changelog
|
|
9
15
|
for supported versions)
|
10
16
|
* Add `.version_name` (alias: `.translation_name`) to get full version name.
|
11
17
|
(e.g. "New International Version")
|
12
|
-
* Add `.link` to get a link to the verse on the associated Bible site
|
18
|
+
* Add `.link` to get a link to the verse on the associated Bible site
|
13
19
|
|
14
20
|
2.2.0
|
15
21
|
-----
|
data/lib/votd/bible_gateway.rb
CHANGED
@@ -46,6 +46,8 @@ module Votd
|
|
46
46
|
# Initializes the BibleGateway class
|
47
47
|
# @return [BibleGateway]
|
48
48
|
def initialize(version = :niv)
|
49
|
+
raise InvalidBibleVersion unless BIBLE_VERSIONS.has_key?(version)
|
50
|
+
|
49
51
|
@version = version.to_s.upcase
|
50
52
|
@version_number = BIBLE_VERSIONS[version][:id]
|
51
53
|
@version_name = BIBLE_VERSIONS[version][:name]
|
data/lib/votd/version.rb
CHANGED
data/lib/votd/votd_error.rb
CHANGED
@@ -135,22 +135,26 @@ describe "Votd::BibleGateway" do
|
|
135
135
|
fake_a_uri("#{Votd::BibleGateway::URI}#{51}", 'bible_gateway/bible_gateway_nlt.rss')
|
136
136
|
end
|
137
137
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
end
|
138
|
+
it "returns the correct scripture verse" do
|
139
|
+
expect(votd_nlt.text).to eq "Let the message about Christ, in all its richness, fill your lives. Teach and counsel each other with all the wisdom he gives. Sing psalms and hymns and spiritual songs to God with thankful hearts."
|
140
|
+
end
|
142
141
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
142
|
+
it 'returns the correct version info' do
|
143
|
+
expect(votd_nlt.version).to eq 'NLT'
|
144
|
+
expect(votd_nlt.version_name).to eq 'New Living Translation'
|
145
|
+
end
|
147
146
|
|
148
|
-
|
149
|
-
|
150
|
-
|
147
|
+
it "returns copyright information" do
|
148
|
+
expect(votd_nlt.copyright).to eq "Brought to you by BibleGateway.com. Copyright (C) NLT. All Rights Reserved."
|
149
|
+
end
|
151
150
|
|
152
|
-
|
153
|
-
|
151
|
+
it 'returns the link' do
|
152
|
+
expect(votd_nlt.link).to eq 'https://www.biblegateway.com/passage/?search=Colossians+3%3A16&version=51'
|
153
|
+
end
|
154
|
+
|
155
|
+
context 'with an invalid version code' do
|
156
|
+
it 'throws an error' do
|
157
|
+
expect{ Votd::BibleGateway.new(:foo) }.to raise_error(Votd::InvalidBibleVersion)
|
154
158
|
end
|
155
159
|
end
|
156
160
|
end
|
data/votd.gemspec
CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |gem|
|
|
5
5
|
gem.authors = ["Steve Clarke", "Chris Clarke"]
|
6
6
|
gem.email = ["steve@sevenview.ca", "chris@seven7.ca"]
|
7
7
|
gem.summary = %q{Generate a (Bible) Verse of the Day using various web service wrappers}
|
8
|
-
gem.homepage = "
|
8
|
+
gem.homepage = "https://github.com/sevenview/votd"
|
9
9
|
|
10
10
|
gem.files = `git ls-files`.split($\)
|
11
11
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
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: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Clarke
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-11-
|
12
|
+
date: 2019-11-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -206,7 +206,7 @@ files:
|
|
206
206
|
- spec/lib/votd_spec.rb
|
207
207
|
- spec/spec_helper.rb
|
208
208
|
- votd.gemspec
|
209
|
-
homepage:
|
209
|
+
homepage: https://github.com/sevenview/votd
|
210
210
|
licenses:
|
211
211
|
- MIT
|
212
212
|
metadata: {}
|