gruf-rspec 1.0.0 → 1.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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/gruf-rspec.gemspec +2 -1
- data/lib/gruf/rspec/version.rb +1 -1
- data/lib/gruf/rspec.rb +5 -13
- metadata +18 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da5399faedb46136f39343dc5cb8209be2725511f3617d2db5e47a384851e416
|
|
4
|
+
data.tar.gz: 8ce277be009832d10fc9b008aaec9c21470ec1460faf40ee6bd393c27b058ac0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d9d5fcfa3941a82dc417c39913f62de81860da536fad5456aac2ffea21b500b869edfd459c12139e40bde003b328e1e49f868c98920c3fcf2e416aaab6311749
|
|
7
|
+
data.tar.gz: 2510df3deac182765e53a54beb62fffce7600a1ed28604e879be154cb98abeaec7091544bb057897e49cb99189975057ea78b51f24bec1f69ac96b1aca02e249
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -114,7 +114,7 @@ Note that when using `with_serialized`, you _must_ pass the block with `{ }`, no
|
|
|
114
114
|
### RSpec Controller Matcher Configuration
|
|
115
115
|
|
|
116
116
|
By default, the type matcher for Gruf controllers matches in `/spec/rpc`. You can customize this by configuring it
|
|
117
|
-
in the `Gruf::Rspec`
|
|
117
|
+
in the `Gruf::Rspec` configuration block like so:
|
|
118
118
|
|
|
119
119
|
```ruby
|
|
120
120
|
Gruf::Rspec.configure do |c|
|
data/gruf-rspec.gemspec
CHANGED
|
@@ -36,6 +36,7 @@ Gem::Specification.new do |spec|
|
|
|
36
36
|
|
|
37
37
|
spec.add_runtime_dependency 'gruf', '~> 2.5', '>= 2.5.1'
|
|
38
38
|
spec.add_runtime_dependency 'rake', '>= 12.3'
|
|
39
|
-
spec.add_runtime_dependency 'rspec', '>= 3.8'
|
|
39
|
+
spec.add_runtime_dependency 'rspec-core', '>= 3.8'
|
|
40
|
+
spec.add_runtime_dependency 'rspec-expectations', '>= 3.8'
|
|
40
41
|
spec.add_runtime_dependency 'zeitwerk', '>= 2'
|
|
41
42
|
end
|
data/lib/gruf/rspec/version.rb
CHANGED
data/lib/gruf/rspec.rb
CHANGED
|
@@ -15,16 +15,8 @@
|
|
|
15
15
|
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
16
16
|
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
17
17
|
#
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
require 'rspec/expectations'
|
|
21
|
-
GRUF_RSPEC_NAMESPACE = RSpec
|
|
22
|
-
GRUF_RSPEC_RUNNER = RSpec
|
|
23
|
-
rescue LoadError # old rspec compat
|
|
24
|
-
require 'spec'
|
|
25
|
-
GRUF_RSPEC_NAMESPACE = Spec
|
|
26
|
-
GRUF_RSPEC_RUNNER = Spec::Runner
|
|
27
|
-
end
|
|
18
|
+
require 'rspec/core'
|
|
19
|
+
require 'rspec/expectations'
|
|
28
20
|
|
|
29
21
|
# use Zeitwerk to lazily autoload all the files in the lib directory
|
|
30
22
|
require 'zeitwerk'
|
|
@@ -58,7 +50,7 @@ rescue LoadError
|
|
|
58
50
|
end
|
|
59
51
|
require_relative 'rspec/railtie' if defined?(::Rails::Railtie)
|
|
60
52
|
|
|
61
|
-
|
|
53
|
+
RSpec.configure do |config|
|
|
62
54
|
config.include Gruf::Rspec::Helpers
|
|
63
55
|
|
|
64
56
|
config.define_derived_metadata(file_path: Regexp.new(Gruf::Rspec.rpc_spec_path)) do |metadata|
|
|
@@ -89,7 +81,7 @@ GRUF_RSPEC_RUNNER.configure do |config|
|
|
|
89
81
|
end
|
|
90
82
|
end
|
|
91
83
|
|
|
92
|
-
|
|
84
|
+
RSpec::Matchers.define :raise_rpc_error do |expected_error_class|
|
|
93
85
|
supports_block_expectations
|
|
94
86
|
|
|
95
87
|
def with_serialized(&block)
|
|
@@ -111,7 +103,7 @@ GRUF_RSPEC_NAMESPACE::Matchers.define :raise_rpc_error do |expected_error_class|
|
|
|
111
103
|
end
|
|
112
104
|
end
|
|
113
105
|
|
|
114
|
-
|
|
106
|
+
RSpec::Matchers.define :be_a_successful_rpc do |_|
|
|
115
107
|
match do |actual|
|
|
116
108
|
if !gruf_controller || actual.is_a?(GRPC::BadStatus) || actual.is_a?(GRPC::Core::CallError)
|
|
117
109
|
false
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gruf-rspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shaun McCormick
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-05-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gruf
|
|
@@ -45,7 +45,21 @@ dependencies:
|
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
46
|
version: '12.3'
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
48
|
-
name: rspec
|
|
48
|
+
name: rspec-core
|
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '3.8'
|
|
54
|
+
type: :runtime
|
|
55
|
+
prerelease: false
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - ">="
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '3.8'
|
|
61
|
+
- !ruby/object:Gem::Dependency
|
|
62
|
+
name: rspec-expectations
|
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|
|
50
64
|
requirements:
|
|
51
65
|
- - ">="
|
|
@@ -115,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
115
129
|
- !ruby/object:Gem::Version
|
|
116
130
|
version: '0'
|
|
117
131
|
requirements: []
|
|
118
|
-
rubygems_version: 3.5.
|
|
132
|
+
rubygems_version: 3.5.9
|
|
119
133
|
signing_key:
|
|
120
134
|
specification_version: 4
|
|
121
135
|
summary: RSpec assistance library for gruf
|