scraperwiki 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -1
- data/lib/scraperwiki.rb +1 -1
- data/lib/scraperwiki/version.rb +1 -1
- data/spec/scraperwiki_spec.rb +1 -7
- metadata +2 -2
data/README.md
CHANGED
data/lib/scraperwiki.rb
CHANGED
@@ -174,7 +174,7 @@ module ScraperWiki
|
|
174
174
|
|
175
175
|
# Establish an SQLiteMagic::Connection (and remember it)
|
176
176
|
def sqlite_magic_connection
|
177
|
-
db = @config ? @config[:db] : 'sqlite
|
177
|
+
db = @config ? @config[:db] : 'scraperwiki.sqlite'
|
178
178
|
@sqlite_magic_connection ||= SqliteMagic::Connection.new(db)
|
179
179
|
end
|
180
180
|
|
data/lib/scraperwiki/version.rb
CHANGED
data/spec/scraperwiki_spec.rb
CHANGED
@@ -23,15 +23,9 @@ describe ScraperWiki do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
describe 'sqlite_magic_connection' do
|
26
|
-
it 'should execute select query and bind variables to connection' do
|
27
|
-
sql_snippet = 'foo from bar WHERE "baz"=42'
|
28
|
-
@dummy_sqlite_magic_connection.should_receive(:execute).with("SELECT #{sql_snippet}", ['foo', 'bar'])
|
29
|
-
ScraperWiki.select(sql_snippet, ['foo', 'bar'])
|
30
|
-
end
|
31
|
-
|
32
26
|
context 'and no config set' do
|
33
27
|
it 'should get an SqliteMagic::Connection with default db name and no path' do
|
34
|
-
SqliteMagic::Connection.should_receive(:new).with('sqlite
|
28
|
+
SqliteMagic::Connection.should_receive(:new).with('scraperwiki.sqlite').and_return(@dummy_sqlite_magic_connection)
|
35
29
|
ScraperWiki.sqlite_magic_connection
|
36
30
|
end
|
37
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scraperwiki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httpclient
|