mysqlconn 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mysqlconn.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: badf81aff07d481cde7e4c89646495546d597aee
|
4
|
+
data.tar.gz: de1e53c12a87cfbedd0d8d939381bcc95ef3e095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c12155da708b254a753f0e01dc6b06861a6cec02ba5c7847ee47bdcaf7bb7e859d6d65523c0efe6fcf4fd76965b831006e2481b39ffe00988f13bd76ea1764e
|
7
|
+
data.tar.gz: c1448a4bb70881f48879ed33fce8efbc31b9658bc0727393d1c15357af2ff65a5c90ce4bdb3be7042bff0fe743dbd2422dab21e374e85da462ed17bb909b16b8
|
data/lib/mysqlconn.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
require 'fileutils'
|
3
3
|
require 'set'
|
4
|
+
require 'json'
|
4
5
|
|
5
6
|
# Copyright Neville Kadwa (2014)
|
6
7
|
|
@@ -78,6 +79,13 @@ class MysqlConn
|
|
78
79
|
end
|
79
80
|
exit(0)
|
80
81
|
end
|
82
|
+
if db_key == '-c'
|
83
|
+
@db_key = args.shift || raise('no db key provided. Usage for configuration: mysqlconn -c db_key')
|
84
|
+
db = config[db_key] || raise("No #{db_key} found")
|
85
|
+
puts JSON.pretty_generate(config[db_key])
|
86
|
+
exit(0)
|
87
|
+
end
|
88
|
+
|
81
89
|
|
82
90
|
db = config[db_key] || raise("No #{db_key} found")
|
83
91
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysqlconn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neville Kadwa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Save your various database credentials to a configuration file and zip
|
14
14
|
around easily
|