grape_sorbet 0.0.4 → 0.0.5
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -3
- data/lib/grape_sorbet/version.rb +1 -1
- data/lib/tapioca/dsl/compilers/grape_endpoints.rb +2 -6
- data/rbi/grape.rbi +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 06c4417253642117e5cc111ec8c478d5c86b12abaff504778c0dc9ca031f0e45
|
|
4
|
+
data.tar.gz: c93127be9f1ac682c30080c0e5614a37d9470168172cfcc64b44e25d61203fa9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c85f6e88f351c4ff58e8fd922f025b41cd38b05d9f773c42c0647128ff2bb525ce359791b21e5462c1119db943e5cee88502b9903236ddd45ef3c06d39c62c5
|
|
7
|
+
data.tar.gz: f504e9a4a9ee21cb7464802207cace234dfe270bd01e61f388eefc261ba39db8b96730f25d002f8fe4fc98daae75f22aaf678e0c594e16d138cf5eb10c0d0bb6
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
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
|
|
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
|
|
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
|
|
data/lib/grape_sorbet/version.rb
CHANGED
|
@@ -137,14 +137,10 @@ module Tapioca
|
|
|
137
137
|
def create_endpoint_class
|
|
138
138
|
superclass = "::Grape::Endpoint"
|
|
139
139
|
|
|
140
|
-
|
|
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
|
-
|
|
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
|