rails_twirp 0.14 → 0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +5 -0
- data/lib/rails_twirp/mapper.rb +2 -2
- data/lib/rails_twirp/testing/integration_test.rb +1 -1
- data/lib/rails_twirp/version.rb +1 -1
- data/rails_twirp.gemspec +5 -2
- metadata +27 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e1b6e06cf246cc4ab4a639ca805033c8f96a24d2a1f468b733001b5f4ca9732
|
4
|
+
data.tar.gz: 4e03e912af4c785bbe9852245ed6e763e6d398c335dd63d4d0c4c3751402b814
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cdc2a1d80937bbb85a513cc4807e9a91c5bd0848d5b959e90d226477231387c0e9250ec30bf7ff8da170c8cf64ca7136bcd47deb3fb23206797749bdbe624b8
|
7
|
+
data.tar.gz: 68c342ad35489011bc921dc4c7529d5ff7a18f47fce4aef9c597cebd2a789bdcec8050b6738cad457bcb54fce0b1c9f262558a964d42b26e1063a34f73f9d250
|
data/.github/workflows/test.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0
|
1
|
+
3.3.0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
### 0.15.0
|
2
|
+
|
3
|
+
* Exclude versions of Rails 7 which were incompatible with the pbbuilder ActionView handler, as pbbuilder cannot work there at all
|
4
|
+
* Fix decode_rack_response to be compatible with Rack response body wrappers (and conform to the Rack SPEC)
|
5
|
+
|
1
6
|
### 0.14.0
|
2
7
|
* Adding frozen_string_literal: true to all files.
|
3
8
|
|
data/lib/rails_twirp/mapper.rb
CHANGED
@@ -59,10 +59,10 @@ module RailsTwirp
|
|
59
59
|
@module = nil
|
60
60
|
end
|
61
61
|
|
62
|
-
def service(service_definition,
|
62
|
+
def service(service_definition, **, &block)
|
63
63
|
service_route_set = @route_set.services[service_definition]
|
64
64
|
service_mapper = ServiceMapper.new(service_route_set, self)
|
65
|
-
scope(**
|
65
|
+
scope(**) { service_mapper.instance_exec(&block) }
|
66
66
|
end
|
67
67
|
|
68
68
|
def scope(**options)
|
@@ -91,7 +91,7 @@ module RailsTwirp
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def decode_rack_response(service, rpc, status, headers, body)
|
94
|
-
body = body.join # body is
|
94
|
+
body = Array.wrap(body).join # body is each-able
|
95
95
|
|
96
96
|
if status === 200
|
97
97
|
output_class = service.rpcs[rpc][:output_class]
|
data/lib/rails_twirp/version.rb
CHANGED
data/rails_twirp.gemspec
CHANGED
@@ -13,7 +13,10 @@ Gem::Specification.new do |spec|
|
|
13
13
|
|
14
14
|
spec.files = `git ls-files`.split("\n")
|
15
15
|
|
16
|
-
|
17
|
-
|
16
|
+
# Rails has shipped an incompatible change in ActiveView, that was reverted in later versions.
|
17
|
+
# @see https://github.com/rails/rails/pull/51023
|
18
|
+
excluded_versions = ["7.1.0", "7.1.1", "7.1.2", "7.1.3"].map { |v| "!= #{v}" }
|
19
|
+
spec.add_runtime_dependency "rails", ">= 6.1.3", *excluded_versions
|
20
|
+
spec.add_runtime_dependency "twirp", ">= 1.9", "< 1.11"
|
18
21
|
spec.required_ruby_version = ">= 3"
|
19
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_twirp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.15'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bouke van der Bijl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -17,6 +17,18 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 6.1.3
|
20
|
+
- - "!="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 7.1.0
|
23
|
+
- - "!="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: 7.1.1
|
26
|
+
- - "!="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: 7.1.2
|
29
|
+
- - "!="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 7.1.3
|
20
32
|
type: :runtime
|
21
33
|
prerelease: false
|
22
34
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +36,18 @@ dependencies:
|
|
24
36
|
- - ">="
|
25
37
|
- !ruby/object:Gem::Version
|
26
38
|
version: 6.1.3
|
39
|
+
- - "!="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 7.1.0
|
42
|
+
- - "!="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 7.1.1
|
45
|
+
- - "!="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 7.1.2
|
48
|
+
- - "!="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 7.1.3
|
27
51
|
- !ruby/object:Gem::Dependency
|
28
52
|
name: twirp
|
29
53
|
requirement: !ruby/object:Gem::Requirement
|
@@ -167,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
191
|
- !ruby/object:Gem::Version
|
168
192
|
version: '0'
|
169
193
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
194
|
+
rubygems_version: 3.5.3
|
171
195
|
signing_key:
|
172
196
|
specification_version: 4
|
173
197
|
summary: Integrate Twirp into Rails
|