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.
Files changed (2) hide show
  1. data/bin/dojo_generator +4 -2
  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 "../Rakefile", "#{dojo_path}/Rakefile"
18
- FileUtils.cp_r "../lib/task", "#{dojo_path}/task"
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
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Felipe Mathies