dblock
7670d9aed7
Upgraded RuboCop to 0.53.0.
2018-03-14 14:58:08 -04:00
Christian Trosclair
b2654190c1
add custom error formatter ( #76 )
2017-10-20 10:26:32 -04:00
Darren Cheng
1b09c69174
Ensure all AMS options are passed through.
...
See the following for details:
* https://github.com/rails-api/active_model_serializers/blob/master/docs/general/rendering.md
* https://github.com/rails-api/active_model_serializers/blob/master/docs/general/adapters.md
2017-04-25 19:13:03 -07:00
Darren Cheng
eb28eb2636
Add Sequel integration spec.
2017-04-24 17:02:11 -07:00
Darren Cheng
0963774ecc
Whitelist adapter options and support extra options.
2016-09-09 10:54:33 -07:00
Darren Cheng
4315930a55
Pass adapter options through calls to render.
2016-09-07 00:06:25 -07:00
Darren Cheng
6bb205731a
Implement support for collection serializers.
2016-07-26 10:21:34 -07:00
Darren Cheng
629afb9887
Namespace inferred serializer resolution.
2016-07-22 15:18:04 -07:00
Darren Cheng
ac9466192d
Refactor option and serializer resolution.
2016-07-21 16:03:46 -07:00
Darren Cheng
1dd73e9cd7
Solve line length linter issues.
2016-07-14 20:09:29 -07:00
Darren Cheng
35abadd8f7
Upgrade codebase to support latest AMS version.
2016-07-14 19:25:58 -07:00
syntaxTerr0r
c57a388e91
Bump version to 1.4.0
...
Adding failing specs for issue #48
Proposition of implementation for #48
Readme update
Rollback travis
2016-05-16 02:48:29 +02:00
Siong
ca9c8faaa9
Merge pull request #39 from jwkoelewijn/options_from_namespace
...
Look for namespace and other options to configure serializers
2015-01-22 13:49:35 -08:00
dB
f773bcbb8e
Use env to pass meta to the formatter.
2015-01-14 14:54:44 -05:00
dB
19bb6b50f7
Simplify meta assignment to a single hash.
2015-01-14 14:53:07 -05:00
J.W. Koelewijn
6b16d22123
Changed some cosmetics in layout
2015-01-14 16:57:56 +01:00
J.W. Koelewijn
906d772202
Look for namespace and other options to configure serializers
...
By default not all serializer options are considered (for instance
the :root option, or the :each_serializer option). This potentially
results in an incomplete configuration of the serializers used.
Added 2 specs to test this when used as a single endpoint and when
used within a namespace. At the moment it is fixed by plucking
the correct settings in the .build_options_from_endpoint,
but I could imagine that this is not exactly the right spot.
2015-01-14 16:35:11 +01:00
dB
04c21470e3
Implemented RuboCop, Ruby linter.
2015-01-13 18:50:18 -05:00
dB
ffd1770ab2
Added support for Grape 0.10.x.
2015-01-13 16:27:36 -05:00
Ignat Zakrevsky
f6feb5f5ef
Merge branch 'master' into test-fixes
...
Conflicts:
spec/grape-active_model_serializers/formatter_spec.rb
2014-11-21 09:30:11 +03:00
Siong
a2578f893d
add spec for default_serializer_options.
2014-11-20 13:23:15 -08:00
Siong
cfb80be11e
better formatting.
2014-11-20 13:22:53 -08:00
Ignat Zakrevsky
6e8757dd88
Tests fixing.
2014-11-17 12:28:51 +03:00
Andrew Korzhuev
e510817abf
Remove jazz-hands dependency
2014-10-12 23:01:58 +07:00
DanyHunter
9e56991a50
Modify first argument for Grape::Endpoint.new to fix error caused by calling a method on nil.
2014-10-02 11:09:55 -05:00
Radan Skoric
0db4cae3b5
Correctly fetch serialization scope
2014-08-05 10:26:54 +02:00
Zander Hill
a7ce076ec7
[Issue #13 ] Add render syntactic sugar
...
As in issue #13 an example solution provided by @jrhe an implementation
of said feature has been created.
As per the discussion in the thread this is only a helper to be able to
reach the available options provided in the active_model_serializer gem.
usage is as follows:
```ruby
get '/some_path' do
collection = Collection.all
render collection, { meta: { current_page: 5 }, meta_key:
:pagination_info }
end
```
The return value would be:
`{ pagination_info: { current_page: 5 }, collection: [item, item] }`
If given without a `meta_key` it would return as:
`{ meta: { current_page: 5 }, collection: [item, item] }`
Any feedback appreciated.
@zph, @olleolleolle and @bjoska
2014-02-09 22:51:17 +00:00
Kyle Passarelli
4b474ef8f2
remove '.DS_Store's
2013-10-07 18:20:06 -06:00
Jonathan Richard Henry Evans
a936f119aa
Adds stub specs
2013-09-09 12:38:03 +01:00
Jonathan Richard Henry Evans
6df2165f9f
Moves aside old tests
2013-09-09 12:26:55 +01:00
Jonathan Richard Henry Evans
57335b7bd9
Seperates out spec_fakes.rb into support directory"
2013-09-09 12:23:43 +01:00
Jonathan Richard Henry Evans
251144d257
Changes root behaviour for arrays. If in a namspace the namespace name is used, if not the route name is used
2013-09-09 12:17:19 +01:00
Jonathan Richard Henry Evans
f50a86f890
Added guard-rspec
2013-08-30 09:56:25 +01:00
Jonathan Richard Henry Evans
c599c489c3
Cleaned up tests
2013-08-29 15:46:31 +01:00
Jonathan Richard Henry Evans
d025cdba34
Added jazz_hands for debugging in development
2013-08-29 15:22:29 +01:00
Jonathan Richard Henry Evans
a1ae2166de
Changed tests to use Plain Old Ruby Objects instead of ActiveRecord models to make testing easier. Gets rid of NullDB and ActiveRecord development dependencies
2013-08-21 10:31:11 +01:00
Adrian Perez
c64bbf22f3
Fix examples, should green the build
2013-08-03 18:06:12 +04:00
John Allen
7933a1796b
Spec setup updates, almost passing
2013-05-16 09:56:13 -04:00
John Allen
7f02d8f0d5
Removes unnecessary dependencies
...
There are some dependencies that are not required for this gem (eg.
tilt) that I'm removing. In addition some of the dependencies were only
necessary for development/test so I'm moving all of that into the gempsec and
making that clear there.
2013-05-16 09:06:37 -04:00
John Allen
e5cf9bdf8c
Adds support for namespace options
2013-05-15 20:47:32 -04:00
george
8022de2d54
Grape::ActiveModelSerializers for models with compound names
...
should generate the proper 'root' node for individual objects
should generate the proper 'root' node for serialized arrays of objects
2013-04-30 14:20:18 -04:00
jrhe
517731792b
Recoded to use active_model_serializer parameter of models/arrays and added array support
2013-04-10 19:36:25 +01:00
jrhe
a60e10d5f4
changed rabl reference
2013-04-04 23:40:10 +01:00
jrhe
65f6980dad
Added the ability to turn off serializer inference
2013-04-04 21:07:05 +01:00
jrhe
d3db8672ab
Improved readme
2013-04-04 20:35:10 +01:00
jrhe
1d2b6de7ea
Initial commit
2013-04-04 20:10:51 +01:00