debugging 2.0.0 → 2.1.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: 872be0c025197161f198fa80b00b9858ccd5c2a07fa9206614e167f3ece4127d
4
- data.tar.gz: f3a4c854578c6a36be5919069a2448c2771e4d14e320a303194214d8a1c74d33
3
+ metadata.gz: b8341a28c8f1fdac2a305791a18ee36e1f0988ad43a8cf7066dbed9ca1aa09c8
4
+ data.tar.gz: c13a21e3905c8ab5d32ee4cddf76994bd2ae5a804ec26a4fd2b9cb6e0d3a5b40
5
5
  SHA512:
6
- metadata.gz: 7d1401c88701c1ff2e1a6a55452dce12f707beaefca1c1391be0f2733d094d93a43810103ce1627bff6165688ef4ae56c05e7f0555b67d65e8c14610fad6cac4
7
- data.tar.gz: d219975b0a6656d4c3ce8828037a183d6e92aad103fdd41aacd5130fbd17db730aca2f51629171c9e24db2eded92368085eaaa0cffb6dcd46ec05153af65ca7c
6
+ metadata.gz: c4478513d9edc86671109191a96d7f182fcc208b2f06d8b497d936370b224a05f23c7292d5791653344e472a61911b1aee9448074216d63ac22bc121e54e6b9b
7
+ data.tar.gz: af16e10e496f26a5c0356fdfc7dd487672edc298be73d8d409b98c67450222bff1f9c05f0438c590297eb6791e6a753532a476f58cbd3e3b627d2c51637fcf30
data/ChangeLog.md CHANGED
@@ -1,5 +1,14 @@
1
1
  ## ChangeLog
2
2
 
3
+ ### 2.1.1 / 2025-12-25
4
+
5
+ * Relax Ruby requirement to allow Ruby 4.0
6
+
7
+ ### 2.1.0 / 2022-12-25
8
+
9
+ * Remove `debugging/mof`; use looksee, object shadow, or IRB's own ls for reliable lookup path inspection
10
+ * Fix that `debugging/all` also loads howtocall
11
+
3
12
  ### 2.0.0 / 2021-12-30
4
13
 
5
14
  * Remove `debugging/repl`, since Ruby now has `binding.irb`
data/Gemfile CHANGED
@@ -1,3 +1,11 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ ### ### ###
6
+
7
+ # 3.2 workaround for RSpec 2.99, see https://bugs.ruby-lang.org/issues/17391
8
+ def File.exists?(f)exist?(f)end unless defined? File.exists?
9
+
10
+ ### ### ###
11
+
data/Gemfile.lock CHANGED
@@ -1,23 +1,28 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- debugging (1.1.2)
4
+ debugging (2.1.0)
5
5
  paint (>= 0.9, < 3.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- diff-lcs (1.4.4)
11
- paint (2.2.1)
10
+ diff-lcs (1.6.2)
11
+ paint (2.3.0)
12
12
  rake (13.0.6)
13
- rspec (2.99.0)
14
- rspec-core (~> 2.99.0)
15
- rspec-expectations (~> 2.99.0)
16
- rspec-mocks (~> 2.99.0)
17
- rspec-core (2.99.2)
18
- rspec-expectations (2.99.2)
19
- diff-lcs (>= 1.1.3, < 2.0)
20
- rspec-mocks (2.99.4)
13
+ rspec (3.13.2)
14
+ rspec-core (~> 3.13.0)
15
+ rspec-expectations (~> 3.13.0)
16
+ rspec-mocks (~> 3.13.0)
17
+ rspec-core (3.13.6)
18
+ rspec-support (~> 3.13.0)
19
+ rspec-expectations (3.13.5)
20
+ diff-lcs (>= 1.2.0, < 2.0)
21
+ rspec-support (~> 3.13.0)
22
+ rspec-mocks (3.13.7)
23
+ diff-lcs (>= 1.2.0, < 2.0)
24
+ rspec-support (~> 3.13.0)
25
+ rspec-support (3.13.6)
21
26
 
22
27
  PLATFORMS
23
28
  ruby
@@ -25,7 +30,7 @@ PLATFORMS
25
30
  DEPENDENCIES
26
31
  debugging!
27
32
  rake (~> 13.0)
28
- rspec (~> 2.99)
33
+ rspec (~> 3.13)
29
34
 
30
35
  BUNDLED WITH
31
36
  2.2.22
data/MIT-LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2021 Jan Lelis
1
+ Copyright (c) 2010-2022 Jan Lelis
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -95,57 +95,6 @@ a = ->(filter: /\A.*\z/, string:){ string[filter] }
95
95
  howtocall a #=> call(string:, filter:)
96
96
  ```
97
97
 
98
-
99
- ### mof(obj, depth = nil)
100
-
101
- "Methods of": Prints out available methods, ordered by modules:
102
-
103
- ```ruby
104
- mof [1,2,3]
105
- ```
106
-
107
- ```
108
- ###
109
- Eigenclass
110
-
111
- Array
112
- inspect to_s to_a to_h to_ary frozen? == eql? hash [] []= at fet
113
- ch first last concat << push pop shift unshift insert each each_i
114
- ndex reverse_each length size empty? find_index index rindex join r
115
- everse reverse! rotate rotate! sort sort! sort_by! collect collect!
116
- map map! select select! keep_if values_at delete delete_at delete_i
117
- f reject reject! zip transpose replace clear fill include? <=> sli
118
- ce slice! assoc rassoc + * - & | uniq uniq! compact compact! fl
119
- atten flatten! count shuffle! shuffle sample cycle permutation combi
120
- nation repeated_permutation repeated_combination product take take_whil
121
- e drop drop_while bsearch pack
122
-
123
- Enumerable
124
- to_a entries to_h sort sort_by grep count find detect find_index f
125
- ind_all select reject collect map flat_map collect_concat inject red
126
- uce partition group_by first all? any? one? none? min max minmax
127
- min_by max_by minmax_by member? include? each_with_index reverse_each
128
- each_entry each_slice each_cons each_with_object zip take take_while
129
- drop drop_while cycle chunk slice_before lazy
130
-
131
- Object
132
-
133
- Debugging
134
-
135
- Kernel
136
- nil? === =~ !~ eql? hash <=> class singleton_class clone dup tain
137
- t tainted? untaint untrust untrusted? trust freeze frozen? to_s ins
138
- pect methods singleton_methods protected_methods private_methods public
139
- _methods instance_variables instance_variable_get instance_variable_set
140
- instance_variable_defined? remove_instance_variable instance_of? kind_of?
141
- is_a? tap send public_send respond_to? extend display method publi
142
- c_method singleton_method define_singleton_method object_id to_enum enu
143
- m_for
144
-
145
- BasicObject
146
- == equal? ! != instance_eval instance_exec __send__ __id__
147
- ```
148
-
149
98
  ### q(*args)
150
99
 
151
100
  Like `Kernel#p`, but with colors on one line:
@@ -164,5 +113,5 @@ re "mail@janlelis.de", /\b([A-Z0-9._%+-]+)@([A-Z0-9.-]+\.[A-Z]{2,10})\b/i, 0..2
164
113
 
165
114
  ## J-_-L
166
115
 
167
- Copyright (c) 2010-2021 Jan Lelis. MIT License. Originated from the
116
+ Copyright (c) 2010-2022 Jan Lelis. MIT License. Originated from the
168
117
  [zucker](https://github.com/janlelis/sugar_refinery) gem.
data/debugging.gemspec CHANGED
@@ -18,10 +18,10 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ['lib']
19
19
  gem.metadata = { "rubygems_mfa_required" => "true" }
20
20
 
21
- gem.required_ruby_version = '>= 2.0', '< 4.0'
21
+ gem.required_ruby_version = '>= 2.0'
22
22
 
23
23
  gem.add_dependency 'paint', '>= 0.9', '< 3.0'
24
24
 
25
25
  gem.add_development_dependency 'rake', '~> 13.0'
26
- gem.add_development_dependency 'rspec', '~> 2.99'
26
+ gem.add_development_dependency 'rspec', '~> 3.13'
27
27
  end
data/lib/debugging/all.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  at
3
3
  beep
4
4
  callstack
5
- mof
5
+ howtocall
6
6
  q
7
7
  re
8
8
  ].each{ |m| require_relative(m) }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Debugging
4
- VERSION = "2.0.0"
4
+ VERSION = "2.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debugging
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2021-12-30 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: paint
@@ -50,14 +49,14 @@ dependencies:
50
49
  requirements:
51
50
  - - "~>"
52
51
  - !ruby/object:Gem::Version
53
- version: '2.99'
52
+ version: '3.13'
54
53
  type: :development
55
54
  prerelease: false
56
55
  version_requirements: !ruby/object:Gem::Requirement
57
56
  requirements:
58
57
  - - "~>"
59
58
  - !ruby/object:Gem::Version
60
- version: '2.99'
59
+ version: '3.13'
61
60
  description: Utilities for better "print debugging"
62
61
  email:
63
62
  - hi@ruby.consulting
@@ -82,7 +81,6 @@ files:
82
81
  - lib/debugging/beep.rb
83
82
  - lib/debugging/callstack.rb
84
83
  - lib/debugging/howtocall.rb
85
- - lib/debugging/mof.rb
86
84
  - lib/debugging/q.rb
87
85
  - lib/debugging/re.rb
88
86
  - lib/debugging/version.rb
@@ -95,7 +93,6 @@ licenses:
95
93
  - MIT
96
94
  metadata:
97
95
  rubygems_mfa_required: 'true'
98
- post_install_message:
99
96
  rdoc_options: []
100
97
  require_paths:
101
98
  - lib
@@ -104,17 +101,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
101
  - - ">="
105
102
  - !ruby/object:Gem::Version
106
103
  version: '2.0'
107
- - - "<"
108
- - !ruby/object:Gem::Version
109
- version: '4.0'
110
104
  required_rubygems_version: !ruby/object:Gem::Requirement
111
105
  requirements:
112
106
  - - ">="
113
107
  - !ruby/object:Gem::Version
114
108
  version: '0'
115
109
  requirements: []
116
- rubygems_version: 3.3.3
117
- signing_key:
110
+ rubygems_version: 4.0.3
118
111
  specification_version: 4
119
112
  summary: Print debugging helpers
120
113
  test_files:
data/lib/debugging/mof.rb DELETED
@@ -1,36 +0,0 @@
1
- require 'debugging'
2
-
3
- module Debugging
4
- private
5
-
6
- def mof(obj, depth = nil, grep = //)
7
- grep = Regexp.new(grep)
8
- puts Paint["###", :red, :bold]
9
-
10
- if obj.is_a? Module
11
- klass, method_function = obj, :singleton_methods
12
- depth += 1 if depth
13
- else
14
- klass, method_function = obj.class, :public_instance_methods
15
-
16
- eigen_methods = obj.singleton_methods.grep(grep)
17
- if eigen_methods.empty?
18
- puts Paint['Eigenclass', :yellow]
19
- else
20
- puts Paint['Eigenclass', :green, :underline], eigen_methods.map(&:to_s)*' '
21
- end
22
- puts
23
- end
24
-
25
- (depth || klass.ancestors.size).times{ |level|
26
- if cur = klass.ancestors[level]
27
- level_methods = cur.send(method_function, false).grep(grep)
28
- colors = level_methods.empty? ? [:yellow] : [:green, :underline]
29
- puts Paint["#{cur}", *colors], level_methods.map(&:to_s)*' '
30
- puts unless level_methods.empty?
31
- end
32
- }
33
-
34
- nil
35
- end
36
- end