debugging 2.0.0 → 2.1.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: 872be0c025197161f198fa80b00b9858ccd5c2a07fa9206614e167f3ece4127d
4
- data.tar.gz: f3a4c854578c6a36be5919069a2448c2771e4d14e320a303194214d8a1c74d33
3
+ metadata.gz: afb045a3e3347c58b06cdea68c4d484654d8f2da4f85e0454198544ef62bf67c
4
+ data.tar.gz: 30fc47cbcc4bbb8163549035e9c0d78cc5f2dd9205befc45fafcf395b26f19bb
5
5
  SHA512:
6
- metadata.gz: 7d1401c88701c1ff2e1a6a55452dce12f707beaefca1c1391be0f2733d094d93a43810103ce1627bff6165688ef4ae56c05e7f0555b67d65e8c14610fad6cac4
7
- data.tar.gz: d219975b0a6656d4c3ce8828037a183d6e92aad103fdd41aacd5130fbd17db730aca2f51629171c9e24db2eded92368085eaaa0cffb6dcd46ec05153af65ca7c
6
+ metadata.gz: fc5110354a3622932dcd671a5b6ba9953dee9f03d1ab13f97ac268b1ad72b7345260dafcebf7fe5d8862392213d2a1d4004eb2f870c2679f92eef67a1059d2d6
7
+ data.tar.gz: d5fab61e1aea27ed784fec2ca4d6047e0217bfbd5d8ffd30ebd1b219ed68318180088b3777fcbd7c43a7d383848e2a9ccebe96263b08ed0cf7e7e2e077060697
data/ChangeLog.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## ChangeLog
2
2
 
3
+ ### 2.1.0 / 2022-12-25
4
+
5
+ * Remove `debugging/mof`; use looksee, object shadow, or IRB's own ls for reliable lookup path inspection
6
+ * Fix that `debugging/all` also loads howtocall
7
+
3
8
  ### 2.0.0 / 2021-12-30
4
9
 
5
10
  * 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/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/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.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
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.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-30 00:00:00.000000000 Z
11
+ date: 2022-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paint
@@ -82,7 +82,6 @@ files:
82
82
  - lib/debugging/beep.rb
83
83
  - lib/debugging/callstack.rb
84
84
  - lib/debugging/howtocall.rb
85
- - lib/debugging/mof.rb
86
85
  - lib/debugging/q.rb
87
86
  - lib/debugging/re.rb
88
87
  - lib/debugging/version.rb
@@ -113,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
112
  - !ruby/object:Gem::Version
114
113
  version: '0'
115
114
  requirements: []
116
- rubygems_version: 3.3.3
115
+ rubygems_version: 3.4.1
117
116
  signing_key:
118
117
  specification_version: 4
119
118
  summary: Print debugging helpers
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