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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b7e742d4821b2a3745b2463d19aae223822eac419bd773d371f379143454d71
4
- data.tar.gz: 1abf4446ebeea434ecdd7064a19e5ad7375c0e3e8f936af4afaf67a938923844
3
+ metadata.gz: 4e1b6e06cf246cc4ab4a639ca805033c8f96a24d2a1f468b733001b5f4ca9732
4
+ data.tar.gz: 4e03e912af4c785bbe9852245ed6e763e6d398c335dd63d4d0c4c3751402b814
5
5
  SHA512:
6
- metadata.gz: 6dfdf309ddc0f01d4da60b51205de47414fc11aff123a15f1e65fdbbd31d532c9c417fe7e73f5e5a4a9c0fb0d9f030c6a758bae1fc4a40df4f776167a64a2c84
7
- data.tar.gz: 74840175fc2b2bac370dcddb5c906f89cebf072c7b5f678baca72f4c678d45c87ff15f0cfbe62c9e7d15ac3b8904eedc99ffd4d90fdb632439c18d575ad40a95
6
+ metadata.gz: 6cdc2a1d80937bbb85a513cc4807e9a91c5bd0848d5b959e90d226477231387c0e9250ec30bf7ff8da170c8cf64ca7136bcd47deb3fb23206797749bdbe624b8
7
+ data.tar.gz: 68c342ad35489011bc921dc4c7529d5ff7a18f47fce4aef9c597cebd2a789bdcec8050b6738cad457bcb54fce0b1c9f262558a964d42b26e1063a34f73f9d250
@@ -11,7 +11,7 @@ jobs:
11
11
  - name: Setup Ruby
12
12
  uses: ruby/setup-ruby@v1
13
13
  with:
14
- ruby-version: 3.0.0
14
+ ruby-version: 3.3.0
15
15
  bundler-cache: true
16
16
 
17
17
  - name: Run tests
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.3
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
 
@@ -59,10 +59,10 @@ module RailsTwirp
59
59
  @module = nil
60
60
  end
61
61
 
62
- def service(service_definition, **options, &block)
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(**options) { service_mapper.instance_exec(&block) }
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 an Enumerable
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]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsTwirp
4
- VERSION = "0.14"
4
+ VERSION = "0.15"
5
5
  end
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
- spec.add_dependency "rails", ">= 6.1.3"
17
- spec.add_dependency "twirp", ">= 1.9", "< 1.11"
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.14'
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: 2023-03-16 00:00:00.000000000 Z
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.2.32
194
+ rubygems_version: 3.5.3
171
195
  signing_key:
172
196
  specification_version: 4
173
197
  summary: Integrate Twirp into Rails