Class: RhoDevelopment::AllPlatformsPartialBundleBuildingTask

Inherits:
LiveUpdateTask show all
Defined in:
lib/build/development/live_update_task.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from LiveUpdateTask

descendants, #execute

Constructor Details

#initialize(aFilename) ⇒ AllPlatformsPartialBundleBuildingTask

Returns a new instance of AllPlatformsPartialBundleBuildingTask.



47
48
49
# File 'lib/build/development/live_update_task.rb', line 47

def initialize(aFilename)
  @filename = aFilename
end

Class Method Details

.fromHash(aHash) ⇒ Object



56
57
58
59
# File 'lib/build/development/live_update_task.rb', line 56

def self.fromHash(aHash)
  filename = aHash['filename']
  self.new(filename)
end

.taskNameObject



61
62
63
# File 'lib/build/development/live_update_task.rb', line 61

def self.taskName
  'BuildPartialBundleForAllSubscribers'
end

Instance Method Details

#actionObject



65
66
67
68
69
70
71
72
# File 'lib/build/development/live_update_task.rb', line 65

def action
  unless Configuration::has_enabled_subscribers?
    puts 'Enabled subscribers not found'.warning
    return
  end
  server = BuildServer.new
  server.build_partial_bundles_for_all_subscribers(@filename)
end

#dispatchToUrl(anUri) ⇒ Object



51
52
53
54
# File 'lib/build/development/live_update_task.rb', line 51

def dispatchToUrl(anUri)
  uri = URI.join(anUri, 'tasks/new')
  Net::HTTP.post_form(uri, {'taskName' => self.class.taskName, 'filename' => @filename})
end