Skip to content

Commit

Permalink
Use standard library for JSON parsing/serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
spohlenz committed May 4, 2015
1 parent e619b39 commit b8e7811
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions lib/tinymce/rails/asset_manifest.rb
@@ -1,5 +1,3 @@
require "multi_json"

module TinyMCE
module Rails
class AssetManifest
Expand Down Expand Up @@ -81,7 +79,7 @@ def self.try(manifest_path)

def initialize(file)
@file = file
@manifest = MultiJson.load(File.read(file))
@manifest = JSON.parse(File.read(file))
end

def append(logical_path, file)
Expand Down Expand Up @@ -120,7 +118,7 @@ def files
end

def dump
MultiJson.dump(@manifest)
JSON.generate(@manifest)
end

def write
Expand Down
3 changes: 1 addition & 2 deletions spec/lib/asset_manifest_spec.rb
@@ -1,5 +1,4 @@
require "tinymce/rails/asset_manifest"
require "multi_json"

module TinyMCE
module Rails
Expand Down Expand Up @@ -94,7 +93,7 @@ def reload_manifest(manifest)
subject(:manifest) { JsonManifest.new(fixture("json_manifest/manifest-18802ea98f713a419dac90694dd5b6c4.json")) }

def reload_manifest(manifest)
MultiJson.load(manifest.to_s)
JSON.parse(manifest.to_s)
end

it "keeps existing manifest data" do
Expand Down

0 comments on commit b8e7811

Please sign in to comment.