json_api_toolbox 1.4.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7449efd8dd09c17235fcb78b359a4bd7050851a6
4
- data.tar.gz: c1a744a1eefa42bc00a6bd6cc8172df8a287f008
2
+ SHA256:
3
+ metadata.gz: 2bd96792ca86fca2089b5b5f5e837b0d5555e9d8ad549d17f4d2697034288c8c
4
+ data.tar.gz: be654d88ed537bae350035da7ef869a50dbde04271e491b693815398e3fdfb3a
5
5
  SHA512:
6
- metadata.gz: 90b05221b72edaef537bbf173313ed6159db759203187b7aa2b3b3211a1403e20896e892cb91bb11aaf7534b4c8c56c7982aea99ff053b112eef3312d49124f6
7
- data.tar.gz: b5ba639f2fa06caeda67ecaaa5b87b01aeaba2cadcc7b99e2249b1dd40053c48c0a45a83bbdf6f979e2c62eb29c320b31bb9c1cba0a14b81c682ce3cbd5aaa1d
6
+ metadata.gz: 2a6b0f774066482fe66821665f9a39cdb55e7f345b765fe1ad7c131994595a2c98fdc8853b0b3314f0e317a450babb944cc1052c92caaaa6405e8710eb86c86e
7
+ data.tar.gz: 4ab8137ebee0a96c5ee2680b1725a206632d31b69281e0d86be0f4fea7596331a60ef3ea243d7e536781ed1088bb5c489735deef75871c67846f02c87cf88d7b
data/CHANGELOG.md CHANGED
@@ -8,6 +8,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
8
8
  ### Added
9
9
 
10
10
  ## [Released]
11
+
12
+ ## [1.5.1] - 2021-05-26
13
+ ### Fixed
14
+ - Fixed a pagination bug that happened when building the resource_path from the controller name
15
+
16
+ ## [1.5.0] - 2021-02-04
17
+ ### Added
18
+ - Require `will_paginate`
19
+ - Remove limit of version to `log_toolbox` dependence
20
+ - Update ruby of 2.4.x to 2.5.x
21
+
22
+ ## [1.4.0] - 2020‑11‑16
23
+ ### Added
24
+ - Adding per_page limit
25
+
11
26
  ## [1.3.0] - 2020-02-19
12
27
  ### Added
13
28
  - Remove gem rescue responsibility
@@ -1,4 +1,4 @@
1
- image: ruby:2.4.1
1
+ image: ruby:2.5.8
2
2
 
3
3
  pipelines:
4
4
  default:
@@ -15,6 +15,7 @@ pipelines:
15
15
  - step:
16
16
  script:
17
17
  - gem build json_api_toolbox.gemspec
18
+ - mkdir /root/.gem
18
19
  - curl -u $RUBYGEMS_USERNAME:$RUBYGEMS_PASSWORD https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials
19
20
  - chmod 0600 ~/.gem/credentials
20
21
  - gem push $(ls *.gem)
@@ -6,7 +6,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
6
  require 'json_api_toolbox/version'
7
7
 
8
8
  Gem::Specification.new do |spec|
9
- spec.required_ruby_version = '>= 2.4.0'
9
+ spec.required_ruby_version = '~> 2.5.0'
10
10
  spec.name = 'json_api_toolbox'
11
11
  spec.version = JsonApiToolbox::VERSION
12
12
  spec.authors = ['Adriano Bacha']
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_dependency 'activesupport', '>= 4.0.0'
26
26
  spec.add_dependency 'jsonapi-serializable', '>= 0.3.0'
27
27
  spec.add_dependency 'json-api-vanilla', '~> 1.0.1'
28
- spec.add_dependency 'log_toolbox', '>= 1.0.0'
28
+ spec.add_dependency 'log_toolbox'
29
29
  spec.add_dependency 'request_store', '~> 1.3.2'
30
30
  spec.add_dependency 'rest-client', '>= 2.0.1'
31
31
  spec.add_dependency 'rspec', '>= 3.0.0'
@@ -8,6 +8,8 @@ require 'postable'
8
8
  require 'service'
9
9
  require 'jsonapi/serializable'
10
10
  require 'json_api_toolbox/paginable'
11
+ require 'will_paginate'
12
+ require 'will_paginate/active_record'
11
13
 
12
14
  require_relative 'json_api_toolbox/spec_support/shared_examples_for_controllers'
13
15
  require_relative 'json_api_toolbox/serializables/serializable_enum_option'
@@ -49,7 +49,7 @@ module JsonApiToolbox
49
49
  end
50
50
 
51
51
  def collection_resource_path(options)
52
- path_method = "#{controller_name.pluralize.underscore}_path"
52
+ path_method = "#{controller_path.parameterize.pluralize.underscore}_path"
53
53
  public_send(path_method, options)
54
54
  end
55
55
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JsonApiToolbox
4
- VERSION = '1.4.0'
4
+ VERSION = '1.5.1'
5
5
  end
data/lib/postable.rb CHANGED
@@ -11,7 +11,7 @@ module JsonApiToolbox
11
11
  hash_value = check_child_association(value, key, model, child_model)
12
12
  [key, hash_value]
13
13
  end
14
- Hash[normalized_hash]
14
+ normalized_hash.to_h
15
15
  end
16
16
 
17
17
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_api_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adriano Bacha
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-16 00:00:00.000000000 Z
11
+ date: 2021-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 1.0.0
89
+ version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 1.0.0
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: request_store
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -287,17 +287,16 @@ require_paths:
287
287
  - lib
288
288
  required_ruby_version: !ruby/object:Gem::Requirement
289
289
  requirements:
290
- - - ">="
290
+ - - "~>"
291
291
  - !ruby/object:Gem::Version
292
- version: 2.4.0
292
+ version: 2.5.0
293
293
  required_rubygems_version: !ruby/object:Gem::Requirement
294
294
  requirements:
295
295
  - - ">="
296
296
  - !ruby/object:Gem::Version
297
297
  version: '0'
298
298
  requirements: []
299
- rubyforge_project:
300
- rubygems_version: 2.6.13
299
+ rubygems_version: 3.0.3
301
300
  signing_key:
302
301
  specification_version: 4
303
302
  summary: Json API usefull tools