Commit Graph

586 Commits

Author SHA1 Message Date
Lucas Hosseini
7847d05ecb Remove root_name class method from Serializer, as it is used nowhere. 2015-10-05 07:27:13 +02:00
Lucas Hosseini
066990184b Merge pull request #1201 from hut8/master
Add documentation about wildcard includes
2015-10-02 15:30:31 +02:00
Lucas Hosseini
34d65716cb Merge pull request #1214 from NullVoxPopuli/issue/1211-failing-test
Fix #1211, include_tree is null when using the key: options
2015-10-02 15:29:04 +02:00
Liam Bowen
f8323fc9e5 Fixes #1211 - retrieve the key from the reflection options when building associations 2015-10-02 08:52:21 -04:00
Benjamin Fleischer
b8a5bbd860 Merge pull request #1223 from bf4/remove_unnecessary_railtie
Fix bundle console no longer tries to load I18n::Rails
2015-10-02 00:13:37 -05:00
Benjamin Fleischer
8e8cfd45ff Fix bundle console no longer tries to load I18n::Rails 2015-10-01 23:08:34 -05:00
Benjamin Fleischer
a2bfe190e3 Merge pull request #1050 from bf4/json_api_member
Add top-level jsonapi member to JSON API adapter
2015-10-01 23:03:11 -05:00
Benjamin Fleischer
a819da6c13 Merge pull request #1213 from AutoCloud/type_setting
Add Serializer 'type' directive to control type field, for
 use by the JsonApi adapter
2015-10-01 22:59:17 -05:00
Benjamin Fleischer
c5fdfb43bf Merge pull request #1217 from maurogeorge/patch-04
Change default rake task to run test and rubocop
2015-10-01 22:57:40 -05:00
Ivan Yurov
2dd569ae51 Add Serializer 'type' directive to control type field, for use by the JsonApi adapter 2015-10-01 22:48:57 -04:00
Benjamin Fleischer
9d7da8afc4 Add support for top level jsonapi member. 2015-10-01 21:22:49 -05:00
Mauro George
c7b8c54952 Change default rake task to run test and rubocop
The rubocop only runs in the CI this way a contributor probably will see a
rubocop offense only in the CI.

Running the rubocop in the default rake task we have more chance that a offense
be get in the local machine.
2015-10-01 19:52:14 -03:00
L. Preston Sego III
345f8f30c1 Merge pull request #1220 from maurogeorge/patch-06
Remove empty rubocop.rake
2015-10-01 18:26:34 -04:00
Mauro George
908f13fe6c Remove empty rubocop.rake 2015-10-01 19:05:28 -03:00
Liam Bowen
a32ad4331f Add documentation about wildcard includes
Resolves #1200
2015-10-01 18:46:49 +00:00
Lucas Hosseini
1f08865a10 Merge pull request #1125 from bf4/no_fail_coverage_by_platform
Simplify Windows platform identification in Gemfile
2015-09-24 01:01:14 +02:00
Benjamin Fleischer
bd80c1942b Simplify Windows platform identification
Platforms map available at https://github.com/bundler/bundler/blob/master/lib/bundler/dependency.rb
2015-09-24 00:31:21 +02:00
L. Preston Sego III
f2d0a918fe Merge pull request #1195 from beauby/fix-id-override
Fix id override
2015-09-23 17:24:35 -04:00
Lucas Hosseini
e552e4329b Fix. 2015-09-23 18:59:32 +02:00
Lucas Hosseini
359f290ddc Add failing test. 2015-09-23 18:59:18 +02:00
Lucas Hosseini
a54d237e28 Merge pull request #1182 from rails-api/update_changelog
Update CHANGELOG.md using `github-changes`
2015-09-21 20:37:59 +02:00
Lucas Hosseini
35473cf983 Merge pull request #1186 from bf4/empty_else
Enforce case requires else; allow else nil
2015-09-21 17:48:27 +02:00
Benjamin Fleischer
e9a15a3b80 Merge pull request #1187 from bf4/remove_dead_code
Remove dead code
2015-09-21 10:45:14 -05:00
Benjamin Fleischer
3f91015a7b Update CHANGELOG.md using github-changes
https://github.com/lalitkapoor/github-changes
2015-09-21 10:44:49 -05:00
Lucas Hosseini
606e2ae337 Merge pull request #1127 from NullVoxPopuli/support-nested-associations-for-json-adapter
Support nested associations for Json and Attributes adapters + Refactor Attributes adapter
2015-09-21 17:20:29 +02:00
Benjamin Fleischer
1d8a3d039a Enforce case requires else; allow else nil 2015-09-21 09:50:53 -05:00
Benjamin Fleischer
839d1ab21c Remove dead code 2015-09-21 09:41:54 -05:00
L. Preston Sego III
a74ea189cd Refactors of the Attribute adapter. Adds support for nested associations specified from the include key in the controller. Adds some tests and some method documentation 2015-09-21 10:35:47 -04:00
Benjamin Fleischer
bac43af0e6 Merge pull request #1175 from bf4/quiet_success_messages
Disable coverage/warnings output when passing in dev
2015-09-21 09:31:49 -05:00
L. Preston Sego III
8f2dd66710 Merge pull request #1183 from rails-api/block_style
Update Rubocop todo
2015-09-21 01:25:50 -05:00
L. Preston Sego III
94cee192a9 Merge pull request #1185 from beauby/fix-attributes-include
Fix options passing in Json and Attributes adapters
2015-09-21 00:48:16 -05:00
Benjamin Fleischer
0e433d3b64 Add debug tracing for JRuby code coverage 2015-09-21 00:44:51 -05:00
Benjamin Fleischer
076cf64ff3 Disable coverage/warnings output when passing in dev 2015-09-21 00:39:56 -05:00
Lucas Hosseini
4976837c31 Fix options passing in Json and Attributes adapters. 2015-09-21 07:13:17 +02:00
Lucas Hosseini
88785ea21e Add failing test. 2015-09-21 07:11:23 +02:00
Benjamin Fleischer
140b4f2735 Update Rubocop todo 2015-09-21 00:11:08 -05:00
Benjamin Fleischer
ca6b193fcb Enforce Rails-style (line-count-based) block style 2015-09-21 00:00:53 -05:00
L. Preston Sego III
aaa60bfdc1 Merge pull request #1158 from beauby/includes-wildcard
Add support for wildcards in nested includes
2015-09-20 23:45:06 -05:00
Lucas Hosseini
ac06013aeb Add support for wildcard includes + improve perfs on JsonApi includes. 2015-09-21 05:58:00 +02:00
Lucas Hosseini
ab1e2af349 Merge pull request #1138 from bf4/introduce_adapter_base
Introduce Adapter::Base
2015-09-20 21:37:06 +02:00
Benjamin Fleischer
19de5f7722 Introduce Adapter::Base
Breaking change:
- Adapters now inherit Adapter::Base
- 'Adapter' is now a module, no longer a class
Why?

- using a class as a namespace that you also inherit from is complicated and circular at time i.e.
  buggy (see https://github.com/rails-api/active_model_serializers/pull/1177)
- The class methods on Adapter aren't necessarily related to the instance methods, they're more
    Adapter functions
- named `Base` because it's a Rails-ism
- It helps to isolate and highlight what the Adapter interface actually is
2015-09-20 12:26:04 -05:00
L. Preston Sego III
7cf0e93d03 Merge pull request #1178 from bf4/opt_out_capturing_stderr_warnings
env CAPTURE_STDERR=false lets devs see hard failures
2015-09-18 16:11:20 -05:00
Benjamin Fleischer
2e7222323c env CAPTURE_STDERR=false lets devs see hard failures 2015-09-18 15:20:55 -05:00
L. Preston Sego III
7c82258b09 Merge pull request #1177 from bf4/remove_adapter_autoloads
Remove Adapter autoloads in favor of require
2015-09-18 14:56:16 -05:00
Benjamin Fleischer
ad2ca3b45c Remove Adapter autoloads in favor of require
Adapters must be eager loaded to ensure they are defined
before they are used as namespacing.

cf6a074a1c (diff-41f2b3509d33e1c65bb70ee0ec7a2eea)
2015-09-18 12:44:53 -05:00
L. Preston Sego III
a30913229f Merge pull request #1117 from bf4/remove_flatten_json_inheriting_json
FlattenJson adapter no longer inherits Json adapter, renamed to Attributes
2015-09-18 11:15:09 -05:00
Benjamin Fleischer
c6f8d0f5f2 Rename FlattenJson to Attributes (allow plural adapter names) 2015-09-18 10:17:02 -05:00
Benjamin Fleischer
ceef214f1e FlattenJson adapter no longer inherits Json adapter 2015-09-18 10:15:49 -05:00
L. Preston Sego III
24a5f3843e Merge pull request #1171 from shicholas/require_statements
add require statements to top of file
2015-09-18 02:27:23 -04:00
L. Preston Sego III
701eb17a27 Merge pull request #1172 from bf4/better_adapter_registration
Better serializer registration, get more than just the first module
2015-09-18 02:12:54 -04:00