ps-voodoo 0.0.4 → 0.0.5
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.
- data/changelog.md +5 -0
- data/lib/voodoo/commands.rb +9 -9
- data/lib/voodoo/commands/run.rb +1 -0
- data/lib/voodoo/peopletools/sqr.rb +4 -4
- data/lib/voodoo/version.rb +1 -1
- metadata +7 -6
data/changelog.md
ADDED
data/lib/voodoo/commands.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'terminal-table/import'
|
2
|
-
require 'mail'
|
2
|
+
# require 'mail'
|
3
3
|
Voodoo.require_all_libs_relative_to(__FILE__)
|
4
4
|
|
5
5
|
module Voodoo
|
@@ -21,7 +21,7 @@ module Voodoo
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def get_project
|
24
|
-
ask("Project name: ")
|
24
|
+
ask("Project name: ").upcase
|
25
25
|
end
|
26
26
|
|
27
27
|
def get_env(name)
|
@@ -41,7 +41,6 @@ module Voodoo
|
|
41
41
|
env = OpenStruct.new(ENVIRONMENTS[name])
|
42
42
|
env.name = name
|
43
43
|
env.db_password = get_db_password(name)
|
44
|
-
puts env.db_password
|
45
44
|
else
|
46
45
|
puts "#{name} is not listed in the configuration file"
|
47
46
|
exit
|
@@ -74,18 +73,17 @@ module Voodoo
|
|
74
73
|
end
|
75
74
|
|
76
75
|
def get_migration
|
77
|
-
folder_name = ask("Name for output folder: ")
|
76
|
+
folder_name = ask("Name for output folder: ").upcase
|
78
77
|
Migration.new(folder_name)
|
79
78
|
end
|
80
79
|
|
81
|
-
#TODO:
|
80
|
+
#TODO: figure out how to get this to recursively search a directory
|
82
81
|
def get_sqr
|
83
82
|
ask("SQR name: ")
|
84
83
|
end
|
85
84
|
|
86
|
-
#TODO: validate that the appengine name and path is valid
|
87
85
|
def get_appengine
|
88
|
-
ask("Appengine name: ")
|
86
|
+
ask("Appengine name: ").upcase
|
89
87
|
end
|
90
88
|
|
91
89
|
#TODO: change this so that you can specify the root of a drive
|
@@ -110,11 +108,13 @@ module Voodoo
|
|
110
108
|
private
|
111
109
|
|
112
110
|
def get_app_password(name)
|
113
|
-
|
111
|
+
username = ENVIRONMENTS[name]['app_username']
|
112
|
+
ask("Application password for #{username + '@' + name}: ") { |q| q.echo = "*" }
|
114
113
|
end
|
115
114
|
|
116
115
|
def get_db_password(name)
|
117
|
-
|
116
|
+
username = ENVIRONMENTS[name]['app_username']
|
117
|
+
ask("Database password for #{username + '@' + name}: ") { |q| q.echo = "*" }
|
118
118
|
end
|
119
119
|
|
120
120
|
end
|
data/lib/voodoo/commands/run.rb
CHANGED
@@ -12,12 +12,12 @@ module Voodoo
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def run(migration, target, sqr_name)
|
15
|
-
@sqr_name = sqr_name
|
16
|
-
append(:sqr => File.join(target.ps_home, 'sqr', sqr_name).gsub!(File::SEPARATOR, File::ALT_SEPARATOR))
|
15
|
+
@sqr_name = sqr_name.gsub(/\.sqr/, '')
|
16
|
+
append(:sqr => File.join(target.ps_home, 'sqr', @sqr_name).gsub!(File::SEPARATOR, File::ALT_SEPARATOR))
|
17
17
|
append(:db_login => target.db_username + '/' + target.db_password + '@' + target.name)
|
18
18
|
append(:input => File.join(target.ps_home, 'sqr').gsub!(File::SEPARATOR, File::ALT_SEPARATOR))
|
19
19
|
append(:output => migration.log_folder)
|
20
|
-
append(:log_file => File.join(migration.log_folder, '
|
20
|
+
append(:log_file => File.join(migration.log_folder, @sqr_name + '_' + Time.now.strftime("%Y_%m_%d_%H_%M_%S") + '.log').gsub!(File::SEPARATOR, File::ALT_SEPARATOR))
|
21
21
|
append(:zif => File.join(target.ps_home, 'sqr', 'pssqr.ini').gsub!(File::SEPARATOR, File::ALT_SEPARATOR))
|
22
22
|
append(:print => true)
|
23
23
|
append(:xmb=> true)
|
@@ -32,7 +32,7 @@ module Voodoo
|
|
32
32
|
when k == :db_login
|
33
33
|
v
|
34
34
|
when k == :sqr
|
35
|
-
v
|
35
|
+
v + '.sqr'
|
36
36
|
when k == :input
|
37
37
|
'-I' + v + '\\'
|
38
38
|
when k == :output
|
data/lib/voodoo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ps-voodoo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-08-
|
12
|
+
date: 2011-08-22 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: commander
|
16
|
-
requirement: &
|
16
|
+
requirement: &18608556 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 4.0.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *18608556
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: terminal-table
|
27
|
-
requirement: &
|
27
|
+
requirement: &18608244 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 1.4.2
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *18608244
|
36
36
|
description: A small command line utility for helping with PeopleSoft administration
|
37
37
|
email:
|
38
38
|
- jrbing@gmail.com
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- README.md
|
49
49
|
- Rakefile
|
50
50
|
- bin/voodoo
|
51
|
+
- changelog.md
|
51
52
|
- lib/voodoo.rb
|
52
53
|
- lib/voodoo/commands.rb
|
53
54
|
- lib/voodoo/commands/add.rb
|