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
L. Preston Sego III
e0a0ad3e46
Merge pull request #1167 from rails-api/simplify_serializer_attributes
...
Delegate Serializer.attributes to Serializer.attribute
2015-09-18 01:24:45 -04:00
L. Preston Sego III
95cbebc47d
Merge pull request #1174 from bf4/correct_json_api_naming
...
Consistently refer to the 'JSON API' and the 'JsonApi' adapter
2015-09-18 01:13:23 -04:00
Nicholas Shook
7f17ec8afa
bring back autoload - fix test
2015-09-17 22:03:22 -07:00
Benjamin Fleischer
eb1264ad99
Better serializer registration, get more than just the first module
...
But is potentially breaking anyone on rc3, but the fix is just
to manually register the adapter with the rc3-style name
2015-09-17 23:33:04 -05:00
Benjamin Fleischer
484426ce17
Delegate Serializer.attributes to Serializer.attribute
2015-09-17 22:11:57 -05:00
Nicholas Shook
444b4cd1d8
all require
2015-09-17 14:06:55 -07:00
Nicholas Shook
faa56482d1
full require
2015-09-17 14:06:55 -07:00
Nicholas Shook
6bdb4a13e2
removed autoload statements
2015-09-17 14:06:54 -07:00
Nicholas Shook
a9e3143c19
add require statements to top of file
...
Based on
https://github.com/rails-api/active_model_serializers/issues/1170#issuecomment-141184047
2015-09-17 14:06:54 -07:00
Benjamin Fleischer
0091be89f8
Consistently refer to the 'JSON API' and the 'JsonApi' adapter
2015-09-17 15:22:28 -05:00
L. Preston Sego III
ee40e9fcef
Merge pull request #1173 from bf4/comment_private_reader_warnings
...
Comment private accessor warnings
2015-09-17 15:35:45 -04:00
Benjamin Fleischer
c9ae868bfb
Comment private accessor warnings
2015-09-17 14:32:22 -05:00
L. Preston Sego III
61c54bddcd
Merge pull request #1166 from rails-api/clarify_options_variable
...
Prefer methods over instance variables
2015-09-17 15:14:01 -04:00
Benjamin Fleischer
9d65f0adc5
Distinguish options ivar from local; Extract latent Adapter::CachedSerializer
2015-09-17 10:45:09 -05:00
Benjamin Fleischer
3f0794bd39
Merge pull request #1168 from bf4/fix_appveyor
...
Fix appveyor failure cache not being expired
2015-09-17 10:05:40 -05:00
Benjamin Fleischer
c43e8e2a32
Fix or skip appveyor failure on cache expiration
2015-09-17 09:30:29 -05:00
L. Preston Sego III
a60e1ea82e
Merge pull request #1161 from bf4/remove_duplicate_test_helper
...
Remove duplicate test helper
2015-09-17 07:46:57 -04:00
João Moura
47a846d2d5
Fixing the travis build svg to amster
2015-09-16 12:40:53 -03:00
João M. D. Moura
1ca73e0c33
updating version to new release
2015-09-16 12:19:44 -03:00
Benjamin Fleischer
26277ea1f9
Remove duplicate test helper
2015-09-16 08:54:33 -05:00
L. Preston Sego III
610775a95f
Merge pull request #1129 from bf4/remove_serializable_resource_serialize
...
Remove SerializableResource.serialize in favor of `.new`
2015-09-15 17:32:44 -04:00
L. Preston Sego III
2111ae8ec4
Merge pull request #1155 from CodedBeardedSignedTaylor/documentation
...
Outside controller use tutorial
2015-09-15 17:08:20 -04:00
Terminator3
173f21d942
outside controller use tutorial
2015-09-15 15:55:35 -05:00
João Moura
0c42e32499
Merge pull request #1154 from NullVoxPopuli/rubocop-fixes
...
Rubocop fixes for issues introduced by #1089
2015-09-15 15:59:38 -03:00
L. Preston Sego III
a34cb998c7
rubocop-fixes
2015-09-15 14:58:04 -04:00