L. Preston Sego III
bd2939db44
Merge pull request #1567 from bf4/remove_ci_rbx
...
Remove rbx from CI. Allowing failures is just wasting resources
2016-03-09 07:57:29 -05:00
Benjamin Fleischer
3e63596423
Remove rbx from CI. Allowing failures is just wasting resources
...
Breaks too often.
Happy to re-add if someone want to take charge of keeping it green.
2016-03-08 23:01:43 -06:00
L. Preston Sego III
7ab39bed85
Merge pull request #1565 from groyoh/refactor_fragment_cache
...
Refactor fragment cache methods
2016-03-08 21:08:45 -05:00
Yohan Robert
efb09051ea
Refactor fragment cache methods
...
Removed extra calls to constantize and DRY'd the code.
2016-03-08 23:51:10 +01:00
L. Preston Sego III
f8d2aabf38
Merge pull request #1560 from groyoh/update_rubocop
...
Update rubocop
2016-03-08 17:24:39 -05:00
Yohan Robert
666dae89c6
Add entry in CHANGELOG for #1560
2016-03-08 22:35:48 +01:00
Benjamin Fleischer
464acd2e78
Update rubocop todos
2016-03-08 22:32:34 +01:00
Benjamin Fleischer
68d5233b31
Address rubocop warnings
2016-03-08 22:32:34 +01:00
Benjamin Fleischer
a26d3e4425
Rubocop autocorrect
2016-03-08 22:32:34 +01:00
Benjamin Fleischer
ec36ab7f60
Update Rubocop
2016-03-08 22:32:34 +01:00
Ben Mills
c97a80db95
Merge pull request #1564 from NullVoxPopuli/organize-badges
...
organize badges
2016-03-08 13:20:11 -07:00
L. Preston Sego III
08d3160ded
Organize the badges
...
styling updates
remove styles, as github doesn't allow them
2016-03-08 13:17:46 -05:00
L. Preston Sego III
f46890820d
Merge pull request #1551 from korzonek/master
...
add codebeat badge - need a badge organization PR
2016-03-08 11:52:41 -05:00
L. Preston Sego III
2acea0b0b2
Merge pull request #1561 from groyoh/update_changelog
...
Add entry in CHANGELOG for #1545
2016-03-08 08:42:18 -05:00
Yohan Robert
f69450f5db
[skip ci] Add entry in CHANGELOG for #1545
2016-03-08 14:13:28 +01:00
L. Preston Sego III
b3c6c7eadd
Merge pull request #1496 from nadavshatz/add-jruby-to-ci
...
Run all branches against JRuby on CI
2016-03-08 07:26:20 -05:00
Ben Mills
1aa64f2ac3
Merge pull request #1550 from remear/url-helpers
...
Add Rails url_helpers
2016-03-07 14:53:59 -07:00
Ben Mills
cc10928472
Provide Rails url_helpers via SerializationContext
2016-03-07 10:40:34 -07:00
Nadav Shatz
84b87e7d92
Run all branches against JRuby on CI
2016-03-07 11:41:37 -05:00
L. Preston Sego III
3ba5254a46
Merge pull request #1559 from groyoh/deperecation_dsl
...
Deperecation dsl
2016-03-07 09:36:37 -05:00
Yohan Robert
8dfbc4818d
Simplify adapter deprecation and delegation
...
The Adapter module was refactored a bit to use Active Support delegation
and remove duplicated code.
The CHANGELOG was also added.
2016-03-07 15:09:09 +01:00
Benjamin Fleischer
1a312bc2d3
Merge pull request #1545 from CodedBeardedSignedTaylor/1506-document-passing-arbitrary-options-to-serializer
...
[DOCS] 1506 document passing arbitrary options to serializer
2016-03-07 01:09:50 -06:00
Benjamin Fleischer
b50195fde7
Add a deprecation DSL
2016-03-07 01:07:06 -06:00
Benjamin Fleischer
6b4c8df6fb
Clean up test deprecation warnings
2016-03-06 23:35:22 -06:00
Benjamin Fleischer
5d7a1a4889
Remove the last of ApiObjects
2016-03-06 23:24:53 -06:00
Benjamin Fleischer
e30b2a4417
Merge branch 'groyoh-follow_up_1535'
...
Needs followup
- way we deprecate classes to be generalized
- initialize old json api https://github.com/rails-api/active_model_serializers/pull/1543#discussion_r54368858
- consider restoring ensure https://github.com/rails-api/active_model_serializers/pull/1543#discussion_r54368925
2016-03-06 23:15:46 -06:00
Yohan Robert
dd94fe2163
Follow up to #1535
...
- The removed classes and modules were added back with deprecation
warning and deprecation test were added for them.
- One test was renamed because it contained `__`.
- Some tests were refactored.
- The ActiveModelSerializers::Deserialization module is now called
Adapter instead of ActiveModelSerializers::Adapter.
- The changelog was added for #1535
2016-03-06 23:15:39 -06:00
L. Preston Sego III
79e6acbc4a
Merge pull request #1004 from bf4/json_api_errors
...
JSON API Errors (Initial implementation and roadmap for full feature-set)
2016-03-06 22:09:18 -05:00
NullVoxPopuli
d03db81070
add an extra format token to the primary data string so that JRuby doesn't break
2016-03-06 20:05:25 -06:00
Benjamin Fleischer
e6ae34b84c
Update documentation with Yard links
2016-03-06 20:05:25 -06:00
Benjamin Fleischer
3d986377b6
Collapse JSON API success/failure documents in one adapter
...
Idea per remear (Ben Mills) in the slack:
https://amserializers.slack.com/archives/general/p1455140474000171
remear:
just so i understand, the adapter in `render json: resource, status: 422, adapter: 'json_api/error',
serializer: ActiveModel::Serializer::ErrorSerializer` is a different one than, say what i’ve
specified in a base serializer with `ActiveModel::Serializer.config.adapter = :json_api`. correct?
and a followup question of, why not same adapter but different serializer?
me:
With the way the code is written now, it might be possible to not require a special jsonapi adapter.
However, the behavior is pretty different from the jsonapi adapter.
this first draft of the PR had it automatically set the adapter if there were errors. since that
requires more discussion, I took a step back and made it explicit for this PR
If I were to re-use the json api adapter and remove the error one, it think the serializable hash
method would look like
```
def serializable_hash(options = nil)
return { errors: JsonApi::Error.collection_errors } if serializer.is_a?(ErrorsSerializer)
return { errors: JsonApi::Error.resource_errors(serializer) } if serializer.is_a?(ErrorSerializer)
options ||= {}
```
I suppose it could be something more duckish like
```
def serializable_hash(options = nil)
if serializer.errors? # object.errors.any? || object.any? {|o| o.errors.any? }
JsonApi::Error.new(serializer).serializable_hash
else
# etc
```
2016-03-06 12:03:17 -06:00
Benjamin Fleischer
96107c56aa
Require explicit adapter/serializer to render JSON API errors
...
- Separate collection errors from resource errors in adapter
- Refactor to ErrorsSerializer; first-class json error methods
- DOCS
- Rails 4.0 requires assert exact exception class, boo
2016-03-06 12:03:17 -06:00
Benjamin Fleischer
dfe162638c
Generalize detection of serializable resource with errors
2016-03-06 12:03:17 -06:00
Benjamin Fleischer
0ba944dabf
RFC: Json Api Errors (WIP)
...
- ActiveModelSerializers::JsonPointer
- ActiveModel::Serializer::Adapter::JsonApi::Error
- ActiveModel::Serializer::Adapter::JsonApi::Error.attributes
- Fix rubocop config
2016-03-06 12:03:14 -06:00
Taylor Jones
48f8a892e6
a little bit more trimming
2016-03-04 11:14:43 -05:00
Taylor Jones
60a207bb0d
wrong link
2016-03-04 11:12:09 -05:00
Taylor Jones
32c6bccec7
edits and rearranging logic
2016-03-04 11:09:38 -05:00
Benjamin Fleischer
df815c48ba
Merge pull request #1544 from groyoh/remove_design
...
[DOC] Removes DESIGN.textile doc and update ARCHITECTURE.md [ci skip]
2016-03-03 13:31:10 -06:00
Tomasz Korzeniowski
eac5622873
codebeat badge
...
Is it fine to add codebeat badge to README?
codebeat is automated code review tool for Swift, Ruby & Go that helps get instant feedback on code quality.
"Quick wins" suggested by codebeat could be a nice candidate for a pull request and help other developers become contributors.
FYI. To be fully open and honest. I'm co-founder of codebeat.
2016-03-02 11:12:52 +01:00
Taylor Jones
da55cd181c
addressing comments / concerns
2016-03-01 08:40:45 -05:00
Taylor Jones
e9f259697a
addressing pull request comments
2016-02-29 10:56:14 -05:00
CodedBeardedSignedTaylor
6a8da1f664
adding ruby tag to code blocks
2016-02-28 22:45:45 -05:00
bobba surendranath chowdary
8b5da690fe
Removes DESIGN.textile doc and update ARCHITECTURE.md
...
The old DESIGN.textile was removed and replace by reference to 0.8 and
0.9 READMEs within the ARCHITECTURE.md docs.
2016-02-29 04:41:47 +01:00
CodedBeardedSignedTaylor
558769981e
rough draft
2016-02-28 22:41:26 -05:00
Yohan Robert
8a040052af
Merge pull request #1535 from bf4/domitian-move-namespace-of-adapter-to-active-model-serializers
...
Moved the adapter and adapter folder to active_model_serializers folder and changed the module namespace
2016-02-28 12:58:36 +01:00
Benjamin Fleischer
3975e3642a
Merge pull request #1542 from bf4/rake_isolated_shellescape
...
Escape paths in rake isolated for directory with spaces and parens
2016-02-26 14:38:20 -06:00
Benjamin Fleischer
042ec38b40
Escape paths in rake isolated for directory with spaces and parens
2016-02-26 14:14:00 -06:00
Ben Mills
b2314017c6
Fix GitHub template formatting and spelling
2016-02-26 11:24:57 -07:00
Ben Mills
3af7ae2eb4
Merge pull request #1530 from bf4/gh_templates
...
Simplify contributing.md; move details into GitHub templates
2016-02-26 11:17:37 -07:00
Ben Mills
5d9039e172
Adjust GitHub templates
2016-02-26 10:43:52 -07:00