lib/dev/Commands.rb in dev-1.0.237 vs lib/dev/Commands.rb in dev-1.0.238
- old
+ new
@@ -1,6 +1,17 @@
-["Compile","Replace","Setup","Test","Commit","Info","Update","Pull","DeepPull","Build"].each{ |f| require_relative("cmd/#{f}.rb") }
+if(RUBY_VERSION=="1.8.7")
+ commandArray=["Compile","Replace","Setup","Test","Commit","Info","Update","Build"]
+else
+ commandArray=["Compile","Replace","Setup","Test","Commit","Info","Update","Pull","DeepPull","Build"]
+end
+commandArray.each { |f|
+ if(RUBY_VERSION=="1.8.7")
+ require("#{DEV_FILEPATH}/dev/cmd/#{f}.rb")
+ else
+ require_relative("cmd/#{f}.rb")
+ end
+}
module Dev
class Commands < Hash
def initialize
@@ -8,12 +19,14 @@
self[:replace]=Dev::Cmd::Replace.new
self[:compile]=Dev::Cmd::Compile.new
self[:test]=Dev::Cmd::Test.new
self[:commit]=Dev::Cmd::Commit.new
self[:update]=Dev::Cmd::Update.new
- self[:pull]=Dev::Cmd::Pull.new
- self[:deep_pull]=Dev::Cmd::DeepPull.new
+ if(RUBY_VERSION != "1.8.7")
+ self[:pull]=Dev::Cmd::Pull.new
+ self[:deep_pull]=Dev::Cmd::DeepPull.new
+ end
refresh
end
def refresh
puts_debug "Dev::Command.refresh"
@@ -22,11 +35,13 @@
self[:replace].refresh(DEV[:dep]) if self[:replace].respond_to?("refresh")
self[:compile].refresh if self[:compile].respond_to?("refresh")
self[:test].refresh if self[:test].respond_to?("refresh")
self[:commit].refresh if self[:commit].respond_to?("refresh")
self[:update].refresh if self[:update].respond_to?("refresh")
- self[:pull].refresh if self[:pull].respond_to?("refresh")
- self[:deep_pull].refresh if self[:deep_pull].respond_to?("refresh")
+ if(RUBY_VERSION != "1.8.7")
+ self[:pull].refresh if self[:pull].respond_to?("refresh")
+ self[:deep_pull].refresh if self[:deep_pull].respond_to?("refresh")
+ end
puts_debug "Commands refresh elapsed time " + (Time.now-start_time).to_s
end
def info; Dev::Cmd::Info.execute; end
def setup; execute_method "setup"; end
\ No newline at end of file