aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/plugins
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2011-10-13 00:29:51 +0200
committerDavid Cabo <david@calibea.com>2011-10-13 00:29:51 +0200
commitc8983b923e4dc7db9ba22156daaddd94d2b5ed4d (patch)
tree7741c3655fe5e3cbc90dd20a4626ac7acc1bf6b0 /vendor/plugins
parenta29b3aaf0ae77af49d38813b62dddcb6889c1ebe (diff)
parente13127a8ebc8bf8379d92f778af5a2bb6931d80c (diff)
Merge branch 'release/0.4'0.4
Diffstat (limited to 'vendor/plugins')
-rw-r--r--vendor/plugins/action_mailer_layouts/CHANGELOG21
-rw-r--r--vendor/plugins/action_mailer_layouts/README35
-rw-r--r--vendor/plugins/action_mailer_layouts/init.rb7
-rw-r--r--vendor/plugins/action_mailer_layouts/plugin.rb48
-rw-r--r--vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb6
5 files changed, 3 insertions, 114 deletions
diff --git a/vendor/plugins/action_mailer_layouts/CHANGELOG b/vendor/plugins/action_mailer_layouts/CHANGELOG
deleted file mode 100644
index 0b3f47667..000000000
--- a/vendor/plugins/action_mailer_layouts/CHANGELOG
+++ /dev/null
@@ -1,21 +0,0 @@
-2008-06-03
-* Added support for Rails 2.0 and 2.1. Thanks to Scott Windsor.
-
-2008-02-08
-* Added support for *.<format>.erb layouts and templates. Thanks to Eric Wollensen.
-
-2007-12-20
-* Fixed a bug present when specifying the layout with a string (eg: layout 'subdir/layout_template') in a multipart mail, which caused the plugin to only render one part and not the other. Thanks to Andres Koetsier.
-
-2007-12-12
-* Now works with Rails 2.0.
-
-2007-11-27
-* Now supports helpers defined in the mailer class. Thanks to Marshall Roch.
-
-2007-24-07
-* Now requires actionmailer-1.3.3.
-
-2007-05-07
-* No longer have to specify a :layout. The layout name is now inferred from the mailer class name. Thanks to Peter Boctor.
-* Helper methods are now available to action mailer layouts. Thanks to Peter Boctor. \ No newline at end of file
diff --git a/vendor/plugins/action_mailer_layouts/README b/vendor/plugins/action_mailer_layouts/README
deleted file mode 100644
index 92b19a69d..000000000
--- a/vendor/plugins/action_mailer_layouts/README
+++ /dev/null
@@ -1,35 +0,0 @@
-== Action Mailer Layouts
-
-Original Homepage: http://cardboardrocket.com/pages/action_mailer_layouts
-Original svn: http://svn.cardboardrocket.com/action_mailer_layouts
-
-A plugin to enable layouts for ActionMailer templates.
-
-Adds a new 'layout' property to the ActionMailer::Base class. Specify the name
-of the layout you want to use. The plugin will look in app/views/layouts for your
-layout. If no layout is specified, the plugin will look for a layout that matches
-the name of your mailer class.
-
-For example:
-
-If your mailer class is called UserNotifier and you are rendering the activation.rhtml
-template, then the plugin will attempt to load the user_notifier.rhtml layout. If you are
-rendering the activation.text.html.rhtml template, the plugin will look for the
-user_notifier.text.html.rhtml layout. In other words, the plugin attempts to load the
-layout named after the your ActionMailer class.
-
-You can overload this behavior by setting the layout property of your mailer:
-
-class UserNotfier < ActionMailer::Base
- def activation(user)
- @recipients = user.email
- @from = 'you@domain.com'
- @sent_on = Time.now
- @subject = 'Activate your account!'
- @layout = :email
- end
-end
-
-This arrangement will cause the plugin to render the content in
-views/user_notifier/activation.text.html.rhtml in the views/layouts/email.text.html.rhtml
-layout. \ No newline at end of file
diff --git a/vendor/plugins/action_mailer_layouts/init.rb b/vendor/plugins/action_mailer_layouts/init.rb
deleted file mode 100644
index 8289c4eb9..000000000
--- a/vendor/plugins/action_mailer_layouts/init.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-begin
- require File.join(File.dirname(__FILE__), 'plugin.rb')
- ActionController::Base.logger.fatal '** Loaded layouts plugin for ActionMailer'
-rescue Exception => e
- puts e.inspect
- ActionController::Base.logger.fatal e if ActionController::Base.logger
-end \ No newline at end of file
diff --git a/vendor/plugins/action_mailer_layouts/plugin.rb b/vendor/plugins/action_mailer_layouts/plugin.rb
deleted file mode 100644
index ef0cbc37c..000000000
--- a/vendor/plugins/action_mailer_layouts/plugin.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-module ActionMailer
- class Base
-
- # Specify the layout name
- adv_attr_accessor :layout
-
- alias_method :render_message_without_layouts, :render_message
-
- def render_message(method_name, body)
- layout = @layout ? @layout.to_s.clone : self.class.to_s.underscore
-
- filename = if method_name.respond_to?(:filename)
- method_name.filename
- else
- method_name
- end
-
- md = /([^\.]+)\.([^\.]+\.[^\.]+)\.(erb|rhtml|rxml)$/.match(filename)
-
- layout << ".#{md.captures[1]}" if md && md.captures[1]
- layout << ".#{md.captures[2]}" if md && md.captures[2]
-
- if File.exists?(File.join(layouts_path, layout))
- body[:content_for_layout] = render_message_without_layouts(method_name, body)
-
- # TODO: extract content_for blocks and somehow put them in body[:content_for_...]
-
- initialize_layout_template_class(body).render(:file => "/#{layout}")
- else
- render_message_without_layouts(method_name, body)
- end
- end
-
- def initialize_layout_template_class(assigns)
- # for Rails 2.1 (and greater), we have to process view paths first!
- ActionView::TemplateFinder.process_view_paths(layouts_path) if defined?(ActionView::TemplateFinder)
-
- returning(template = ActionView::Base.new(layouts_path, assigns, self)) do
- template.extend self.class.master_helper_module
- template.extend ActionView::Helpers::CaptureHelper
- end
- end
-
- def layouts_path
- File.join(template_root, 'layouts')
- end
- end
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
index 43f0764ca..4671b79da 100644
--- a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
+++ b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
@@ -668,8 +668,8 @@ module ActsAsXapian
self.class.to_s + "-" + self.id.to_s
end
- def xapian_value(field, type = nil)
- if self.respond_to?("translations")
+ def xapian_value(field, type = nil, index_translations = false)
+ if index_translations && self.respond_to?("translations")
if type == :date or type == :boolean
value = single_xapian_value(field, type = type)
else
@@ -756,7 +756,7 @@ module ActsAsXapian
for text in self.xapian_options[:texts]
ActsAsXapian.term_generator.increase_termpos # stop phrases spanning different text fields
# XXX the "1" here is a weight that could be varied for a boost function
- ActsAsXapian.term_generator.index_text(xapian_value(text), 1)
+ ActsAsXapian.term_generator.index_text(xapian_value(text, nil, true), 1)
end
end