bible_gateway 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +0 -2
- data/.gitignore +15 -3
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/{LICENSE → LICENSE.txt} +3 -1
- data/README.md +42 -0
- data/Rakefile +4 -44
- data/bible_gateway.gemspec +22 -48
- data/lib/bible_gateway.rb +21 -13
- data/lib/bible_gateway/version.rb +3 -0
- data/spec/bible_gateway_spec.rb +41 -21
- data/spec/fixtures/john_1_1.html +899 -409
- data/spec/fixtures/john_3.html +1148 -0
- data/spec/spec_helper.rb +12 -15
- metadata +123 -48
- data/README.rdoc +0 -42
data/spec/spec_helper.rb
CHANGED
@@ -1,24 +1,21 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
|
4
|
+
require 'webmock/rspec'
|
3
5
|
require 'bible_gateway'
|
4
|
-
require 'spec'
|
5
|
-
require 'spec/autorun'
|
6
|
-
require 'fakeweb'
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
end
|
7
|
+
RSpec.configure do |config|
|
11
8
|
|
12
|
-
|
9
|
+
end
|
13
10
|
|
14
11
|
def fixture_file(filename)
|
15
12
|
return '' if filename == ''
|
16
13
|
file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename)
|
17
14
|
File.read(file_path)
|
18
15
|
end
|
19
|
-
|
20
|
-
def stub_get(url, filename, status=
|
21
|
-
options = {:
|
22
|
-
options.merge!({:status => status})
|
23
|
-
|
24
|
-
end
|
16
|
+
|
17
|
+
def stub_get(url, filename, status=200)
|
18
|
+
options = {:body => fixture_file(filename)}
|
19
|
+
options.merge!({:status => status})
|
20
|
+
stub_request(:get, url).to_return(options)
|
21
|
+
end
|
metadata
CHANGED
@@ -1,76 +1,151 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: bible_gateway
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
|
-
authors:
|
7
|
+
authors:
|
7
8
|
- Geoffrey Dagley
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
date: 2013-08-09 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: nokogiri
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: bundler
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.3'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.3'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
16
63
|
name: rspec
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
17
70
|
type: :development
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: webmock
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
description: An unofficial 'API' for BibleGateway.com.
|
95
|
+
email:
|
96
|
+
- gdagley@gmail.com
|
27
97
|
executables: []
|
28
|
-
|
29
98
|
extensions: []
|
30
|
-
|
31
|
-
|
32
|
-
- LICENSE
|
33
|
-
- README.rdoc
|
34
|
-
files:
|
99
|
+
extra_rdoc_files: []
|
100
|
+
files:
|
35
101
|
- .document
|
36
102
|
- .gitignore
|
37
|
-
-
|
38
|
-
-
|
103
|
+
- .rspec
|
104
|
+
- Gemfile
|
105
|
+
- LICENSE.txt
|
106
|
+
- README.md
|
39
107
|
- Rakefile
|
40
108
|
- VERSION
|
41
109
|
- bible_gateway.gemspec
|
42
110
|
- lib/bible_gateway.rb
|
111
|
+
- lib/bible_gateway/version.rb
|
43
112
|
- spec/bible_gateway_spec.rb
|
44
113
|
- spec/fixtures/john_1_1.html
|
114
|
+
- spec/fixtures/john_3.html
|
45
115
|
- spec/spec_helper.rb
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
116
|
+
homepage: https://github.com/gdagley/bible_gateway
|
117
|
+
licenses:
|
118
|
+
- MIT
|
50
119
|
post_install_message:
|
51
|
-
rdoc_options:
|
52
|
-
|
53
|
-
require_paths:
|
120
|
+
rdoc_options: []
|
121
|
+
require_paths:
|
54
122
|
- lib
|
55
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
none: false
|
125
|
+
requirements:
|
126
|
+
- - ! '>='
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
segments:
|
130
|
+
- 0
|
131
|
+
hash: -1686751714827866122
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
none: false
|
134
|
+
requirements:
|
135
|
+
- - ! '>='
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
segments:
|
139
|
+
- 0
|
140
|
+
hash: -1686751714827866122
|
67
141
|
requirements: []
|
68
|
-
|
69
142
|
rubyforge_project:
|
70
|
-
rubygems_version: 1.
|
143
|
+
rubygems_version: 1.8.25
|
71
144
|
signing_key:
|
72
145
|
specification_version: 3
|
73
146
|
summary: An unofficial 'API' for BibleGateway.com.
|
74
|
-
test_files:
|
147
|
+
test_files:
|
75
148
|
- spec/bible_gateway_spec.rb
|
149
|
+
- spec/fixtures/john_1_1.html
|
150
|
+
- spec/fixtures/john_3.html
|
76
151
|
- spec/spec_helper.rb
|
data/README.rdoc
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
= bible_gateway
|
2
|
-
|
3
|
-
An unofficial 'API' for BibleGateway.com.
|
4
|
-
|
5
|
-
Source: http://github.com/gdagley/bible_gateway
|
6
|
-
Build status: http://runcoderun.com/gdagley/bible_gateway
|
7
|
-
|
8
|
-
== SYNOPSIS:
|
9
|
-
|
10
|
-
BibleGateway.versions # available versions
|
11
|
-
|
12
|
-
b = BibleGateway.new # defaults to :king_james_version, but can be initialized to different version
|
13
|
-
b.version = :english_standard_version
|
14
|
-
b.lookup('John 1:1') # => "<h4>John 1</h4>\n<h5>The Word Became Flesh</h5> <sup>1</sup> In the beginning was the Word, and the Word was with God, and the Word was God."
|
15
|
-
|
16
|
-
== TODO
|
17
|
-
|
18
|
-
* Add other versions that are available
|
19
|
-
* Fix failing spec on Ruby 1.9.1 spec (although the gem still works, there is something up with the spec.)
|
20
|
-
|
21
|
-
== REQUIREMENTS:
|
22
|
-
|
23
|
-
* nokogiri
|
24
|
-
|
25
|
-
== INSTALL:
|
26
|
-
|
27
|
-
* sudo gem install gdagley-bible_gateway
|
28
|
-
|
29
|
-
== Note on Patches/Pull Requests
|
30
|
-
|
31
|
-
* Fork the project.
|
32
|
-
* Make your feature addition or bug fix.
|
33
|
-
* Add tests for it. This is important so I don't break it in a
|
34
|
-
future version unintentionally.
|
35
|
-
* Commit, do not mess with rakefile, version, or history.
|
36
|
-
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
37
|
-
* Send me a pull request. Bonus points for topic branches.
|
38
|
-
|
39
|
-
== Copyright
|
40
|
-
|
41
|
-
Copyright (c) 2009 Geoffrey Dagley. See LICENSE for details.
|
42
|
-
Most Bible translations are copyrighted. Please see BibleGateway.com for more information.
|