Class: Xcode::Buildspec

Inherits:
Object
  • Object
show all
Defined in:
lib/xcode/buildspec.rb

Defined Under Namespace

Classes: GroupBuilder, TaskBuilder

Class Method Summary collapse

Class Method Details

.parse(path = '.') ⇒ Object

Given a path to a Buildspec, define rake tasks

Parameters:

  • the

    path to the Buildspec file, or a directory containing one



13
14
15
16
17
18
# File 'lib/xcode/buildspec.rb', line 13

def self.parse(path = '.')
  b = GroupBuilder.new
  path = File.join(path, 'Buildspec') if File.directory? path
  b.instance_eval(File.read(path))
  b.generate_rake_tasks
end

.run(path, task) ⇒ Object

Given a path to a buildspec, perform the given task

Parameters:

  • the

    path to the buildspec, or the directory containing one

  • the

    task to invoke



26
27
28
29
# File 'lib/xcode/buildspec.rb', line 26

def self.run(path, task)
  self.parse path
  Rake::Task[task].invoke unless task.nil?
end