bible_gateway 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Geoffrey Dagley
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,42 @@
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.
@@ -0,0 +1,47 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "bible_gateway"
8
+ gem.summary = %Q{An unofficial 'API' for BibleGateway.com.}
9
+ gem.email = "gdagley@gmail.com"
10
+ gem.homepage = "http://github.com/gdagley/bible_gateway"
11
+ gem.authors = ["Geoffrey Dagley"]
12
+ gem.add_development_dependency "rspec"
13
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
14
+ end
15
+ rescue LoadError
16
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
17
+ end
18
+
19
+ require 'spec/rake/spectask'
20
+ Spec::Rake::SpecTask.new(:spec) do |spec|
21
+ spec.libs << 'lib' << 'spec'
22
+ spec.spec_files = FileList['spec/**/*_spec.rb']
23
+ end
24
+
25
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
26
+ spec.libs << 'lib' << 'spec'
27
+ spec.pattern = 'spec/**/*_spec.rb'
28
+ spec.rcov = true
29
+ end
30
+
31
+ task :spec => :check_dependencies
32
+
33
+ task :default => :spec
34
+
35
+ require 'rake/rdoctask'
36
+ Rake::RDocTask.new do |rdoc|
37
+ if File.exist?('VERSION')
38
+ version = File.read('VERSION')
39
+ else
40
+ version = ""
41
+ end
42
+
43
+ rdoc.rdoc_dir = 'rdoc'
44
+ rdoc.title = "bible_gateway #{version}"
45
+ rdoc.rdoc_files.include('README*')
46
+ rdoc.rdoc_files.include('lib/**/*.rb')
47
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.2
@@ -0,0 +1,53 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{bible_gateway}
8
+ s.version = "0.0.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Geoffrey Dagley"]
12
+ s.date = %q{2009-09-19}
13
+ s.email = %q{gdagley@gmail.com}
14
+ s.extra_rdoc_files = [
15
+ "LICENSE",
16
+ "README.rdoc"
17
+ ]
18
+ s.files = [
19
+ ".document",
20
+ ".gitignore",
21
+ "LICENSE",
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "bible_gateway.gemspec",
26
+ "lib/bible_gateway.rb",
27
+ "spec/bible_gateway_spec.rb",
28
+ "spec/fixtures/john_1_1.html",
29
+ "spec/spec_helper.rb"
30
+ ]
31
+ s.homepage = %q{http://github.com/gdagley/bible_gateway}
32
+ s.rdoc_options = ["--charset=UTF-8"]
33
+ s.require_paths = ["lib"]
34
+ s.rubygems_version = %q{1.3.5}
35
+ s.summary = %q{An unofficial 'API' for BibleGateway.com.}
36
+ s.test_files = [
37
+ "spec/bible_gateway_spec.rb",
38
+ "spec/spec_helper.rb"
39
+ ]
40
+
41
+ if s.respond_to? :specification_version then
42
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
43
+ s.specification_version = 3
44
+
45
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
46
+ s.add_development_dependency(%q<rspec>, [">= 0"])
47
+ else
48
+ s.add_dependency(%q<rspec>, [">= 0"])
49
+ end
50
+ else
51
+ s.add_dependency(%q<rspec>, [">= 0"])
52
+ end
53
+ end
@@ -0,0 +1,71 @@
1
+ require 'open-uri'
2
+ require 'nokogiri'
3
+
4
+ class BibleGatewayError < StandardError; end
5
+
6
+ class BibleGateway
7
+ GATEWAY_URL = "http://www.biblegateway.com"
8
+
9
+ VERSIONS = {
10
+ :new_international_version => "NIV",
11
+ :new_american_standard_bible => "NASB",
12
+ :the_message => "MSG",
13
+ :amplified_bible => "AMP",
14
+ :new_living_translation => "NLT",
15
+ :king_james_version => "KJV",
16
+ :english_standard_version => "ESV",
17
+ :contemporary_english_version => "CEV",
18
+ :new_king_james_version => "NKJV",
19
+ :new_century_version => "NCV",
20
+ :king_james_version_21st_century => "KJ21",
21
+ :american_standard_version => "ASV",
22
+ :youngs_literal_translation => "YLT",
23
+ :darby_translation => "DARBY",
24
+ :holman_christian_standard_bible => "HCSB",
25
+ :new_international_readers_version => "NIRV",
26
+ :wycliffe_new_testament => "WYC",
27
+ :worldwide_english_new_testament => "WE",
28
+ :new_international_version_uk => "NIVUK",
29
+ :todays_new_international_version => "TNIV",
30
+ }
31
+
32
+ def self.versions
33
+ VERSIONS.keys
34
+ end
35
+
36
+ attr_accessor :version
37
+
38
+ def initialize(version = :king_james_version)
39
+ self.version = version
40
+ end
41
+
42
+ def version=(version)
43
+ raise BibleGatewayError, 'Unsupported version' unless VERSIONS.keys.include? version
44
+ @version = version
45
+ end
46
+
47
+ def lookup(passage)
48
+ doc = Nokogiri::HTML(open(passage_url(passage)))
49
+ scrape_passage(doc)
50
+ end
51
+
52
+ private
53
+ def passage_url(passage)
54
+ URI.escape "#{GATEWAY_URL}/passage/?search=#{passage}&version=#{VERSIONS[version]}"
55
+ end
56
+
57
+ def scrape_passage(doc)
58
+ title = doc.css('h2')[0].content
59
+ segment = doc.at('div.result-text-style-normal')
60
+ segment.search('sup.xref').remove # remove cross reference links
61
+ segment.search('sup.footnote').remove # remove footnote links
62
+ segment.search("div.crossrefs").remove # remove cross references
63
+ segment.search("div.footnotes").remove # remove footnotes
64
+ segment.search('sup.versenum').each do |span|
65
+ text = span.content
66
+ span.swap "<sup>#{text}</sup>"
67
+ end
68
+ content = segment.inner_html.gsub('<p></p>', '').gsub(/<!--.*?-->/, '').strip
69
+ {:title => title, :content => content }
70
+ end
71
+ end
@@ -0,0 +1,53 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe BibleGateway do
4
+ it 'should have a list of versions' do
5
+ BibleGateway.versions.should_not be_empty
6
+ end
7
+
8
+ describe 'setting the version' do
9
+ it "should have a default version" do
10
+ gateway = BibleGateway.new
11
+ gateway.version.should == :king_james_version
12
+ end
13
+
14
+ it "should be able to set the version to use" do
15
+ gateway = BibleGateway.new :english_standard_version
16
+ gateway.version.should == :english_standard_version
17
+ end
18
+
19
+ it "should raise an exception for unknown version" do
20
+ lambda { BibleGateway.new :unknown_version }.should raise_error(BibleGatewayError)
21
+ end
22
+
23
+ it "should be able to change the version to use" do
24
+ gateway = BibleGateway.new
25
+ gateway.version = :english_standard_version
26
+ gateway.version.should == :english_standard_version
27
+ end
28
+
29
+ it "should raise an exception when changing to unknown version" do
30
+ gateway = BibleGateway.new
31
+ lambda { gateway.version = :unknown_version }.should raise_error(BibleGatewayError)
32
+ end
33
+ end
34
+
35
+ describe "lookup" do
36
+ it "should find the passage title" do
37
+ stub_get "http://www.biblegateway.com/passage/?search=John%201:1&version=ESV", 'john_1_1.html'
38
+ BibleGateway.new(:english_standard_version).lookup("John 1:1")[:title].should == "John 1:1 (English Standard Version)"
39
+ end
40
+
41
+ it "should find and clean the passage content" do
42
+ passage = "<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."
43
+ stub_get "http://www.biblegateway.com/passage/?search=John%201:1&version=ESV", 'john_1_1.html'
44
+ result = BibleGateway.new(:english_standard_version).lookup("John 1:1")[:content]
45
+ result.should include("<h4>John 1</h4>")
46
+ result.should include("<h5>The Word Became Flesh</h5>")
47
+ result.should include("<sup>1</sup>")
48
+ result.should include("In the beginning was the Word, and the Word was with God, and the Word was God.")
49
+ # result.should == passage # there are hidden characters in here that I need to track down
50
+ end
51
+ end
52
+
53
+ end
@@ -0,0 +1,498 @@
1
+ HTTP/1.1 200 OK
2
+ Date: Tue, 08 Sep 2009 20:20:53 GMT
3
+ Server: Apache/2.0
4
+ X-Powered-By: PHP/4.4.7
5
+ Set-Cookie: bg_id=986c85fbc4411d7452042f9587c06a4f; path=/; domain=.biblegateway.com
6
+ Vary: Accept-Encoding
7
+ Transfer-Encoding: chunked
8
+ Content-Type: text/html; charset=UTF-8
9
+
10
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
11
+ <html xmlns="http://www.w3.org/1999/xhtml">
12
+ <head>
13
+ <title>John 1:1 - Passage&nbsp;Lookup - English Standard Version - BibleGateway.com</title>
14
+ <link rel="canonical" href="http://www.biblegateway.com/passage/?search=John+1%3A1&amp;version=ESV" />
15
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
16
+ <meta name="description" content="The Word Became Flesh Gen 1:1; Col 1:17; 1 John 1:1; Rev 1:4, 8, 17; 3:14; 21:6; 22:13 In the beginning wasRev 19:13; Heb 4:12; 1 John 1:1 the Word," />
17
+ <link rel="favorite icon" href="http://static.bgcdn.com/favicon.ico" type="image/x-icon" />
18
+ <link rel="search" type="application/opensearchdescription+xml" title="Bible Gateway" href="http://static.bgcdn.com/resources/opensearch/bgsearch.xml">
19
+ <!-- STYLESHEETS -->
20
+ <style type="text/css" media="screen">@import "http://static.bgcdn.com/includes/css/default.css?0831-2";</style>
21
+ <link rel="stylesheet" type="text/css" media="print" href="http://static.bgcdn.com/includes/css/print.css" />
22
+ <link rel="stylesheet" type="text/css" media="handheld" href="http://static.bgcdn.com/includes/css/handheld.css" />
23
+ <link rel="alternate stylesheet" type="text/css" media="all" title="xsmall" href="http://static.bgcdn.com/includes/css/xsmall.css" />
24
+ <link rel="alternate stylesheet" type="text/css" media="all" title="small" href="http://static.bgcdn.com/includes/css/small.css" />
25
+ <link rel="stylesheet" type="text/css" media="all" title="medium" href="http://static.bgcdn.com/includes/css/medium.css" />
26
+ <link rel="alternate stylesheet" type="text/css" media="all" title="large" href="http://static.bgcdn.com/includes/css/large.css" />
27
+ <link rel="alternate stylesheet" type="text/css" media="all" title="xlarge" href="http://static.bgcdn.com/includes/css/xlarge.css" />
28
+ <link rel="stylesheet" type="text/css" media="all" href="http://static.bgcdn.com/includes/css/bgblog.css" />
29
+ <link rel="alternate" type="application/atom+xml" title="Verse of the day feed" href="http://www.biblegateway.com/votd/get/?format=atom&version=31" /><!-- JAVASCRIPT -->
30
+ <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'></script>
31
+ <script type="text/javascript" language="javascript">
32
+ // <![CDATA[
33
+ var prefs = new Array;
34
+
35
+ prefs['searches_includeapocrypha'] = 'no';
36
+ prefs['fontsize'] = 'medium';
37
+ prefs['language'] = 'en';
38
+ prefs['default_version_display'] = 'all';
39
+ prefs['default_version'] = '31';
40
+ prefs['default_version_overrides'] = 'no';
41
+ prefs['quicksearch_search'] = '';
42
+ prefs['pslookup_search1'] = '';
43
+ prefs['pslookup_search2'] = '';
44
+ prefs['pslookup_search3'] = '';
45
+ prefs['pslookup_search4'] = '';
46
+ prefs['pslookup_search5'] = '';
47
+ prefs['pslookup_version1'] = '31';
48
+ prefs['pslookup_version2'] = '';
49
+ prefs['pslookup_version3'] = '';
50
+ prefs['pslookup_version4'] = '';
51
+ prefs['pslookup_version5'] = '';
52
+ prefs['pslookup_language1'] = 'en';
53
+ prefs['pslookup_language2'] = '';
54
+ prefs['pslookup_language3'] = '';
55
+ prefs['pslookup_language4'] = '';
56
+ prefs['pslookup_language5'] = '';
57
+ prefs['pslookup_showmoresearches'] = 'closed';
58
+ prefs['pslookup_showversions'] = 'open';
59
+ prefs['pslookup_showmoreversions'] = 'closed';
60
+ prefs['pslookup_showoptions'] = 'open';
61
+ prefs['pslookup_showfootnotes'] = 'yes';
62
+ prefs['pslookup_showxrefs'] = 'yes';
63
+ prefs['pslookup_showwoj'] = 'no';
64
+ prefs['pslookup_multilayout'] = 'rows';
65
+ prefs['pslookup_multisort'] = 'version';
66
+ prefs['pslookup_embed-versenum'] = 'true';
67
+ prefs['pslookup_embed-xref'] = 'false';
68
+ prefs['pslookup_embed-footnote'] = 'false';
69
+ prefs['pslookup_embed-heading'] = 'false';
70
+ prefs['keysearch_search'] = '';
71
+ prefs['keysearch_version1'] = '31';
72
+ prefs['keysearch_version2'] = '';
73
+ prefs['keysearch_version3'] = '';
74
+ prefs['keysearch_version4'] = '';
75
+ prefs['keysearch_version5'] = '';
76
+ prefs['keysearch_language1'] = 'en';
77
+ prefs['keysearch_language'] = 'en';
78
+ prefs['keysearch_bookset'] = '';
79
+ prefs['keysearch_spanbegin'] = '1';
80
+ prefs['keysearch_spanend'] = '73';
81
+ prefs['keysearch_limit'] = 'none';
82
+ prefs['keysearch_startnumber'] = '1';
83
+ prefs['keysearch_searchtype'] = 'all';
84
+ prefs['keysearch_showversions'] = 'open';
85
+ prefs['keysearch_showmoreversions'] = 'closed';
86
+ prefs['keysearch_showoptions'] = 'open';
87
+ prefs['keysearch_displayas'] = 'long';
88
+ prefs['keysearch_resultspp'] = '25';
89
+ prefs['keysearch_sort'] = 'bookorder';
90
+ prefs['keysearch_wholewordsonly'] = 'no';
91
+ prefs['commentary_source'] = '1';
92
+ prefs['topindex_source'] = '1';
93
+ prefs['topindex_search'] = '';
94
+ prefs['topindex_search_type'] = 'any';
95
+ prefs['topindex_resultspp'] = '25';
96
+ prefs['audio_source'] = '3';
97
+ prefs['audio_book'] = '';
98
+ prefs['audio_chapter'] = '';
99
+ prefs['dict_source'] = '1';
100
+ prefs['dict_search'] = '';
101
+ prefs['dict_search_type'] = 'any';
102
+ if (document.images) { self.name = 'bgmain'; }
103
+ // ]]>
104
+
105
+ function slideleft() {
106
+ elements = document.getElementsByTagName('body');
107
+ body = elements[0];
108
+ body.style.left = '100px';
109
+ console.log('moved?');
110
+ }
111
+ </script>
112
+ </head>
113
+
114
+ <body bgcolor="ffffff">
115
+ <div id='body'>
116
+ <a name='intersite'></a>
117
+
118
+
119
+ <!-- BRAND -->
120
+ <div id="brand" style="background-image: url(http://static.bgcdn.com/languages/en/images/logo.gif); background-repeat: no-repeat;">
121
+ <a href="/">
122
+ <img src="http://static.bgcdn.com/languages/en/images/logo_whitebg.png" alt="BibleGateway.com" border="0" />
123
+ </a>
124
+ </div>
125
+
126
+
127
+ <!-- SITE OPTIONS -->
128
+ <table id="site-options" cellpadding="0" cellspacing="0" border="0"><tr>
129
+ <!-- QUICKSEARCH -->
130
+ <td>
131
+ <form name="quicksearch" action="/quicksearch/" method="get">
132
+ <img src="http://static.bgcdn.com/images/search_icon.gif" width="17" height="21" alt="" />
133
+ <input type="text" name="quicksearch" value="" onblur="setUpdatePrefs('quicksearch_search',this.value)" />
134
+ <input type="image" src="http://static.bgcdn.com/images/search_button.gif" title="Search" />
135
+ </form>
136
+ </td>
137
+ <!-- FONT OPTIONS -->
138
+ <td>
139
+ <a href="/passage/index.php?search=John%201:1&version=ESV" style="font-size:10px;" title="extra small"
140
+ class="unselected" onclick="setUpdatePrefs('fontsize','xsmall');">A</a>
141
+ <a href="/passage/index.php?search=John%201:1&version=ESV" style="font-size:12px;" title="small"
142
+ class="unselected" onclick="setUpdatePrefs('fontsize','small');">A</a>
143
+ <a href="/passage/index.php?search=John%201:1&version=ESV" style="font-size:14px;" title="medium"
144
+ class="selected" onclick="setUpdatePrefs('fontsize','medium');">A</a>
145
+ <a href="/passage/index.php?search=John%201:1&version=ESV" style="font-size:16px;" title="large"
146
+ class="unselected" onclick="setUpdatePrefs('fontsize','large');">A</a>
147
+ <a href="/passage/index.php?search=John%201:1&version=ESV" style="font-size:18px;" title="extra large"
148
+ class="unselected" onclick="setUpdatePrefs('fontsize','xlarge');">A</a>
149
+ </td>
150
+
151
+ <!-- LANGUAGE OPTIONS -->
152
+ <td>
153
+ <form method="post" action="/languages/update.php">
154
+ <input type="hidden" name="url" value="/passage/index.php?search=John%201:1&version=ESV" />
155
+ <img src="http://static.bgcdn.com/languages/en/images/flag.gif" alt="en" />
156
+ <select name="language" class="txt-sm" onchange="setUpdatePrefs('language',this.value); this.form.submit();">
157
+ <option value='en' selected="selected">English (EN) </option><option value='es' >Español (ES) </option></select>
158
+ <noscript>
159
+ <input type="image" src="/images/search_button.gif" />
160
+ </noscript>
161
+ </form>
162
+ </td>
163
+ </tr></table>
164
+
165
+ <!-- PAGE OPTIONS -->
166
+ <div id="page-options">
167
+
168
+ <!--
169
+ <a href="/share/index.php?url=%2Fpassage%2Findex.php%3Fsearch%3DJohn%25201%3A1%26version%3DESV">
170
+ <img src="/images/buttons/email_sm.gif" width="12" height="10" alt="" />
171
+ Email this page</a>
172
+ -->
173
+ <a href="/passage/index.php?search=John%201:1&version=ESV&interface=print" rel="nofollow">
174
+ » Printer-friendly page</a>
175
+ <a href="http://mobile.biblegateway.com/passage/index.php?search=John%201:1&version=ESV" rel="nofollow">
176
+ » Mobile-friendly page</a>
177
+
178
+ </div>
179
+
180
+ <div id="content">
181
+ <img id="spacer" src="http://static.bgcdn.com/images/spacer.gif" width="1" height="325" alt="" align="right" />
182
+
183
+ <!-- SITE NAVIGATION -->
184
+ <div id="navigation">
185
+ <hr />
186
+ <h3>BibleGateway.com navigation</h3>
187
+ <ul>
188
+ <li id="nav01"><a href="/" title="Return to the BibleGateway.com homepage" style="background-image:url(http://static.bgcdn.com/languages/en/images/nav.gif);"><span>Home</span></a></li>
189
+ <li id="nav02"><a href="/passage/" title="Look for a passage in one or more Bible versions" style="background-image:url(http://static.bgcdn.com/languages/en/images/nav.gif);"><span>Passage&nbsp;Lookup</span></a></li>
190
+ <li id="nav03"><a href="/keyword/" title="Search for keywords or phrases in one or more Bible versions" style="background-image:url(http://static.bgcdn.com/languages/en/images/nav.gif);"><span>Keyword&nbsp;Search</span></a></li>
191
+ <li id="nav04"><a href="/topical/" title="Search the Bible by topic" style="background-image:url(http://static.bgcdn.com/languages/en/images/nav.gif);"><span>Topical&nbsp;Index</span></a></li>
192
+ <li id="nav05"><a href="/versions/" title="Bible versions available on BibleGateway.com" style="background-image:url(http://static.bgcdn.com/languages/en/images/nav.gif);"><span>Available Versions</span></a></li>
193
+ <li id="nav06"><a href="/resources/" title="Additional Bible resources" style="background-image:url(http://static.bgcdn.com/languages/en/images/nav.gif);"><span>Additional Resources</span></a></li>
194
+ <li id="nav07"><a href="/resources/readingplans/" title="Plans for reading through the bible" style="background-image:url(http://static.bgcdn.com/languages/en/images/nav.gif);"><span>Reading Plans</span></a></li>
195
+ <li id="nav08"><a href="/usage/" title="How to use BibleGateway.com on your own site" style="background-image:url(http://static.bgcdn.com/languages/en/images/nav.gif);"><span>Use On Your Website</span></a></li>
196
+ <li id="nav09"><a href="/about/" title="Find out more about BibleGateway.com" style="background-image:url(http://static.bgcdn.com/languages/en/images/nav.gif);"><span>About BibleGateway.com</span></a></li>
197
+ <li id="nav10"><a href="/preferences/" title="Set your preferences for BibleGateway.com" style="background-image:url(http://static.bgcdn.com/languages/en/images/nav.gif);"><span>Preferences</span></a></li>
198
+ <li id="nav11"><a href="/blog/" title="Keep up with the BibleGateway.com" style="background-image:url(http://static.bgcdn.com/languages/en/images/nav.gif);"><span>Blog</span></a></li>
199
+ <li id="nav12"><a href="/help/" title="Frequently Asked Questions" style="background-image:url(http://static.bgcdn.com/languages/en/images/nav.gif);"><span>Help</span></a></li>
200
+
201
+ </ul>
202
+ </div>
203
+ <!-- UNIQUE CONTENT -->
204
+ <h1>Passage results</h1>
205
+ <form style="margin-bottom: 5px; margin-top: 0px;" action="/passage/parser.php" id="updateresultsform"><input type="text" name="search1" onBlur="setUpdatePrefs('pslookup_search1',this.value)" class="txt-sm" value="John 1:1" /> <select name="version1" class="txt-sm" onchange="setUpdatePrefs('pslookup_version1',this.value)"><option class="lang" value="AMU">Amuzgo de Guerrero (amu)</option>
206
+ <option value="AMU" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Amuzgo de Guerrero</option>
207
+ <option class="lang" value="ALAB">العربية (ar)</option>
208
+ <option value="ALAB" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Arabic Life Application Bible</option>
209
+ <option class="lang" value="BULG">Български (bg)</option>
210
+ <option value="BULG" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bulgarian Bible</option>
211
+ <option value="BG1940" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1940 Bulgarian Bible</option>
212
+ <option class="lang" value="CCO">Chinanteco de Comaltepec (cco)</option>
213
+ <option value="CCO" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Chinanteco de Comaltepec</option>
214
+ <option class="lang" value="CKW">Cakchiquel Occidental (ckw)</option>
215
+ <option value="CKW" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cakchiquel Occidental</option>
216
+ <option class="lang" value="HCV">Kreyol (cpf)</option>
217
+ <option value="HCV" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Haitian Creole Version</option>
218
+ <option class="lang" value="SNC">Čeština (cs)</option>
219
+ <option value="SNC" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Slovo na cestu</option>
220
+ <option class="lang" value="DN1933">Dansk (da)</option>
221
+ <option value="DN1933" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dette er Biblen på dansk</option>
222
+ <option class="lang" value="HOF">Deutsch (de)</option>
223
+ <option value="HOF" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hoffnung für Alle</option>
224
+ <option value="LUTH1545" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Luther Bibel 1545</option>
225
+ <option class="lang" value="NIV">English (en)</option>
226
+ <option value="NIV" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;New International Version</option>
227
+ <option value="NASB" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;New American Standard Bible</option>
228
+ <option value="MSG" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Message</option>
229
+ <option value="AMP" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Amplified Bible</option>
230
+ <option value="NLT" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;New Living Translation</option>
231
+ <option value="KJV" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;King James Version</option>
232
+ <option value="ESV" selected="selected" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;English Standard Version</option>
233
+ <option value="CEV" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contemporary English Version</option>
234
+ <option value="NKJV" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;New King James Version</option>
235
+ <option value="NCV" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;New Century Version</option>
236
+ <option value="KJ21" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;21st Century King James Version</option>
237
+ <option value="ASV" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;American Standard Version</option>
238
+ <option value="YLT" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Young's Literal Translation</option>
239
+ <option value="DARBY" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Darby Translation</option>
240
+ <option value="HCSB" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Holman Christian Standard Bible</option>
241
+ <option value="NIRV" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;New International Reader's Version</option>
242
+ <option value="WYC" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Wycliffe New Testament</option>
243
+ <option value="WE" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Worldwide English (New Testament)</option>
244
+ <option value="NIVUK" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;New International Version - UK</option>
245
+ <option value="TNIV" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Today's New International Version</option>
246
+ <option class="lang" value="RVR1960">Español (es)</option>
247
+ <option value="RVR1960" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reina-Valera 1960</option>
248
+ <option value="NVI" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Nueva Versión Internacional</option>
249
+ <option value="RVR1995" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reina-Valera 1995</option>
250
+ <option value="CST" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Castilian</option>
251
+ <option value="RVA" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reina-Valera Antigua</option>
252
+ <option value="BLS" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Biblia en Lenguaje Sencillo</option>
253
+ <option value="LBLA" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;La Biblia de las Américas</option>
254
+ <option class="lang" value="LSG">Français (fr)</option>
255
+ <option value="LSG" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Louis Segond</option>
256
+ <option value="BDS" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;La Bible du Semeur</option>
257
+ <option class="lang" value="WHNU">Κοινη (grc)</option>
258
+ <option value="WHNU" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1881 Westcott-Hort New Testament</option>
259
+ <option value="TR1550" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1550 Stephanus New Testament</option>
260
+ <option value="TR1894" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1894 Scrivener New Testament</option>
261
+ <option class="lang" value="WLC">תירביע (he)</option>
262
+ <option value="WLC" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Westminster Leningrad Codex</option>
263
+ <option class="lang" value="HLGN">Ilonggo (hil)</option>
264
+ <option value="HLGN" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hiligaynon Bible</option>
265
+ <option class="lang" value="CRO">Hrvatski (hr)</option>
266
+ <option value="CRO" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Croatian Bible</option>
267
+ <option class="lang" value="KAR">Magyar (hu)</option>
268
+ <option value="KAR" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hungarian Károli</option>
269
+ <option class="lang" value="ICELAND">Íslenska (is)</option>
270
+ <option value="ICELAND" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Icelandic Bible</option>
271
+ <option class="lang" value="LND">Italiano (it)</option>
272
+ <option value="LND" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;La Nuova Diodati</option>
273
+ <option value="LM" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;La Parola è Vita</option>
274
+ <option class="lang" value="JAC">Jacalteco, Oriental (jac)</option>
275
+ <option value="JAC" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Jacalteco, Oriental</option>
276
+ <option class="lang" value="KEK">Kekchi (kek)</option>
277
+ <option value="KEK" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kekchi</option>
278
+ <option class="lang" value="KOREAN">한국어 (ko)</option>
279
+ <option value="KOREAN" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Korean Bible</option>
280
+ <option class="lang" value="MAORI">Māori (mi)</option>
281
+ <option value="MAORI" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maori Bible</option>
282
+ <option class="lang" value="MNT">Macedonian (mk)</option>
283
+ <option value="MNT" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Macedonian New Testament</option>
284
+ <option class="lang" value="MVC">Mam, Central (mvc)</option>
285
+ <option value="MVC" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mam, Central</option>
286
+ <option class="lang" value="MVJ">Mam, Todos Santos (mvj)</option>
287
+ <option value="MVJ" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mam de Todos Santos Chuchumatán</option>
288
+ <option class="lang" value="REIMER">Plautdietsch (nds)</option>
289
+ <option value="REIMER" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reimer 2001</option>
290
+ <option class="lang" value="NGU">Náhuatl de Guerrero (ngu)</option>
291
+ <option value="NGU" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Náhuatl de Guerrero</option>
292
+ <option class="lang" value="HTB">Nederlands (nl)</option>
293
+ <option value="HTB" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Het Boek</option>
294
+ <option class="lang" value="DNB1930">Norsk (no)</option>
295
+ <option value="DNB1930" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Det Norsk Bibelselskap 1930</option>
296
+ <option value="LB" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Levande Bibeln</option>
297
+ <option class="lang" value="OL">Português (pt)</option>
298
+ <option value="OL" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;O Livro</option>
299
+ <option value="AA" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;João Ferreira de Almeida Atualizada</option>
300
+ <option class="lang" value="QUT">Quiché, Centro Occidenta (qut)</option>
301
+ <option value="QUT" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quiché, Centro Occidental</option>
302
+ <option class="lang" value="RMNN">Română (ro)</option>
303
+ <option value="RMNN" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Romanian</option>
304
+ <option value="TLCR" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Romanian</option>
305
+ <option class="lang" value="RUSV">Русский (ru)</option>
306
+ <option value="RUSV" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Russian Synodal Version</option>
307
+ <option value="SZ" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Slovo Zhizny</option>
308
+ <option class="lang" value="NPK">Slovenčina (sk)</option>
309
+ <option value="NPK" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Nádej pre kazdého</option>
310
+ <option class="lang" value="ALB">Shqip (sq)</option>
311
+ <option value="ALB" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Albanian Bible</option>
312
+ <option class="lang" value="SVL">Svenska (sv)</option>
313
+ <option value="SVL" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Levande Bibeln</option>
314
+ <option value="SV1917" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Svenska 1917</option>
315
+ <option class="lang" value="SNT">Kiswahili (sw)</option>
316
+ <option value="SNT" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Swahili New Testament</option>
317
+ <option class="lang" value="SND">Tagalog (tl)</option>
318
+ <option value="SND" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ang Salita ng Diyos</option>
319
+ <option class="lang" value="UKR">Українська (uk)</option>
320
+ <option value="UKR" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ukrainian Bible</option>
321
+ <option class="lang" value="USP">Uspanteco (usp)</option>
322
+ <option value="USP" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uspanteco</option>
323
+ <option class="lang" value="VIET">Tiêng Viêt (vi)</option>
324
+ <option value="VIET" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1934 Vietnamese Bible</option>
325
+ <option class="lang" value="CUV">汉语 (zh)</option>
326
+ <option value="CUV" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Chinese Union Version (Traditional)</option>
327
+ <option value="CUVS" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Chinese Union Version (Simplified)</option>
328
+ </select><input type="hidden" name="showmoresearches" value="closed"><input type="hidden" name="showmoreversions" value="closed"><input type="hidden" name="pslookup_showfootnotes" value="yes" /> <input type="hidden" name="pslookup_showxrefs" value="" /><input type="submit" value="Update" /></form>
329
+ <ul class="result-options" id='result-options1'><li class="backback">
330
+ <a href="/passage/?search=Luke+1&version=ESV"
331
+ onmouseover="ShowOptionInfo('Previous Book','Go to Luke 1')"
332
+ onmouseout="HideOptionInfo()" >
333
+ <span>Previous Book:Go to Luke</span></a></li>
334
+ <li class="back">
335
+ <a href="/passage/?search=Luke+24&version=ESV"
336
+ onmouseover="ShowOptionInfo('Previous Chapter','Go to Luke 24')"
337
+ onmouseout="HideOptionInfo()" >
338
+ <span>Previous Chapter : Go to Luke 24</span></a></li>
339
+ <li class="expand">
340
+ <a href="/passage/?search=John+1&version=ESV"
341
+ onmouseover="ShowOptionInfo('Expand: show the entire chapter of',' John 1')"
342
+ onmouseout="HideOptionInfo()" >
343
+ <span>Expand: show the entire chapter ofJohn 1</span></a></li>
344
+ <li class="next">
345
+ <a href="/passage/?search=John+2&version=ESV"
346
+ onmouseover="ShowOptionInfo('Next Chapter','Go to John 2')"
347
+ onmouseout="HideOptionInfo()" >
348
+ <span>Next Chapter : Go to John 2</span></a></li>
349
+ <li class="nextnext">
350
+ <a href="/passage/?search=Acts+1&version=ESV"
351
+ onmouseover="ShowOptionInfo('Next Book','Go to Acts 1')"
352
+ onmouseout="HideOptionInfo()" >
353
+ <span>Next Book:Go to Acts</span></a></li>
354
+ <li class="listen">
355
+ <a href="/resources/audio/flash_play.php?aid=21&book=50&chapter=1" onclick = "var flashWindow =''; function openwin() {
356
+ url = '/resources/audio/flash_play.php?aid=21&book=50&chapter=1';
357
+ if (flashWindow != '' && !flashWindow.closed) {
358
+ flashWindow.location = url;
359
+ } else {
360
+ flashWindow = window.open(url,'_blank','resizable=yes, toolbar=no, location=no, directories=no, status=0, menubar=no, scrollbars=no, width=350, height=196');
361
+ }
362
+ } openwin(); return false;"
363
+ onmouseover="ShowOptionInfo('Listen to this passage',' John 1')"
364
+ onmouseout="HideOptionInfo()" >
365
+ <span>Listen to this passage : John 1</span></a></li><li class="commentary">
366
+ <a href="/resources/commentaries/Matthew-Henry/John/Divinity-Christ"
367
+ onmouseover="ShowOptionInfo('View commentary related to this passage',' John 1')"
368
+ onmouseout="HideOptionInfo()" >
369
+ <span>View commentary related to this passage : John 1</span></a></li></ul><div id="result-options-info">&nbsp;</div>
370
+ <div id='purchase-bible'><script type='text/javascript'><!--//<![CDATA[
371
+ var m3_u = (location.protocol=='https:'?'https://a9g.biblegateway.com/www/delivery/ajs.php':'http://a9g.biblegateway.com/www/delivery/ajs.php');
372
+ var m3_r = Math.floor(Math.random()*99999999999);
373
+ if (!document.MAX_used) document.MAX_used = ',';
374
+ document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
375
+ document.write ("?zoneid=2&amp;source=ESV");
376
+ document.write ('&amp;cb=' + m3_r);
377
+ if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
378
+ document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
379
+ document.write ("&amp;loc=" + escape(window.location));
380
+ if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
381
+ if (document.context) document.write ("&context=" + escape(document.context));
382
+ if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
383
+ document.write ("'><\/scr"+"ipt>");
384
+ //]]>--></script><noscript><a href='http://a9g.biblegateway.com/www/delivery/ck.php?n=a79f0a7f&amp;cb=1397383246' target='_blank'><img src='http://a9g.biblegateway.com/www/delivery/avw.php?zoneid=2&amp;source=ESV&amp;n=a79f0a7f' border='0' alt='' /></a></noscript></div>
385
+ <h2>John 1:1&nbsp;(English Standard Version)</h2>
386
+ <div class="result-text-style-normal">
387
+ <p><h4>John 1</h4><h5>The Word Became Flesh</h5>&nbsp;<sup class="versenum" id="en-ESV-26035">1</sup><sup class='xref' value='(<a href="#cen-ESV-26035A" title="See cross-reference A">A</a>)'>(<a href="#cen-ESV-26035A" title="See cross-reference A">A</a>)</sup> In the beginning was<sup class='xref' value='(<a href="#cen-ESV-26035B" title="See cross-reference B">B</a>)'>(<a href="#cen-ESV-26035B" title="See cross-reference B">B</a>)</sup> the Word, and<sup class='xref' value='(<a href="#cen-ESV-26035C" title="See cross-reference C">C</a>)'>(<a href="#cen-ESV-26035C" title="See cross-reference C">C</a>)</sup> the Word was with God, and<sup class='xref' value='(<a href="#cen-ESV-26035D" title="See cross-reference D">D</a>)'>(<a href="#cen-ESV-26035D" title="See cross-reference D">D</a>)</sup> the Word was God.</p><p /><div class="crossrefs"><strong>Cross references:</strong><ol type="A"><li id="cen-ESV-26035A"><a href="#en-ESV-26035" title="Go to John 1:1">John 1:1</a> : <a href="/passage/?search=Gen1:1;Col1:17;1John1:1;Rev1:4,8,17;3:14;21:6;22:13&version=ESV">Gen 1:1; Col 1:17; 1 John 1:1; Rev 1:4, 8, 17; 3:14; 21:6; 22:13 </a></li>
388
+
389
+ <li id="cen-ESV-26035B"><a href="#en-ESV-26035" title="Go to John 1:1">John 1:1</a> : <a href="/passage/?search=Rev19:13;Heb4:12;1John1:1&version=ESV">Rev 19:13; Heb 4:12; 1 John 1:1 </a></li>
390
+
391
+ <li id="cen-ESV-26035C"><a href="#en-ESV-26035" title="Go to John 1:1">John 1:1</a> : <a href="/passage/?search=1John1:2;John17:5&version=ESV">1 John 1:2; John 17:5 </a></li>
392
+
393
+ <li id="cen-ESV-26035D"><a href="#en-ESV-26035" title="Go to John 1:1">John 1:1</a> : <a href="/passage/?search=Phil2:6&version=ESV">Phil 2:6</a></li>
394
+
395
+ </ol></div> <!--end of crossrefs-->
396
+ </div>
397
+ <div id="publisher-info-bottom-withad" class="publisher-info-bottom">
398
+ <strong><a href="/versions/English-Standard-Version-ESV-Bible/">English Standard Version</a> (ESV)</strong><p>The Holy Bible, English Standard Version Copyright ©&nbsp;2001 by <a href="http://www.gnpcb.org">Crossway Bibles, a division of Good News Publishers.</a></p></div>
399
+ <div id="result-options-info2" style="clear:both;">&nbsp;</div>
400
+ <ul class="result-options" id="result-options2"><li class="backback">
401
+ <a href="/passage/?search=Luke+1&version=ESV"
402
+ onmouseover="ShowOptionInfo2('Previous Book','Go to Luke 1')"
403
+ onmouseout="HideOptionInfo2()" >
404
+ <span>Previous Book:Go to Luke</span></a></li>
405
+ <li class="back">
406
+ <a href="/passage/?search=Luke+24&version=ESV"
407
+ onmouseover="ShowOptionInfo2('Previous Chapter','Go to Luke 24')"
408
+ onmouseout="HideOptionInfo2()" >
409
+ <span>Previous Chapter : Go to Luke 24</span></a></li>
410
+ <li class="expand">
411
+ <a href="/passage/?search=John+1&version=ESV"
412
+ onmouseover="ShowOptionInfo2('Expand: show the entire chapter of',' John 1')"
413
+ onmouseout="HideOptionInfo2()" >
414
+ <span>Expand: show the entire chapter ofJohn 1</span></a></li>
415
+ <li class="next">
416
+ <a href="/passage/?search=John+2&version=ESV"
417
+ onmouseover="ShowOptionInfo2('Next Chapter','Go to John 2')"
418
+ onmouseout="HideOptionInfo2()" >
419
+ <span>Next Chapter : Go to John 2</span></a></li>
420
+ <li class="nextnext">
421
+ <a href="/passage/?search=Acts+1&version=ESV"
422
+ onmouseover="ShowOptionInfo2('Next Book','Go to Acts 1')"
423
+ onmouseout="HideOptionInfo2()" >
424
+ <span>Next Book:Go to Acts</span></a></li>
425
+ <li class="listen">
426
+ <a href="/resources/audio/flash_play.php?aid=21&book=50&chapter=1" onclick = "var flashWindow =''; function openwin() {
427
+ url = '/resources/audio/flash_play.php?aid=21&book=50&chapter=1';
428
+ if (flashWindow != '' && !flashWindow.closed) {
429
+ flashWindow.location = url;
430
+ } else {
431
+ flashWindow = window.open(url,'_blank','resizable=yes, toolbar=no, location=no, directories=no, status=0, menubar=no, scrollbars=no, width=350, height=196');
432
+ }
433
+ } openwin(); return false;"
434
+ onmouseover="ShowOptionInfo2('Listen to this passage',' John 1')"
435
+ onmouseout="HideOptionInfo2()" >
436
+ <span>Listen to this passage : John 1</span></a></li><li class="commentary">
437
+ <a href="/resources/commentaries/Matthew-Henry/John/Divinity-Christ"
438
+ onmouseover="ShowOptionInfo2('View commentary related to this passage',' John 1')"
439
+ onmouseout="HideOptionInfo2()" >
440
+ <span>View commentary related to this passage : John 1</span></a></li></ul><br />
441
+ </td></tr></table><!-- SIGNATURE -->
442
+ <div id="sig" class="txt-sm">
443
+ <hr />
444
+ <p>
445
+ <a href="http://mobile.biblegateway.com/passage/index.php?search=John%201:1&version=ESV">Go to mobile site</a><br />
446
+ <a href="#intersite" title="Go to the top of the page">Go to the top of the page</a><br />
447
+ <a href="/feedback/" title="Contact us">Contact us/Feedback</a><br />
448
+ <a href="http://www.gospel.com" title="Gospel.com">Gospel.com</a><br />
449
+ <a href="/site-map/" title="Site map">Site map</a><br />
450
+ <a href="/privacy.php" title="Privacy policy">Privacy policy</a><br />
451
+ <a href="/terms.php">Terms of use</a>
452
+ </p>
453
+ </div>
454
+
455
+ </div>
456
+ <!-- END CONTENT -->
457
+
458
+ <script type="text/javascript" src="http://static.bgcdn.com/includes/scripts.js?0813"></script>
459
+
460
+
461
+
462
+ <div id='a9g-skyscraper'>
463
+ <div style='border:1px solid #999999;'>
464
+ <script type="text/javascript"
465
+ src="http://this.content.served.by.adshuffle.com/p/kl/46/799/r/12/4/8/ast0k3n/eXwy3Zek2cvwpb~sl~rCUh3EA==/view.js"></script>
466
+
467
+ </div>
468
+ </div>
469
+
470
+
471
+ <!-- Start Google Analytics -->
472
+ <script type="text/javascript">
473
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
474
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
475
+ </script>
476
+ <script type="text/javascript">
477
+ try {
478
+ var pageTracker = _gat._getTracker("UA-3008784-8");
479
+ pageTracker._setDomainName(".biblegateway.com");
480
+ pageTracker._trackPageview();
481
+ } catch(err) {}</script>
482
+
483
+
484
+ <!-- Start Quantcast tag -->
485
+ <script type="text/javascript"
486
+ src="http://edge.quantserve.com/quant.js"></script>
487
+ <script
488
+ type="text/javascript">_qacct="p-d56GGD3LGBwJk";quantserve();</script>
489
+ <noscript>
490
+ <a href="http://www.quantcast.com/p-d56GGD3LGBwJk" target="_blank"><img
491
+ src="http://pixel.quantserve.com/pixel/p-d56GGD3LGBwJk.gif"
492
+ style="display: none;" border="0" height="1" width="1" alt="Quantcast"/></a>
493
+ </noscript>
494
+ <!-- End Quantcast tag -->
495
+
496
+ </div>
497
+ </body>
498
+ </html>
@@ -0,0 +1,24 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+ require 'bible_gateway'
4
+ require 'spec'
5
+ require 'spec/autorun'
6
+ require 'fakeweb'
7
+
8
+ Spec::Runner.configure do |config|
9
+
10
+ end
11
+
12
+ FakeWeb.allow_net_connect = false
13
+
14
+ def fixture_file(filename)
15
+ return '' if filename == ''
16
+ file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename)
17
+ File.read(file_path)
18
+ end
19
+
20
+ def stub_get(url, filename, status=nil)
21
+ options = {:response => fixture_file(filename)}
22
+ options.merge!({:status => status}) unless status.nil?
23
+ FakeWeb.register_uri(:get, url, options)
24
+ end
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bible_gateway
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Geoffrey Dagley
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-09-19 00:00:00 -05:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rspec
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ description:
26
+ email: gdagley@gmail.com
27
+ executables: []
28
+
29
+ extensions: []
30
+
31
+ extra_rdoc_files:
32
+ - LICENSE
33
+ - README.rdoc
34
+ files:
35
+ - .document
36
+ - .gitignore
37
+ - LICENSE
38
+ - README.rdoc
39
+ - Rakefile
40
+ - VERSION
41
+ - bible_gateway.gemspec
42
+ - lib/bible_gateway.rb
43
+ - spec/bible_gateway_spec.rb
44
+ - spec/fixtures/john_1_1.html
45
+ - spec/spec_helper.rb
46
+ has_rdoc: true
47
+ homepage: http://github.com/gdagley/bible_gateway
48
+ licenses: []
49
+
50
+ post_install_message:
51
+ rdoc_options:
52
+ - --charset=UTF-8
53
+ require_paths:
54
+ - lib
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: "0"
60
+ version:
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: "0"
66
+ version:
67
+ requirements: []
68
+
69
+ rubyforge_project:
70
+ rubygems_version: 1.3.5
71
+ signing_key:
72
+ specification_version: 3
73
+ summary: An unofficial 'API' for BibleGateway.com.
74
+ test_files:
75
+ - spec/bible_gateway_spec.rb
76
+ - spec/spec_helper.rb