methodfinder 2.2.3 → 2.2.4

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: 9870bf45c6bbb10d2fe3c2d5ad509a3dace99d3b0bca753127bfa20a2185f2db
4
- data.tar.gz: 424c6c14b3ec09c8b20370cb40ec2beb8e9ff9405008606d2a1ffdbc1a88c007
3
+ metadata.gz: 60a53dfb0ed92260ece6d823b14bf913ce8c1ccc5cedaca06a4d657959e17c7f
4
+ data.tar.gz: de867f859a3131529bb476f79edb0a2fd613279575f2f6218f0d02102d277137
5
5
  SHA512:
6
- metadata.gz: 475f9808360c53bc6b71861fa4ddb5c405a72ec685bb5517a5ff59704f61e034c56b802c4cc2f14fea18e55bdf811b44e03ed551c257864929294a5f0f4f6066
7
- data.tar.gz: 6835cb818777f35e343d10f14ba905eb57f797ce251ad5b0120f336a05f2d466dc1658e9dedc4f6378919024b39f29010aa772af5ee18e668e8c6bbc708a7e97
6
+ metadata.gz: 45c69e28874c5fe6eb8d20a442f74b44b5d91f1605f54bbcb930b0073fbf2a16942a708d57a11e15837c6c0eb2573bf7c7744a72743281ebbcd6219a254b29d8
7
+ data.tar.gz: 36907469a0fc84a5b6688642dd78d70b1f2c397f3b5693df2c63aa4579fc86fcf3c74119b873a536d30dc7514dcbfb873b4b98dd23bc0f02cdce846bb5fd785b
data/README.md CHANGED
@@ -207,7 +207,7 @@ https://github.com/citizen428/methodfinder.
207
207
 
208
208
  ## VERSION
209
209
 
210
- 2.2.1
210
+ 2.2.4
211
211
 
212
212
  ## AUTHOR
213
213
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MethodFinder
4
- VERSION = '2.2.3'
4
+ VERSION = '2.2.4'
5
5
  end
data/lib/methodfinder.rb CHANGED
@@ -33,7 +33,8 @@ module MethodFinder
33
33
  # Default arguments for methods
34
34
  # :nodoc:
35
35
  ARGS = {
36
- cycle: [1] # prevent cycling forever
36
+ cycle: [1], # prevent cycling forever
37
+ tally: [], # Since Ruby 3.1 Enumberable tally takes an optional hash
37
38
  }.freeze
38
39
 
39
40
  # Ignoring methods, e.g. { :Object => [:ri, :vim] }
@@ -61,7 +62,7 @@ module MethodFinder
61
62
  # $ METHOD_FINDER_DEBUG=0 irb # false
62
63
  # $ METHOD_FINDER_DEBUG=false irb # false
63
64
  # $ METHOD_FINDER_DEBUG= irb # false
64
- @debug = !ENV.fetch('METHOD_FINDER_DEBUG', '').match(/\A(0|false)?\z/i)
65
+ @debug = !ENV.fetch('METHOD_FINDER_DEBUG', '').match?(/\A(0|false)?\z/i)
65
66
 
66
67
  # Checks whether or not debugging is currently enabled
67
68
  # :doc:
@@ -98,7 +99,7 @@ module MethodFinder
98
99
  next unless m.arity <= args.size
99
100
 
100
101
  warn(met) if debug?
101
- a = args.empty? && ARGS.key?(met) ? ARGS[met] : args
102
+ a = ARGS.key?(met) ? ARGS[met] : args
102
103
  begin
103
104
  m.call(*a, &block) == res
104
105
  rescue StandardError
@@ -187,8 +188,11 @@ module MethodFinder
187
188
  def self.with_redirected_streams
188
189
  orig_stdout = $stdout
189
190
  orig_stderr = $stderr
190
- $stdout = StringIO.new
191
- $stderr = StringIO.new
191
+
192
+ unless debug?
193
+ $stdout = StringIO.new
194
+ $stderr = StringIO.new
195
+ end
192
196
 
193
197
  yield
194
198
  ensure
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: methodfinder
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Kohl
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-08 00:00:00.000000000 Z
11
+ date: 2022-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.2'
19
+ version: '2.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.2'
27
- - !ruby/object:Gem::Dependency
28
- name: github_changelog_generator
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.16'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.16'
26
+ version: '2.3'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: minitest
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -101,7 +87,6 @@ executables: []
101
87
  extensions: []
102
88
  extra_rdoc_files: []
103
89
  files:
104
- - CHANGELOG.md
105
90
  - LICENSE.txt
106
91
  - README.md
107
92
  - lib/methodfinder.rb
@@ -112,8 +97,7 @@ licenses:
112
97
  metadata:
113
98
  bug_tracker_uri: https://github.com/citizen428/methodfinder/issues
114
99
  source_code_uri: https://github.com/citizen428/methodfinder
115
- changelog_uri: https://github.com/citizen428/methodfinder/blob/master/CHANGELOG.md
116
- post_install_message:
100
+ post_install_message:
117
101
  rdoc_options: []
118
102
  require_paths:
119
103
  - lib
@@ -128,8 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
112
  - !ruby/object:Gem::Version
129
113
  version: '0'
130
114
  requirements: []
131
- rubygems_version: 3.2.22
132
- signing_key:
115
+ rubygems_version: 3.3.7
116
+ signing_key:
133
117
  specification_version: 4
134
118
  summary: A Smalltalk-like Method Finder for Ruby
135
119
  test_files: []
data/CHANGELOG.md DELETED
@@ -1,80 +0,0 @@
1
- # Changelog
2
-
3
- ## [Unreleased](https://github.com/citizen428/methodfinder/tree/HEAD)
4
-
5
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v2.2.1...HEAD)
6
-
7
- **Implemented enhancements:**
8
-
9
- - Cast the METHOD\_FINDER\_DEBUG environment variable to a boolean [\#17](https://github.com/citizen428/methodfinder/pull/17) ([chocolateboy](https://github.com/chocolateboy))
10
- - Switch to Bundler gem structure [\#16](https://github.com/citizen428/methodfinder/pull/16) ([citizen428](https://github.com/citizen428))
11
-
12
- ## [v2.2.1](https://github.com/citizen428/methodfinder/tree/v2.2.1) (2018-05-02)
13
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v2.2.0...v2.2.1)
14
-
15
- ## [v2.2.0](https://github.com/citizen428/methodfinder/tree/v2.2.0) (2018-05-02)
16
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v2.1.0...v2.2.0)
17
-
18
- **Implemented enhancements:**
19
-
20
- - README.md tweaks [\#14](https://github.com/citizen428/methodfinder/pull/14) ([chocolateboy](https://github.com/chocolateboy))
21
-
22
- **Fixed bugs:**
23
-
24
- - It's not possible to pass a hash as the last argument [\#10](https://github.com/citizen428/methodfinder/issues/10)
25
- - Fix failing Travis builds [\#15](https://github.com/citizen428/methodfinder/pull/15) ([chocolateboy](https://github.com/chocolateboy))
26
- - Propagate keywords \(i.e. :debug\) from find\_method to find [\#11](https://github.com/citizen428/methodfinder/pull/11) ([chocolateboy](https://github.com/chocolateboy))
27
-
28
- ## [v2.1.0](https://github.com/citizen428/methodfinder/tree/v2.1.0) (2017-02-05)
29
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v2.0.0...v2.1.0)
30
-
31
- **Implemented enhancements:**
32
-
33
- - Allow tested method names to be dumped to STDERR via an environment variable [\#9](https://github.com/citizen428/methodfinder/pull/9) ([chocolateboy](https://github.com/chocolateboy))
34
- - Compatibility updates, fixes and workarounds [\#8](https://github.com/citizen428/methodfinder/pull/8) ([chocolateboy](https://github.com/chocolateboy))
35
-
36
- ## [v2.0.0](https://github.com/citizen428/methodfinder/tree/v2.0.0) (2013-10-30)
37
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v1.2.5...v2.0.0)
38
-
39
- ## [v1.2.5](https://github.com/citizen428/methodfinder/tree/v1.2.5) (2011-12-18)
40
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v1.2.4...v1.2.5)
41
-
42
- ## [v1.2.4](https://github.com/citizen428/methodfinder/tree/v1.2.4) (2011-10-26)
43
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v1.2.2...v1.2.4)
44
-
45
- **Implemented enhancements:**
46
-
47
- - Make methodfinder play nice with Pry [\#7](https://github.com/citizen428/methodfinder/pull/7) ([skanev](https://github.com/skanev))
48
- - Instance syntax and fix tests [\#6](https://github.com/citizen428/methodfinder/pull/6) ([BMorearty](https://github.com/BMorearty))
49
-
50
- ## [v1.2.2](https://github.com/citizen428/methodfinder/tree/v1.2.2) (2011-04-23)
51
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v1.2.1...v1.2.2)
52
-
53
- ## [v1.2.1](https://github.com/citizen428/methodfinder/tree/v1.2.1) (2011-04-16)
54
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v1.2.0...v1.2.1)
55
-
56
- **Implemented enhancements:**
57
-
58
- - Add a method ignore list [\#4](https://github.com/citizen428/methodfinder/pull/4) ([janlelis](https://github.com/janlelis))
59
-
60
- ## [v1.2.0](https://github.com/citizen428/methodfinder/tree/v1.2.0) (2011-04-08)
61
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v1.1.1...v1.2.0)
62
-
63
- ## [v1.1.1](https://github.com/citizen428/methodfinder/tree/v1.1.1) (2011-04-05)
64
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v1.1.0...v1.1.1)
65
-
66
- **Implemented enhancements:**
67
-
68
- - Alternative block interface [\#3](https://github.com/citizen428/methodfinder/issues/3)
69
-
70
- ## [v1.1.0](https://github.com/citizen428/methodfinder/tree/v1.1.0) (2011-03-31)
71
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v1.0.1...v1.1.0)
72
-
73
- **Closed issues:**
74
-
75
- - Small typo in the readme [\#2](https://github.com/citizen428/methodfinder/issues/2)
76
-
77
- ## [v1.0.1](https://github.com/citizen428/methodfinder/tree/v1.0.1) (2011-03-11)
78
- [Full Changelog](https://github.com/citizen428/methodfinder/compare/v1.0.0...v1.0.1)
79
-
80
- ## [v1.0.0](https://github.com/citizen428/methodfinder/tree/v1.0.0) (2011-02-10)