mocha 2.8.0 → 2.8.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/RELEASE.md +11 -0
- data/lib/mocha/integration/minitest/adapter.rb +3 -1
- data/lib/mocha/parameter_matchers/base.rb +2 -0
- data/lib/mocha/parameter_matchers/deprecations.rb +9 -11
- data/lib/mocha/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c403814a1f0f6fd604e2978ecbbd18341c543f9e894ce9da078e3ed277e5a92c
|
|
4
|
+
data.tar.gz: 55313439e576d54b112d313a8ce3e3ccca809e8716c0bccbeed1f6f87c33aadf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7383b0e2494d3cb257f21094204437fd86b2dfb55090642b036f0ed86facb0e8f6800933c8ebacc3b45145f4975d2aad0bfe84e772b683c33b5bb6fcfe0f9c03
|
|
7
|
+
data.tar.gz: 2963d0995efa21bff9ac7ee98e7b3ff321223a0a51d2dbc9d6011c490e00071b100e05e30026eebe5b43fae23c602f2da0398ff93b03b357ab349fd4eb7d108e
|
data/RELEASE.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## 2.8.1
|
|
4
|
+
|
|
5
|
+
### External changes
|
|
6
|
+
|
|
7
|
+
* Restore unqualified access to `ParameterMatchers` matcher classes, but deprecate such access (5231a4f7)
|
|
8
|
+
* Restore unqualified access to `ParameterMatchers::BaseMethods`, but deprecate such access (8a898567)
|
|
9
|
+
|
|
3
10
|
## 2.8.0
|
|
4
11
|
|
|
5
12
|
Many thanks to @etiennebarrie for his help in testing v3.0.0 release candidates which led to many of these changes.
|
|
@@ -15,6 +22,10 @@ Many thanks to @etiennebarrie for his help in testing v3.0.0 release candidates
|
|
|
15
22
|
|
|
16
23
|
* Move `ParameterMatchers#parse_option` -> `HasEntry.parse_option` (9e2a6f66)
|
|
17
24
|
|
|
25
|
+
**WARNING: This release accidentally removed access to ParameterMatchers classes**
|
|
26
|
+
* Fully-qualified access from within a test/spec class still works, e.g. `Mocha::ParameterMatchers::HasKey`, but unqualified access does not work, e.g. `HasKey`.
|
|
27
|
+
* The mistake has been fixed in v2.8.1 where unqualified access is restored but deprecated. Unqualified access will be removed in v3.
|
|
28
|
+
|
|
18
29
|
## 2.7.1
|
|
19
30
|
|
|
20
31
|
### External changes
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
require 'mocha/api'
|
|
2
2
|
require 'mocha/integration/assertion_counter'
|
|
3
3
|
require 'mocha/expectation_error_factory'
|
|
4
|
+
require 'mocha/parameter_matchers/deprecations'
|
|
4
5
|
|
|
5
6
|
module Mocha
|
|
6
7
|
module Integration
|
|
@@ -22,7 +23,8 @@ module Mocha
|
|
|
22
23
|
end
|
|
23
24
|
|
|
24
25
|
# @private
|
|
25
|
-
def self.included(
|
|
26
|
+
def self.included(mod)
|
|
27
|
+
mod.extend(Mocha::ParameterMatchers::Deprecations)
|
|
26
28
|
Mocha::ExpectationErrorFactory.exception_class = ::Minitest::Assertion
|
|
27
29
|
end
|
|
28
30
|
|
|
@@ -3,19 +3,17 @@ require 'set'
|
|
|
3
3
|
|
|
4
4
|
module Mocha
|
|
5
5
|
module ParameterMatchers
|
|
6
|
-
module
|
|
6
|
+
module Deprecations
|
|
7
7
|
# @private
|
|
8
|
-
def
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
)
|
|
15
|
-
end
|
|
16
|
-
else
|
|
17
|
-
super(name)
|
|
8
|
+
def const_missing(name)
|
|
9
|
+
if ParameterMatchers.access_deprecated?(name)
|
|
10
|
+
ParameterMatchers.const_get(name).tap do |mod|
|
|
11
|
+
Deprecation.warning(
|
|
12
|
+
"Referencing #{name} outside its namespace is deprecated. Use fully-qualified #{mod} instead."
|
|
13
|
+
)
|
|
18
14
|
end
|
|
15
|
+
else
|
|
16
|
+
super(name)
|
|
19
17
|
end
|
|
20
18
|
end
|
|
21
19
|
end
|
data/lib/mocha/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mocha
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.8.
|
|
4
|
+
version: 2.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Mead
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ruby2_keywords
|