pasqual 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -0
- data/lib/pasqual/arglist.rb +5 -2
- data/lib/pasqual/database.rb +2 -2
- data/lib/pasqual/version.rb +1 -1
- data/spec/pasqual/database_spec.rb +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc09adce972094277d683a6c2e9cb1ad56548f28
|
4
|
+
data.tar.gz: 2ea079766156623edb4164d29ca962ffa860e0a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78ca14b7c1cefc569bfbbf76f44a5689feca1fb8d20c83ea865745371f2b676f264401b19043863b071196cbaa823b07c03aec0272341241709c201dd196aada
|
7
|
+
data.tar.gz: 34d94bfafe3371e98165ad00926532ee8f05b115ba8373606b8a1f309f0a1491deaa0eeffc681d9a459d5d8cd2c90f33973208f71f38d549e15268c42a89bfcc
|
data/.travis.yml
ADDED
data/lib/pasqual/arglist.rb
CHANGED
@@ -3,8 +3,11 @@ module Pasqual
|
|
3
3
|
module Arglist
|
4
4
|
|
5
5
|
def self.args(username, password, host, port, name)
|
6
|
-
list = [
|
7
|
-
list
|
6
|
+
list = []
|
7
|
+
list << '-h' << host if host.to_s.length > 0
|
8
|
+
list << '-U' << username if username.to_s.length > 0
|
9
|
+
list << '-p' << port.to_s if port.to_s.length > 0
|
10
|
+
list << '-w' if password.to_s.length == 0
|
8
11
|
|
9
12
|
list + [name]
|
10
13
|
end
|
data/lib/pasqual/database.rb
CHANGED
@@ -33,8 +33,8 @@ module Pasqual
|
|
33
33
|
Psql.command statement, username, password, host, port, name
|
34
34
|
end
|
35
35
|
|
36
|
-
def pipe_sql(file)
|
37
|
-
Psql.pipe file, username, password, host, port,
|
36
|
+
def pipe_sql(file, dbname = name)
|
37
|
+
Psql.pipe file, username, password, host, port, dbname
|
38
38
|
end
|
39
39
|
|
40
40
|
end
|
data/lib/pasqual/version.rb
CHANGED
@@ -27,6 +27,7 @@ describe Pasqual::Database do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
describe '#command' do
|
30
|
+
before { database.createdb rescue Pasqual::Dropdb::Failed }
|
30
31
|
|
31
32
|
it 'runs an sql command' do
|
32
33
|
expect do
|
@@ -37,6 +38,7 @@ describe Pasqual::Database do
|
|
37
38
|
end
|
38
39
|
|
39
40
|
describe '#pipe_sql' do
|
41
|
+
before { database.createdb rescue Pasqual::Dropdb::Failed }
|
40
42
|
|
41
43
|
it 'runs an sql script file' do
|
42
44
|
file = Tempfile.new 'sql-script'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pasqual
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Kastner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: childprocess
|
@@ -75,6 +75,7 @@ extensions: []
|
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
77
|
- ".gitignore"
|
78
|
+
- ".travis.yml"
|
78
79
|
- Gemfile
|
79
80
|
- LICENSE.txt
|
80
81
|
- README.md
|