ps-voodoo 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/changelog.md ADDED
@@ -0,0 +1,5 @@
1
+ # Changelog #
2
+
3
+ ## Version 0.0.5 ##
4
+
5
+ * removed requirement to add .sqr extension when running SQR through VooDoo
@@ -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: validate that the SQR name and path is valid
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
- ask("Application password for #{name}: ") { |q| q.echo = "*" }
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
- ask("Database password for #{name}: ") { |q| q.echo = "*" }
116
+ username = ENVIRONMENTS[name]['app_username']
117
+ ask("Database password for #{username + '@' + name}: ") { |q| q.echo = "*" }
118
118
  end
119
119
 
120
120
  end
@@ -26,6 +26,7 @@ module Voodoo
26
26
  end
27
27
 
28
28
  def run_appengine(args=nil)
29
+ setup?
29
30
 
30
31
  if args[0].nil?
31
32
  ae_name = get_appengine
@@ -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, 'sqr.log').gsub!(File::SEPARATOR, File::ALT_SEPARATOR))
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
@@ -1,3 +1,3 @@
1
1
  module Voodoo
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
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
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-08 00:00:00.000000000Z
12
+ date: 2011-08-22 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: commander
16
- requirement: &20414196 !ruby/object:Gem::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: *20414196
24
+ version_requirements: *18608556
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: terminal-table
27
- requirement: &20413884 !ruby/object:Gem::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: *20413884
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