public
Description: A super cool, simple, and feature rich configuration system for Ruby apps. (replaces application_configuration)
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/configatron.git
Click here to lend your support to: configatron and make a donation at www.pledgie.com !
commit  b1eeede854d614ba5f7ec74159dd0c622e0594bb
tree    00ca596682e42d011606cfcd0d6ef369be67ebe4
parent  d8475cd8f3dceb654fbbb7c826b3bb4b655b9001
configatron / .treasure_map.rb
100644 22 lines (16 sloc) 0.625 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
map_for(:configatron) do |nachos|
  # nachos.watch "dir1", "dir2"
  
  test_type = "spec" # or even just "test_type = 'test' or 'example' or 'spec' ??
  
nachos.keep_a_watchful_eye_for "app", "spec"
 
  nachos.prepare_spell_for %r%^lib/(.*)\.rb% do |match|
["#{test_type}/#{match[1]}_#{test_type}.rb"]
end
nachos.prepare_spell_for %r%^#{test_type}/(.*)_#{test_type}\.rb% do |match|
p match[1]
p match[0]
["#{test_type}/#{match[1]}_#{test_type}.rb"]
end
nachos.prepare_spell_for %r%^#{test_type}/#{test_type}_helper\.rb% do |spell_component|
    Dir["#{test_type}/**/*_#{test_type}.rb"]
  end
  
end