Method: ChocTop::Configuration#initialize

Defined in:
lib/choctop.rb

#initialize {|_self| ... } ⇒ Configuration

Returns a new instance of Configuration.

Yields:

  • (_self)

Yield Parameters:



326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# File 'lib/choctop.rb', line 326

def initialize
  $choctop = $sparkle = self # define a global variable for this object ($sparkle is legacy)

  yield self if block_given?

  # Defaults
  @name ||= info_plist['CFBundleExecutable'] || File.basename(File.expand_path("."))
  @name = File.basename(File.expand_path(".")) if @name == '${EXECUTABLE_NAME}'
  @version ||= info_plist['CFBundleVersion']
  @build_type = ENV['BUILD_TYPE'] || 'Release'

  if base_url
    @host ||= URI.parse(base_url).host
  end

  @release_notes ||= 'release_notes.html'
  @readme        ||= 'README.txt'
  @release_notes_template ||= "release_notes_template.html.erb"
  @rsync_args ||= '-aCv --progress'

  defaults :normal unless @project_type

  define_tasks
end