irb-kit 0.3.0 → 0.4.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: b692329d2278f59f1ce6f20d56821972cd9b77ade76381f2c3f11da5630e18af
4
- data.tar.gz: f2c933bc7b3b019b39680217e09e522df7ba3a8e5ba4e4d133c035b061bff14e
3
+ metadata.gz: 933e747eed7ae52f00c24917ffc823c6c64f46e89ee545c073acd1ab5030d658
4
+ data.tar.gz: 635104c16839e1e0daa5dd86fc4e9a16b6c1f2d38f71b115fd5a48a9c51b7ec1
5
5
  SHA512:
6
- metadata.gz: 3b504eef2e81b90b4cabbe8a51651eb35927a861016df3b08c6f631b9619fb4905b28884bd600b52245e0a6e14020284e6b34f8bd81690602211b12717540957
7
- data.tar.gz: 76dc0f7cc724201608a42cc831f4d2b72c91e53f37cf14f3fa0ae80e5f7124c8b607fad277bccd92b00e1dfb336d6a4f09b40399f379e79087c473954de01595
6
+ metadata.gz: 33f497dfd8df38fa16951b88f8309c87d282576c87e45540d6c2ee42451731c69269a67ed76b806f53b4338eadc8165feb27bb4b064a1b5c0256936a30f471e7
7
+ data.tar.gz: af933ab60e72c168d1e0eef54d30edc36ddb9d69d26a925b834cbfa52d4994537fb75177b872d42c38fe766e00345e29ca4b610720761fc67b7136a059f8bab3
checksums.yaml.gz.sig CHANGED
Binary file
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 = "0.3.0"
5
+ spec.version = "0.4.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/irb-kit"
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.cert_chain = [Gem.default_cert_path]
24
24
 
25
25
  spec.required_ruby_version = "~> 3.3"
26
- spec.add_dependency "irb", "~> 1.13"
26
+ spec.add_dependency "irb", "~> 1.14"
27
27
  spec.add_dependency "zeitwerk", "~> 2.6"
28
28
 
29
29
  spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
@@ -3,7 +3,7 @@
3
3
  module IRB
4
4
  module Kit
5
5
  # Loads extensions for namespace.
6
- class Loader
6
+ class Register
7
7
  ALL = [:all].freeze
8
8
 
9
9
  def initialize registrar, namespace, all: ALL
@@ -12,15 +12,15 @@ module IRB
12
12
  @all = all
13
13
  end
14
14
 
15
- def call(*monikers) = monikers == all ? register_all : register_selected(*monikers)
15
+ def call(*monikers) = monikers == all ? maximum : only(*monikers)
16
16
 
17
17
  private
18
18
 
19
19
  attr_reader :registrar, :namespace, :all
20
20
 
21
- def register_all = constants.each { |helper| registrar.register helper::MONIKER, helper }
21
+ def maximum = constants.each { |helper| registrar.register helper::MONIKER, helper }
22
22
 
23
- def register_selected(*monikers)
23
+ def only(*monikers)
24
24
  constants.select { |helper| monikers.include? helper::MONIKER }
25
25
  .then { |selected| monikers.zip selected }
26
26
  .each { |moniker, helper| registrar.register moniker, helper }
data/lib/irb/kit.rb CHANGED
@@ -17,9 +17,9 @@ module IRB
17
17
  @loader ||= registry.loaders.find { |loader| loader.tag == "irb-kit" }
18
18
  end
19
19
 
20
- def self.register_commands(*) = Loader.new(IRB::Command, :Commands).call(*)
20
+ def self.register_commands(*) = Register.new(IRB::Command, :Commands).call(*)
21
21
 
22
- def self.register_helpers(*) = Loader.new(IRB::HelperMethod, :Helpers).call(*)
22
+ def self.register_helpers(*) = Register.new(IRB::HelperMethod, :Helpers).call(*)
23
23
 
24
24
  def self.prompt = @prompt ||= Prompter.new.call
25
25
  end
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: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -35,7 +35,7 @@ cert_chain:
35
35
  3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
36
36
  gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
37
37
  -----END CERTIFICATE-----
38
- date: 2024-06-23 00:00:00.000000000 Z
38
+ date: 2024-07-08 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: irb
@@ -43,14 +43,14 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '1.13'
46
+ version: '1.14'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '1.13'
53
+ version: '1.14'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: zeitwerk
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -91,8 +91,8 @@ files:
91
91
  - lib/irb/kit/helpers/edit_source.rb
92
92
  - lib/irb/kit/helpers/paste.rb
93
93
  - lib/irb/kit/helpers/search.rb
94
- - lib/irb/kit/loader.rb
95
94
  - lib/irb/kit/prompter.rb
95
+ - lib/irb/kit/register.rb
96
96
  homepage: https://alchemists.io/projects/irb-kit
97
97
  licenses:
98
98
  - Hippocratic-2.1
metadata.gz.sig CHANGED
Binary file