dburl 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6efc5f1d70587e9c7e23fd54d8bdedbf8056bde2
4
- data.tar.gz: 384661007a0ea397beb96476468af254baeeaf58
3
+ metadata.gz: e5353f9de67d4ecb2bd943085912b2260b98a0c3
4
+ data.tar.gz: d01cb6b3208da51a5eb8e0b171eea4d86c2d989e
5
5
  SHA512:
6
- metadata.gz: 754c77d6c3c4ac3d0a0e3accd492efabafce21a0e635f2f556335c86bf8d1b377f3cd36efc366c8d17b6bf6e7de5ad9f1b29c47dcb0d4dcd7b73518ea5883a12
7
- data.tar.gz: a33713bc1322beeec1779ddb4231dc735a9038f66b6705abfeddfe1ad9fc67c643552eac592c6d452d9014e75f954ff6b946c754c9ccd84c13e2f78b51ef3035
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
- #### Currently Supported
8
+ **Currently Supported**
9
9
  * Postgres
10
10
 
11
- ...but adding a new one is [easy](://github.com/dashkb/dburl/blob/master/bin/dburl#L8)!
11
+ ...but adding a new one is [easy](https://github.com/dashkb/dburl/blob/master/bin/dburl#L25)!
12
12
 
13
- ## Installation
13
+ ### Installation
14
14
 
15
15
  `$ gem install dburl`
16
16
 
17
- ## Contributing
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
- ## License
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 "bundler/gem_tasks"
2
- task :default => :spec
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
- if !input
8
- puts "Usage: dburl [DATABASE_URL]"
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 = "psql"
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 "Please add it and open a pull request."
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
- require 'dburl/version'
4
+ require_relative 'version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "dburl"
7
+ spec.name = 'dburl'
8
8
  spec.version = Dburl::VERSION
9
- spec.authors = ["Kyle Brett"]
10
- spec.email = ["kyle@kylebrett.com"]
9
+ spec.authors = ['Kyle Brett']
10
+ spec.email = ['kyle@kylebrett.com']
11
11
 
12
- spec.summary = %q{Easily connect to a DATABASE_URL.}
13
- spec.homepage = "http://github.com/dashkb/dburl"
14
- spec.license = "MIT"
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 "bundler", "~> 1.13"
20
- spec.add_development_dependency "rake", "~> 10.0"
19
+ spec.add_development_dependency 'bundler', '~> 1.13'
20
+ spec.add_development_dependency 'rake', '~> 10.0'
21
21
  end
data/version.rb ADDED
@@ -0,0 +1,3 @@
1
+ module Dburl
2
+ VERSION = '0.1.2'.freeze
3
+ end
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.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
- - lib/dburl.rb
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
@@ -1,3 +0,0 @@
1
- module Dburl
2
- VERSION = "0.1.1"
3
- end
data/lib/dburl.rb DELETED
@@ -1,5 +0,0 @@
1
- require "dburl/version"
2
-
3
- module Dburl
4
- # Your code goes here...
5
- end