moonmaster9000 / dupe

BDD your (ActiveResource compatible) services from the client-side, before they exist.
62 stars 17 forks source link

Support for JSON-based services in Dupe #25

Closed cdmicacc closed 12 years ago

cdmicacc commented 12 years ago

I've added support for JSON-based resources. I've wired all the calls to serialize/deserialize/get the mime-type, etc to use the configured formatter (which defaults to the default ActiveResource formatter).

Hopefully this also ensures that Dupe produces JSON and XML that match the JSON/XML produced by the real service (ie, it should respect settings such as 'include_root_in_json')

I think this fixes #23 (it seems to work for me, at least, and the tests pass)

moonmaster9000 commented 12 years ago

Awesome! I'll check it out tonight and release if everything looks good!

Sent from my iPhone

On Mar 21, 2012, at 10:56 AM, Chris Micacchireply@reply.github.com wrote:

I've added support for JSON-based resources. I've wired all the calls to serialize/deserialize/get the mime-type, etc to use the configured formatter (which defaults to the default ActiveResource formatter).

Hopefully this also ensures that Dupe produces JSON and XML that match the JSON/XML produced by the real service (ie, it should respect settings such as 'include_root_in_json')

I think this fixes #23 (it seems to work for me, at least, and the tests pass)

You can merge this Pull Request by running:

git pull https://github.com/cdmicacc/dupe master

Or you can view, comment on it, or merge it online at:

https://github.com/moonmaster9000/dupe/pull/25

-- Commit Summary --

  • Support JSON in Dupe

-- File Changes --

A .rspec (2) M Gemfile.lock (24) M lib/dupe/active_resource_extensions.rb (16) M lib/dupe/dupe.rb (20) M lib/dupe/hash_pruner.rb (8) M lib/dupe/mock.rb (17) M spec/lib_specs/active_resource_extensions_spec.rb (453) M spec/lib_specs/dupe_spec.rb (459) M spec/lib_specs/mock_definitions_spec.rb (141) M spec/lib_specs/mock_spec.rb (424) M spec/lib_specs/network_spec.rb (40)

-- Patch Links --

https://github.com/moonmaster9000/dupe/pull/25.patch https://github.com/moonmaster9000/dupe/pull/25.diff


Reply to this email directly or view it on GitHub: https://github.com/moonmaster9000/dupe/pull/25

moonmaster9000 commented 12 years ago

merged and released! 1.1.0.rc1 - let me know if you have any issues. THANKS!!!!