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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6291a6cf9290f5a961f9fe4aaa14cab581d4e6f8496165d9d615554c31aadf2a
4
- data.tar.gz: eed0811eb88ff1a57d02b6c03e523eef23859b69b1d9cff9362cdd08c6175d78
3
+ metadata.gz: da5399faedb46136f39343dc5cb8209be2725511f3617d2db5e47a384851e416
4
+ data.tar.gz: 8ce277be009832d10fc9b008aaec9c21470ec1460faf40ee6bd393c27b058ac0
5
5
  SHA512:
6
- metadata.gz: 235f0f22e3bfde97bb808c683848c5a5ec396c9d4b194b2aa6071c0a251903365344ba0e6d9de05614ebbed9dc634172dd0b7484f88bce2966eb523bf15487ec
7
- data.tar.gz: 7cb35d4584731c5f733de85260feb13154cb9f85b714ce6e19e88054d002f83fc0a20dcb7d696b37b54e56759d013ce30419ab4028ce0a0589b69e7b0e3e2859
6
+ metadata.gz: d9d5fcfa3941a82dc417c39913f62de81860da536fad5456aac2ffea21b500b869edfd459c12139e40bde003b328e1e49f868c98920c3fcf2e416aaab6311749
7
+ data.tar.gz: 2510df3deac182765e53a54beb62fffce7600a1ed28604e879be154cb98abeaec7091544bb057897e49cb99189975057ea78b51f24bec1f69ac96b1aca02e249
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@ Changelog for the gruf-rspec gem.
2
2
 
3
3
  ### Pending release
4
4
 
5
+ ### 1.0.1
6
+
7
+ - [#23] Only depend on rspec-core/rspec-expectations
8
+
5
9
  ### 1.0.0
6
10
 
7
11
  - Add support for Ruby 3.2, 3.3
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` confiugration block like so:
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
@@ -17,6 +17,6 @@
17
17
  #
18
18
  module Gruf
19
19
  module Rspec
20
- VERSION = '1.0.0'
20
+ VERSION = '1.0.1'
21
21
  end
22
22
  end
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
- begin
19
- require 'rspec/core'
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
- GRUF_RSPEC_RUNNER.configure do |config|
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
- GRUF_RSPEC_NAMESPACE::Matchers.define :raise_rpc_error do |expected_error_class|
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
- GRUF_RSPEC_NAMESPACE::Matchers.define :be_a_successful_rpc do |_|
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.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-02-05 00:00:00.000000000 Z
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.3
132
+ rubygems_version: 3.5.9
119
133
  signing_key:
120
134
  specification_version: 4
121
135
  summary: RSpec assistance library for gruf