kj 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -16
  3. data/VERSION +1 -1
  4. data/kj.gemspec +2 -2
  5. data/lib/kj.rb +4 -4
  6. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9683cdffefc0ebcfc4f8721ef60e0260d3fcfaf
4
- data.tar.gz: 56d48e534011a1a3904ae86c6bf4338363074761
3
+ metadata.gz: fbcf9674a3d4d75e8f4216963e5dd023753c7237
4
+ data.tar.gz: 61742fc8be16fba42799913d1a6a70dc4b4fe54a
5
5
  SHA512:
6
- metadata.gz: ec9aa8b1ee6fe44b71583c9ed1d2d56c18c2cdf139464951cd1fe59eb919ad7f0386bbd09dfb23ce95a594416e0dcb05cf67dcd59ccd1c06c0238cad51913095
7
- data.tar.gz: ad64557b1b09a325e0d1186e23e3b7a2c41597fa26a72292a2501dc11bbfcc34958b7527f19d975d17c4c76f25f5d8ce0a327b6bc5a9102726c2052a02f7f5b1
6
+ metadata.gz: 22f2999c146d48d9244493476d54f99f99d9563621f7a206762c217e036d7b2ec30500c366a6a7cfef774097df823d9b844838a6c7f0f3d6cb5d542bf63185f5
7
+ data.tar.gz: 5b810c92feeedc0badd9c61708118b72612e4cffd2ff721c3a3ea756f03f53e90cea42792c1dbc074b5c995262472ab4a1f6d1a359c6e2e16ded3c041024ffd7
data/README.md CHANGED
@@ -2,26 +2,26 @@
2
2
  kj is a simple rubygem for accessing the King James Bible. It uses an embedded sqlite data store.
3
3
 
4
4
  ___
5
- ###Install
5
+ ### Install
6
6
  ```ruby
7
7
  gem install kj
8
8
  ```
9
- ##Usage
10
- ###Create
9
+ ## Usage
10
+ ### Create
11
11
  ```ruby
12
12
  require 'kj'
13
13
  bible = Kj::Bible.new
14
14
  ```
15
- ###Books
15
+ ### Books
16
16
  All return an array of Book objects.
17
17
  ```ruby
18
- genesis = bible.books
19
- genesis = bible.books(1)
20
- genesis = bible.books(:genesis)
21
- genesis = bible.books('Gen')
22
- genesis = bible.books(:genesis, 2, 'Levit')
18
+ books = bible.books
19
+ books = bible.books(1)
20
+ books = bible.books(:genesis)
21
+ books = bible.books('Gen')
22
+ books = bible.books(:genesis, 2, 'Levit')
23
23
  ```
24
- ###Book
24
+ ### Book
25
25
  ```ruby
26
26
  romans = bible.book(45)
27
27
  romans = bible.book(:romans)
@@ -29,14 +29,14 @@ romans = bible.book('Rom')
29
29
  puts romans.name
30
30
  => "Romans"
31
31
  ```
32
- ###Chapters
32
+ ### Chapters
33
33
  All return an array of Chapter objects for the book.
34
34
  ```ruby
35
35
  genesis = bible.book(:genesis)
36
36
  chapters = genesis.chapters
37
37
  chapters = genesis.chapters(1, 2, (3..10).to_a)
38
38
  ```
39
- ###Chapter
39
+ ### Chapter
40
40
  ```ruby
41
41
  genesis = bible.book(:genesis)
42
42
  chapter = genesis.chapter(1)
@@ -47,14 +47,14 @@ puts chapter.number
47
47
  puts chapter.title
48
48
  => "Genesis 1"
49
49
  ```
50
- ###Verses
50
+ ### Verses
51
51
  All return an array of Verse objects.
52
52
  ```ruby
53
53
  genesis = bible.book(:genesis)
54
54
  verses = genesis.chapter(1).verses
55
55
  verse = genesis.chapter(1).verses(1, 2, (3..10).to_a)
56
56
  ```
57
- ###Verse
57
+ ### Verse
58
58
  ```ruby
59
59
  genesis = bible.book(:genesis)
60
60
  verse = genesis.chapter(1).verse(1)
@@ -63,14 +63,22 @@ puts verse.title
63
63
  puts verse.text
64
64
  => "In the beginning God..."
65
65
  ```
66
- ###Exceptions
66
+ ### Random
67
+ ```ruby
68
+ bible.random_book #returns a random Kj::Book
69
+ bible.random_chapter #returns a random Kj::Chapter
70
+ bible.random_verse #returns a random Kj::Verse
71
+ puts bible.random_verse.text
72
+ => "But woe unto you, scribes and Pharisees, hypocrites! for ye shut up the kingdom of heaven against men: for ye neither go in yourselves, neither suffer ye them that are entering to go in."
73
+ ```
74
+ ### Exceptions
67
75
  Kj will raise a Kj::Iniquity when it can't find what you're looking for.
68
76
  ```
69
77
  bible.book(:tobit)
70
78
  # Kj::Iniquity: Not found
71
79
  ```
72
80
  As you can see, kj is a protestant gem.
73
- ###FAQ
81
+ ### FAQ
74
82
  Q. Why only King James? Are you one of those 'King James only' nuts?
75
83
 
76
84
  A. Yes
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
data/kj.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: kj 0.0.5 ruby lib
5
+ # stub: kj 0.0.6 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "kj"
9
- s.version = "0.0.5"
9
+ s.version = "0.0.6"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
data/lib/kj.rb CHANGED
@@ -1,7 +1,7 @@
1
- require_relative 'kj/base'
2
- require_relative 'kj/book'
3
- require_relative 'kj/chapter'
4
- require_relative 'kj/verse'
1
+ require 'kj/base'
2
+ require 'kj/book'
3
+ require 'kj/chapter'
4
+ require 'kj/verse'
5
5
 
6
6
  module Kj
7
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - David John