bible_ref 1.0.0 → 1.1.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
  SHA1:
3
- metadata.gz: 68f998033defe0c1f8dc086834178c4d680380c2
4
- data.tar.gz: 405ff445a3dc1a7ee78412dd84b783405f4fe2a2
3
+ metadata.gz: 6639093bb4ea9aa49aa9073fce5c3779d3bec6c0
4
+ data.tar.gz: 4047132cea9a8ae54a532b87ed9060b3b8218b55
5
5
  SHA512:
6
- metadata.gz: c646a6b5b7501d39822b10d298b14524cbc61e7a99b935f28b4100b9ecd00e300bd96097678cab49aa48e4de2c6d105cb5809dea83deac26cb7ed447efa7185c
7
- data.tar.gz: 7891140a1831b033324e074321fdf1476044bfdc6731cdb64933ae514bb975ca68b0497fb643c0d6ac4363df1c9d02f0a2c0613113da6e00b2e7733eb6099f8b
6
+ metadata.gz: f7e4e30c897b7645fee8ed549577b9b5779149186b935b2b7d05fc1c9f978e42974ceff62819ea320bbb611492d2025968177b24228565bdda567cff0dbaf585
7
+ data.tar.gz: 6ce26a3bbe73ae8f4f98ede403a30c8eeecdd6828bf6943c4ba7f6fd1ca38b9de6782b98975b24f0f545979419bcf913c7fe004f5259e494dc5547f3c66be607
@@ -9,8 +9,13 @@ module BibleRef
9
9
  book_name = replace_roman_numerals(book_name.downcase)
10
10
  return book_name.upcase if books[book_name.upcase] # already normalized
11
11
  canon.books.each do |book|
12
- match = books[book][:match]
13
- return book if book_name =~ match
12
+ details = books[book]
13
+ next if details.nil?
14
+ if (match = details[:match])
15
+ return book if book_name =~ match
16
+ else
17
+ return book if book_name == details[:name]
18
+ end
14
19
  end
15
20
  nil
16
21
  end
@@ -21,9 +26,9 @@ module BibleRef
21
26
  end
22
27
 
23
28
  def replace_roman_numerals(book)
24
- book.sub!(/^iii/i, '3')
25
- book.sub!(/^ii/i, '2')
26
- book.sub!(/^i/i, '1')
29
+ book.sub!(/^iii /i, '3 ')
30
+ book.sub!(/^ii /i, '2 ')
31
+ book.sub!(/^i /i, '1 ')
27
32
  book
28
33
  end
29
34
  end
@@ -0,0 +1,40 @@
1
+ # -*- coding: utf-8 -*-
2
+ require_relative 'base'
3
+
4
+ module BibleRef
5
+ module Languages
6
+ class Cherokee < Base
7
+ def books
8
+ {
9
+ 'MAT' => { name: 'ᎣᏍᏛ ᎧᏃᎮᏛ ᎹᏚ ᎤᏬᏪᎳᏅᎯ' },
10
+ 'MRK' => { name: 'ᎣᏍᏛ ᎧᏃᎮᏛ ᎹᎦ ᎤᏬᏪᎳᏅᎯ' },
11
+ 'LUK' => { name: 'ᎣᏍᏛ ᎧᏃᎮᏛ ᎷᎦ ᎤᏬᏪᎳᏅᎯ' },
12
+ 'JHN' => { name: 'ᎣᏍᏛ ᎧᏃᎮᏛ ᏣᏂ ᎤᏬᏪᎳᏅᎯ' },
13
+ 'ACT' => { name: 'ᎨᏥᏅᏏᏛ ᏄᎾᏛᏁᎵᏙᎸᎢ' },
14
+ 'ROM' => { name: 'ᏉᎳ ᎶᎻ ᎠᏁᎯ ᏧᏬᏪᎳᏁᎸᎯ' },
15
+ '1CO' => { name: 'ᎪᎵᏂᏗᏱ ᎠᏁᎯ ᎢᎬᏱᏱ ᎨᎪᏪᎳᏁᎸᎯ' },
16
+ '2CO' => { name: 'ᎪᎵᏂᏗᏱ ᎠᏁᎯ ᏔᎵᏁ ᎨᎪᏪᎳᏁᎸᎯ' },
17
+ 'GAL' => { name: 'ᏉᎳ ᎨᎴᏏᏱ ᎠᏁᎯ ᏧᏬᏪᎳᏁᎸᎯ' },
18
+ 'EPH' => { name: 'ᏉᎳ ᎡᏈᏌ ᎠᏁᎯ ᏧᏬᏪᎳᏁᎸᎯ' },
19
+ 'PHP' => { name: 'ᏉᎳ ᏈᎵᎩᏱ ᎠᏁᎯ ᏧᏬᏪᎳᏁᎸᎯ' },
20
+ 'COL' => { name: 'ᏉᎳ ᎪᎶᏏ ᎠᏁᎯ ᏧᏬᏪᎳᏁᎸᎯ' },
21
+ '1TH' => { name: 'ᏉᎳ ᏕᏏᎶᏂᎦ ᎠᏁᎯ ᎢᎬᏱᏱ ᏧᏬᏪᎳᏁᎸᎯ' },
22
+ '2TH' => { name: 'ᏉᎳ ᏕᏏᎶᏂᎦ ᎠᏁᎯ ᏔᎵᏁ ᏧᏬᏪᎳᏁᎸᎯ' },
23
+ '1TI' => { name: 'ᏉᎳ ᏧᏬᏪᎳᏅᎯ ᎢᎬᏱᏱ ᏗᎹᏗ ᏧᏬᏪᎳᏁᎸᎯ' },
24
+ '2TI' => { name: 'ᏉᎳ ᏧᏬᏪᎳᏅᎯ ᏔᎵᏁ ᏗᎹᏗ ᏧᏬᏪᎳᏁᎸᎯ' },
25
+ 'TIT' => { name: 'ᏉᎳ ᏓᏓᏏ ᎤᏬᏪᎳᏁᎸᎯ' },
26
+ 'PHM' => { name: 'ᏉᎳ ᏆᎵᎹᏂ ᎤᏬᏪᎳᏁᎸᎯ' },
27
+ 'HEB' => { name: 'ᏉᎳ ᎠᏂᏈᎷ ᏧᏬᏪᎳᏁᎸᎯ' },
28
+ 'JAS' => { name: 'ᏥᎻ ᎤᏬᏪᎳᏅᎯ' },
29
+ '1PE' => { name: 'ᏈᏓ ᎢᎬᏱᏱ ᎤᏬᏪᎳᏅᎯ' },
30
+ '2PE' => { name: 'ᏈᏓ ᏔᎵᏁ ᎤᏬᏪᎳᏅᎯ' },
31
+ '1JN' => { name: 'ᏣᏂ ᎢᎬᏱᏱ ᎤᏬᏪᎳᏅᎯ' },
32
+ '2JN' => { name: 'ᏣᏂ ᏔᎵᏁ ᎤᏬᏪᎳᏅᎯ' },
33
+ '3JN' => { name: 'ᏣᏂ ᏦᎢᏁ ᎤᏬᏪᎳᏅᎯ' },
34
+ 'JUD' => { name: 'ᏧᏓᏏ ᎤᏬᏪᎳᏅᎯ' },
35
+ 'REV' => { name: 'ᏣᏂ ᏄᏍᏛ ᎠᏥᎾᏄᎪᏫᏎᎸᎢ' }
36
+ }
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,79 @@
1
+ # -*- coding: utf-8 -*-
2
+ require_relative 'base'
3
+
4
+ module BibleRef
5
+ module Languages
6
+ class Romanian < Base
7
+ def books
8
+ {
9
+ 'GEN' => { match: /^gen/, name: 'Geneza' },
10
+ 'EXO' => { match: /^ex/, name: 'Exodul' },
11
+ 'LEV' => { match: /^le?v/, name: 'Leviticul' },
12
+ 'NUM' => { match: /^num/, name: 'Numeri' },
13
+ 'DEU' => { match: /^de?ut/, name: 'Deuteronomul' },
14
+ 'JOS' => { match: /^ios/, name: 'Iosua' },
15
+ 'JDG' => { match: /^ju/, name: 'Judecători' },
16
+ 'RUT' => { match: /^ru/, name: 'Rut' },
17
+ '1SA' => { match: /^1 sa?m/, name: '1 Samuel' },
18
+ '2SA' => { match: /^2 sa?m/, name: '2 Samuel' },
19
+ '1KI' => { match: /^1 [iîÎ]/, name: '1 Împăraţi' },
20
+ '2KI' => { match: /^2 [iîÎ]/, name: '2 Împăraţi' },
21
+ '1CH' => { match: /^1 cr/, name: '1 Cronici' },
22
+ '2CH' => { match: /^2 cr/, name: '2 Cronici' },
23
+ 'EZR' => { match: /^ezr/, name: 'Ezra' },
24
+ 'NEH' => { match: /^ne/, name: 'Neemia' },
25
+ 'EST' => { match: /^est/, name: 'Estera' },
26
+ 'JOB' => { match: /^iov/, name: 'Iov' },
27
+ 'PSA' => { match: /^ps/, name: 'Psalmii' },
28
+ 'PRO' => { match: /^pr/, name: 'Proverbe' },
29
+ 'ECC' => { match: /^ecl/, name: 'Eclesiastul' },
30
+ 'SNG' => { match: /^c[aâ]n$/, name: 'Cântarea cântărilor' },
31
+ 'ISA' => { match: /^isa/, name: 'Isaia' },
32
+ 'JER' => { match: /^ier/, name: 'Ieremia' },
33
+ 'LAM' => { match: /^plâ/, name: 'Plângerile lui Ieremia'},
34
+ 'EZK' => { match: /^ez/, name: 'Ezechiel' },
35
+ 'DAN' => { match: /^dan/, name: 'Daniel' },
36
+ 'HOS' => { match: /^os/, name: 'Osea' },
37
+ 'JOL' => { match: /^ioel/, name: 'Ioel' },
38
+ 'AMO' => { match: /^amo/, name: 'Amos' },
39
+ 'OBA' => { match: /^ob/, name: 'Obadia' },
40
+ 'JON' => { match: /^iona/, name: 'Iona' },
41
+ 'MIC' => { match: /^mi/, name: 'Mica' },
42
+ 'NAM' => { match: /^nau/, name: 'Naum' },
43
+ 'HAB' => { match: /^hab/, name: 'Habacuc' },
44
+ 'ZEP' => { match: /^[Ţţ̧]ef/, name: 'Ţefania' },
45
+ 'HAG' => { match: /^hag/, name: 'Hagai' },
46
+ 'ZEC' => { match: /^za/, name: 'Zaharia' },
47
+ 'MAL' => { match: /^mal/, name: 'Maleahi' },
48
+ 'MAT' => { match: /^mat/, name: 'Matei' },
49
+ 'MRK' => { match: /^mar/, name: 'Marcu' },
50
+ 'LUK' => { match: /^lu/, name: 'Luca' },
51
+ 'JHN' => { match: /^io/, name: 'Ioan' },
52
+ 'ACT' => { match: /^fa/, name: 'Faptele apostolilor' },
53
+ 'ROM' => { match: /^rom/, name: 'Romani' },
54
+ '1CO' => { match: /^1 cor/, name: '1 Corinteni' },
55
+ '2CO' => { match: /^2 cor/, name: '2 Corinteni' },
56
+ 'GAL' => { match: /^gal/, name: 'Galateni' },
57
+ 'EPH' => { match: /^ef/, name: 'Efeseni' },
58
+ 'PHP' => { match: /^fil/, name: 'Filipeni' },
59
+ 'COL' => { match: /^col/, name: 'Coloseni' },
60
+ '1TH' => { match: /^1 te?s/, name: '1 Tesaloniceni' },
61
+ '2TH' => { match: /^2 te?s/, name: '2 Tesaloniceni' },
62
+ '1TI' => { match: /^1 tim/, name: '1 Timotei' },
63
+ '2TI' => { match: /^2 tim/, name: '2 Timotei' },
64
+ 'TIT' => { match: /^tit/, name: 'Tit' },
65
+ 'PHM' => { match: /^fil/, name: 'Filimon' },
66
+ 'HEB' => { match: /^ev/, name: 'Evrei' },
67
+ 'JAS' => { match: /^iac/, name: 'Iacov' },
68
+ '1PE' => { match: /^1 pet/, name: '1 Petru' },
69
+ '2PE' => { match: /^2 pet/, name: '2 Petru' },
70
+ '1JN' => { match: /^1 io/, name: '1 Ioan' },
71
+ '2JN' => { match: /^2 io/, name: '2 Ioan' },
72
+ '3JN' => { match: /^3 io/, name: '1 Ioan' },
73
+ 'JUD' => { match: /^iud/, name: 'Iuda' },
74
+ 'REV' => { match: /^apo/, name: 'Apocalipsa' }
75
+ }
76
+ end
77
+ end
78
+ end
79
+ end
@@ -1,9 +1,13 @@
1
+ require_relative 'languages/cherokee'
1
2
  require_relative 'languages/english'
2
3
  require_relative 'languages/portuguese'
4
+ require_relative 'languages/romanian'
3
5
 
4
6
  module BibleRef
5
7
  LANGUAGES = {
8
+ 'chr' => Languages::Cherokee,
6
9
  'eng' => Languages::English,
7
- 'por' => Languages::Portuguese
10
+ 'por' => Languages::Portuguese,
11
+ 'ron' => Languages::Romanian
8
12
  }
9
13
  end
@@ -1,3 +1,3 @@
1
1
  module BibleRef
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.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.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-15 00:00:00.000000000 Z
11
+ date: 2015-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet
@@ -65,8 +65,10 @@ files:
65
65
  - lib/bible_ref/canons/protestant.rb
66
66
  - lib/bible_ref/languages.rb
67
67
  - lib/bible_ref/languages/base.rb
68
+ - lib/bible_ref/languages/cherokee.rb
68
69
  - lib/bible_ref/languages/english.rb
69
70
  - lib/bible_ref/languages/portuguese.rb
71
+ - lib/bible_ref/languages/romanian.rb
70
72
  - lib/bible_ref/parser.rb
71
73
  - lib/bible_ref/reference.rb
72
74
  - lib/bible_ref/version.rb