Module: Bonethug
- Defined in:
- lib/bonethug.rb,
lib/bonethug/cli.rb,
lib/bonethug/conf.rb,
lib/bonethug/utils.rb,
lib/bonethug/syncer.rb,
lib/bonethug/version.rb,
lib/bonethug/watcher.rb,
lib/bonethug/installer.rb,
lib/bonethug/configurator.rb
Defined Under Namespace
Classes: CLI, Conf, Configurator, Installer, Syncer, Watcher
Constant Summary collapse
- VERSION =
"0.0.92"
- BUILD_DATE =
"2014-11-23 08:52:56 +1300"
Class Method Summary collapse
-
.call_rake(arguments) ⇒ Object
arguments can be for example db:migrate.
- .increment_version ⇒ Object
- .setup_gitpull(target = '.') ⇒ Object
Class Method Details
.call_rake(arguments) ⇒ Object
arguments can be for example db:migrate
6 7 8 9 10 11 12 13 14 15 |
# 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 ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# 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 = '.') ⇒ Object
17 18 19 20 21 22 |
# File 'lib/bonethug/utils.rb', line 17 def self.setup_gitpull(target = '.') path = File. target `chown www-data #{path}` end |