28 Commits

Author SHA1 Message Date
Shuhei Kitagawa
e39de8c8c4 Enable to use block to define relationship 2018-05-06 10:26:38 -07:00
Shishir Kakaraddi
4523508c5b inherits attributes, relationships and other settings from parent serializer 2018-05-05 19:12:45 -07:00
Carlos Solares
fe5ecb5b28 Use the serializer_key directly if it is not a symbol in relationships (#198) 2018-05-01 10:15:43 -07:00
Brandon Buck
a585497161 Add in options[:scope] and receiving scope in attribute blocks (#153) 2018-05-01 09:58:01 -07:00
Dillon Welch
a29b2c6184 Use alias for belongs_to because code is the same
Addresses https://github.com/Netflix/fast_jsonapi/issues/73
2018-04-26 10:37:44 -07:00
Dillon Welch
5428820d73 Add extra variables to cache to_sym calls 2018-04-26 10:37:44 -07:00
Dillon Welch
5b65608142 Move more of the logic inside the hash method 2018-04-26 10:37:44 -07:00
Dillon Welch
1f6fca522e Compute relationship_hash on a separate line for clarity 2018-04-26 10:37:44 -07:00
Dillon Welch
e8f276c44f Get rid of unnecessary freezes 2018-04-26 10:37:44 -07:00
Dillon Welch
f0cc24ed06 DRY up ObjectSerializer code 2018-04-26 10:37:44 -07:00
Shuhei Kitagawa
4fdf5a221c Enable to set race_condition_ttl for cache_options 2018-04-08 22:53:31 -07:00
Shuhei Kitagawa
0d8bbedcdd Change transform_method to accessor 2018-03-29 17:22:51 -07:00
mnauage
ecd7bbc793 links key support 2018-03-18 22:31:02 -07:00
Shuhei Kitagawa
8f4e716153 Define set_id method 2018-03-18 08:29:13 -07:00
Shishir Kakaraddi
00e960f883 adds the use_hyphen feature back and adds a deprecation warning 2018-03-17 18:33:55 -07:00
Les Fletcher
2da0b5bd87 rework of AS Notifications 2018-03-12 22:46:41 -07:00
Shuhei Kitagawa
b4eaa04c09 Add frozen_string_literal: true 2018-03-12 22:20:48 -07:00
Sam Morgan
dfd215d3a1 91 allow includes strings (#93)
* add hash benchmarking to performance tests

* Add missing attribute in README example

* Disable GC before doing performance test

* Enable oj to AM for fair benchmark test

* add information on performance methodology

* add oss metadata

* Make an error that demonstrates [Issue

* Simple RSpec test that fails with a non-empty string but passes with a
non-empty symbol
* To run the test, rspec spec/lib/object_serializer_spec.rb

* Map includes to symbols if they are provided as strings

* Includes would fail with an ArgumentError unless they were explicitly
provided as symbols (see #97)
* This is solved by mapping the strings to symbols in the
ObjectSerializer initializer
* No real impact on performance here
2018-02-28 08:29:24 -08:00
Jay Hayes
95c136fa0f Add #to_hash conversion protocol to object serializer 2018-02-22 08:04:40 -08:00
Christopher Sansone
b30a53bc5f ability to customize rendering of attributes via a block (#54)
* add hash benchmarking to performance tests

* Add missing attribute in README example

* Disable GC before doing performance test

* Enable oj to AM for fair benchmark test

* ability to customize rendering of attributes via a block

* fixed attribute render spec

* minimized specs to specifially test this feature

* Update README to include attribute definitions

* Fixed syntax error

* Fixed merge issues
2018-02-09 08:59:07 -08:00
Roberto Quintanilla
6d516c217c Support for polymorphic associations (#64)
* add hash benchmarking to performance tests

* Add missing attribute in README example

* Disable GC before doing performance test

* Enable oj to AM for fair benchmark test

* Support for polymorphic associations

* Optional dictionary for polymorphic associations

* Added polymorphic record types memoization

* Updated performance tests for polymorphic examples to include jsonapi-rb
2018-02-08 22:18:46 -08:00
Benjamin Fleischer
b717ffeccf Let people choose their JSON serializer; JSON:API is not circular 2018-02-07 18:02:59 -08:00
Shishir Kakaraddi
a3a989244b initial commit to allow the same kind of key transforms as AMS 2018-02-05 21:06:57 -08:00
Shishir Kakaraddi
dbdc85a875 initial commit removing all the dependencies 2018-02-04 17:24:11 -08:00
Sergii Makagon
7f27543081 Refactoring 2018-02-04 17:12:18 -08:00
Benjamin Roth
088d655998 get rid of temp variables 2018-02-04 12:00:45 -08:00
Min.Kim
62e1419465 Move skylight to dev_dep and check whether loaded or not 2018-02-01 17:01:04 +00:00
Shishir Kakaraddi
5374a1378e initial commit 2018-01-31 16:20:40 -08:00