disable_rails_json 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ InstalledFiles
7
+ lib/bundler/man
8
+ pkg
9
+ rdoc
10
+ spec/reports
11
+ test/tmp
12
+ test/version_tmp
13
+ tmp
14
+
15
+ # YARD artifacts
16
+ .yardoc
17
+ _yardoc
18
+ doc/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in disable_rails_json.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ disable_rails_json
2
+ ==================
3
+
4
+ Disables ActiveSupport's to_json replacement
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "disable_rails_json/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "disable_rails_json"
7
+ s.version = DisableRailsJson::VERSION
8
+ s.authors = ["Ryan Souza"]
9
+ s.email = ["rsouza@engineyard.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{Disables ActiveSupport's json encoding}
12
+ s.description = s.summary
13
+
14
+ s.add_development_dependency 'activesupport', ['>=3.1.0.rc4', '<4.0']
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.require_paths = ["lib"]
19
+ end
@@ -0,0 +1,9 @@
1
+ # Rails tries to override #to_json with its own implementation. This implementation
2
+ # has some subtle differences in how it generates the JSON output, so it ends up
3
+ # being not identical. This file simply prevents Rails from loading its own extensions
4
+ # and always uses #to_json from the JSON gem instead.
5
+
6
+ begin
7
+ require 'json'
8
+ rescue LoadError
9
+ end
@@ -0,0 +1,4 @@
1
+ # Required for tricking active support to load our to_json
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+
4
+ require "disable_rails_json/version"
@@ -0,0 +1,3 @@
1
+ module DisableRailsJson
2
+ VERSION = "0.0.0"
3
+ end
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: disable_rails_json
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Ryan Souza
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-04-28 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activesupport
16
+ requirement: &2153373000 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 3.1.0.rc4
22
+ - - <
23
+ - !ruby/object:Gem::Version
24
+ version: '4.0'
25
+ type: :development
26
+ prerelease: false
27
+ version_requirements: *2153373000
28
+ description: Disables ActiveSupport's json encoding
29
+ email:
30
+ - rsouza@engineyard.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - .gitignore
36
+ - Gemfile
37
+ - README.md
38
+ - Rakefile
39
+ - disable_rails_json.gemspec
40
+ - lib/active_support/core_ext/object/to_json.rb
41
+ - lib/disable_rails_json.rb
42
+ - lib/disable_rails_json/version.rb
43
+ homepage: ''
44
+ licenses: []
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ requirements: []
62
+ rubyforge_project:
63
+ rubygems_version: 1.8.11
64
+ signing_key:
65
+ specification_version: 3
66
+ summary: Disables ActiveSupport's json encoding
67
+ test_files: []