dburl 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/README.md +9 -5
- data/Rakefile +2 -2
- data/bin/dburl +13 -5
- data/dburl.gemspec +9 -9
- data/version.rb +3 -0
- metadata +2 -3
- data/lib/dburl/version.rb +0 -3
- data/lib/dburl.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5353f9de67d4ecb2bd943085912b2260b98a0c3
|
4
|
+
data.tar.gz: d01cb6b3208da51a5eb8e0b171eea4d86c2d989e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f01a73ba0587ac5ec09b8adbb739a1b951005b4cca5be874139e427f38f43af5f8988c42ba36cc19e8120511815e685c5e72e74cb54f6baed1a12d13c02b7a1d
|
7
|
+
data.tar.gz: dbc1778642d5ccaf7660a0f8085d45457c65728e13dc15542e9d83914d9dfab058721ceef07a2cf3eb2f28d3a9006f8be16e24e8e6930373000f147a33d358a3
|
data/README.md
CHANGED
@@ -5,20 +5,24 @@ Easily connect to your database.
|
|
5
5
|
Just `$ dburl postgres://username:password@hostname:1234/dbname` and you'll
|
6
6
|
be dropped into a `psql` shell.
|
7
7
|
|
8
|
-
|
8
|
+
**Currently Supported**
|
9
9
|
* Postgres
|
10
10
|
|
11
|
-
...but adding a new one is [easy](://github.com/dashkb/dburl/blob/master/bin/dburl#
|
11
|
+
...but adding a new one is [easy](https://github.com/dashkb/dburl/blob/master/bin/dburl#L25)!
|
12
12
|
|
13
|
-
|
13
|
+
### Installation
|
14
14
|
|
15
15
|
`$ gem install dburl`
|
16
16
|
|
17
|
-
|
17
|
+
### Contributing
|
18
18
|
|
19
19
|
Bug reports, pull requests, and support for more DBs are welcome on GitHub at https://github.com/dashkb/dburl.
|
20
20
|
|
21
|
-
|
21
|
+
### License
|
22
22
|
|
23
23
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
24
24
|
|
25
|
+
### Pronunciation
|
26
|
+
|
27
|
+
DEE-burl
|
28
|
+
|
data/Rakefile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
require
|
2
|
-
task :
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
task default: :spec
|
data/bin/dburl
CHANGED
@@ -4,8 +4,8 @@ require 'uri'
|
|
4
4
|
|
5
5
|
input = ARGV.first
|
6
6
|
|
7
|
-
|
8
|
-
puts
|
7
|
+
unless input
|
8
|
+
puts 'Usage: dburl [DATABASE_URL]'
|
9
9
|
exit
|
10
10
|
end
|
11
11
|
|
@@ -22,9 +22,17 @@ else
|
|
22
22
|
invalid! unless db.scheme
|
23
23
|
end
|
24
24
|
|
25
|
+
# To add a support for a new DB, add a new condition
|
26
|
+
# to this case staement.
|
27
|
+
#
|
28
|
+
# Use the `db` object to build a `cmd` string, which gets
|
29
|
+
# printed and executed at the bottom of the file.
|
30
|
+
#
|
31
|
+
# Set the $debug global to disable execution for
|
32
|
+
# convenient hacking.
|
25
33
|
case db.scheme
|
26
34
|
when 'postgres'
|
27
|
-
cmd =
|
35
|
+
cmd = 'psql'
|
28
36
|
cmd += " -h #{db.host}" if db.host
|
29
37
|
cmd += " -p #{db.port}" if db.port
|
30
38
|
cmd += " -U #{db.user}" if db.user
|
@@ -33,8 +41,8 @@ when 'postgres'
|
|
33
41
|
cmd = "PGPASSWORD=#{db.password} #{cmd}" if db.password
|
34
42
|
else
|
35
43
|
puts "This script doesn't support #{db.scheme} yet."
|
36
|
-
puts
|
44
|
+
puts 'Please add it and open a pull request.'
|
37
45
|
end
|
38
46
|
|
39
47
|
puts cmd
|
40
|
-
Kernel.exec cmd
|
48
|
+
Kernel.exec cmd unless $debug
|
data/dburl.gemspec
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
|
4
|
+
require_relative 'version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'dburl'
|
8
8
|
spec.version = Dburl::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['Kyle Brett']
|
10
|
+
spec.email = ['kyle@kylebrett.com']
|
11
11
|
|
12
|
-
spec.summary =
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
12
|
+
spec.summary = 'Easily connect to a DATABASE_URL.'
|
13
|
+
spec.homepage = 'http://github.com/dashkb/dburl'
|
14
|
+
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
17
17
|
spec.executables = 'dburl'
|
18
18
|
|
19
|
-
spec.add_development_dependency
|
20
|
-
spec.add_development_dependency
|
19
|
+
spec.add_development_dependency 'bundler', '~> 1.13'
|
20
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
21
21
|
end
|
data/version.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dburl
|
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
|
- Kyle Brett
|
@@ -54,8 +54,7 @@ files:
|
|
54
54
|
- bin/dburl
|
55
55
|
- bin/setup
|
56
56
|
- dburl.gemspec
|
57
|
-
-
|
58
|
-
- lib/dburl/version.rb
|
57
|
+
- version.rb
|
59
58
|
homepage: http://github.com/dashkb/dburl
|
60
59
|
licenses:
|
61
60
|
- MIT
|
data/lib/dburl/version.rb
DELETED