bible_ref 1.2.0 → 1.4.0

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: c5d54495720e89fd21d2971e70edd654e335803b5d5041b10cfaf9d236355f8e
4
- data.tar.gz: 32eb420422295190f04503a39f66185500b34f88d6069408d59811e3636f568f
3
+ metadata.gz: 5b66f31665e878b3a71f4c334f43ed5a26c972f15989e8569fab62aa557df191
4
+ data.tar.gz: 9e7d5a746bf49b140963dfcc945eeaee58fcf68633828892447519841d656f5f
5
5
  SHA512:
6
- metadata.gz: bcea0883f760b833857c5dbd05885cb9f653bd85961591a6e3dfc6c2099bfc98da23170326674b274796b71d3e92991fb2a8ba0c8c3a9433073002c8fdba8539
7
- data.tar.gz: '094e075be4d9d87cac62e873b0e522a6daa171e4116195ebad6cff3927cc3dab5d6348ce6c6fb1fe9332820367683c00af555dfe1e34782222eaf23bbf352864'
6
+ metadata.gz: 460cb9fc1df0ae490c46607ed010b21986d636dc63c2a5783ca3343589a58351570c15df9deca603a309108ca59ac74c70b89e994da1e45eec939f648fb2b27f
7
+ data.tar.gz: 88462cdbb3dc94dc66c1470455ea5b0de6605da4d1df45a2b1be761fc7ee2262aa8558173df036686f1f8bc2ab329995b7bf64e430bc411bae982591b3032154
@@ -1,7 +1,8 @@
1
1
  require_relative 'canons/protestant'
2
-
2
+ require_relative 'canons/all'
3
3
  module BibleRef
4
4
  CANONS = {
5
- 'protestant' => Canons::Protestant
5
+ 'protestant' => Canons::Protestant,
6
+ 'all' => Canons::All
6
7
  }
7
8
  end
@@ -0,0 +1,15 @@
1
+ module BibleRef
2
+ module Canons
3
+ class All
4
+ def books
5
+ %w(
6
+ GEN EXO LEV NUM DEU JOS JDG RUT 1SA 2SA 1KI 2KI 1CH 2CH EZR NEH EST JOB
7
+ PSA PRO ECC SNG ISA JER LAM EZK DAN HOS JOL AMO OBA JON MIC NAM HAB ZEP HAG
8
+ ZEC MAL TOB JDT ESG WIS SIR BAR LJE S3Y SUS BEL 1MA 2MA 1ES MAN PS2 3MA 2ES
9
+ 4MA MAT MRK LUK JHN ACT ROM 1CO 2CO GAL EPH PHP COL 1TH 2TH 1TI 2TI TIT PHM
10
+ HEB JAS 1PE 2PE 1JN 2JN 3JN JUD REV
11
+ )
12
+ end
13
+ end
14
+ end
15
+ end
@@ -46,7 +46,7 @@ module BibleRef
46
46
  'ZEC' => { match: /^zec/, name: 'Zechariah' },
47
47
  'MAL' => { match: /^mal/, name: 'Malachi' },
48
48
  'TOB' => { match: /^tob/, name: 'Tobit' },
49
- 'JDT' => { match: /^(jud|jdt)/, name: 'Judith' },
49
+ 'JDT' => { match: /^(jth|jdth?|judith)/, name: 'Judith' },
50
50
  'ESG' => { match: /^(est.*greek|esg)/, name: 'Esther (Greek)' },
51
51
  'WIS' => { match: /^wis(dom)?/, name: 'Wisdom of Solomon' },
52
52
  'SIR' => { match: /^sir/, name: 'Sirach' },
@@ -64,7 +64,7 @@ module BibleRef
64
64
  '2ES' => { match: /^2 ?esd?/, name: '2 Esdras' },
65
65
  '4MA' => { match: /^4 ?mac?/, name: '4 Maccabees' },
66
66
  'MAT' => { match: /^mat/, name: 'Matthew' },
67
- 'MRK' => { match: /^ma?rk/, name: 'Mark' },
67
+ 'MRK' => { match: /^(ma?rk|mk)/, name: 'Mark' },
68
68
  'LUK' => { match: /^lu?k/, name: 'Luke' },
69
69
  'JHN' => { match: /^(john|jn|jhn)/, name: 'John' },
70
70
  'ACT' => { match: /^act/, name: 'Acts' },
@@ -88,7 +88,7 @@ module BibleRef
88
88
  '1JN' => { match: /^1 ?jo?h?n/, name: '1 John' },
89
89
  '2JN' => { match: /^2 ?jo?h?n/, name: '2 John' },
90
90
  '3JN' => { match: /^3 ?jo?h?n/, name: '3 John' },
91
- 'JUD' => { match: /^jud/, name: 'Jude' },
91
+ 'JUD' => { match: /^(jud$|jd$|jude$)/, name: 'Jude' },
92
92
  'REV' => { match: /^re?v/, name: 'Revelation' }
93
93
  }
94
94
  end
@@ -46,7 +46,7 @@ module BibleRef
46
46
  'ZEC' => { match: /^zac/, name: 'Zacarias' },
47
47
  'MAL' => { match: /^mal/, name: 'Malaquias' },
48
48
  'MAT' => { match: /^mat/, name: 'Mateus' },
49
- 'MRK' => { match: /^mar/, name: 'Marcos' },
49
+ 'MRK' => { match: /^(mar|mk)/, name: 'Marcos' },
50
50
  'LUK' => { match: /^lu/, name: 'Lucas' },
51
51
  'JHN' => { match: /^jo/, name: 'João' },
52
52
  'ACT' => { match: /^at/, name: 'Atos' },
@@ -46,7 +46,7 @@ module BibleRef
46
46
  'ZEC' => { match: /^za/, name: 'Zaharia' },
47
47
  'MAL' => { match: /^mal/, name: 'Maleahi' },
48
48
  'MAT' => { match: /^mat/, name: 'Matei' },
49
- 'MRK' => { match: /^mar/, name: 'Marcu' },
49
+ 'MRK' => { match: /^(mar|mk)/, name: 'Marcu' },
50
50
  'LUK' => { match: /^lu/, name: 'Luca' },
51
51
  'JHN' => { match: /^io/, name: 'Ioan' },
52
52
  'ACT' => { match: /^fa/, name: 'Faptele apostolilor' },
@@ -7,7 +7,7 @@ module BibleRef
7
7
  attr_reader :book, :reference, :language, :canon
8
8
 
9
9
  # Create a new Reference instance by passing in the user-supplied bible reference as a string.
10
- def initialize(reference, language: 'eng', canon: 'protestant')
10
+ def initialize(reference, language: 'eng', canon: 'all')
11
11
  @reference = reference
12
12
  @details = parse
13
13
  @language = language.respond_to?(:book_id) ? language : LANGUAGES.fetch(language.to_s).new
@@ -1,3 +1,3 @@
1
1
  module BibleRef
2
- VERSION = '1.2.0'
2
+ VERSION = '1.4.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bible_ref
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Morgan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-03 00:00:00.000000000 Z
11
+ date: 2020-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet
@@ -62,6 +62,7 @@ files:
62
62
  - README.md
63
63
  - lib/bible_ref.rb
64
64
  - lib/bible_ref/canons.rb
65
+ - lib/bible_ref/canons/all.rb
65
66
  - lib/bible_ref/canons/protestant.rb
66
67
  - lib/bible_ref/languages.rb
67
68
  - lib/bible_ref/languages/base.rb
@@ -77,7 +78,7 @@ homepage: https://github.com/seven1m/bible_ref
77
78
  licenses:
78
79
  - MIT
79
80
  metadata: {}
80
- post_install_message:
81
+ post_install_message:
81
82
  rdoc_options: []
82
83
  require_paths:
83
84
  - lib
@@ -92,8 +93,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
93
  - !ruby/object:Gem::Version
93
94
  version: '0'
94
95
  requirements: []
95
- rubygems_version: 3.0.2
96
- signing_key:
96
+ rubygems_version: 3.1.2
97
+ signing_key:
97
98
  specification_version: 4
98
99
  summary: Bible reference parser
99
100
  test_files: []