Class: RhoDevelopment::AllPlatformsFullBundleBuildingTask

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) ⇒ AllPlatformsFullBundleBuildingTask

Returns a new instance of AllPlatformsFullBundleBuildingTask.



78
79
80
# File 'lib/build/development/live_update_task.rb', line 78

def initialize(aFilename)
  @filename = aFilename
end

Class Method Details

.fromHash(aHash) ⇒ Object



87
88
89
90
# File 'lib/build/development/live_update_task.rb', line 87

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

.taskNameObject



92
93
94
# File 'lib/build/development/live_update_task.rb', line 92

def self.taskName
  'BuildFullBundleForAllSubscribers'
end

Instance Method Details

#actionObject



96
97
98
99
100
101
102
103
# File 'lib/build/development/live_update_task.rb', line 96

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

#dispatchToUrl(anUri) ⇒ Object



82
83
84
85
# File 'lib/build/development/live_update_task.rb', line 82

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