irb-kit 1.5.0 → 2.0.0
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
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +0 -25
- data/irb-kit.gemspec +3 -3
- data/lib/irb/kit/helpers/edit_source.rb +0 -2
- data.tar.gz.sig +0 -0
- metadata +5 -7
- metadata.gz.sig +2 -2
- data/lib/irb/kit/handlers/clipper.rb +0 -26
- data/lib/irb/kit/helpers/clip.rb +0 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f55cd898907e998d4db9a3670336efdaea15e3e8226957124862c48dde904e75
|
|
4
|
+
data.tar.gz: faf5b807f8dcd20b0c2d93859c62af92bd061e470a20b4160bd1782c186c5962
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6ea692bfffccf676b45bb834efa0ed3159c3545d775cdb0f506cc0f8ce90998b316ebcba788979b2345211279958a9012b0fcb9167712185e31837d2951ca53
|
|
7
|
+
data.tar.gz: c83854ce28aeacef1478b0e6bcc1a2cf844961ef0e9f9571297068be259d7e38933dd99929d70cc18ee49978fc9fe6a4ac944f7beb619fc2670db63d8089847a
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/README.adoc
CHANGED
|
@@ -149,7 +149,6 @@ Several custom helpers are provided for you by this gem. Each is listed below as
|
|
|
149
149
|
....
|
|
150
150
|
Helper methods
|
|
151
151
|
conf Returns the current IRB context.
|
|
152
|
-
clip Copy input to macOS clipboard. DEPRECATED.
|
|
153
152
|
esource Edit the source code of a constant or method in your default editor.
|
|
154
153
|
paste Paste last entry from macOS clipboard.
|
|
155
154
|
search Search an object's methods by pattern.
|
|
@@ -164,30 +163,6 @@ IRB::Kit.register_helpers(*%i[clip esource paste search])
|
|
|
164
163
|
|
|
165
164
|
Knowing this, you can disable all helpers entirely, use only the ones you care about, or enable all of them at once. The following explains each helper in greater detail.
|
|
166
165
|
|
|
167
|
-
==== `clip`
|
|
168
|
-
|
|
169
|
-
⚠️ This helper is deprecated and _will be removed_ in the next major release. Use IRB's new `copy` helper instead.
|
|
170
|
-
|
|
171
|
-
Use this helper to copy output into the macOS clipboard. Example:
|
|
172
|
-
|
|
173
|
-
[source,ruby]
|
|
174
|
-
----
|
|
175
|
-
clip (1..3).to_a
|
|
176
|
-
# 1
|
|
177
|
-
# 2
|
|
178
|
-
# 3
|
|
179
|
-
|
|
180
|
-
clip 1, 2, 3
|
|
181
|
-
# 1
|
|
182
|
-
# 2
|
|
183
|
-
# 3
|
|
184
|
-
|
|
185
|
-
clip Object.new
|
|
186
|
-
# #<Object:0x000000012a46eaf8>
|
|
187
|
-
----
|
|
188
|
-
|
|
189
|
-
This helper accepts any number of arguments. Each is delimited by a new line for pasting into another application.
|
|
190
|
-
|
|
191
166
|
==== `esource`
|
|
192
167
|
|
|
193
168
|
Use this helper, short for _edit source_, to print and edit the source of a constant or method in your default editor. This assumes your have the `EDITOR` environment variable set and configured to use your favorite editor. If not, you'll get an error requiring your to update your environment accordingly. Here are a few usage examples:
|
data/irb-kit.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |spec|
|
|
4
4
|
spec.name = "irb-kit"
|
|
5
|
-
spec.version = "
|
|
5
|
+
spec.version = "2.0.0"
|
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
|
8
8
|
spec.homepage = "https://alchemists.io/projects/irb-kit"
|
|
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
|
|
|
22
22
|
spec.signing_key = Gem.default_key_path
|
|
23
23
|
spec.cert_chain = [Gem.default_cert_path]
|
|
24
24
|
|
|
25
|
-
spec.required_ruby_version = ">=
|
|
26
|
-
spec.add_dependency "irb", "~> 1.
|
|
25
|
+
spec.required_ruby_version = ">= 4.0"
|
|
26
|
+
spec.add_dependency "irb", "~> 1.16"
|
|
27
27
|
spec.add_dependency "zeitwerk", "~> 2.7"
|
|
28
28
|
|
|
29
29
|
spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: irb-kit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brooke Kuhlmann
|
|
@@ -41,14 +41,14 @@ dependencies:
|
|
|
41
41
|
requirements:
|
|
42
42
|
- - "~>"
|
|
43
43
|
- !ruby/object:Gem::Version
|
|
44
|
-
version: '1.
|
|
44
|
+
version: '1.16'
|
|
45
45
|
type: :runtime
|
|
46
46
|
prerelease: false
|
|
47
47
|
version_requirements: !ruby/object:Gem::Requirement
|
|
48
48
|
requirements:
|
|
49
49
|
- - "~>"
|
|
50
50
|
- !ruby/object:Gem::Version
|
|
51
|
-
version: '1.
|
|
51
|
+
version: '1.16'
|
|
52
52
|
- !ruby/object:Gem::Dependency
|
|
53
53
|
name: zeitwerk
|
|
54
54
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -77,14 +77,12 @@ files:
|
|
|
77
77
|
- lib/irb/kit.rb
|
|
78
78
|
- lib/irb/kit/commands/descendants.rb
|
|
79
79
|
- lib/irb/kit/handlers/abstract.rb
|
|
80
|
-
- lib/irb/kit/handlers/clipper.rb
|
|
81
80
|
- lib/irb/kit/handlers/constant_editor.rb
|
|
82
81
|
- lib/irb/kit/handlers/descender.rb
|
|
83
82
|
- lib/irb/kit/handlers/editor.rb
|
|
84
83
|
- lib/irb/kit/handlers/method_editor.rb
|
|
85
84
|
- lib/irb/kit/handlers/paster.rb
|
|
86
85
|
- lib/irb/kit/handlers/searcher.rb
|
|
87
|
-
- lib/irb/kit/helpers/clip.rb
|
|
88
86
|
- lib/irb/kit/helpers/edit_source.rb
|
|
89
87
|
- lib/irb/kit/helpers/paste.rb
|
|
90
88
|
- lib/irb/kit/helpers/search.rb
|
|
@@ -108,14 +106,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
108
106
|
requirements:
|
|
109
107
|
- - ">="
|
|
110
108
|
- !ruby/object:Gem::Version
|
|
111
|
-
version: '
|
|
109
|
+
version: '4.0'
|
|
112
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
111
|
requirements:
|
|
114
112
|
- - ">="
|
|
115
113
|
- !ruby/object:Gem::Version
|
|
116
114
|
version: '0'
|
|
117
115
|
requirements: []
|
|
118
|
-
rubygems_version:
|
|
116
|
+
rubygems_version: 4.0.3
|
|
119
117
|
specification_version: 4
|
|
120
118
|
summary: Extends IRB by providing additional productivity enhancements.
|
|
121
119
|
test_files: []
|
metadata.gz.sig
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
V��>���κn��������� _�0Z?���p�!=��sZUL3������Ԉ�V��p�F����F�ɸw���ß��_1�������b%ԭRZC'u(B�����F&'v��c�dߪ�!m��pa�/{߅��z�Pr{�(��;4 ��ծ^
|
|
2
|
+
frȤ���뤺c�8S�تJ�u4o���_�e���y�L�xkq5�,��9Nq)�p��"����b�]�-�*(�,(�Bc���҂'i�G%!��B��һ�=�v��s�$�y.���Zj�0 �y�W�U��V89=�ph��e���̖��F�7���rz�S��X��eS�tÔ+��4!g�9��r��;��6���B
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module IRB
|
|
4
|
-
module Kit
|
|
5
|
-
module Handlers
|
|
6
|
-
# Handles copying content to the macOS clipboard.
|
|
7
|
-
class Clipper < Abstract
|
|
8
|
-
def initialize(processor: IO, **)
|
|
9
|
-
@processor = processor
|
|
10
|
-
super(**)
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def call(*lines)
|
|
14
|
-
processor.popen("pbcopy", "w") { |clipboard| clipboard.write lines.join("\n") }
|
|
15
|
-
io.puts "Copied to clipboard."
|
|
16
|
-
rescue Errno::ENOENT
|
|
17
|
-
io.puts "ERROR: Unable to copy since `pbcopy` is only supported on macOS."
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
private
|
|
21
|
-
|
|
22
|
-
attr_reader :processor
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
data/lib/irb/kit/helpers/clip.rb
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module IRB
|
|
4
|
-
module Kit
|
|
5
|
-
module Helpers
|
|
6
|
-
# Copies input to macOS clipboard.
|
|
7
|
-
class Clip < IRB::HelperMethod::Base
|
|
8
|
-
MONIKER = :clip
|
|
9
|
-
|
|
10
|
-
description "Copy input to macOS clipboard. DEPRECATED."
|
|
11
|
-
|
|
12
|
-
def initialize handler: Handlers::Clipper.new
|
|
13
|
-
super()
|
|
14
|
-
@handler = handler
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def execute(*)
|
|
18
|
-
warn "`clip` is deprecated, use IRB's native `copy` helper instead.",
|
|
19
|
-
category: :deprecated
|
|
20
|
-
|
|
21
|
-
handler.call(*)
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
attr_reader :handler
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|