diff options
author | elijah <elijah@riseup.net> | 2014-10-28 11:23:55 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-10-28 11:23:55 -0700 |
commit | 6d443e008a94f842799f30d15aacb754439fe101 (patch) | |
tree | 8b5a3dfb75a2144d0f1b8fabc961fe72ae4bd330 /lib | |
parent | dddbaa40ed9abb1031ccdce21c3d6769dbc5b112 (diff) | |
download | leap_cli-6d443e008a94f842799f30d15aacb754439fe101.tar.gz leap_cli-6d443e008a94f842799f30d15aacb754439fe101.tar.bz2 |
better solution to activesupport dependency problem
Diffstat (limited to 'lib')
-rw-r--r-- | lib/leap_cli.rb | 1 | ||||
-rw-r--r-- | lib/override/json.rb | 2 | ||||
-rw-r--r-- | lib/override/to_json.rb | 20 |
3 files changed, 1 insertions, 22 deletions
diff --git a/lib/leap_cli.rb b/lib/leap_cli.rb index baff32f..e8f7ecf 100644 --- a/lib/leap_cli.rb +++ b/lib/leap_cli.rb @@ -6,7 +6,6 @@ end $ruby_version = RUBY_VERSION.split('.').collect{ |i| i.to_i }.extend(Comparable) # ensure leap_cli/lib/overrides has the highest priority -# (these files override bad behavior in gems that overrides JSON) $:.unshift(File.expand_path('../override',__FILE__)) require 'leap/platform' diff --git a/lib/override/json.rb b/lib/override/json.rb index 8857a22..a7ae328 100644 --- a/lib/override/json.rb +++ b/lib/override/json.rb @@ -8,4 +8,4 @@ # This trick only works if this directory is early in the # include path. # -require 'json/pure' +require 'json/pure'
\ No newline at end of file diff --git a/lib/override/to_json.rb b/lib/override/to_json.rb deleted file mode 100644 index 73fbe5c..0000000 --- a/lib/override/to_json.rb +++ /dev/null @@ -1,20 +0,0 @@ -# -# activesupport/lib/core_ext/object/to_json.rb overrides to_json for -# most core objects like so: -# -# [Object, Array, FalseClass, Float, Hash, Integer, NilClass, String, TrueClass].each do |klass| -# klass.class_eval do -# # Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info. -# def to_json(options = nil) -# ActiveSupport::JSON.encode(self, options) -# end -# end -# end -# -# We cannot tolerate this. We need the normal to_json to be called, not -# ActiveSupport's custom version. -# -# This file exists to override the behavior of ActiveSupport. This file will get included -# instead of the normal to_json.rb. -# - |