Module: Pluto

Defined in:
lib/pluto/tasks.rb

Class Method Summary collapse

Class Method Details

.fetch_config_for(key) ⇒ Object

todo/fix: move to pluto-update for (re)use !!!!



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/pluto/tasks.rb', line 52

def self.fetch_config_for( key )
  ###
  ## todo:
  ##  move into a method for (re)use
  puts "trying to fetch pluto.index.ini shortcut planet registry..."

  index_txt = fixme_fetcher_read_utf8!( 'https://raw.githubusercontent.com/feedreader/planets/master/pluto.index.ini' )
  shortcuts = INI.load( index_txt )
  pp shortcuts

  shortcut = shortcuts[key]
  if shortcut.nil?
    puts "sorry; no planet shortcut found for key >#{key}<"
    exit 1
  end

  config_txt = InclPreproc.from_url( shortcut['source'] ).read
  config = INI.load( config_txt )
  config
end

.load_tasksObject



40
41
42
43
44
45
46
# File 'lib/pluto/tasks.rb', line 40

def self.load_tasks
  # load all builtin Rake tasks (from tasks/*rake)
  load 'pluto/tasks/environment.rake'
  load 'pluto/tasks/setup.rake'
  load 'pluto/tasks/stats.rake'
  load 'pluto/tasks/update.rake'
end