grift 2.1.0 → 2.2.0

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: be076a2312ee3278d68f393d8ace60b12aa44cec9923336fbe0469366be5c9cd
4
- data.tar.gz: b38846285534aaf9e56c413c77b84da307655a1ac336aba9c8a4fa3b676a34c7
3
+ metadata.gz: aa5b5344bca43ca62082d11f90cea53e27b02ee4defc424916aa7ffa123099f0
4
+ data.tar.gz: dcc8fe58f1f753b15dc040a2663467d159de298bf08b51177d61652ac6105a9f
5
5
  SHA512:
6
- metadata.gz: 25cdd247a6c4eacff1c77b099d22475bedb56d7a885beb1365e71e6798bddee87401fe1257e65cfbb5af5137b8458af650f2916f32b000a0712c3494e3f45459
7
- data.tar.gz: 2c0e207ea0c7eb8db2719af429aaf0831fcb18169f5167d92f0111207e5a228e9f2a5d49131565dd499043268b65c4481fbd4497dca918c993326d7ed683102f
6
+ metadata.gz: cc2aa7d33cfd5296bc24a8fb10d5dc678c3b71781d9ff63a7c475055997310a41fa6963ff351c14384a321224ba3bbf2159b2ae94c06ce03b5997725da46f1ae
7
+ data.tar.gz: 2809aeaf6fde5122e733e0dd25e84d9989051b9e5d25ca7d2593e77b005785182bede7d0caf81e7743f500d389f834c4fa67b89a28d7e85d10ed4cb3f0c29006
@@ -0,0 +1,3 @@
1
+ # github sponsors
2
+ github:
3
+ - clarkedb
@@ -15,12 +15,12 @@ jobs:
15
15
  BUNDLE_WITHOUT: development:test
16
16
 
17
17
  steps:
18
- - uses: actions/checkout@v3
18
+ - uses: actions/checkout@v4
19
19
 
20
- - name: Set up Ruby 3.1
20
+ - name: Set up Ruby 3.3
21
21
  uses: ruby/setup-ruby@v1
22
22
  with:
23
- ruby-version: 3.1
23
+ ruby-version: 3.3
24
24
  bundler-cache: true
25
25
 
26
26
  - name: Rubocop
@@ -33,10 +33,10 @@ jobs:
33
33
  strategy:
34
34
  fail-fast: false
35
35
  matrix:
36
- ruby: ["2.7", "3.0", "3.1", "3.2"]
36
+ ruby: ["2.7", "3.0", "3.1", "3.2", "3.3"]
37
37
 
38
38
  steps:
39
- - uses: actions/checkout@v3
39
+ - uses: actions/checkout@v4
40
40
  - uses: ruby/setup-ruby@v1
41
41
  with:
42
42
  ruby-version: ${{ matrix.ruby }}
data/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
8
8
 
9
9
  None
10
10
 
11
+ ## [2.2.0](https://github.com/clarkedb/grift/releases/tag/v2.2.0) - 2024-01-13
12
+
13
+ ### Added
14
+
15
+ * Official support for Ruby 3.3 ([#203](https://github.com/clarkedb/grift/pull/203))
16
+
11
17
  ## [2.1.0](https://github.com/clarkedb/grift/releases/tag/v2.1.0) - 2022-12-27
12
18
 
13
19
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grift (2.1.0)
4
+ grift (2.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -15,51 +15,56 @@ GEM
15
15
  simplecov
16
16
  docile (1.4.0)
17
17
  iniparse (1.5.0)
18
- json (2.6.3)
19
- minitest (5.16.3)
20
- minitest-reporters (1.5.0)
18
+ json (2.7.1)
19
+ language_server-protocol (3.17.0.3)
20
+ minitest (5.20.0)
21
+ minitest-reporters (1.6.1)
21
22
  ansi
22
23
  builder
23
24
  minitest (>= 5.0)
24
25
  ruby-progressbar
25
- overcommit (0.59.1)
26
+ overcommit (0.60.0)
26
27
  childprocess (>= 0.6.3, < 5)
27
28
  iniparse (~> 1.4)
28
29
  rexml (~> 3.2)
29
- parallel (1.22.1)
30
- parser (3.1.3.0)
30
+ parallel (1.24.0)
31
+ parser (3.3.0.3)
31
32
  ast (~> 2.4.1)
33
+ racc
34
+ racc (1.7.3)
32
35
  rainbow (3.1.1)
33
- rake (13.0.6)
34
- regexp_parser (2.6.1)
35
- rexml (3.2.5)
36
- rubocop (1.41.1)
36
+ rake (13.1.0)
37
+ regexp_parser (2.9.0)
38
+ rexml (3.2.6)
39
+ rubocop (1.59.0)
37
40
  json (~> 2.3)
41
+ language_server-protocol (>= 3.17.0)
38
42
  parallel (~> 1.10)
39
- parser (>= 3.1.2.1)
43
+ parser (>= 3.2.2.4)
40
44
  rainbow (>= 2.2.2, < 4.0)
41
45
  regexp_parser (>= 1.8, < 3.0)
42
46
  rexml (>= 3.2.5, < 4.0)
43
- rubocop-ast (>= 1.23.0, < 2.0)
47
+ rubocop-ast (>= 1.30.0, < 2.0)
44
48
  ruby-progressbar (~> 1.7)
45
- unicode-display_width (>= 1.4.0, < 3.0)
46
- rubocop-ast (1.24.0)
47
- parser (>= 3.1.1.0)
48
- rubocop-minitest (0.25.1)
49
- rubocop (>= 0.90, < 2.0)
49
+ unicode-display_width (>= 2.4.0, < 3.0)
50
+ rubocop-ast (1.30.0)
51
+ parser (>= 3.2.1.0)
52
+ rubocop-minitest (0.34.4)
53
+ rubocop (>= 1.39, < 2.0)
54
+ rubocop-ast (>= 1.30.0, < 2.0)
50
55
  rubocop-packaging (0.5.2)
51
56
  rubocop (>= 1.33, < 2.0)
52
- rubocop-performance (1.15.2)
57
+ rubocop-performance (1.19.1)
53
58
  rubocop (>= 1.7.0, < 2.0)
54
59
  rubocop-ast (>= 0.4.0)
55
- ruby-progressbar (1.11.0)
60
+ ruby-progressbar (1.13.0)
56
61
  simplecov (0.22.0)
57
62
  docile (~> 1.1)
58
63
  simplecov-html (~> 0.11)
59
64
  simplecov_json_formatter (~> 0.1)
60
65
  simplecov-html (0.12.3)
61
66
  simplecov_json_formatter (0.1.4)
62
- unicode-display_width (2.3.0)
67
+ unicode-display_width (2.5.0)
63
68
 
64
69
  PLATFORMS
65
70
  ruby
data/README.md CHANGED
@@ -122,7 +122,7 @@ my_mock.mock.results
122
122
 
123
123
  ## Requirements
124
124
 
125
- Grift supports all Ruby versions >= 2.7 (including 3.2).
125
+ Grift supports all Ruby versions >= 2.7 (including 3.3).
126
126
 
127
127
  ## Development
128
128
 
@@ -11,6 +11,22 @@ module Grift
11
11
  CACHE_METHOD_PREFIX = 'grift_cache'
12
12
  private_constant :CACHE_METHOD_PREFIX
13
13
 
14
+ ##
15
+ # Hashes the class and method for tracking mocks.
16
+ #
17
+ # @example
18
+ # Grift::MockMethod.hash_key(String, :upcase)
19
+ # #=> 'String#upcase'
20
+ #
21
+ # @param klass [Class]
22
+ # @param method_name [Symbol]
23
+ #
24
+ # @return [String] the hash of the class and method
25
+ #
26
+ def self.hash_key(klass, method_name)
27
+ "#{klass}##{method_name}"
28
+ end
29
+
14
30
  ##
15
31
  # A new instance of MockMethod. Should be initialized via {Grift.mock} or {Grift.spy_on}
16
32
  #
@@ -36,7 +52,7 @@ module Grift
36
52
  @method_name = method_name
37
53
  @true_method_cached = false
38
54
  @mock_executions = MockExecutions.new
39
- @cache_method_name = "#{CACHE_METHOD_PREFIX}_#{method_name}".to_sym
55
+ @cache_method_name = :"#{CACHE_METHOD_PREFIX}_#{method_name}"
40
56
 
41
57
  # class methods are really instance methods of the singleton class
42
58
  @class_method = klass.singleton_class.method_defined?(method_name, true) ||
@@ -439,22 +455,6 @@ module Grift
439
455
  Grift::MockMethod.hash_key(@klass, @method_name)
440
456
  end
441
457
 
442
- ##
443
- # Hashes the class and method for tracking mocks.
444
- #
445
- # @example
446
- # Grift::MockMethod.hash_key(String, :upcase)
447
- # #=> 'String#upcase'
448
- #
449
- # @param klass [Class]
450
- # @param method_name [Symbol]
451
- #
452
- # @return [String] the hash of the class and method
453
- #
454
- def self.hash_key(klass, method_name)
455
- "#{klass}##{method_name}"
456
- end
457
-
458
458
  private
459
459
 
460
460
  ##
data/lib/grift/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Grift
4
4
  # gem version
5
- VERSION = '2.1.0'
5
+ VERSION = '2.2.0'
6
6
  public_constant :VERSION
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grift
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clark Brown
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-27 00:00:00.000000000 Z
11
+ date: 2024-01-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A gem for simple mocking and spying in Ruby's MiniTest framework.
14
14
  email:
@@ -19,6 +19,7 @@ extra_rdoc_files: []
19
19
  files:
20
20
  - ".github/CODEOWNERS"
21
21
  - ".github/CONTRIBUTING.md"
22
+ - ".github/FUNDING.yml"
22
23
  - ".github/dependabot.yml"
23
24
  - ".github/workflows/ci.yml"
24
25
  - ".gitignore"
@@ -54,7 +55,7 @@ metadata:
54
55
  homepage_uri: https://github.com/clarkedb/grift
55
56
  rubygems_mfa_required: 'true'
56
57
  source_code_uri: https://github.com/clarkedb/grift
57
- post_install_message:
58
+ post_install_message:
58
59
  rdoc_options: []
59
60
  require_paths:
60
61
  - lib
@@ -69,8 +70,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
70
  - !ruby/object:Gem::Version
70
71
  version: '0'
71
72
  requirements: []
72
- rubygems_version: 3.3.26
73
- signing_key:
73
+ rubygems_version: 3.5.3
74
+ signing_key:
74
75
  specification_version: 4
75
76
  summary: Mocking and spying in MiniTest
76
77
  test_files: []