cwninja-inaction_mailer 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -17,11 +17,11 @@ end
17
17
 
18
18
  spec = Gem::Specification.new do |s|
19
19
  s.name = %q{inaction_mailer}
20
- s.version = "0.2"
20
+ s.version = "0.3"
21
21
  s.summary = %q{An ActionMailer delivery mechanism to save mails as files in a directory.}
22
22
  s.description = %q{An ActionMailer delivery mechanism to save mails as files in a directory.}
23
23
 
24
- s.files = FileList['[A-Z]*', 'lib/**/*.rb', 'test/**/*.rb']
24
+ s.files = FileList['[A-Z]*', 'lib/**/*.rb', 'test/**/*.rb', 'rails/*']
25
25
  s.require_path = 'lib'
26
26
  s.test_files = Dir[*['test/**/*_test.rb']]
27
27
 
@@ -29,7 +29,7 @@ module InactionMailer
29
29
  end
30
30
 
31
31
  def ensure_output_dir_exists
32
- File.mkdir output_dir unless File.directory? output_dir
32
+ Dir.mkdir output_dir unless File.directory? output_dir
33
33
  end
34
34
  end
35
35
 
data/rails/init.rb ADDED
@@ -0,0 +1,2 @@
1
+ require File.join(File.dirname(__FILE__), *%w[lib inaction_mailer])
2
+ InactionMailer.hook!
data/test/test_helper.rb CHANGED
@@ -48,11 +48,16 @@ class Test::Unit::TestCase
48
48
 
49
49
  def with_stubbed_file_store(fake_file_system = {}, &block)
50
50
  file_class = File
51
+ dir_class = Dir
51
52
  Object.send :remove_const, :File
52
53
  Object.const_set(:File, FileSystemStub.new(fake_file_system))
54
+ Object.send :remove_const, :Dir
55
+ Object.const_set(:Dir, File)
53
56
  yield
54
57
  ensure
55
58
  Object.send :remove_const, :File
56
59
  Object.const_set(:File, file_class)
60
+ Object.send :remove_const, :Dir
61
+ Object.const_set(:Dir, dir_class)
57
62
  end
58
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cwninja-inaction_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.2"
4
+ version: "0.3"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lea
@@ -27,6 +27,7 @@ files:
27
27
  - lib/inaction_mailer.rb
28
28
  - test/functional_test.rb
29
29
  - test/test_helper.rb
30
+ - rails/init.rb
30
31
  has_rdoc: true
31
32
  homepage:
32
33
  post_install_message: