rag 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1,6 @@
1
- require_relative "<%=project%>/version"
1
+ libdir = File.dirname(__FILE__)
2
+ $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
3
+
4
+ module <%=project.capitalize%>
5
+ autoload :VERSION, "<%=project%>/version"
6
+ end
@@ -67,8 +67,18 @@ class Project
67
67
  end
68
68
  end
69
69
 
70
+ def template_path
71
+ path1 = File.join(ENV["HOME"], ".rag/template", options[:template])
72
+ return path1 if File.exists?(path1)
73
+
74
+ path2 = Rc.pa.template.join(options[:template]).p
75
+ return path2 if File.exists?(path2)
76
+
77
+ raise Error, "can't find template -- #{options[:template]}"
78
+ end
79
+
70
80
  def copy_files o={}
71
- Pa.each_r Rc.pa.template.join(options[:template]) do |pa, relative, e|
81
+ Pa.each_r template_path do |pa, relative, e|
72
82
  # skip *~
73
83
  next if pa.b =~ /~$/
74
84
 
data/version.rb CHANGED
@@ -2,7 +2,7 @@ class Rag
2
2
  module VERSION
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- PATCH = 6
5
+ PATCH = 7
6
6
 
7
7
  IS = [MAJOR, MINOR, PATCH].join(".")
8
8
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rag
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.6
5
+ version: 1.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Guten
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-05 00:00:00 Z
13
+ date: 2011-07-12 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: tagen