Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Unforce builder from AS

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit 31e1445a8194f1eab70ac8c7d45797f0708c6c8e 1 parent 0bed93b
@spastorino spastorino authored josevalim committed
View
1  actionpack/actionpack.gemspec
@@ -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')
View
1  activemodel/activemodel.gemspec
@@ -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
View
1  activesupport/activesupport.gemspec
@@ -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
View
6 activesupport/lib/active_support/builder.rb
@@ -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
View
2  activesupport/lib/active_support/core_ext/array/conversions.rb
@@ -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
View
2  activesupport/lib/active_support/core_ext/hash/conversions.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.