ktec-subtrac 0.1.47 → 0.1.48
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/subtrac/project.rb +11 -1
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/subtrac/project.rb
CHANGED
@@ -19,7 +19,7 @@ module Subtrac
|
|
19
19
|
puts "Lets see what the filter has returned: #{Dir.glob(glob_path)}"
|
20
20
|
Dir.glob(glob_path).each do |file|
|
21
21
|
unless File.directory?(file) # only mess with files
|
22
|
-
buffer = File.new(file,'r').read
|
22
|
+
buffer = tokenize(File.new(file,'r').read)
|
23
23
|
puts buffer
|
24
24
|
File.open(file,'w') {|fw| fw.write(buffer)}
|
25
25
|
end
|
@@ -27,9 +27,19 @@ module Subtrac
|
|
27
27
|
# TODO: We'll need to run through and do some renaming if necessary
|
28
28
|
end
|
29
29
|
end
|
30
|
+
|
30
31
|
def clear_temp
|
31
32
|
# delete the temporary directory
|
32
33
|
#FileUtils.rm_r(@temp_dir, :force => true)
|
33
34
|
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
# Replaces some tokens
|
39
|
+
def tokenize( string )
|
40
|
+
string.gsub( /\$\{project.display_name\}/, @display_name ).
|
41
|
+
gsub( /\$\{client.display_name\}/, @client.display_name )
|
42
|
+
end
|
43
|
+
|
34
44
|
end
|
35
45
|
end
|