uas2git 0.9.9.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uas2git/main.rb +12 -1
- data/lib/uas2git/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33e4c936e2e84745d64afd2b1c3e90c1e1e4b23e
|
4
|
+
data.tar.gz: 1952c53c0975c08207a72ef0668549d3ee8d2e99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 148a452bd412ac36590e3e4819804ae59cd3e05fd601b3854c04c57cec57b040609782fc5f034852e45d02936486cb40a3340d1b6baeb728ca0aaffb6bd01c73
|
7
|
+
data.tar.gz: 98c40a4275c49bbcc5b3b07d5d1c999525799b4806b4b565c5b45910d18435795a7badb96fd8c878671ca141b6dbf6a8cd646b3ae002d9795dab30418e6bb1f4
|
data/lib/uas2git/main.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'highline/import'
|
2
2
|
require 'optparse'
|
3
3
|
require 'rugged'
|
4
|
+
require 'pg'
|
4
5
|
require 'progress'
|
5
6
|
|
6
7
|
module Uas2Git
|
@@ -23,13 +24,23 @@ module Uas2Git
|
|
23
24
|
def run!
|
24
25
|
password = ask('Enter password for ' + @options[:username] + '@' + @options[:host] + ': ') { |q| q.echo = false }
|
25
26
|
|
27
|
+
connection = PG::connect(
|
28
|
+
:host => @options[:host],
|
29
|
+
:port => '10733',
|
30
|
+
:user => @options[:username],
|
31
|
+
:password => password,
|
32
|
+
:dbname => 'template1'
|
33
|
+
)
|
34
|
+
|
35
|
+
result = connection.exec_params("SELECT db_name($1)", [ @project_name ])
|
36
|
+
|
26
37
|
ActiveRecord::Base.establish_connection(
|
27
38
|
:adapter => 'postgresql',
|
28
39
|
:host => @options[:host],
|
29
40
|
:port => '10733',
|
30
41
|
:username => @options[:username],
|
31
42
|
:password => password,
|
32
|
-
:database =>
|
43
|
+
:database => result[0]['db_name']
|
33
44
|
)
|
34
45
|
|
35
46
|
# Initialize a git repository
|
data/lib/uas2git/version.rb
CHANGED