Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (33 sloc) 0.975 kb
# require 'yajl-ruby'
require 'couchrest'
begin
require 'ap'
rescue LoadError
puts "'gem install awesome_print' for nicer formatting"
alias ap puts
end
require File.expand_path '../couchup/couchup', __FILE__
Dir[File.expand_path('../couchup/*.rb',__FILE__)].each { |file| require file}
Dir[File.expand_path('../couchup/commands/*.rb',__FILE__)].each { |file| require file}
Dir[File.expand_path('../couchup/extensions/*.rb',__FILE__)].each { |file| require file}
include Couchup::ShortHands
Couchup::Commands.constants.each do |c|
instance_eval "
def #{c.underscore}(*args)
begin
instance = Couchup::Commands.const_get(:#{c}).new
Couchup::Couchup.last_result = instance.run(*args)
nil
rescue ArgumentError => e
ap e
rescue
ap $!.inspect
ap $!.backtrace if Couchup::Couchup.debug?
end
end"
end
instance_eval "def last_result
Couchup::Couchup.last_result
end
alias __ last_result
"
Jump to Line
Something went wrong with that request. Please try again.