Class: Sprout::WinUser
Overview
Constant Summary
collapse
- @@LOCAL_SETTINGS =
"Local\ Settings"
- @@APPLICATION_DATA =
"Application\ Data"
Instance Method Summary
collapse
Methods inherited from UnixUser
#application_home, #execute, #execute_silent, #execute_thread, #get_exe_path, #get_process_runner, #home=, #in_path?, #platform, #repair_executable
Constructor Details
Returns a new instance of WinUser.
310
311
312
313
|
# File 'lib/sprout/user.rb', line 310
def initialize
super
@home = nil
end
|
Instance Method Details
#clean_path(path) ⇒ Object
347
348
349
350
351
352
353
|
# File 'lib/sprout/user.rb', line 347
def clean_path(path)
path = path.split('/').join("\\")
if(path.index(' '))
return %{"#{path}"}
end
return path
end
|
355
356
357
|
# File 'lib/sprout/user.rb', line 355
def format_application_name(name)
return name.capitalize
end
|
#get_paths ⇒ Object
326
327
328
|
# File 'lib/sprout/user.rb', line 326
def get_paths
return ENV['PATH'].split(';')
end
|
#home ⇒ Object
318
319
320
321
322
323
324
|
# File 'lib/sprout/user.rb', line 318
def home
usr = super
if(usr.index "My Documents")
usr = File.dirname(usr)
end
return usr
end
|
#library ⇒ Object
330
331
332
333
334
335
336
337
338
|
# File 'lib/sprout/user.rb', line 330
def library
application_data = File.join(home, @@LOCAL_SETTINGS, @@APPLICATION_DATA)
if(File.exists?(application_data))
return application_data
else
return super
end
end
|
#setup_user ⇒ Object
315
316
|
# File 'lib/sprout/user.rb', line 315
def setup_user
end
|
#should_repair_executable(path) ⇒ Object
Override from UnixUser and block behavior. I know this is smelly… Fixes?
343
344
345
|
# File 'lib/sprout/user.rb', line 343
def should_repair_executable(path)
false
end
|