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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b25aca7bbd23dfa9a4ecd49e2880b3f9e059f7a0fa0ff04a3d97fbda46c3a92b
4
- data.tar.gz: 32bb871d6a200a34d553fbb784c94af5d56358f203dbe6387db6e7e40c11ed7f
3
+ metadata.gz: 57bcf6e57b91887386c042964ec51f28f4ab4c14b9e90a148b2912b0f5068fe6
4
+ data.tar.gz: 80b0bf8a03ff966a8db709ae04e1607cc2b8cbae184b3d0a5160eec14bcb058b
5
5
  SHA512:
6
- metadata.gz: 2e65b6ff4787364c3eb269baa095503a13d561e87b40e81f83da2fc0d69d8635d648b59738adfc396cea5f528978073ba5b6f4b61cb231b6291f554c02ba5039
7
- data.tar.gz: 2800cfef14f6fb8ee2f1968022c6748888badc38f2121bce001f3e565590ce0ab942b654ba19eb5f4b39321379831e82379e5dd52dfb3a0aeb24fa3f62a3a5c1
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
  -----
@@ -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
@@ -1,4 +1,4 @@
1
1
  module Votd
2
2
  # Gem version number
3
- VERSION = "3.0.0"
3
+ VERSION = "3.0.1"
4
4
  end
@@ -3,4 +3,7 @@ module Votd
3
3
  # by Votd.
4
4
  class VotdError < StandardError
5
5
  end
6
- end
6
+
7
+ class InvalidBibleVersion < VotdError
8
+ end
9
+ end
@@ -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
- describe ".text" do
139
- it "returns the correct scripture verse" do
140
- 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."
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
- it 'returns the correct version info' do
144
- expect(votd_nlt.version).to eq 'NLT'
145
- expect(votd_nlt.version_name).to eq 'New Living Translation'
146
- end
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
- it "returns copyright information" do
149
- expect(votd_nlt.copyright).to eq "Brought to you by BibleGateway.com. Copyright (C) NLT. All Rights Reserved."
150
- end
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
- it 'returns the link' do
153
- expect(votd_nlt.link).to eq 'https://www.biblegateway.com/passage/?search=Colossians+3%3A16&version=51'
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 = "http://sevenview.github.com/votd"
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.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-27 00:00:00.000000000 Z
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: http://sevenview.github.com/votd
209
+ homepage: https://github.com/sevenview/votd
210
210
  licenses:
211
211
  - MIT
212
212
  metadata: {}