Class: AsProject::OSXUser

Inherits:
User
  • Object
show all
Defined in:
lib/path_finder.rb

Constant Summary collapse

@@LIBRARY =
'Library'

Instance Method Summary collapse

Methods inherited from User

#asproject_player_trust, #downloads, #file_exists?, #flash_player_config_content, #flash_player_log, #flash_player_path, #flash_player_trust, #get_or_create, #get_player_url, #home, #mxmlc

Constructor Details

#initializeOSXUser

Returns a new instance of OSXUser.



376
377
378
379
380
381
382
383
384
385
# File 'lib/path_finder.rb', line 376

def initialize
  super
#      @flash_player_7_url = "/pub/flashplayer/updaters/7/sa_flashplayer_7_all_debug.dmg"
#      @flash_player_8_url = "/pub/flashplayer/updaters/8/flash_player_update3_flash8_win.zip"
#      @flash_player_9_url = "/pub/flashplayer/updaters/9/sa_flashplayer_9_all_debug_ub.dmg"
#      @zip_target = File.join('Players', 'Debug', 'SAFlashPlayer.dmg')   
#      @flash_player_8_target = File.join('Players', 'Debug', 'SAFlashPlayer.exe')

  @osx_asproject = 'AsProject'
end

Instance Method Details

#asproject_homeObject



415
416
417
418
419
420
421
# File 'lib/path_finder.rb', line 415

def asproject_home
  if(library == home)
    return super
  end
  ap_home = File.join(library, @osx_asproject)
  get_or_create(ap_home)
end

#flash_player_configObject



402
403
404
# File 'lib/path_finder.rb', line 402

def flash_player_config
    return File.join('/Library/Application Support/Macromedia/', 'mm.cfg')
end

#flash_player_homeObject



398
399
400
# File 'lib/path_finder.rb', line 398

def flash_player_home
  return File.join(library, 'Preferences', 'Macromedia', 'Flash Player')
end

#libraryObject



406
407
408
409
410
411
412
413
# File 'lib/path_finder.rb', line 406

def library
  lib = File.join(home, @@LIBRARY)
  if(File.exists?(lib))
    return lib
  else
    return super
  end
end

#remote_file_task(name, task) ⇒ Object



387
388
389
390
391
392
393
394
395
396
# File 'lib/path_finder.rb', line 387

def remote_file_task(name, task)
  return OSXRemoteFileTask.new(name, self) do |t|
    if(task.osx_url.nil?)
      raise UsageError.new("There was a problem finding a target for #{task.name}, it doesn't appear as if this task was expected to run on your system...")
    end
    t.url = task.osx_url
    t.mounted_path = task.osx_mounted_path
    t.extracted_file = task.osx_extracted_file
  end
end