echoe 2.7.3 → 2.7.4

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG CHANGED
@@ -1,6 +1,8 @@
1
1
 
2
2
  vSVN. support compiling without extension registration for win32 and java targets.
3
3
 
4
+ v2.7.4. Ensured teardown.rb just like setup.rb. Load multi_rails automatically if its available. ENV['VERBOSE'] obeyed for Echoe.silence.
5
+
4
6
  v2.7.3. Put some handy things in lib/echoe/extensions.rb; use Rake::TestTask instead of screwing around in the shell. Automatically run test/setup.rb before the test task, if it exists.
5
7
 
6
8
  v2.7.2. Don't try to verify the existence of the RDoc template. Fixes for the RCov task.
@@ -15,6 +15,11 @@ begin
15
15
  rescue LoadError
16
16
  end
17
17
 
18
+ begin
19
+ require 'load_multi_rails_rake_tasks'
20
+ rescue LoadError
21
+ end
22
+
18
23
  gem 'rubyforge', '>=0.4.0'
19
24
  require 'rubyforge'
20
25
 
@@ -612,21 +617,33 @@ class Echoe
612
617
 
613
618
  ### Testing
614
619
 
615
- Rake::TestTask.new do |t|
620
+ Rake::TestTask.new(:test_inner) do |t|
616
621
  t.libs += ['lib', 'ext', 'bin', 'test']
617
622
  t.test_files = test_pattern
618
623
  t.verbose = true
619
624
  end
620
625
 
621
- task :default => :test
622
-
623
- if File.exist? 'test/setup.rb'
624
- task :setup_test_environment do
625
- Echoe.silence { system("ruby test/setup.rb") }
626
+ task :test do
627
+ if File.exist? 'test/setup.rb'
628
+ Echoe.silence do
629
+ puts "Setting up test environment"
630
+ system("ruby test/setup.rb")
631
+ end
626
632
  end
627
- task :test => :setup_test_environment
633
+ begin
634
+ Rake::Task[:test_inner].already_invoked = false
635
+ Rake::Task[:test_inner].invoke
636
+ ensure
637
+ if File.exist? 'test/teardown.rb'
638
+ Echoe.silence do
639
+ puts "Tearing down test environment"
640
+ system("ruby test/teardown.rb")
641
+ end
642
+ end
643
+ end
628
644
  end
629
-
645
+
646
+ task :default => :test
630
647
 
631
648
  if defined? Rcov
632
649
  Rcov::RcovTask.new(:coverage) do |t|
@@ -11,16 +11,19 @@ end
11
11
 
12
12
  class Echoe
13
13
 
14
- # http://pastie.caboo.se/127840
15
-
16
14
  def self.silence
17
- stdout, stderr = $stdout.clone, $stderr.clone
18
- $stdout.reopen(File.new('/tmp/stdout.echoe', 'w'))
19
- $stderr.reopen(File.new('/tmp/stderr.echoe', 'w'))
20
- yield
21
- $stdout.reopen(stdout)
22
- $stderr.reopen(stderr)
15
+ if !ENV['VERBOSE']
16
+ stdout, stderr = $stdout.clone, $stderr.clone
17
+ $stdout.reopen(File.new('/tmp/stdout.echoe', 'w'))
18
+ $stderr.reopen(File.new('/tmp/stderr.echoe', 'w'))
19
+ yield
20
+ $stdout.reopen(stdout)
21
+ $stderr.reopen(stderr)
22
+ else
23
+ yield
24
+ end
23
25
  end
26
+
24
27
  end
25
28
 
26
29
  # Redefine instead of chain a Rake task
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: echoe
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.3
4
+ version: 2.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Weaver
@@ -30,7 +30,7 @@ cert_chain:
30
30
  yZ0=
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2007-12-12 00:00:00 -05:00
33
+ date: 2007-12-13 00:00:00 -05:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file