Class: Seagull::Tasks

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/seagull/tasks.rb

Instance Method Summary collapse

Constructor Details

#initialize(namespace = '') {|@configuration| ... } ⇒ Tasks

Returns a new instance of Tasks.

Yields:

  • (@configuration)


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/seagull/tasks.rb', line 10

def initialize(namespace = '', &block)
  @configuration = Configuration.new
  @namespace     = namespace

  yield @configuration if block_given?

  # Check we can find our xctool
  unless File.executable?(%x{which #{@configuration.xctool_path}}.strip)
    raise "xctool is required. Please install using Homebrew: brew install xctool."
  end

  unless File.executable?(%x{which #{@configuration.xcodebuild_path}}.strip)
    raise "xcodebuild is required. Please install XCode."
  end

  define
end