forked from jlawler/activeconfig
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
54 lines (50 loc) · 1.6 KB
/
Rakefile
File metadata and controls
54 lines (50 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
require 'rubygems'
Gem::manage_gems
require 'rake/gempackagetask'
begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = 'activeconfig'
s.author = 'Jeremy Lawler'
s.email = 'jlawler@cashnetusa.com'
s.homepage = 'http://jlawler.github.com/activeconfig/'
s.summary = 'An extremely flexible configuration system'
s.authors = ["Jeremy Lawler"]
end
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
task :default => :test
active_config_multi_paths=[File.expand_path(File.dirname(__FILE__) + "/test/active_config_test_multi/patha"),':',File.expand_path(File.dirname(__FILE__) + "/test/active_config_test_multi/pathb")]
task :rdoc do
sh "rm -rf #{File.dirname(__FILE__)}/doc"
sh "cd lib && rdoc -o ../doc "
end
task :test do
sh "ruby -I lib test/active_config_test.rb"
puts "\n\n"
exception1,exception2,exception3=nil,nil,nil
begin
ENV['ACTIVE_CONFIG_PATH'] = active_config_multi_paths.join('')
sh "ruby -I lib test/active_config_test_multi.rb"
rescue Object => exception1
end
puts "\n\n"
begin
ENV['ACTIVE_CONFIG_PATH'] = active_config_multi_paths.reverse.join('')
sh "ruby -I lib test/active_config_test_multi.rb"
sh "ruby -I lib test/env_test.rb"
rescue Object => exception2
end
x=exception1 ||exception2
raise x if x
end
task :cnu_config_test do
sh "ruby -I lib test/cnu_config_test.rb"
puts "\n\n"
begin
ENV['CNU_CONFIG_PATH'] = cnu_config_multi_paths.join('')
sh "ruby -I lib test/cnu_config_test.rb"
rescue Object => exception3
end
end