dojo_generator 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/dojo_generator +4 -2
- metadata +2 -2
data/bin/dojo_generator
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'fileutils'
|
4
|
+
|
4
5
|
class DojoGenerator
|
5
6
|
def self.generate_scaffold(dojo_name)
|
7
|
+
gem_root = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
6
8
|
app_root = Dir.pwd
|
7
9
|
dojo_path = "#{app_root}/#{dojo_name}"
|
8
10
|
if File.exist?(dojo_path)
|
@@ -14,8 +16,8 @@ class DojoGenerator
|
|
14
16
|
autotest_grow = File.new("#{dojo_path}/.autotest", "w")
|
15
17
|
autotest_grow.write "require 'autotest/growl'"
|
16
18
|
autotest_grow.close
|
17
|
-
FileUtils.cp "
|
18
|
-
FileUtils.cp_r "
|
19
|
+
FileUtils.cp "#{gem_root}/Rakefile", "#{dojo_path}/Rakefile"
|
20
|
+
FileUtils.cp_r "#{gem_root}/lib/task", "#{dojo_path}/task"
|
19
21
|
end
|
20
22
|
end
|
21
23
|
end
|