desert 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ 0.2.1
2
+ - Fixed ActionMailer rendering in Rails 1.99.0
3
+
1
4
  0.2.0
2
5
  - Works with edge Rails
3
6
  - Removed Desert::Plugin#up_to_date?
data/Rakefile CHANGED
@@ -26,7 +26,7 @@ task(:tag_release) do
26
26
  end
27
27
 
28
28
  PKG_NAME = "desert"
29
- PKG_VERSION = "0.2.0"
29
+ PKG_VERSION = "0.2.1"
30
30
  PKG_FILES = FileList[
31
31
  '[A-Z]*',
32
32
  '*.rb',
@@ -89,5 +89,5 @@ end
89
89
 
90
90
  desc "Updates the dependencies to run the build. This task uses Git."
91
91
  task(:update_dependencies) do
92
- system "cd spec/rails_root/vendor/edge_rails; git pull origin"
92
+ system "cd spec/rails_root/vendor/rails_versions/edge; git pull origin"
93
93
  end
@@ -1,7 +1,9 @@
1
1
  dir = File.dirname(__FILE__)
2
2
  require "#{dir}/plugin_templates/action_controller"
3
- if Desert::VersionChecker.rails_version_is_below_rc2?
3
+ if Desert::VersionChecker.rails_version_is_below_1990?
4
4
  require "#{dir}/plugin_templates/1.2.0/action_mailer"
5
+ elsif Desert::VersionChecker.rails_version_is_below_rc2?
6
+ require "#{dir}/plugin_templates/1.99.0/action_mailer"
5
7
  else
6
8
  require "#{dir}/plugin_templates/2.0.0/action_mailer"
7
9
  end
@@ -0,0 +1,23 @@
1
+ module ActionMailer #:nodoc
2
+ class Base #:nodoc:
3
+ private
4
+ def template_path_with_plugin_routing
5
+ template_paths = [template_path_without_plugin_routing]
6
+ Desert::Manager.plugins.reverse.each do |plugin|
7
+ template_paths << "#{plugin.templates_path}/#{mailer_name}"
8
+ end
9
+ "{#{template_paths * ','}}"
10
+ end
11
+ alias_method_chain :template_path, :plugin_routing
12
+
13
+ def initialize_template_class(assigns)
14
+ view_paths = Dir["#{template_path}/#{@template}.*"].collect do |path|
15
+ File.dirname(path)
16
+ end
17
+ returning(template = ActionView::Base.new(view_paths, assigns, self)) do
18
+ template.extend ApplicationHelper
19
+ template.extend self.class.master_helper_module
20
+ end
21
+ end
22
+ end
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: desert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal Labs
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-26 00:00:00 -07:00
12
+ date: 2008-05-02 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -35,6 +35,7 @@ files:
35
35
  - lib/desert/plugin_templates/1.2.0/action_mailer.rb
36
36
  - lib/desert/plugin_templates/action_view.rb
37
37
  - lib/desert/plugin_templates/2.0.0/action_mailer.rb
38
+ - lib/desert/plugin_templates/1.99.0/action_mailer.rb
38
39
  - lib/desert/plugin_templates/action_controller.rb
39
40
  - lib/desert/rails.rb
40
41
  - lib/desert/supported_rails_versions.rb