grape-path-helpers 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48d0b31d4510edbe385479f81ca2e91a51cf09454037339d7c71510ea892321e
4
- data.tar.gz: a8856400f31326e0c13b1ca55397c9d46b7f0e800848ba8f4cbb9df65794cf78
3
+ metadata.gz: e71d56159cc94723aad37fb1ce55ae321867cfd317b199514115264f0e1f1bc4
4
+ data.tar.gz: 24949aafa6b2e4083a089a966ee63d05a9329ff464021052c2cd0ab55373719a
5
5
  SHA512:
6
- metadata.gz: '0097583d83eb6f56e6063fb4527809411d0970a9aa36622e0e96ae039d3556cb737d7624807a3ef2f0862329babf62474b4b6423bb6ebae6c506c2f5c35f8245'
7
- data.tar.gz: 945c6f84ebb3ee473f94aadba7780b04c1f813d4e8405c5f634218904f8b54af78a5fc49e12b171de294f6a50b50d2d871c75083779d9d1ed446d0c164db4420
6
+ metadata.gz: fc587fd5d313052aa4c96d1342e8a589232f54c2541493302550d346aa06be442b7d9784cebc25a7dde626b4a3a702e315b63c037870cfd7e377ff2ac0986765
7
+ data.tar.gz: ce2d8e7087725c144ca7b53ef42bdd90588bef92bc12539c47a6939589bd4ffd1f71e0be409d640556fde3f50c9ecf67c02d47a52d113af63a91f7a6f4c4c73a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.1
4
+
5
+ * [Fix helpers not available by default in Grape endpoints](https://gitlab.com/gitlab-org/ruby/gems/grape-path-helpers/-/merge_requests/46)
6
+
7
+
3
8
  ## 2.0.0
4
9
 
5
10
  * [Adds support for Rack 3](https://gitlab.com/gitlab-org/ruby/gems/grape-path-helpers/-/merge_requests/45)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grape-path-helpers (2.0.0)
4
+ grape-path-helpers (2.0.1)
5
5
  activesupport
6
6
  grape (~> 2.0)
7
7
  rake (> 12)
@@ -1,4 +1,4 @@
1
1
  # Gem version
2
2
  module GrapePathHelpers
3
- VERSION = '2.0.0'.freeze
3
+ VERSION = '2.0.1'.freeze
4
4
  end
@@ -13,4 +13,4 @@ module GrapePathHelpers
13
13
  end
14
14
 
15
15
  Grape::API::Instance.extend GrapePathHelpers::AllRoutes
16
- Grape::Endpoint.send(:include, GrapePathHelpers::NamedRouteMatcher)
16
+ Grape::Endpoint.prepend GrapePathHelpers::NamedRouteMatcher
@@ -20,6 +20,13 @@ describe GrapePathHelpers::NamedRouteMatcher do
20
20
  fake_class.new
21
21
  end
22
22
 
23
+ it 'is available inside Grape endpoints' do
24
+ endpoint = Spec::Support::API.endpoints.first
25
+
26
+ expect(endpoint.api_v1_cats_path(id: 5))
27
+ .to eq('/api/v1/cats/5.json')
28
+ end
29
+
23
30
  describe '#method_missing' do
24
31
  it 'returns super method_missing if the route does not exist' do
25
32
  expect(helper_class.test_method(id: 1))
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: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drew Blessing