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.
Files changed (3) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/subtrac/project.rb +11 -1
  3. metadata +1 -1
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 47
4
+ :patch: 48
@@ -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.gsub(/\$\{project.display_name\}/,exp_replace)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ktec-subtrac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.47
4
+ version: 0.1.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Salisbury