grape_sorbet 0.0.4 → 0.0.5

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: aa4f8d64cc6cbf5839f525d1c1e246386510695be350c4bf1ed1298b52b8c9a4
4
- data.tar.gz: baeca4c981155f04394d3dab717a300c923f41aa063516c4eb0430943e0ba756
3
+ metadata.gz: 06c4417253642117e5cc111ec8c478d5c86b12abaff504778c0dc9ca031f0e45
4
+ data.tar.gz: c93127be9f1ac682c30080c0e5614a37d9470168172cfcc64b44e25d61203fa9
5
5
  SHA512:
6
- metadata.gz: 9a7f6cb172c0c73adf41a2992b620f45962459baeeb7f19cc916036776a010018a28a5f0dac752a55a2e1c623ee4e394a6654fd3f2139750e73fdc278a5f8a6d
7
- data.tar.gz: 59580b70030d1d8d013191c55671a82daa854e1a536ecc67acb1a1ee70e1e907086a76b9eddb5022eadb03161c0043c241c7fc5f8a831c4cdf0b1c0f12e09597
6
+ metadata.gz: 7c85f6e88f351c4ff58e8fd922f025b41cd38b05d9f773c42c0647128ff2bb525ce359791b21e5462c1119db943e5cee88502b9903236ddd45ef3c06d39c62c5
7
+ data.tar.gz: f504e9a4a9ee21cb7464802207cace234dfe270bd01e61f388eefc261ba39db8b96730f25d002f8fe4fc98daae75f22aaf678e0c594e16d138cf5eb10c0d0bb6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.0.5 (2024-06-24)
2
+
3
+ - Ignore anonymous helpers
4
+
1
5
  ## 0.0.4 (2024-06-24)
2
6
 
3
7
  - Update `grape.rbi`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grape_sorbet (0.0.4)
4
+ grape_sorbet (0.0.5)
5
5
  activesupport
6
6
  grape (~> 2.0)
7
7
  sorbet-runtime (~> 0.5.10741)
data/README.md CHANGED
@@ -10,12 +10,11 @@ grape_sorbet is a gem that provides hand written signatures and a Tapioca DSL co
10
10
 
11
11
  Install the gem and add to the application's Gemfile by executing:
12
12
 
13
- $ bundle add r --github=https://github.com/thatch-health/grape_sorbet
13
+ $ bundle add grape_sorbet
14
14
 
15
15
  If bundler is not being used to manage dependencies, install the gem by executing:
16
16
 
17
- $ gem install specific_install
18
- $ gem specific_install https://github.com/thatch-health/grape_sorbet.git
17
+ $ gem install grape_sorbet
19
18
 
20
19
  After installing the gem, make sure to run `bundle exec tapioca gem grape_sorbet` in your project to import the hand written signatures.
21
20
 
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module GrapeSorbet
5
- VERSION = "0.0.4"
5
+ VERSION = "0.0.5"
6
6
  end
@@ -137,14 +137,10 @@ module Tapioca
137
137
  def create_endpoint_class
138
138
  superclass = "::Grape::Endpoint"
139
139
 
140
- helper_mods = constant.namespace_stackable(:helpers)
141
-
142
- if helper_mods.any? { |mod| mod.name.nil? }
143
- raise "Cannot compile Grape API with anonymous helpers"
144
- end
140
+ named_helper_mods = constant.namespace_stackable(:helpers).reject { |mod| mod.name.nil? }
145
141
 
146
142
  api.create_class(EndpointClassName, superclass_name: superclass) do |klass|
147
- helper_mods.each do |mod|
143
+ named_helper_mods.each do |mod|
148
144
  klass.create_include(mod.name)
149
145
  end
150
146
  end
data/rbi/grape.rbi CHANGED
@@ -22,6 +22,11 @@ module Grape
22
22
  sig { params(name: Symbol, block: T.proc.bind(Grape::Validations::ParamsScope).void).void }
23
23
  def params(name, &block); end
24
24
  end
25
+
26
+ module ClassMethods
27
+ sig { params(new_modules: T.untyped, block: T.nilable(T.proc.bind(Grape::DSL::Helpers::BaseHelper).void)).void }
28
+ def helpers(*new_modules, &block); end
29
+ end
25
30
  end
26
31
 
27
32
  module RequestResponse
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape_sorbet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thatch Health, Inc.