Fixed double root bug with ActiveSupport 3.2.0 #16

Merged
merged 3 commits into from Feb 8, 2012

Projects

None yet

3 participants

@jduff jduff commented on an outdated diff Jan 30, 2012
lib/shopify_api/json_format.rb
@@ -21,3 +21,19 @@ def decode(json)
end
end
end
+
+module ActiveModel
+ module Serializers
+ module JSON
+ def as_json(options = nil)
+ root = options[:root] if options.try(:key?, :root)
@jduff
jduff Jan 30, 2012

Your tabbing is a bit messed up here.

@jduff
Shopify member

Does everything still work under ActiveResource 3.0 and 3.1?

@dennisfoconnor

Yes, everything still works under 3.0 and 3.1

Dennis O'Connor Fixed tabbing cf6c427
@odorcicd odorcicd commented on the diff Feb 3, 2012
test/detailed_log_subscriber_test.rb
@@ -27,7 +27,7 @@ def set_logger(logger)
assert_equal "GET http://localhost:80/admin/pages/1.json", @logger.logged(:info)[0]
assert_match /\-\-\> 200/, @logger.logged(:info)[1]
assert_equal "Headers: {\"Accept\"=>\"application/json\"}", @logger.logged(:info)[2]
- assert_equal "Response:\n{\"page\":{\"title\":\"Shopify API\",\"id\":1}}", @logger.logged(:info)[3]
@odorcicd
odorcicd Feb 3, 2012

We'll need to continue to support 1.8.7 and having the tests run, can you get them to pass on both? Where there are ordering issues, parse the json and compare the objects I guess.

@dennisfoconnor

@jduff @odorcicd Updated with changes.

@odorcicd

🆗

@jduff
Shopify member

👍

@dennisfoconnor dennisfoconnor merged commit 6787773 into Shopify:master Feb 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment