ircinch 2.4.1 → 2.4.2

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: 3e646f4e5f8d8281a86ddab9727f02ba9ee5c5ebcd874d12aa814a0691d63c9f
4
- data.tar.gz: d1a798b6518cbabdfe928a6f56969a5fe1a70cd56ab00ae167da25ccacdae226
3
+ metadata.gz: de7e4e085fee1303e2bcca842721d58d57748d597b392c2f914a25bd2e6a30ef
4
+ data.tar.gz: 8aae2cfb9b253be5bb25aed45f05f1bb26de5b0acad85f732dbde1d9b7a54268
5
5
  SHA512:
6
- metadata.gz: c75cb5184abbe64e61277332f9d1e64c7c143a5767d7732455e608ba1c2d1f73eeaefbc4da64f27d252b4c755e591fc49ad024fb3524e0624b03ebd852bb2488
7
- data.tar.gz: a7cfa92fcfd22caf28ee5d211db38a04533b7b845a8ffc562ae87ed34864d2a439294b76bd8018eeabdeded96d719a8b0ae91bf690a43a30c43f6851b9e7966b
6
+ metadata.gz: 3a6fa7c8ab22c8afaf2426e2ac39321587b490a7a9cd186f7b025a10758286879d77e945dbc45089ffc23564725f74bad9c77b2bdd9f4223b8ee5a7373197627
7
+ data.tar.gz: 7ee970b4665d0e682d8e1382330d6b36809d967f485997717f2d37a96d2c9f14a244d96de00d4fd45bd0f8c57682160439b980f697b18c6044ffc44fcadacd3c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ * IRCinch 2.4.2, 3 April 2025
2
+ - Improve Gemspec metadata
3
+ - Performance and linting improvements
4
+
1
5
  * IRCinch 2.4.1, 1 April 2025
2
6
  - Gemspec updates for compatibility with Ruby >= 3.4.0
3
7
  - Minor readme and documentation updates
data/ircinch.gemspec CHANGED
@@ -14,9 +14,14 @@ Gem::Specification.new do |spec|
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = ">= 3.2.0"
16
16
 
17
- spec.metadata["homepage_uri"] = spec.homepage
18
- spec.metadata["source_code_uri"] = "https://github.com/ircinchrb/ircinch"
19
- spec.metadata["changelog_uri"] = "https://github.com/ircinchrb/ircinch/blob/main/CHANGELOG.md"
17
+ spec.metadata = {
18
+ "bug_tracker_uri" => "https://github.com/ircinchrb/ircinch/issues",
19
+ "changelog_uri" => "https://github.com/ircinchrb/ircinch/blob/main/CHANGELOG.md",
20
+ "documentation_uri" => "https://rubydoc.info/gems/ircinch",
21
+ "homepage_uri" => spec.homepage,
22
+ "source_code_uri" => "https://github.com/ircinchrb/ircinch",
23
+ "rubygems_mfa_required" => "true"
24
+ }
20
25
 
21
26
  # Specify which files should be added to the gem when it is released.
22
27
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
data/lib/cinch/channel.rb CHANGED
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "set"
4
-
5
3
  require_relative "target"
6
4
 
7
5
  module Cinch
@@ -418,7 +416,7 @@ module Cinch
418
416
  # allow colors.
419
417
  text = Cinch::Formatting.unformat(text)
420
418
  end
421
- super(text, notice)
419
+ super
422
420
  end
423
421
  alias_method :msg, :send # deprecated
424
422
  alias_method :privmsg, :send # deprecated
@@ -14,7 +14,7 @@ module Cinch
14
14
 
15
15
  def initialize(base = nil)
16
16
  base ||= self.class.default_config
17
- super(base)
17
+ super
18
18
  end
19
19
 
20
20
  # @return [Hash]
@@ -32,7 +32,7 @@ module Cinch
32
32
  # doesn't support yet.
33
33
  class UnsupportedMode < Generic
34
34
  def initialize(mode)
35
- super "Cinch does not support the mode '#{mode}' yet."
35
+ super("Cinch does not support the mode '#{mode}' yet.")
36
36
  end
37
37
  end
38
38
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "set"
4
-
5
3
  require_relative "cached_list"
6
4
 
7
5
  module Cinch
data/lib/cinch/irc.rb CHANGED
@@ -504,7 +504,7 @@ module Cinch
504
504
  end
505
505
  elsif direction == :add
506
506
  # channel options
507
- msg.channel.modes_unsynced[mode] = param.nil? ? true : param
507
+ msg.channel.modes_unsynced[mode] = param.nil? || param
508
508
  else
509
509
  msg.channel.modes_unsynced.delete(mode)
510
510
  end
data/lib/cinch/logger.rb CHANGED
@@ -133,7 +133,7 @@ module Cinch
133
133
  private
134
134
 
135
135
  def format_message(message, level)
136
- __send__ "format_#{level}", message
136
+ __send__ :"format_#{level}", message
137
137
  end
138
138
 
139
139
  def format_general(message)
data/lib/cinch/message.rb CHANGED
@@ -357,7 +357,7 @@ module Cinch
357
357
  end
358
358
 
359
359
  def parse_error
360
- return @command.to_i if numeric_reply? && @command[/[45]\d\d/]
360
+ @command.to_i if numeric_reply? && @command[/[45]\d\d/]
361
361
  end
362
362
 
363
363
  def parse_message
data/lib/cinch/network.rb CHANGED
@@ -41,13 +41,13 @@ module Cinch
41
41
  # @return [String, nil] The mode used for getting the list of
42
42
  # channel owners, if any
43
43
  def owner_list_mode
44
- return "q" if @ircd == :unreal || @ircd == :inspircd
44
+ "q" if @ircd == :unreal || @ircd == :inspircd
45
45
  end
46
46
 
47
47
  # @return [String, nil] The mode used for getting the list of
48
48
  # channel quiets, if any
49
49
  def quiet_list_mode
50
- return "q" if @ircd == :"ircd-seven"
50
+ "q" if @ircd == :"ircd-seven"
51
51
  end
52
52
 
53
53
  # @return [Boolean] Does WHOIS only support one argument?
data/lib/cinch/plugin.rb CHANGED
@@ -163,11 +163,11 @@ module Cinch
163
163
  when 1
164
164
  # {:key => value, ...}
165
165
  args.first.each do |key, value|
166
- send("#{key}=", value)
166
+ send(:"#{key}=", value)
167
167
  end
168
168
  when 2
169
169
  # key, value
170
- send("#{args.first}=", args.last)
170
+ send(:"#{args.first}=", args.last)
171
171
  else
172
172
  raise ArgumentError # TODO proper error message
173
173
  end
@@ -367,7 +367,7 @@ module Cinch
367
367
  @bot.loggers.debug "[plugin] #{self.class.plugin_name}: Registering CTCP `#{ctcp}`"
368
368
  new_handler = Handler.new(@bot, :ctcp, Pattern.generate(:ctcp, ctcp)) do |message, *args|
369
369
  if self.class.call_hooks(:pre, :ctcp, nil, self, [message])
370
- __send__("ctcp_#{ctcp.downcase}", message, *args)
370
+ __send__(:"ctcp_#{ctcp.downcase}", message, *args)
371
371
  self.class.call_hooks(:post, :ctcp, nil, self, [message])
372
372
  else
373
373
  @bot.loggers.debug "[plugin] #{self.class.plugin_name}: Dropping message due to hook"
@@ -12,7 +12,7 @@ class Module
12
12
  attr(attribute)
13
13
  end
14
14
 
15
- define_method("#{attribute}_unsynced") do
15
+ define_method(:"#{attribute}_unsynced") do
16
16
  attr(attribute, false, true)
17
17
  end
18
18
  end
@@ -40,7 +40,7 @@ module Cinch
40
40
  result = 1
41
41
  while e > 0
42
42
  result = (result * b) % m if e[0] == 1
43
- e = e >> 1
43
+ e >>= 1
44
44
  b = (b * b) % m
45
45
  end
46
46
  result
@@ -33,7 +33,7 @@ module Cinch
33
33
  if data
34
34
  @data[attribute] = value
35
35
  else
36
- instance_variable_set("@#{attribute}", value)
36
+ instance_variable_set(:"@#{attribute}", value)
37
37
  end
38
38
  @synced_attributes << attribute
39
39
  end
@@ -70,7 +70,7 @@ module Cinch
70
70
  if data
71
71
  @data[attribute]
72
72
  else
73
- instance_variable_get("@#{attribute}")
73
+ instance_variable_get(:"@#{attribute}")
74
74
  end
75
75
  end
76
76
 
data/lib/cinch/target.rb CHANGED
@@ -138,7 +138,7 @@ module Cinch
138
138
  # @param [#to_s] message the ctcp message
139
139
  # @return [void]
140
140
  def ctcp(message)
141
- send "\001#{message}\001"
141
+ send :"\001#{message}\001"
142
142
  end
143
143
 
144
144
  def concretize
data/lib/cinch/user.rb CHANGED
@@ -135,13 +135,13 @@ module Cinch
135
135
  def unknown_unsynced
136
136
  attr(:unknown?, true, true)
137
137
  end
138
- alias_method :"unknown?_unsynced", "unknown_unsynced"
138
+ alias_method :"unknown?_unsynced", :unknown_unsynced
139
139
 
140
140
  # @private
141
141
  def online_unsynced
142
142
  attr(:online?, true, true)
143
143
  end
144
- alias_method :"online?_unsynced", "online_unsynced"
144
+ alias_method :"online?_unsynced", :online_unsynced
145
145
 
146
146
  # @private
147
147
  def channels_unsynced
@@ -152,14 +152,14 @@ module Cinch
152
152
  def secure_unsynced
153
153
  attr(:secure?, true, true)
154
154
  end
155
- alias_method :"secure?_unsynced", "secure_unsynced"
155
+ alias_method :"secure?_unsynced", :secure_unsynced
156
156
 
157
157
  # @private
158
158
  # @since 2.1.0
159
159
  def oper_unsynced
160
160
  attr(:oper?, true, true)
161
161
  end
162
- alias_method :"oper?_unsynced", "oper_unsynced"
162
+ alias_method :"oper?_unsynced", :oper_unsynced
163
163
 
164
164
  # By default, you can use methods like {#user}, {#host} and
165
165
  # alike – If you however fear that another thread might change
data/lib/cinch/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Cinch
4
4
  # Version of the library
5
- VERSION = "2.4.1"
5
+ VERSION = "2.4.2"
6
6
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ircinch
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Sias
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-04-02 00:00:00.000000000 Z
10
+ date: 2025-04-04 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: ostruct
@@ -235,9 +235,12 @@ homepage: https://github.com/ircinchrb/ircinch
235
235
  licenses:
236
236
  - MIT
237
237
  metadata:
238
+ bug_tracker_uri: https://github.com/ircinchrb/ircinch/issues
239
+ changelog_uri: https://github.com/ircinchrb/ircinch/blob/main/CHANGELOG.md
240
+ documentation_uri: https://rubydoc.info/gems/ircinch
238
241
  homepage_uri: https://github.com/ircinchrb/ircinch
239
242
  source_code_uri: https://github.com/ircinchrb/ircinch
240
- changelog_uri: https://github.com/ircinchrb/ircinch/blob/main/CHANGELOG.md
243
+ rubygems_mfa_required: 'true'
241
244
  rdoc_options: []
242
245
  require_paths:
243
246
  - lib