Permalink
Browse files

Unforce builder from AS

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
spastorino authored and josevalim committed Jun 1, 2010
1 parent 0bed93b commit 31e1445a8194f1eab70ac8c7d45797f0708c6c8e
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
s.add_dependency('activesupport', version)
s.add_dependency('activemodel', version)
+ s.add_dependency('builder', '~> 2.1.2')
s.add_dependency('i18n', '~> 0.4.0')
s.add_dependency('rack', '~> 1.1.0')
s.add_dependency('rack-test', '~> 0.5.4')
@@ -20,5 +20,6 @@ Gem::Specification.new do |s|
s.has_rdoc = true
s.add_dependency('activesupport', version)
+ s.add_dependency('builder', '~> 2.1.2')
s.add_dependency('i18n', '~> 0.4.0')
end
@@ -19,6 +19,5 @@ Gem::Specification.new do |s|
s.has_rdoc = true
- s.add_dependency('builder', '~> 2.1.2')
s.add_dependency('memcache-client', '>= 1.7.5')
end
@@ -0,0 +1,6 @@
+begin
+ require 'builder'
+rescue LoadError => e
+ $stderr.puts "You don't have builder installed in your application. Please add it to your Gemfile and run bundle install"
+ raise e
+end
@@ -134,7 +134,7 @@ def to_formatted_s(format = :default)
# </messages>
#
def to_xml(options = {})
- require 'builder' unless defined?(Builder)
+ require 'active_support/builder' unless defined?(Builder)
options = options.dup
options[:indent] ||= 2
@@ -55,7 +55,7 @@ class Hash
# configure your own builder with the <tt>:builder</tt> option. The method also accepts
# options like <tt>:dasherize</tt> and friends, they are forwarded to the builder.
def to_xml(options = {})
- require 'builder' unless defined?(Builder)
+ require 'active_support/builder' unless defined?(Builder)
options = options.dup
options[:indent] ||= 2

0 comments on commit 31e1445

Please sign in to comment.