votd 3.0.2 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -0
- data/LICENSE +1 -1
- data/README.md +24 -22
- data/exe/votd +9 -0
- data/lib/votd/base.rb +37 -22
- data/lib/votd/bible_gateway.rb +80 -72
- data/lib/votd/cli.rb +117 -0
- data/lib/votd/esvbible.rb +13 -49
- data/lib/votd/fetch_error.rb +8 -0
- data/lib/votd/helper/command_line.rb +9 -9
- data/lib/votd/helper/text.rb +9 -7
- data/lib/votd/netbible.rb +33 -29
- data/lib/votd/ourmanna.rb +45 -0
- data/lib/votd/version.rb +3 -1
- data/lib/votd/votd_error.rb +4 -0
- data/lib/votd.rb +42 -0
- metadata +37 -197
- data/.github/workflows/ruby.yml +0 -20
- data/.gitignore +0 -19
- data/.rspec +0 -2
- data/.ruby-version +0 -1
- data/.travis.yml +0 -11
- data/.yardopts +0 -7
- data/CONTRIBUTING.md +0 -46
- data/Gemfile +0 -4
- data/Guardfile +0 -10
- data/Rakefile +0 -13
- data/TODO.md +0 -5
- data/bin/votd +0 -25
- data/lib/votd/helper/helper.rb +0 -6
- data/spec/fixtures/base/base.html +0 -5
- data/spec/fixtures/base/base.txt +0 -1
- data/spec/fixtures/base/base_custom.html +0 -1
- data/spec/fixtures/base/base_custom.txt +0 -1
- data/spec/fixtures/bible_gateway/bible_gateway.html +0 -5
- data/spec/fixtures/bible_gateway/bible_gateway.rss +0 -33
- data/spec/fixtures/bible_gateway/bible_gateway.txt +0 -1
- data/spec/fixtures/bible_gateway/bible_gateway_custom.html +0 -1
- data/spec/fixtures/bible_gateway/bible_gateway_custom.txt +0 -1
- data/spec/fixtures/bible_gateway/bible_gateway_nlt.rss +0 -34
- data/spec/fixtures/bible_gateway/bible_gateway_with_partial.rss +0 -32
- data/spec/fixtures/esvbible/esvbible.html +0 -5
- data/spec/fixtures/esvbible/esvbible.rss +0 -19
- data/spec/fixtures/esvbible/esvbible.txt +0 -1
- data/spec/fixtures/esvbible/esvbible_custom.html +0 -1
- data/spec/fixtures/esvbible/esvbible_custom.txt +0 -1
- data/spec/fixtures/esvbible/esvbible_with_partial.rss +0 -19
- data/spec/fixtures/netbible/netbible.html +0 -5
- data/spec/fixtures/netbible/netbible.json +0 -14
- data/spec/fixtures/netbible/netbible.txt +0 -1
- data/spec/fixtures/netbible/netbible_custom.html +0 -1
- data/spec/fixtures/netbible/netbible_custom.txt +0 -1
- data/spec/fixtures/netbible/netbible_with_html.json +0 -1
- data/spec/fixtures/netbible/netbible_with_partial.json +0 -8
- data/spec/lib/votd/base_spec.rb +0 -96
- data/spec/lib/votd/bible_gateway_spec.rb +0 -161
- data/spec/lib/votd/esvbible_spec.rb +0 -127
- data/spec/lib/votd/helper/command_line_spec.rb +0 -21
- data/spec/lib/votd/helper/helper_spec.rb +0 -3
- data/spec/lib/votd/helper/text_spec.rb +0 -32
- data/spec/lib/votd/netbible_spec.rb +0 -135
- data/spec/lib/votd/version_spec.rb +0 -7
- data/spec/lib/votd/votd_error_spec.rb +0 -5
- data/spec/lib/votd_spec.rb +0 -4
- data/spec/spec_helper.rb +0 -26
- data/votd.gemspec +0 -29
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Votd
|
|
2
4
|
module Helper
|
|
3
5
|
# This module contains helper methods that support the
|
|
4
6
|
# command-line application
|
|
5
7
|
module CommandLine
|
|
6
8
|
extend self
|
|
9
|
+
|
|
7
10
|
# Generates a text banner suitable for displaying from a command-line
|
|
8
11
|
# utility.
|
|
9
12
|
# @example
|
|
@@ -13,15 +16,12 @@ module Votd
|
|
|
13
16
|
# ====================
|
|
14
17
|
# My Banner
|
|
15
18
|
# ====================
|
|
16
|
-
# @param [Integer] line_width number of columns for width
|
|
17
19
|
# @param [String] text text to print inside the banner
|
|
20
|
+
# @param [Integer] line_width number of columns for width
|
|
18
21
|
# @return [nil]
|
|
19
|
-
def banner(text, line_width=40)
|
|
20
|
-
|
|
21
|
-
banner_text
|
|
22
|
-
banner_text << text.center(line_width)
|
|
23
|
-
banner_text << "\n"
|
|
24
|
-
banner_text << "=" * line_width
|
|
22
|
+
def banner(text, line_width = 40)
|
|
23
|
+
separator = "=" * line_width
|
|
24
|
+
banner_text = [separator, text.center(line_width), separator].join("\n")
|
|
25
25
|
puts banner_text
|
|
26
26
|
nil
|
|
27
27
|
end
|
|
@@ -30,9 +30,9 @@ module Votd
|
|
|
30
30
|
# @param [String] text the text to be wrapped
|
|
31
31
|
# @param [Integer] line_width column width
|
|
32
32
|
# @return [String] wrapped text
|
|
33
|
-
def word_wrap(text, line_width=40)
|
|
33
|
+
def word_wrap(text, line_width = 40)
|
|
34
34
|
text.split("\n").collect do |line|
|
|
35
|
-
line.length > line_width ? line.gsub(/(.{1,#{line_width}})(\s+|$)/, "\\1\n").strip : line
|
|
35
|
+
(line.length > line_width) ? line.gsub(/(.{1,#{line_width}})(\s+|$)/, "\\1\n").strip : line
|
|
36
36
|
end * "\n"
|
|
37
37
|
end
|
|
38
38
|
end
|
data/lib/votd/helper/text.rb
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Votd
|
|
4
|
+
# Namespace for helper modules used internally by VotD providers and the CLI.
|
|
2
5
|
module Helper
|
|
3
6
|
# This module contains helper methods that support the
|
|
4
7
|
# VotD text parsing.
|
|
5
8
|
module Text
|
|
6
9
|
extend self
|
|
10
|
+
|
|
7
11
|
# Removes HTML tags from the given text
|
|
8
12
|
# @param [String] text the text you want to strip HTML tags from
|
|
9
13
|
# @return [String]
|
|
10
14
|
def strip_html_tags(text)
|
|
11
|
-
text.gsub(/<\/?[^>]*>/,
|
|
15
|
+
text.gsub(/<\/?[^>]*>/, "")
|
|
12
16
|
end
|
|
13
|
-
|
|
17
|
+
|
|
14
18
|
# Prepends '...' if first letter is not a capital letter
|
|
15
19
|
# @param [String] text the text to process
|
|
16
20
|
# @return [String]
|
|
@@ -23,16 +27,14 @@ module Votd
|
|
|
23
27
|
# @return [String]
|
|
24
28
|
def clean_verse_end(text)
|
|
25
29
|
case text
|
|
26
|
-
when /[a-zA-Z]$/
|
|
27
|
-
text
|
|
30
|
+
when /[a-zA-Z]$/
|
|
31
|
+
"#{text}..."
|
|
28
32
|
when /[,;]$/
|
|
29
|
-
text.sub
|
|
33
|
+
text.sub(/[,;]$/, "...")
|
|
30
34
|
else
|
|
31
35
|
text
|
|
32
36
|
end
|
|
33
|
-
text
|
|
34
37
|
end
|
|
35
|
-
|
|
36
38
|
end
|
|
37
39
|
end
|
|
38
40
|
end
|
data/lib/votd/netbible.rb
CHANGED
|
@@ -1,29 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Votd
|
|
4
|
-
# Retrieves a Verse of the Day from
|
|
4
|
+
# Retrieves a Verse of the Day from https://labs.bible.org using the NETBible
|
|
5
5
|
# translation.
|
|
6
|
+
#
|
|
7
|
+
# @example
|
|
8
|
+
# votd = Votd::NetBible.new
|
|
9
|
+
# votd.text # => "For God so loved the world..."
|
|
10
|
+
# votd.reference # => "John 3:16"
|
|
11
|
+
# votd.version # => "NETBible"
|
|
6
12
|
class NetBible < Votd::Base
|
|
7
13
|
# The name of the Bible Translation that this module generates
|
|
8
|
-
BIBLE_VERSION =
|
|
9
|
-
|
|
14
|
+
BIBLE_VERSION = "NETBible"
|
|
15
|
+
# The full name of the Bible translation
|
|
16
|
+
BIBLE_VERSION_NAME = "NET Bible"
|
|
10
17
|
|
|
11
|
-
# The
|
|
12
|
-
|
|
18
|
+
# The URL of the API gateway
|
|
19
|
+
ENDPOINT_URL = "https://labs.bible.org/api/?passage=votd&type=json"
|
|
13
20
|
|
|
14
|
-
# The
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
# Initializes the NetBible class
|
|
18
|
-
# @return [Votd::NetBible]
|
|
19
|
-
def initialize
|
|
20
|
-
super
|
|
21
|
-
end
|
|
21
|
+
# The URL of the website to view the verse (used in ``.link``)
|
|
22
|
+
NET_BIBLE_URL = "https://netbible.org/bible"
|
|
22
23
|
|
|
23
24
|
private
|
|
24
|
-
|
|
25
|
+
|
|
26
|
+
# Fetches the verse of the day in JSON format from bible.org.
|
|
27
|
+
# Parses the response, builds the reference, cleans the verse text,
|
|
28
|
+
# and generates a link to the passage.
|
|
29
|
+
# @raise [FetchError] if the HTTP request or JSON parsing fails
|
|
30
|
+
# @return [void]
|
|
25
31
|
def get_votd
|
|
26
|
-
netbible_data = JSON.parse(HTTParty.get(
|
|
32
|
+
netbible_data = JSON.parse(HTTParty.get(ENDPOINT_URL))
|
|
27
33
|
|
|
28
34
|
# use bookname from first verse -- assume votd won't span books
|
|
29
35
|
bookname = netbible_data[0]["bookname"]
|
|
@@ -31,16 +37,12 @@ module Votd
|
|
|
31
37
|
# use chapter from first verse -- assume votd won't span chapters
|
|
32
38
|
chapter = netbible_data[0]["chapter"]
|
|
33
39
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
verses = Array.new
|
|
37
|
-
netbible_data.each do |verse|
|
|
38
|
-
verse_numbers << verse["verse"]
|
|
39
|
-
verses << verse["text"]
|
|
40
|
-
end
|
|
40
|
+
verse_numbers = netbible_data.map { |v| v["verse"] }
|
|
41
|
+
verses = netbible_data.map { |v| v["text"] }
|
|
41
42
|
|
|
42
43
|
# now build the reference
|
|
43
|
-
@reference = "#{bookname} #{chapter}:#{verse_numbers.
|
|
44
|
+
@reference = "#{bookname} #{chapter}:#{verse_numbers.first}"
|
|
45
|
+
@reference += "-#{verse_numbers.last}" if verse_numbers.size > 1
|
|
44
46
|
|
|
45
47
|
# build the text
|
|
46
48
|
text = Helper::Text.strip_html_tags(verses.join(" "))
|
|
@@ -53,15 +55,17 @@ module Votd
|
|
|
53
55
|
@version_name = BIBLE_VERSION_NAME
|
|
54
56
|
|
|
55
57
|
@link = generate_link(bookname, chapter, verse_numbers.first)
|
|
56
|
-
|
|
57
58
|
rescue => e
|
|
58
|
-
|
|
59
|
-
set_defaults
|
|
60
|
-
# @todo Add logging
|
|
59
|
+
report_and_raise(e, "Failed to fetch verse from NetBible")
|
|
61
60
|
end
|
|
62
61
|
|
|
62
|
+
# Generates a URL to the verse on netbible.org.
|
|
63
|
+
# @param [String] bookname the book name (e.g. "John")
|
|
64
|
+
# @param [String] chapter the chapter number
|
|
65
|
+
# @param [String] verse_number the starting verse number
|
|
66
|
+
# @return [String] the full URL to the passage
|
|
63
67
|
def generate_link(bookname, chapter, verse_number)
|
|
64
|
-
"#{
|
|
68
|
+
"#{NET_BIBLE_URL}/#{bookname}+#{chapter}:#{verse_number}"
|
|
65
69
|
end
|
|
66
70
|
end
|
|
67
71
|
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Votd
|
|
4
|
+
# Retrieves a Verse of the Day from https://ourmanna.com using the NIV
|
|
5
|
+
# translation.
|
|
6
|
+
#
|
|
7
|
+
# @example
|
|
8
|
+
# votd = Votd::OurManna.new
|
|
9
|
+
# votd.text # => "For God so loved the world..."
|
|
10
|
+
# votd.reference # => "John 3:16"
|
|
11
|
+
# votd.version # => "NIV"
|
|
12
|
+
class OurManna < Votd::Base
|
|
13
|
+
# The name of the Bible Translation that this module generates
|
|
14
|
+
BIBLE_VERSION = "NIV"
|
|
15
|
+
# The full name of the Bible translation
|
|
16
|
+
BIBLE_VERSION_NAME = "New International Version"
|
|
17
|
+
|
|
18
|
+
# The URL of the API gateway
|
|
19
|
+
ENDPOINT_URL = "https://beta.ourmanna.com/api/v1/get?format=json&order=daily"
|
|
20
|
+
|
|
21
|
+
private
|
|
22
|
+
|
|
23
|
+
# Fetches the verse of the day in JSON format from ourmanna.com.
|
|
24
|
+
# Parses the response and extracts reference, text, link, and copyright.
|
|
25
|
+
# @raise [FetchError] if the HTTP request or JSON parsing fails
|
|
26
|
+
# @return [void]
|
|
27
|
+
def get_votd
|
|
28
|
+
data = JSON.parse(HTTParty.get(ENDPOINT_URL).body)
|
|
29
|
+
details = data["verse"]["details"]
|
|
30
|
+
|
|
31
|
+
@reference = details["reference"]
|
|
32
|
+
@version = BIBLE_VERSION
|
|
33
|
+
@version_name = BIBLE_VERSION_NAME
|
|
34
|
+
@link = details["verseurl"]
|
|
35
|
+
|
|
36
|
+
text = Helper::Text.strip_html_tags(details["text"])
|
|
37
|
+
text = Helper::Text.clean_verse_start(text)
|
|
38
|
+
@text = Helper::Text.clean_verse_end(text)
|
|
39
|
+
|
|
40
|
+
@copyright = data["verse"]["notice"]
|
|
41
|
+
rescue => e
|
|
42
|
+
report_and_raise(e, "Failed to fetch verse from OurManna")
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
data/lib/votd/version.rb
CHANGED
data/lib/votd/votd_error.rb
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Votd
|
|
2
4
|
# Votd exception class. This will be thrown on errors returned
|
|
3
5
|
# by Votd.
|
|
4
6
|
class VotdError < StandardError
|
|
5
7
|
end
|
|
6
8
|
|
|
9
|
+
# Raised when an unknown Bible version symbol is passed to
|
|
10
|
+
# {BibleGateway#initialize}.
|
|
7
11
|
class InvalidBibleVersion < VotdError
|
|
8
12
|
end
|
|
9
13
|
end
|
data/lib/votd.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require "time"
|
|
2
4
|
require "json"
|
|
3
5
|
require "httparty"
|
|
@@ -5,12 +7,52 @@ require "httparty"
|
|
|
5
7
|
# This class acts as the entry point to all sub-modules that are used
|
|
6
8
|
# to interact with various Verse of the Day web services.
|
|
7
9
|
module Votd
|
|
10
|
+
class << self
|
|
11
|
+
# Set a Logger-compatible object to receive error messages when
|
|
12
|
+
# a provider fails to fetch a verse.
|
|
13
|
+
#
|
|
14
|
+
# @example
|
|
15
|
+
# Votd.logger = Logger.new($stderr)
|
|
16
|
+
attr_accessor :logger
|
|
17
|
+
|
|
18
|
+
# Register a callback to be invoked when a provider error occurs.
|
|
19
|
+
# The block receives the provider class and the wrapped FetchError.
|
|
20
|
+
#
|
|
21
|
+
# @example
|
|
22
|
+
# Votd.on_error do |provider_class, error|
|
|
23
|
+
# Sentry.capture_exception(error)
|
|
24
|
+
# end
|
|
25
|
+
#
|
|
26
|
+
# @yield [provider_class, error] invoked when a provider fails
|
|
27
|
+
# @yieldparam [Class] provider_class the provider class that failed (e.g. Votd::BibleGateway)
|
|
28
|
+
# @yieldparam [FetchError] error the wrapped exception
|
|
29
|
+
# @return [void]
|
|
30
|
+
def on_error(&block)
|
|
31
|
+
@on_error = block
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns the registered on_error callback, if any.
|
|
35
|
+
# @api private
|
|
36
|
+
# @return [Proc, nil]
|
|
37
|
+
def on_error_callback
|
|
38
|
+
@on_error
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Resets logger and on_error callback. Useful in tests.
|
|
42
|
+
# @return [void]
|
|
43
|
+
def reset_configuration
|
|
44
|
+
@logger = nil
|
|
45
|
+
@on_error = nil
|
|
46
|
+
end
|
|
47
|
+
end
|
|
8
48
|
end
|
|
9
49
|
|
|
10
50
|
require "votd/helper/text"
|
|
11
51
|
require "votd/version"
|
|
12
52
|
require "votd/votd_error"
|
|
53
|
+
require "votd/fetch_error"
|
|
13
54
|
require "votd/base"
|
|
14
55
|
require "votd/bible_gateway"
|
|
15
56
|
require "votd/netbible"
|
|
57
|
+
require "votd/ourmanna"
|
|
16
58
|
require "votd/esvbible"
|
metadata
CHANGED
|
@@ -1,217 +1,90 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: votd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 4.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Steve Clarke
|
|
8
|
-
|
|
9
|
-
autorequire:
|
|
10
|
-
bindir: bin
|
|
8
|
+
bindir: exe
|
|
11
9
|
cert_chain: []
|
|
12
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
11
|
dependencies:
|
|
14
|
-
- !ruby/object:Gem::Dependency
|
|
15
|
-
name: httparty
|
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
requirements:
|
|
18
|
-
- - ">="
|
|
19
|
-
- !ruby/object:Gem::Version
|
|
20
|
-
version: '0'
|
|
21
|
-
type: :runtime
|
|
22
|
-
prerelease: false
|
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
24
|
-
requirements:
|
|
25
|
-
- - ">="
|
|
26
|
-
- !ruby/object:Gem::Version
|
|
27
|
-
version: '0'
|
|
28
12
|
- !ruby/object:Gem::Dependency
|
|
29
13
|
name: feedjira
|
|
30
14
|
requirement: !ruby/object:Gem::Requirement
|
|
31
15
|
requirements:
|
|
32
|
-
- - "
|
|
16
|
+
- - "~>"
|
|
33
17
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: '0'
|
|
18
|
+
version: '4.0'
|
|
35
19
|
type: :runtime
|
|
36
20
|
prerelease: false
|
|
37
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
22
|
requirements:
|
|
39
|
-
- - "
|
|
40
|
-
- !ruby/object:Gem::Version
|
|
41
|
-
version: '0'
|
|
42
|
-
- !ruby/object:Gem::Dependency
|
|
43
|
-
name: rake
|
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
|
45
|
-
requirements:
|
|
46
|
-
- - ">="
|
|
47
|
-
- !ruby/object:Gem::Version
|
|
48
|
-
version: '0'
|
|
49
|
-
type: :development
|
|
50
|
-
prerelease: false
|
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
52
|
-
requirements:
|
|
53
|
-
- - ">="
|
|
54
|
-
- !ruby/object:Gem::Version
|
|
55
|
-
version: '0'
|
|
56
|
-
- !ruby/object:Gem::Dependency
|
|
57
|
-
name: webmock
|
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
|
59
|
-
requirements:
|
|
60
|
-
- - ">="
|
|
61
|
-
- !ruby/object:Gem::Version
|
|
62
|
-
version: '0'
|
|
63
|
-
type: :development
|
|
64
|
-
prerelease: false
|
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
66
|
-
requirements:
|
|
67
|
-
- - ">="
|
|
68
|
-
- !ruby/object:Gem::Version
|
|
69
|
-
version: '0'
|
|
70
|
-
- !ruby/object:Gem::Dependency
|
|
71
|
-
name: rspec
|
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
|
73
|
-
requirements:
|
|
74
|
-
- - ">="
|
|
75
|
-
- !ruby/object:Gem::Version
|
|
76
|
-
version: '0'
|
|
77
|
-
type: :development
|
|
78
|
-
prerelease: false
|
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
80
|
-
requirements:
|
|
81
|
-
- - ">="
|
|
23
|
+
- - "~>"
|
|
82
24
|
- !ruby/object:Gem::Version
|
|
83
|
-
version: '0'
|
|
25
|
+
version: '4.0'
|
|
84
26
|
- !ruby/object:Gem::Dependency
|
|
85
|
-
name:
|
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
|
87
|
-
requirements:
|
|
88
|
-
- - ">="
|
|
89
|
-
- !ruby/object:Gem::Version
|
|
90
|
-
version: '0'
|
|
91
|
-
type: :development
|
|
92
|
-
prerelease: false
|
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
94
|
-
requirements:
|
|
95
|
-
- - ">="
|
|
96
|
-
- !ruby/object:Gem::Version
|
|
97
|
-
version: '0'
|
|
98
|
-
- !ruby/object:Gem::Dependency
|
|
99
|
-
name: guard-bundler
|
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
|
101
|
-
requirements:
|
|
102
|
-
- - ">="
|
|
103
|
-
- !ruby/object:Gem::Version
|
|
104
|
-
version: '0'
|
|
105
|
-
type: :development
|
|
106
|
-
prerelease: false
|
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
108
|
-
requirements:
|
|
109
|
-
- - ">="
|
|
110
|
-
- !ruby/object:Gem::Version
|
|
111
|
-
version: '0'
|
|
112
|
-
- !ruby/object:Gem::Dependency
|
|
113
|
-
name: yard
|
|
27
|
+
name: httparty
|
|
114
28
|
requirement: !ruby/object:Gem::Requirement
|
|
115
29
|
requirements:
|
|
116
|
-
- - "
|
|
30
|
+
- - "~>"
|
|
117
31
|
- !ruby/object:Gem::Version
|
|
118
|
-
version: '0'
|
|
119
|
-
type: :
|
|
32
|
+
version: '0.24'
|
|
33
|
+
type: :runtime
|
|
120
34
|
prerelease: false
|
|
121
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
122
36
|
requirements:
|
|
123
|
-
- - "
|
|
37
|
+
- - "~>"
|
|
124
38
|
- !ruby/object:Gem::Version
|
|
125
|
-
version: '0'
|
|
39
|
+
version: '0.24'
|
|
126
40
|
- !ruby/object:Gem::Dependency
|
|
127
|
-
name:
|
|
41
|
+
name: thor
|
|
128
42
|
requirement: !ruby/object:Gem::Requirement
|
|
129
43
|
requirements:
|
|
130
|
-
- - "
|
|
44
|
+
- - "~>"
|
|
131
45
|
- !ruby/object:Gem::Version
|
|
132
|
-
version: '
|
|
133
|
-
type: :
|
|
46
|
+
version: '1.3'
|
|
47
|
+
type: :runtime
|
|
134
48
|
prerelease: false
|
|
135
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
136
50
|
requirements:
|
|
137
|
-
- - "
|
|
51
|
+
- - "~>"
|
|
138
52
|
- !ruby/object:Gem::Version
|
|
139
|
-
version: '
|
|
140
|
-
description:
|
|
53
|
+
version: '1.3'
|
|
54
|
+
description: A Ruby gem that wraps Bible verse-of-the-day web services including BibleGateway,
|
|
55
|
+
NetBible, and OurManna. Provides both a library and CLI.
|
|
141
56
|
email:
|
|
142
57
|
- steve@sevenview.ca
|
|
143
|
-
- chris@seven7.ca
|
|
144
58
|
executables:
|
|
145
59
|
- votd
|
|
146
60
|
extensions: []
|
|
147
61
|
extra_rdoc_files: []
|
|
148
62
|
files:
|
|
149
|
-
- ".github/workflows/ruby.yml"
|
|
150
|
-
- ".gitignore"
|
|
151
|
-
- ".rspec"
|
|
152
|
-
- ".ruby-version"
|
|
153
|
-
- ".travis.yml"
|
|
154
|
-
- ".yardopts"
|
|
155
63
|
- CHANGELOG.md
|
|
156
|
-
- CONTRIBUTING.md
|
|
157
|
-
- Gemfile
|
|
158
|
-
- Guardfile
|
|
159
64
|
- LICENSE
|
|
160
65
|
- README.md
|
|
161
|
-
-
|
|
162
|
-
- TODO.md
|
|
163
|
-
- bin/votd
|
|
66
|
+
- exe/votd
|
|
164
67
|
- lib/votd.rb
|
|
165
68
|
- lib/votd/base.rb
|
|
166
69
|
- lib/votd/bible_gateway.rb
|
|
70
|
+
- lib/votd/cli.rb
|
|
167
71
|
- lib/votd/esvbible.rb
|
|
72
|
+
- lib/votd/fetch_error.rb
|
|
168
73
|
- lib/votd/helper/command_line.rb
|
|
169
|
-
- lib/votd/helper/helper.rb
|
|
170
74
|
- lib/votd/helper/text.rb
|
|
171
75
|
- lib/votd/netbible.rb
|
|
76
|
+
- lib/votd/ourmanna.rb
|
|
172
77
|
- lib/votd/version.rb
|
|
173
78
|
- lib/votd/votd_error.rb
|
|
174
|
-
- spec/fixtures/base/base.html
|
|
175
|
-
- spec/fixtures/base/base.txt
|
|
176
|
-
- spec/fixtures/base/base_custom.html
|
|
177
|
-
- spec/fixtures/base/base_custom.txt
|
|
178
|
-
- spec/fixtures/bible_gateway/bible_gateway.html
|
|
179
|
-
- spec/fixtures/bible_gateway/bible_gateway.rss
|
|
180
|
-
- spec/fixtures/bible_gateway/bible_gateway.txt
|
|
181
|
-
- spec/fixtures/bible_gateway/bible_gateway_custom.html
|
|
182
|
-
- spec/fixtures/bible_gateway/bible_gateway_custom.txt
|
|
183
|
-
- spec/fixtures/bible_gateway/bible_gateway_nlt.rss
|
|
184
|
-
- spec/fixtures/bible_gateway/bible_gateway_with_partial.rss
|
|
185
|
-
- spec/fixtures/esvbible/esvbible.html
|
|
186
|
-
- spec/fixtures/esvbible/esvbible.rss
|
|
187
|
-
- spec/fixtures/esvbible/esvbible.txt
|
|
188
|
-
- spec/fixtures/esvbible/esvbible_custom.html
|
|
189
|
-
- spec/fixtures/esvbible/esvbible_custom.txt
|
|
190
|
-
- spec/fixtures/esvbible/esvbible_with_partial.rss
|
|
191
|
-
- spec/fixtures/netbible/netbible.html
|
|
192
|
-
- spec/fixtures/netbible/netbible.json
|
|
193
|
-
- spec/fixtures/netbible/netbible.txt
|
|
194
|
-
- spec/fixtures/netbible/netbible_custom.html
|
|
195
|
-
- spec/fixtures/netbible/netbible_custom.txt
|
|
196
|
-
- spec/fixtures/netbible/netbible_with_html.json
|
|
197
|
-
- spec/fixtures/netbible/netbible_with_partial.json
|
|
198
|
-
- spec/lib/votd/base_spec.rb
|
|
199
|
-
- spec/lib/votd/bible_gateway_spec.rb
|
|
200
|
-
- spec/lib/votd/esvbible_spec.rb
|
|
201
|
-
- spec/lib/votd/helper/command_line_spec.rb
|
|
202
|
-
- spec/lib/votd/helper/helper_spec.rb
|
|
203
|
-
- spec/lib/votd/helper/text_spec.rb
|
|
204
|
-
- spec/lib/votd/netbible_spec.rb
|
|
205
|
-
- spec/lib/votd/version_spec.rb
|
|
206
|
-
- spec/lib/votd/votd_error_spec.rb
|
|
207
|
-
- spec/lib/votd_spec.rb
|
|
208
|
-
- spec/spec_helper.rb
|
|
209
|
-
- votd.gemspec
|
|
210
79
|
homepage: https://github.com/sevenview/votd
|
|
211
80
|
licenses:
|
|
212
81
|
- MIT
|
|
213
|
-
metadata:
|
|
214
|
-
|
|
82
|
+
metadata:
|
|
83
|
+
homepage_uri: https://github.com/sevenview/votd
|
|
84
|
+
source_code_uri: https://github.com/sevenview/votd
|
|
85
|
+
changelog_uri: https://github.com/sevenview/votd/blob/master/CHANGELOG.md
|
|
86
|
+
rubygems_mfa_required: 'true'
|
|
87
|
+
allowed_push_host: https://rubygems.org
|
|
215
88
|
rdoc_options: []
|
|
216
89
|
require_paths:
|
|
217
90
|
- lib
|
|
@@ -219,50 +92,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
219
92
|
requirements:
|
|
220
93
|
- - ">="
|
|
221
94
|
- !ruby/object:Gem::Version
|
|
222
|
-
version:
|
|
95
|
+
version: '3.3'
|
|
96
|
+
- - "<"
|
|
97
|
+
- !ruby/object:Gem::Version
|
|
98
|
+
version: '4.1'
|
|
223
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
100
|
requirements:
|
|
225
101
|
- - ">="
|
|
226
102
|
- !ruby/object:Gem::Version
|
|
227
103
|
version: '0'
|
|
228
104
|
requirements: []
|
|
229
|
-
rubygems_version: 3.
|
|
230
|
-
signing_key:
|
|
105
|
+
rubygems_version: 3.6.9
|
|
231
106
|
specification_version: 4
|
|
232
107
|
summary: Generate a (Bible) Verse of the Day using various web service wrappers
|
|
233
|
-
test_files:
|
|
234
|
-
- spec/fixtures/base/base.html
|
|
235
|
-
- spec/fixtures/base/base.txt
|
|
236
|
-
- spec/fixtures/base/base_custom.html
|
|
237
|
-
- spec/fixtures/base/base_custom.txt
|
|
238
|
-
- spec/fixtures/bible_gateway/bible_gateway.html
|
|
239
|
-
- spec/fixtures/bible_gateway/bible_gateway.rss
|
|
240
|
-
- spec/fixtures/bible_gateway/bible_gateway.txt
|
|
241
|
-
- spec/fixtures/bible_gateway/bible_gateway_custom.html
|
|
242
|
-
- spec/fixtures/bible_gateway/bible_gateway_custom.txt
|
|
243
|
-
- spec/fixtures/bible_gateway/bible_gateway_nlt.rss
|
|
244
|
-
- spec/fixtures/bible_gateway/bible_gateway_with_partial.rss
|
|
245
|
-
- spec/fixtures/esvbible/esvbible.html
|
|
246
|
-
- spec/fixtures/esvbible/esvbible.rss
|
|
247
|
-
- spec/fixtures/esvbible/esvbible.txt
|
|
248
|
-
- spec/fixtures/esvbible/esvbible_custom.html
|
|
249
|
-
- spec/fixtures/esvbible/esvbible_custom.txt
|
|
250
|
-
- spec/fixtures/esvbible/esvbible_with_partial.rss
|
|
251
|
-
- spec/fixtures/netbible/netbible.html
|
|
252
|
-
- spec/fixtures/netbible/netbible.json
|
|
253
|
-
- spec/fixtures/netbible/netbible.txt
|
|
254
|
-
- spec/fixtures/netbible/netbible_custom.html
|
|
255
|
-
- spec/fixtures/netbible/netbible_custom.txt
|
|
256
|
-
- spec/fixtures/netbible/netbible_with_html.json
|
|
257
|
-
- spec/fixtures/netbible/netbible_with_partial.json
|
|
258
|
-
- spec/lib/votd/base_spec.rb
|
|
259
|
-
- spec/lib/votd/bible_gateway_spec.rb
|
|
260
|
-
- spec/lib/votd/esvbible_spec.rb
|
|
261
|
-
- spec/lib/votd/helper/command_line_spec.rb
|
|
262
|
-
- spec/lib/votd/helper/helper_spec.rb
|
|
263
|
-
- spec/lib/votd/helper/text_spec.rb
|
|
264
|
-
- spec/lib/votd/netbible_spec.rb
|
|
265
|
-
- spec/lib/votd/version_spec.rb
|
|
266
|
-
- spec/lib/votd/votd_error_spec.rb
|
|
267
|
-
- spec/lib/votd_spec.rb
|
|
268
|
-
- spec/spec_helper.rb
|
|
108
|
+
test_files: []
|
data/.github/workflows/ruby.yml
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
name: Ruby
|
|
2
|
-
|
|
3
|
-
on: [push]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
build:
|
|
7
|
-
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v1
|
|
12
|
-
- name: Set up Ruby 2.6
|
|
13
|
-
uses: actions/setup-ruby@v1
|
|
14
|
-
with:
|
|
15
|
-
ruby-version: 2.6.x
|
|
16
|
-
- name: Build and test with Rake
|
|
17
|
-
run: |
|
|
18
|
-
gem install bundler
|
|
19
|
-
bundle install --jobs 4 --retry 3
|
|
20
|
-
bundle exec rake
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.6.5
|
data/.travis.yml
DELETED