lib/dscript.rb in andhapp-decoct-1.4.2 vs lib/dscript.rb in andhapp-decoct-1.4.3
- old
+ new
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../lib/dmeta'
+require File.join(File.dirname(__FILE__), "..", 'lib', 'dmeta')
module Decoct
class Dscript
@@ -29,20 +29,20 @@
def create_app_dir
Dir.mkdir("#{app_name}") if !test(?d, "#{app_name}")
end
def copy_autotest_file
- copy_file(".autotest", "#{app_name}/.autotest")
+ copy_file(".autotest", "#{app_name}#{File::SEPARATOR}.autotest")
end
def copy_rspec_files
- from = ["spec/spec.opts", "spec/rcov.opts", "spec/spec_helper.rb", "spec/app_spec.rb"]
- to = ["#{app_name}/spec/spec.opts", "#{app_name}/spec/rcov.opts", "#{app_name}/spec/spec_helper.rb", "#{app_name}/spec/#{app_name}_spec.rb"]
+ from = ["spec#{File::SEPARATOR}spec.opts", "spec#{File::SEPARATOR}rcov.opts", "spec#{File::SEPARATOR}spec_helper.rb", "spec#{File::SEPARATOR}app_spec.rb"]
+ to = ["#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}spec.opts", "#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}rcov.opts", "#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}spec_helper.rb", "#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}#{app_name}_spec.rb"]
copy_file(from, to)
end
def copy_app_file
- copy_file("generic_app.rb", "#{app_name}/#{app_name}.rb")
+ copy_file("generic_app.rb", "#{app_name}#{File::SEPARATOR}#{app_name}.rb")
end
end
end