Commit Graph

1098 Commits

Author SHA1 Message Date
Brian McManus
d67f7da114 Preserve the serializer type when fragment caching
We were not previously cloning the type setting into the dynamically
generated cached/non-cached serializers for a given fragment-cached
serializer. This led to the type generated for JsonApi having the wrong
value when fragment caching is enabled by adding either :except or :only
options to cache.

This pulls the type setting from the fragment-cached serializer forward
onto the dynamic caching classes so it is preserved in the output.
2016-02-09 22:35:32 -06:00
Benjamin Fleischer
2789cc5221 Test CachedSerializer#fragment_cached? 2016-02-09 22:31:59 -06:00
Benjamin Fleischer
4974295ee0 Merge branch 'CheckMateIO-bugfix/fix-fragment-cached-check'
Remaining issues:
- Changelog
- Test
2016-02-09 22:01:01 -06:00
Benjamin Fleischer
eedf0b64a4 Merge pull request #1505 from bf4/simplecov_fix
Update SimpleCov; remove compatibility patch
2016-02-09 21:55:03 -06:00
Benjamin Fleischer
7b98cf3e36 Update SimpleCov; remove compatibility patch
Also, SimpleCov.start already called
   SimpleCov.pid = Process.pid
So, no need for that
2016-02-09 20:59:31 -06:00
Benjamin Fleischer
fe6d2da46f Add missing changelog for #1454 [ci skip] 2016-02-08 18:17:33 -06:00
Benjamin Fleischer
1cc2e04cf6 Address issues in 50950d9533 #1340
- Add changelog entry
- Remove superseded and incorrect tests
- Fix array serialization test
2016-02-08 18:14:25 -06:00
Benjamin Fleischer
50950d9533 Merge branch 'beauby-resource-level-meta'
Followup concerns:
- https://github.com/rails-api/active_model_serializers/pull/1340/files#r47451387
- https://github.com/rails-api/active_model_serializers/pull/1340/files#r48116963
- https://github.com/rails-api/active_model_serializers/pull/1340#discussion_r47451387
- https://github.com/rails-api/active_model_serializers/pull/1340#issuecomment-164306882
- https://github.com/rails-api/active_model_serializers/pull/1340#issuecomment-166202978
- https://github.com/rails-api/active_model_serializers/pull/1340#issuecomment-173028896
2016-02-08 18:00:51 -06:00
Benjamin Fleischer
5b953ff40f Address concerns from #1018 commit c59668e 2016-02-08 17:55:15 -06:00
Benjamin Fleischer
c59668e7a8 Merge branch 'leandrocp-add-top-level-links'
Needs followup
- https://github.com/rails-api/active_model_serializers/pull/1018#discussion_r51733900
- https://github.com/rails-api/active_model_serializers/pull/1018#discussion_r51734779
- https://github.com/rails-api/active_model_serializers/pull/1018#discussion_r51735145
- https://github.com/rails-api/active_model_serializers/pull/1018#discussion_r51735218
2016-02-08 17:44:05 -06:00
Benjamin Fleischer
dcbe4ef9e2 Rubocop autocorrect indentation 2016-02-08 17:39:45 -06:00
Benjamin Fleischer
e51597480a Merge branch 'beauby-association-blocks'
Has Rubocop failures to be fixed in next commit.
2016-02-08 17:37:31 -06:00
Benjamin Fleischer
020db79a09 Merge pull request #1501 from domitian/testcases-documentation-fix
Added testcases for serializable_resource and fixed a documentation error regarding adapter key constant
2016-02-08 12:31:56 -06:00
bobba surendranath chowdary
68f09e59c4 Fixed a documentation error regarding adapter key constant, added tests
for SerializableResource::use_adapter?
2016-02-08 15:27:56 +05:30
Benjamin Fleischer
a18c99fe87 Fix typo in changelog link ref [ci skip] 2016-02-07 22:19:24 -06:00
CorainChicago
6de1e9b328 update changelog 2016-02-05 08:44:40 -06:00
CorainChicago
69c0338663 add JRuby 9000 to appveyor.yml
add JRuby 9000 to appveyor.yml
2016-02-04 22:35:04 -06:00
Benjamin Fleischer
f32c0d97d5 Merge pull request #1491 from domitian/fix-documentation-links-in-readme
[DOCS] Changed the yardoc link in README.md for documentation to v.10.4
2016-02-04 15:21:31 -06:00
Benjamin Fleischer
6b50b5d92f Merge pull request #1493 from ScottKbka/patch-1
Update readme.md to link to v0.10.0.rc4
2016-02-03 09:28:28 -06:00
Leandro Cesquini Pereira
b55fc32ba2 improve doc as suggested by @bf4 2016-02-03 10:22:17 -02:00
Leandro Cesquini Pereira
37e4f1c30c Update top-level link with PR #1247
update according rubocop rules
2016-02-03 10:16:22 -02:00
Leandro Cesquini Pereira
1844c162f1 Adds support for top-level links to JsonApi adapter
http://jsonapi.org/format/#document-top-level

fix failing tests

support for top-level links limited to jsonapi adapter

Move docs from README to docs/ dir

move links to json-api adapter & create Links class to hold links data
2016-02-03 10:16:22 -02:00
bobba surendranath chowdary
7c26c1e09f Changed the yardoc link, and removed the changes to made to documentation links 2016-02-03 11:32:51 +05:30
Scott Kobewka
a86227d4ee Update readme.md to link to v0.10.0.rc4 2016-02-02 16:24:34 -05:00
bobba surendranath chowdary
211646b007 Changed the yardoc links,as old links are not taking to documentation pages,proper links for 0.10,0.9 and 0.8 in rubydoc 2016-02-02 22:39:53 +05:30
Benjamin Fleischer
72c2c9f0d7 Merge pull request #1447 from beauby/jsonapi-refactor-2016
[PERF] Refactor JsonApi adapter to avoid redundant computations.
2016-02-02 10:10:47 -06:00
Benjamin Fleischer
0edf48845b Merge pull request #1488 from nate00/require-active-support-string-inflections
[FIX] Require ActiveSupport's string inflections
2016-01-31 16:02:29 -06:00
Nate Sullivan
3c1fe0fd0f Require ActiveSupport's string/inflections
We depend on string/inflections to define String#underscore.
2016-01-31 13:45:58 -08:00
Karel Ledru-Mathe
310c754587 Simplify CONTRIBUTING.md for filling an issue 2016-01-29 12:09:33 -05:00
Benjamin Fleischer
f5ec8ed9d4 Reset Changelog [ci skip] 2016-01-28 21:02:40 -06:00
Benjamin Fleischer
7f261958b6 Merge pull request #1481 from wagenet/patch-2
Namespace is included in auto-registered adapters
2016-01-28 17:49:13 -06:00
Peter Wagenet
efdd466147 Namespace is included in auto-registered adapters [ci skip] 2016-01-28 15:48:18 -08:00
Benjamin Fleischer
592a5db96e Merge pull request #1479 from wagenet/patch-1
Adapters inherit from Adapter::Base
2016-01-28 16:53:19 -06:00
Peter Wagenet
75fdbfa992 Adapters inherit from Adapter::Base 2016-01-28 14:27:53 -08:00
Brian McManus
3a092c9b4b Fixed fragment_cached? method to check if caching
I noticed that fragment caching does not actually check if caching is
enabled as it seemingly should.

The way CachedSerializer#fragment_cached? worked previously would return
true even in an environment where caching was disabled as defined by
`ActiveModelSerializers.config.perform_caching`.

Added check for `_cache` like in the `cached?` method before checking
whether `_cache_only` or `_cache_except` is set.

There were no existing tests for any of these methods but it's a pretty
trivial change.
2016-01-28 13:47:17 -08:00
Benjamin Fleischer
7d4f47d4a2 Add an RFC template 2016-01-28 12:59:57 -06:00
Benjamin Fleischer
65093055d6 Merge pull request #1310 from maurogeorge/patch-12
RFC: Primary namespace: ActiveModel::Serializer, ActiveModel::Serializers, vs. ActiveModelSerializers
2016-01-28 12:54:52 -06:00
Edwin Lunando
2678896a9c update JSON adapter pagination links 2016-01-28 13:51:19 +07:00
João M. D. Moura
58ff7535b7 releaseing new version RC4 2016-01-27 10:03:01 -05:00
Lucas Hosseini
790efee9c3 Merge pull request #1467 from dgynn/pr_configure_generators
Ensure that generators get configured correctly
2016-01-26 18:16:13 +01:00
Alexandre de Oliveira
dfd22ad860 Merge pull request #1444 from bf4/serializer_prehistory
Why rails renderers are only sentinels for a method; not lookups [ci skip]
2016-01-25 19:57:41 -02:00
Alexandre de Oliveira
ef58efdf73 Merge pull request #1418 from brigade/collection-pluralize
Don't pluralize the CollectionSerializer#root for #json_key
2016-01-25 19:46:47 -02:00
Dave Gynn
b1b3e9fb6a ensure that generators get configured correctly 2016-01-25 09:01:25 -08:00
Lucas Hosseini
2df8804047 Merge pull request #1459 from joyvuu-dave/update_readme
Update Readme to reflect AMS is no longer default in Rails 5
2016-01-24 22:02:02 +01:00
Lucas Hosseini
b34d53287e Merge pull request #1462 from nate00/attribute-overriding--update-docs
Update attribute/association overriding docs
2016-01-24 22:00:31 +01:00
Nate Sullivan
0a937a0fba Use new block-based attribute override in docs 2016-01-23 18:59:18 -08:00
Nate Sullivan
da85d944d4 Remove unrelated code from attribute override examples 2016-01-23 18:50:18 -08:00
Dave Riddle
40553258af updates Readme to reflect AMS is no longer included by default in Rails 5 2016-01-22 23:18:15 -08:00
Lucas Hosseini
061f1c0f59 Add support for relationship-level links and meta. 2016-01-21 02:36:54 +01:00
Lucas Hosseini
701404f757 Clean up meta handling. 2016-01-20 01:00:14 +01:00