graphiti 1.5.1 → 1.5.3

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
2
  SHA256:
3
- metadata.gz: a90dc53cb1aeb5da88880a45923039d4dac291548e88a2fc6e8bddacc0ede150
4
- data.tar.gz: 91e42b3e269f758d8978cfed630a45ca59ae5f96b5114170b965d23a6b67f542
3
+ metadata.gz: 6e73347300b459ef189141f41dc56748767b8dfedc7b6b27965da4fa338cdd90
4
+ data.tar.gz: 2c3dc9a6dc41aa072360fb20c79ec11d7b9663334f023369f32e0822f98f640b
5
5
  SHA512:
6
- metadata.gz: f30ad5e6356b491ba4d0490160c66587a3698c14abf9953d5d0c5cb4b088990bcbed5186c338cc8c5ac833bafc12b69fb764bfd565be717597fe2e4e804ddfed
7
- data.tar.gz: 87c3b0944fd03d12674e2678b8f28967badeea8935ce962804470dd8b68258334ad19b102038bd5e2c87c2d533711597a705185f5073faa71fba95031465e36c
6
+ metadata.gz: 8144b492f5a20b239caf5616d35a4022cb7df4acc56af08feeae987fdf5ab4157c713f7275ee67947cc993bc8618aeee4808de20da7c27020b79bb5aa4151919
7
+ data.tar.gz: 116b84208d8095eb7f07ba965a3fe94dcd683568bc1c658edd0be8ae635a2e45e4edcfa109dec80723698b502be6964ea7caae2930ff0f53f0b31db05803a16e
data/.standard.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  fix: true
2
2
  parallel: true
3
- ruby_version: 2.4
3
+ ruby_version: 2.7
4
4
 
5
5
  ignore:
6
6
  - 'vendor/**/*'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  graphiti changelog
2
2
 
3
+ ## [1.5.3](https://github.com/graphiti-api/graphiti/compare/v1.5.2...v1.5.3) (2024-03-18)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * leverage ruby-2.7 parameter forwarding ([#431](https://github.com/graphiti-api/graphiti/issues/431)) ([ae09a46](https://github.com/graphiti-api/graphiti/commit/ae09a464b2156742bb093537deac0578a1a3e40e))
9
+ * prevent :id stripping when :id not in path ([#447](https://github.com/graphiti-api/graphiti/issues/447)) ([e1dd811](https://github.com/graphiti-api/graphiti/commit/e1dd811283f6e6fe7a36b925934df0ecbb4d3411))
10
+
11
+ ## [1.5.2](https://github.com/graphiti-api/graphiti/compare/v1.5.1...v1.5.2) (2024-03-18)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * Enum should allow the conventionally case-sensitive operators ([#434](https://github.com/graphiti-api/graphiti/issues/434)) ([56d34fd](https://github.com/graphiti-api/graphiti/commit/56d34fd4801bc32c13d64aca880b82b717b2ab81))
17
+
3
18
  ## [1.5.1](https://github.com/graphiti-api/graphiti/compare/v1.5.0...v1.5.1) (2024-03-18)
4
19
 
5
20
 
data/graphiti.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.bindir = "exe"
17
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
18
  spec.require_paths = ["lib"]
19
- spec.required_ruby_version = ">= 2.6"
19
+ spec.required_ruby_version = ">= 2.7"
20
20
 
21
21
  spec.add_dependency "jsonapi-serializable", "~> 0.3.0"
22
22
  spec.add_dependency "jsonapi-renderer", "~> 0.2", ">= 0.2.2"
@@ -39,7 +39,7 @@ module Graphiti
39
39
  :not_match
40
40
  ],
41
41
  uuid: [:eq, :not_eq],
42
- enum: [:eq, :not_eq],
42
+ enum: [:eq, :not_eq, :eql, :not_eql],
43
43
  integer_id: numerical_operators,
44
44
  integer: numerical_operators,
45
45
  big_decimal: numerical_operators,
@@ -26,6 +26,7 @@ module Graphiti
26
26
  alias_method :filter_boolean_eq, :filter_eq
27
27
  alias_method :filter_uuid_eq, :filter_eq
28
28
  alias_method :filter_enum_eq, :filter_eq
29
+ alias_method :filter_enum_eql, :filter_eq
29
30
 
30
31
  def filter_not_eq(scope, attribute, value)
31
32
  scope.where.not(attribute => value)
@@ -37,6 +38,7 @@ module Graphiti
37
38
  alias_method :filter_boolean_not_eq, :filter_not_eq
38
39
  alias_method :filter_uuid_not_eq, :filter_not_eq
39
40
  alias_method :filter_enum_not_eq, :filter_not_eq
41
+ alias_method :filter_enum_not_eql, :filter_not_eq
40
42
 
41
43
  def filter_string_eq(scope, attribute, value, is_not: false)
42
44
  column = column_for(scope, attribute)
@@ -76,7 +76,7 @@ module Graphiti
76
76
  path = request_path
77
77
  if [:update, :show, :destroy].include?(context_namespace) && has_id
78
78
  path = request_path.split("/")
79
- path.pop
79
+ path.pop if path.last == has_id.to_s
80
80
  path = path.join("/")
81
81
  end
82
82
  e[:full_path].to_s == path && e[:actions].include?(context_namespace)
@@ -71,9 +71,9 @@ module Graphiti
71
71
  end
72
72
 
73
73
  # Allow access to resource methods
74
- def method_missing(id, *args, &blk)
74
+ def method_missing(id, ...)
75
75
  if @resource.respond_to?(id, true)
76
- @resource.send(id, *args, &blk)
76
+ @resource.send(id, ...)
77
77
  else
78
78
  super
79
79
  end
@@ -1,3 +1,3 @@
1
1
  module Graphiti
2
- VERSION = "1.5.1"
2
+ VERSION = "1.5.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
@@ -353,7 +353,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
353
353
  requirements:
354
354
  - - ">="
355
355
  - !ruby/object:Gem::Version
356
- version: '2.6'
356
+ version: '2.7'
357
357
  required_rubygems_version: !ruby/object:Gem::Requirement
358
358
  requirements:
359
359
  - - ">="