Sha256: d7aa6fb311c43ff3980ef4e037f5434c54d222204f3b16cbb737856d22d1d94d

Contents?: true

Size: 959 Bytes

Versions: 3

Compression:

Stored size: 959 Bytes

Contents

#!/usr/bin/env ruby
$:.unshift File.expand_path('../../lib', __FILE__)

require 'rubygems' unless Object.const_defined?(:Gem)
require 'peony'
require 'rake'

# Intercept: if invoked as 'peony --help', don't let it pass through Rake, or else
# we'll see the Rake help screen. Redirect it to 'peony help'.
if ARGV.delete('--help') || ARGV.delete('-h')
  ARGV << 'help'
end

if ARGV.delete('--version') || ARGV.delete('-V')
  puts "Peony, version v#{Peony.version}"
  exit
end

if ARGV.delete('--simulate') || ARGV.delete('-S')
  ENV['simulate'] = '1'
end

Rake.application.instance_eval do
  standard_exception_handling do
    
    init 'peony'
    
    @rakefiles += ['Peonyfile', 'peonyfile']
    options.rakelib += ["recipes/**"]    
    
    # Load the Peony DSL.
    require 'peony/rake'
    
    load_rakefile if have_rakefile
    
    Dir.glob(File.expand_path("../recipes/**/*.rake", __dir__)) do|fn|
      load fn
    end
    
    top_level
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
peony-0.1.2 bin/peony
peony-0.1.1 bin/peony
peony-0.0.2 bin/peony