module Bonethug

Constants

BUILD_DATE
VERSION

Public Class Methods

call_rake(arguments) click to toggle source

arguments can be for example db:migrate

# File lib/bonethug/utils.rb, line 6
def self.call_rake(arguments)
  if RUBY_PLATFORM =~ /mswin/
    rake_cmd = "rake.bat" #very important because windows will break with just "rake"
  else
    rake_cmd = "rake"
  end
  puts "calling #{rake_cmd} " + arguments
  puts system("#{rake_cmd} " + arguments)
  puts $?
end
increment_version() click to toggle source
# File lib/bonethug.rb, line 10
def self.increment_version

  version = VERSION.split('.')
  version[version.length-1] = (version.last.to_i + 1).to_s
  version = version.join('.') 

  remove_const 'VERSION'
  const_set 'VERSION', version

end
setup_gitpull(target = '.') click to toggle source
# File lib/bonethug/utils.rb, line 17
def self.setup_gitpull(target = '.')

  path = File.expand_path target
  `chown www-data #{path}`

end