grape-path-helpers 1.6.0 → 1.6.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
2
  SHA256:
3
- metadata.gz: 40792c146fc9c26dd609bc8dd99adce92b010820e3c2ca9644144f3493dd06ec
4
- data.tar.gz: aed680f63272f1e61467787e0d374bb8a8145b61979c18b5c61e332763472cd5
3
+ metadata.gz: 66a92790c192b884c021f5f6aa77544060f9386d036cfde63954b77b0930da2b
4
+ data.tar.gz: 9eb7630323cbd4adea877cf93c3c3061a14a4c14ec110a9ddf26dfe8e31b6387
5
5
  SHA512:
6
- metadata.gz: ff06e53d14f8d46a398cc14754fbc61e7e1a1e28179aa83a27bbca47698c117daaf064f62d3e03e1a385112fea2c0dd076b102e64e4c2f1ffa3c4d4fae7d3279
7
- data.tar.gz: 82fde6483c7ad996189c59ab9c79969495e642fb0274d9e209228b6633e6c6c731066a4bf24effa6e00e990f3fc82b94eca8084b469f64aad15e8f9a5f486728
6
+ metadata.gz: fc02941d380ee7316267feedd073e02c95f542a0dcbaad3ef55e97290e761f4bb29b7de80eb4156d34eefc36344f7f336a30abcfe82b6ede0d05cf05aa2bea4e
7
+ data.tar.gz: c157b188857534b828f19a7ad28eaeeff9c004f23946ef4e3aeab30352e02460b5d200d527a68dcd43fe477d187ea555d3e58e8e7bcef9e95dd90887b65f1ee6
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.6.1
4
+
5
+ * [Use ruby2_keywords to fix 2.7 warning](https://gitlab.com/gitlab-org/grape-path-helpers/-/merge_requests/31)
6
+
3
7
  ## 1.6.0
4
8
 
5
9
  * [Extract kwargs to fix 2.7 warnings](https://gitlab.com/gitlab-org/grape-path-helpers/-/merge_requests/29)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grape-path-helpers (1.6.0)
4
+ grape-path-helpers (1.4.0)
5
5
  activesupport
6
6
  grape (~> 1.3)
7
7
  rake (> 12)
@@ -9,30 +9,32 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (6.1.1)
12
+ activesupport (6.0.3.4)
13
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
- i18n (>= 1.6, < 2)
15
- minitest (>= 5.1)
16
- tzinfo (~> 2.0)
17
- zeitwerk (~> 2.3)
14
+ i18n (>= 0.7, < 2)
15
+ minitest (~> 5.1)
16
+ tzinfo (~> 1.1)
17
+ zeitwerk (~> 2.2, >= 2.2.2)
18
18
  ast (2.4.0)
19
19
  builder (3.2.4)
20
20
  coderay (1.1.2)
21
21
  concurrent-ruby (1.1.7)
22
22
  diff-lcs (1.3)
23
- dry-configurable (0.12.0)
23
+ dry-configurable (0.11.6)
24
24
  concurrent-ruby (~> 1.0)
25
- dry-core (~> 0.5, >= 0.5.0)
25
+ dry-core (~> 0.4, >= 0.4.7)
26
+ dry-equalizer (~> 0.2)
26
27
  dry-container (0.7.2)
27
28
  concurrent-ruby (~> 1.0)
28
29
  dry-configurable (~> 0.1, >= 0.1.3)
29
- dry-core (0.5.0)
30
+ dry-core (0.4.9)
30
31
  concurrent-ruby (~> 1.0)
31
32
  dry-equalizer (0.3.0)
32
33
  dry-inflector (0.2.0)
33
- dry-logic (1.1.0)
34
+ dry-logic (1.0.8)
34
35
  concurrent-ruby (~> 1.0)
35
- dry-core (~> 0.5, >= 0.5)
36
+ dry-core (~> 0.2)
37
+ dry-equalizer (~> 0.2)
36
38
  dry-types (1.4.0)
37
39
  concurrent-ruby (~> 1.0)
38
40
  dry-container (~> 0.3)
@@ -40,17 +42,17 @@ GEM
40
42
  dry-equalizer (~> 0.3)
41
43
  dry-inflector (~> 0.1, >= 0.1.2)
42
44
  dry-logic (~> 1.0, >= 1.0.2)
43
- grape (1.5.1)
45
+ grape (1.5.0)
44
46
  activesupport
45
47
  builder
46
48
  dry-types (>= 1.1)
47
49
  mustermann-grape (~> 1.0.0)
48
50
  rack (>= 1.3.0)
49
51
  rack-accept
50
- i18n (1.8.7)
52
+ i18n (1.8.5)
51
53
  concurrent-ruby (~> 1.0)
52
54
  method_source (0.9.0)
53
- minitest (5.14.3)
55
+ minitest (5.14.2)
54
56
  mustermann (1.1.1)
55
57
  ruby2_keywords (~> 0.0.1)
56
58
  mustermann-grape (1.0.1)
@@ -66,7 +68,7 @@ GEM
66
68
  rack-accept (0.4.5)
67
69
  rack (>= 0.4)
68
70
  rainbow (3.0.0)
69
- rake (13.0.3)
71
+ rake (13.0.1)
70
72
  rspec (3.7.0)
71
73
  rspec-core (~> 3.7.0)
72
74
  rspec-expectations (~> 3.7.0)
@@ -89,10 +91,11 @@ GEM
89
91
  unicode-display_width (~> 1.0, >= 1.0.1)
90
92
  ruby-progressbar (1.9.0)
91
93
  ruby2_keywords (0.0.2)
92
- tzinfo (2.0.4)
93
- concurrent-ruby (~> 1.0)
94
+ thread_safe (0.3.6)
95
+ tzinfo (1.2.7)
96
+ thread_safe (~> 0.1)
94
97
  unicode-display_width (1.3.3)
95
- zeitwerk (2.4.2)
98
+ zeitwerk (2.4.1)
96
99
 
97
100
  PLATFORMS
98
101
  ruby
@@ -104,4 +107,4 @@ DEPENDENCIES
104
107
  rubocop (~> 0.56)
105
108
 
106
109
  BUNDLED WITH
107
- 2.2.3
110
+ 2.1.4
@@ -14,6 +14,7 @@ Gem::Specification.new do |gem|
14
14
  gem.add_runtime_dependency 'activesupport'
15
15
  gem.add_runtime_dependency 'grape', '~> 1.3'
16
16
  gem.add_runtime_dependency 'rake', '> 12'
17
+ gem.add_runtime_dependency 'ruby2_keywords', '~> 0.0.2'
17
18
 
18
19
  gem.add_development_dependency 'pry', '~> 0.11'
19
20
  gem.add_development_dependency 'rspec', '~> 3.7'
@@ -3,29 +3,22 @@ module GrapePathHelpers
3
3
  # to unknown methods will look for a route with a matching
4
4
  # helper function name
5
5
  module NamedRouteMatcher
6
- def method_missing(method_id, *args, **kwargs)
6
+ def method_missing(method_id, *args)
7
7
  return super unless method_id.to_s =~ /_path$/
8
8
 
9
- success, result = call_path_method(method_id, *args, **kwargs)
10
-
11
- if success
12
- result
13
- else
14
- super
15
- end
16
- end
17
-
18
- def call_path_method(method_id, *arguments)
19
- segments = arguments.first || {}
9
+ segments = args.first || {}
20
10
 
21
11
  route = Grape::API::Instance.decorated_routes.detect do |r|
22
12
  route_match?(r, method_id, segments)
23
13
  end
24
14
 
25
- return false unless route
26
-
27
- [true, route.send(method_id, *arguments)]
15
+ if route
16
+ route.send(method_id, *args)
17
+ else
18
+ super
19
+ end
28
20
  end
21
+ ruby2_keywords(:method_missing)
29
22
 
30
23
  def respond_to_missing?(method_name, _include_private = false)
31
24
  return super unless method_name =~ /_path$/
@@ -1,4 +1,4 @@
1
1
  # Gem version
2
2
  module GrapePathHelpers
3
- VERSION = '1.6.0'.freeze
3
+ VERSION = '1.6.1'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-path-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drew Blessing
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-01-11 00:00:00.000000000 Z
12
+ date: 2021-01-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -53,6 +53,20 @@ dependencies:
53
53
  - - ">"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '12'
56
+ - !ruby/object:Gem::Dependency
57
+ name: ruby2_keywords
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: 0.0.2
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: 0.0.2
56
70
  - !ruby/object:Gem::Dependency
57
71
  name: pry
58
72
  requirement: !ruby/object:Gem::Requirement