Commit Graph

1699 Commits

Author SHA1 Message Date
Wasif Hossain
fae99ee08a
Merge pull request #2428 from jpawlyn/0-10-stable
Relax gem requirement to allow Rails 7
2022-01-03 22:56:39 +06:00
Jolyon Pawlyn
c91c7892dc Add ruby 3.1 and rails 7.0 to ci matrix 2021-12-28 20:26:01 +00:00
Jolyon Pawlyn
169d210187 Make Rails 7 hack specific to test controller that needs it 2021-12-28 09:08:06 +00:00
Jolyon Pawlyn
5d64851ad0 Prevent the clearing of instance variables after each test request with Rails 7 2021-12-16 15:21:02 +02:00
Jolyon Pawlyn
c1acc24b31 Rollback redundant travis change 2021-12-16 13:01:15 +02:00
Jolyon Pawlyn
b6d2c8f048 Action review comments 2021-12-16 12:59:14 +02:00
Jolyon Pawlyn
ba2ee99a7c Relax gem requirement to allow Rails 7 2021-12-16 09:15:31 +02:00
Wasif Hossain
669b0a3347
Merge pull request #2423 from sikachu/0-10-stable-relax-rails
Relax gem requirement for Rails 7.0 prerelease
2021-07-12 16:19:44 +06:00
Prem Sichanugrist
9a78a78b72 Relax gem requirement for Rails 7.0 prerelease 2021-07-12 18:48:42 +09:00
Wasif Hossain
01c0d69560
Merge pull request #2412 from tashirosota/v0.10/add_raise_cannot_infer_root_key_error_option
Add raise_cannot_infer_root_key_error to config
2021-03-03 12:54:37 +06:00
tashiro
7a80f98e2d
Merge branch '0-10-stable' into v0.10/add_raise_cannot_infer_root_key_error_option 2021-02-11 20:25:15 +09:00
Tashiro
8fe1aee255 add raise_cannot_infer_root_key_error to config 2021-02-11 20:14:14 +09:00
Benjamin Fleischer
f495f44889
Merge pull request #2253 from zvkemp/disable-logging-docs
[docs] disable logger via /dev/null instead of AS::N.unsubscribe
2021-01-26 16:48:16 -06:00
Wasif Hossain
8f38571ed9
Merge pull request #2399 from hyli-inc/0-10-stable
Handle edge case where requested current_page > total_pages in JSONAPI
2021-01-03 11:58:26 +06:00
Gregory Ray
e2f48b5067 adding #2399 to CHANGELOG.md 2021-01-02 15:57:27 -08:00
Gregory Ray
c954d39f35 adding #2399 to CHANGELOG.md 2021-01-02 15:55:36 -08:00
Gregory Ray
023085eaa6 Merge branch '0-10-stable' of github.com:merlsoft/active_model_serializers into 0-10-stable 2021-01-02 15:24:04 -08:00
Gregory Ray
1f2da3f644 adding #2399 to CHANGELOG.md 2021-01-02 15:23:49 -08:00
Gregory Ray
863a530b34
Merge branch '0-10-stable' into 0-10-stable 2021-01-02 15:12:35 -08:00
Wasif Hossain
cc2972150f
Merge pull request #2405 from rails-api/trigger-workflow-on-PR
Trigger github actions workflow on pull request
2021-01-03 05:09:24 +06:00
Wasif Hossain
1f3a4dd49f
Trigger github actions workflow on pull request
default activity types: [opened, synchronize, reopened]

doc: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#pull_request
2021-01-03 04:52:15 +06:00
Gregory Ray
1bbd7283ce this fixes a bug where an invalid next link appears if the current page is greater than total_pages
adding tests

fixing rubocop violation
2021-01-02 10:52:12 -08:00
Benjamin Fleischer
60ba54a3b0
Set up GitHub actions CI (#2403)
* Set up GitHub actions CI
* Remove simplecov entirely for now
* Fix deprecations
* Relax dev deps
* Address Rails 6.0 blocking hosts
* Rails 6.1 content type changed to application/json; charset=utf-8
* Test a few more rubies and rails
* Stop testing grape. We should drop grape support

```
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.6.0/gems/grape-0.19.0/lib/grape/error_formatter.rb:16: warning: in `formatters': the last argument was passed as a single Hash
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.6.0/gems/grape-0.19.0/lib/grape/error_formatter.rb:21: warning: although a splat keyword arguments here
Run options: --seed 23470

..........................................................................................................................................................................................................................................................................................................................................................................................................................................E

ActiveModelSerializers::GrapeTest#test_render_helper_passes_through_options_correctly:
NoMethodError: undefined method `[]' for nil:NilClass

bin/rails test /home/runner/work/active_model_serializers/active_model_serializers/test/grape_test.rb:126

W, [2020-12-29T02:27:48.991413 #2790]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#size defined in Hash. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
W, [2020-12-29T02:27:48.991505 #2790]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#size defined in Hash. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
W, [2020-12-29T02:27:48.991581 #2790]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#size defined in Hash. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
W, [2020-12-29T02:27:48.991625 #2790]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#size defined in Hash. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
E

Error:
ActiveModelSerializers::GrapeTest#test_implicit_formatter_handles_collections:
NoMethodError: undefined method `[]' for nil:NilClass

bin/rails test /home/runner/work/active_model_serializers/active_model_serializers/test/grape_test.rb:185

...............................................................................................................................................

Finished in 2.052241s, 280.6688 runs/s, 473.6285 assertions/s.
576 runs, 972 assertions, 0 failures, 7 errors, 0 skips
rake aborted!
Command failed with status (1): [ruby -w -I"lib:lib:test" -r./test/test_helper.rb  -w -I"/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib" "/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb" "test/action_controller/adapter_selector_test.rb" "test/action_controller/explicit_serializer_test.rb" "test/action_controller/json/include_test.rb" "test/action_controller/json_api/deserialization_test.rb" "test/action_controller/json_api/errors_test.rb" "test/action_controller/json_api/fields_test.rb" "test/action_controller/json_api/linked_test.rb" "test/action_controller/json_api/pagination_test.rb" "test/action_controller/json_api/transform_test.rb" "test/action_controller/lookup_proc_test.rb" "test/action_controller/namespace_lookup_test.rb" "test/action_controller/serialization_scope_name_test.rb" "test/action_controller/serialization_test.rb" "test/active_model_serializers/adapter_for_test.rb" "test/active_model_serializers/json_pointer_test.rb" "test/active_model_serializers/logging_test.rb" "test/active_model_serializers/model_test.rb" "test/active_model_serializers/test/schema_test.rb" "test/active_model_serializers/test/serializer_test.rb" "test/active_record_test.rb" "test/adapter/attributes_test.rb" "test/adapter/deprecation_test.rb" "test/adapter/json/belongs_to_test.rb" "test/adapter/json/collection_test.rb" "test/adapter/json/fields_test.rb" "test/adapter/json/has_many_test.rb" "test/adapter/json/transform_test.rb" "test/adapter/json_api/belongs_to_test.rb" "test/adapter/json_api/collection_test.rb" "test/adapter/json_api/errors_test.rb" "test/adapter/json_api/fields_test.rb" "test/adapter/json_api/has_many_explicit_serializer_test.rb" "test/adapter/json_api/has_many_test.rb" "test/adapter/json_api/has_one_test.rb" "test/adapter/json_api/include_data_if_sideloaded_test.rb" "test/adapter/json_api/json_api_test.rb" "test/adapter/json_api/linked_test.rb" "test/adapter/json_api/links_test.rb" "test/adapter/json_api/pagination_links_test.rb" "test/adapter/json_api/parse_test.rb" "test/adapter/json_api/relationship_test.rb" "test/adapter/json_api/resource_meta_test.rb" "test/adapter/json_api/toplevel_jsonapi_test.rb" "test/adapter/json_api/transform_test.rb" "test/adapter/json_api/type_test.rb" "test/adapter/json_test.rb" "test/adapter/null_test.rb" "test/adapter/polymorphic_test.rb" "test/adapter_test.rb" "test/array_serializer_test.rb" "test/cache_test.rb" "test/collection_serializer_test.rb" "test/generators/scaffold_controller_generator_test.rb" "test/generators/serializer_generator_test.rb" "test/grape_test.rb" "test/lint_test.rb" "test/logger_test.rb" "test/poro_test.rb" "test/serializable_resource_test.rb" "test/serializers/association_macros_test.rb" "test/serializers/associations_test.rb" "test/serializers/attribute_test.rb" "test/serializers/attributes_test.rb" "test/serializers/configuration_test.rb" "test/serializers/fieldset_test.rb" "test/serializers/meta_test.rb" "test/serializers/options_test.rb" "test/serializers/read_attribute_for_serialization_test.rb" "test/serializers/reflection_test.rb" "test/serializers/root_test.rb" "test/serializers/serialization_test.rb" "test/serializers/serializer_for_test.rb" "test/serializers/serializer_for_with_namespace_test.rb" ]
/home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/opt/hostedtoolcache/Ruby/2.6.6/x64/bin/bundle:23:in `load'
/opt/hostedtoolcache/Ruby/2.6.6/x64/bin/bundle:23:in `<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)
Error: Process completed with exit code 1.
```
2020-12-31 17:15:21 -05:00
Benjamin Fleischer
6d651bc9e3 Bump to 0.10.12 2020-12-10 12:42:12 -05:00
Benjamin Fleischer
11574298c9
Merge pull request #2398 from ritikesh/0-10-stable
Add support for rails 6.1
2020-12-08 20:55:50 -05:00
Ritikesh
f2643c1e3b Update rails dependency to < 6.2 2020-12-09 03:12:21 +05:30
Benjamin Fleischer
bc082848e5 Relax bundler dev dep 2020-12-04 09:07:40 -06:00
Benjamin Fleischer
dac067fec4 Bump version 2020-12-04 08:59:17 -06:00
Benjamin Fleischer
df7475b31c
Merge pull request #2395 from ritikesh/0-10-stable
remove explicit require for thread_safe
2020-10-16 13:24:36 -05:00
Ritikesh
321cd287ad try fixing pry gem issues 2020-10-12 22:35:14 +05:30
Ritikesh
29d8be452f remove explicit require for thread_safe 2020-10-12 19:38:05 +05:30
Wasif Hossain
a6120f1691 Add Ruby 2.7 support (#2368)
* Add Ruby 2.7 support

Co-authored-by: Benjamin Fleischer <bf4@users.noreply.github.com>
2020-01-08 13:58:11 -06:00
Wasif Hossain
64c7fee7a8 Code cleanup (#2369)
* Lint travis.yml on https://config.travis-ci.com/explore

* Replace deprecated 'thread_safe' with 'concurrent-ruby' alternative

'thread_safe' gem is now deprecated and merged into 'concurrent-ruby'.
Ref: 52e5f373a9 (diff-42d5a45da331eaa07d2b315bd3c9e738)

* Fix deprecation warning for Ruby 2.7

https://bugs.ruby-lang.org/issues/15539


* Remove a TODO tag that is already resolved
2020-01-02 21:53:59 -05:00
Benjamin Fleischer
6b093c965f
Merge pull request #2361 from alexzherdev/2358-sha1
Add config to use SHA1 instead of MD5 for caching
2019-10-29 13:17:40 -05:00
Alex Zherdev
628eff2582 Update configuration options doc 2019-10-17 11:07:37 -07:00
Alex Zherdev
7e1c9fcf64 Update changelog 2019-10-17 10:43:47 -07:00
Alex Zherdev
1c028785eb Introduce use_sha1_digests config option 2019-10-16 13:06:45 -07:00
Alex Zherdev
5d3f56f0a4 Use SHA1 instead of MD5 for caching 2019-10-15 13:12:36 -07:00
Wasif Hossain
5ce94fda60
Merge pull request #2360 from rails-api/bump-ruby
Bump Ruby versions on Travis: 2.4.9/2.5.7/2.6.5
2019-10-14 03:22:32 +06:00
Wasif Hossain
14eed23105
Bump Ruby versions on Travis: 2.4.9/2.5.7/2.6.5 2019-10-14 02:40:01 +06:00
Wasif Hossain
ab47e983f5
Merge pull request #2356 from rails-api/bump-ruby
Bump Ruby versions on Travis: 2.4.7/2.5.6/2.6.4
2019-09-21 04:14:00 +06:00
Wasif Hossain
838b1737e0
Bump Ruby versions on Travis: 2.4.7/2.5.6/2.6.4
https://www.ruby-lang.org/en/news/2019/08/28/multiple-jquery-vulnerabilities-in-rdoc/
2019-09-03 06:04:17 +06:00
Wasif Hossain
e349395869
Merge pull request #2340 from rails-api/action_dispatch_response_media_type
Configure `ActionDispatch::Response#content_type` behavior on Rails 6+
2019-08-24 01:18:21 +06:00
Wasif Hossain
8a0dad673c
Support jRuby 9.2.8.0 on Travis
https://www.jruby.org/2019/08/12/jruby-9-2-8-0.html
2019-08-24 00:19:41 +06:00
Wasif Hossain
55a6b23cd8
Configure ActionDispatch::Response#content_type behavior on Rails 6+
in order to retain old behavior,
set `config.action_dispatch.return_only_media_type_on_content_type`
to true

it can also be configured by setting
`ActionDispatch::Response.return_only_media_type_on_content_type`
2019-08-23 23:46:29 +06:00
Wasif Hossain
cec9ebab7b
Merge pull request #2354 from rails-api/rails-6-0-rc2
Add support for Rails 6.0.0 on Travis
2019-08-21 23:54:01 +06:00
Wasif Hossain
82ad288fc7
Add support for Rails 6.0.0 on Travis 2019-08-21 22:21:31 +06:00
Wasif Hossain
95f4ead7de
Drop support for Ruby 2.4+ against Rails 4.1 from Travis
https://stackoverflow.com/questions/41504106/ruby-2-4-and-rails-4-stack-level-too-deep-systemstackerror
2019-08-05 03:18:41 +06:00
Wasif Hossain
e981ac6c48
Require jruby 9.1.x (ruby2.3) and 9.2.x (ruby2.5) to pass on Travis
9.1.x should pass against the following rails versions:
- 4.1
- 4.2
- 5.0
- 5.1
- 5.2

9.2.x should pass against the following rails versions:
- 4.2
- 5.0
- 5.1
- 5.2
- 6.0
2019-08-05 02:50:03 +06:00
Wasif Hossain
9db3dd2579
Use specific jdbcsqlite3 version for certain version of rails
https://github.com/jruby/activerecord-jdbc-adapter#activerecord-jdbc-adapter
2019-08-05 01:24:10 +06:00