Commit Graph

40 Commits

Author SHA1 Message Date
Benjamin Fleischer
0ef6ac30fc Clear out master 2017-05-02 09:57:09 -05:00
Cassidy K
729882caaa Modifying gemspec to use grape v0.19.1 2017-04-16 10:03:43 -04:00
Jared Beck
1005aa60a9 Update version constraint for jsonapi-renderer
Currently (2017-02-20) the latest version is 0.1.2.

Why not use a version constraint like '~> 0.1.1'? Because
we know of no reason why 0.1.1.beta1 cannot still be used.
That said, we have done no research looking for such a reason.
2017-02-20 15:02:51 -05:00
Jared Beck
a081e4ffc4 jsonapi is deprecated, just use jsonapi-renderer
From the author of jsonapi:

> .. The jsonapi gem was previously just a bundle of jsonapi-serializer and jsonapi-renderer, and AMS is using only a helper class of jsonapi-renderer (namely JSONAPI::IncludeDirective). The AMS dependency was previously not properly pinned to a specific version, which I saw as a risk for many users, so I avoided updating this gem. Moreover, the name jsonapi being somewhat too generic for what this gem evolved into (namely jsonapi-rb, which bundles jsonapi-renderer and jsonapi-parser, along with serializers and deserializers, with tight integrations with various frameworks), I decided to stay away from it for fairness.
> TL;DR: Yes, people should use jsonapi-parser and jsonapi-renderer directly (or give a try to jsonapi-rb, depending on their needs).

We should also update jsonapi-renderer to the latest, currently 0.1.2, but I thought that should be a separate PR.
2017-02-17 17:01:22 -05:00
Pierre-Alexandre Kofron
9eacf9f3b7 Update jsonapi runtime dependency to 0.1.1.beta6 2016-12-16 18:00:49 +01:00
L. Preston Sego III
0422a1e772 Swap out KeyTransform for CaseTransform (#1993)
* delete KeyTransform, use CaseTransform

* added changelog
2016-12-07 10:49:38 -05:00
Lucas Hosseini
cb20b957ed Pin jsonapi version. (#1955) 2016-10-25 07:43:40 -04:00
Guilherme
586ad64be7 Make railties an optional dependency 2016-09-09 16:07:08 +02:00
Alexey Dubovskoy
f15f6850de re: RuboCop: Bulk minor style corrections 2016-06-20 22:12:16 +01:00
Lucas Hosseini
f48fd2a327 Extract IncludeTree. (#1685) 2016-05-28 10:07:11 -04:00
Ben Mills
4de8d8c16a Remove default key case change message (#1752) 2016-05-26 15:15:30 -04:00
Benjamin Fleischer
b089a7277d Correct ruby/rails version requirements in gemspec 2016-05-18 10:16:05 -05:00
Robin Mehner
a3fd209612 Fix link to key transforms doc in post install message 2016-04-05 10:12:45 +02:00
Ben Mills
3498647d1a Apply key transforms to keys referenced in values 2016-04-04 10:16:04 -06:00
Benjamin Fleischer
638e8853cc Remove annoying progress reporter 2016-03-26 19:27:33 -05:00
Eric Guo
1a881e7c15 Rake 11.1.1 fix JRuby issue.
https://github.com/ruby/rake/pull/121

Revert "Revert "Safe to using rake 11.0.1 now.""

This reverts commit 82cbe66443.
2016-03-14 13:01:14 +08:00
Benjamin Fleischer
fa0bc9567d Restrict rake dep to 10.x for now; 11.x breaks 2016-03-12 23:27:10 -06:00
Benjamin Fleischer
82cbe66443 Revert "Safe to using rake 11.0.1 now." 2016-03-12 23:15:42 -06:00
Eric Guo
5927f73caf Safe to using rake 11.1.0 2016-03-12 09:46:26 +08:00
Benjamin Fleischer
4cc454d49b Setup benchmarking structure
- Setup dummy app files in `test/dummy`
- Setup dummy test server `bin/serve_dummy
  - Note:  Serializer caching can be completely disabled by passing in
  `CACHE_ON=off bin/serve_dummy start` since Serializer#_cache is only
  set at boot.
- run with
  - ./bin/bench
  - `bin/bench` etc adapted from ruby-bench-suite
  - target files are `test/dummy/bm_*.rb`. Just add another to run it.
  - benchmark cache/no cache
  - remove rake dependency that loads unnecessary files
- remove git gem dependency
  - Running over revisions to be added in subsequent PR
2016-03-09 12:42:25 -06:00
Ben Mills
7f29683cb6 Pin rake to < 11.0
https://stackoverflow.com/questions/35893584/nomethoderror-undefined-method-last-comment-after-upgrading-to-rake-11/35893625#35893625
2016-03-09 08:33:29 -07: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
Mauro George
5058694f4a Create assert_response_schema test helper
It is a common pattern to use JSON Schema to validate a API response[1], [2]
and [3].

This patch creates the `assert_response_schema` test helper that helps people do
this kind of validation easily on the controller tests.

[1]: https://robots.thoughtbot.com/validating-json-schemas-with-an-rspec-matcher
[2]: https://github.com/sharethrough/json-schema-rspec
[3]: https://github.com/rails-api/active_model_serializers/issues/1011#issuecomment-127608121
2016-01-15 00:45:56 -06:00
Benjamin Fleischer
fce856fc83 Merge pull request #1371 from bf4/documentation_updates
[DOCS] Refactor, update, create documentation
2015-12-20 22:30:44 -06:00
Benjamin Fleischer
dff607dc41 Merge pull request #1336 from johnhamelink/master
Grape formatter feature requested in #1258 - Rebased and Repushed (#1273)
2015-12-17 20:31:38 -06:00
Benjamin Fleischer
ce17a1b305 [DOCS] Refactor, update, create documentation [ci skip] 2015-12-14 14:38:29 -06:00
Mauro George
488370fc0b Drop support to Ruby 1.9.3 2015-12-14 14:18:29 -06:00
Julian Paas
d85a17bb33 Grape formatter feature requested in #1258
- adds handling for when the returned resource is not serializable via ams
 - fix for when resource is an Array
 - Moves grape include to grape namespace. Changes Enumerable to Array because a plain hash is enumerable.
 - Add integration test
 - Refine scope of Grape version dependency
 - Assert that the response is equal to a manually defined JSON string
 - Add single module to include in Grape projects
 - Create a Serializable Resource to test rails-api from Grape
 - Update docs
 - Fix discrepency between ActiveRecord 4.0 - 4.1 and 4.2
 - Updated Changelog
 - Remove parens from `render`, use `serializable` in all tests.
2015-12-10 10:06:40 +00:00
Benjamin Fleischer
7d707aabdc Update Gemfile/gemspec dependencies for Rails 5/master 2015-11-25 21:56:01 -06:00
João M. D. Moura
1ca73e0c33 updating version to new release 2015-09-16 12:19:44 -03:00
Benjamin Fleischer
228cc1c92a Rubocop: Consistent spacing 2015-09-03 20:51:40 -05:00
Benjamin Fleischer
e3d3d92201 Clarify AMS dependencies 2015-08-30 22:26:25 -05:00
Bruno Bacarini
e040d6fcce add action test to pagination links 2015-08-18 19:04:02 -03:00
Rodrigo Ra
7412c8d1c8 Fix transient tests failures 2015-06-26 09:33:53 -03:00
Guillermo Iguaran
771e9edccb Require only activemodel instead of full rails 2014-09-29 15:46:57 -05:00
Steve Klabnik
729a823868 Getting started: attributes.
Super super basic collection of attributes. Nothing fancy.
2014-07-09 16:16:39 -04:00
Steve Klabnik
e021281eef Remove Rails 3.2 support for now.
It is impossible to run our tests on both Rails 3.2 and Rails 4:

1. Rails 3.2 relies on test/unit, which is MiniTest 4.
2. Rails 4 relies on MiniTest 5.
3. MiniTest 5 is not compatible with test/unit.

😢 😢 😢
2014-07-05 13:12:10 -04:00
Steve Klabnik
a5107b32e2 Set up the test helper and Gemfile.
Now Travis will build across all the Rails-es.
2014-07-05 12:03:48 -04:00
Steve Klabnik
8a20377239 Set up gemspec, version, and .travis.yml 2014-07-05 00:56:57 -04:00
Steve Klabnik
c718915075 Generate a basic gem 2014-07-05 00:53:48 -04:00