ircinch 2.4.1 → 2.4.3

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: d603bfc62bdd98e5a52cc6f56fea0a5ac42592df0d58c0ccf40a3197f95167b5
4
+ data.tar.gz: 271c967f694780843b98712454662782efcfc9145a0d015a7a3a5570af7303bd
5
5
  SHA512:
6
- metadata.gz: c75cb5184abbe64e61277332f9d1e64c7c143a5767d7732455e608ba1c2d1f73eeaefbc4da64f27d252b4c755e591fc49ad024fb3524e0624b03ebd852bb2488
7
- data.tar.gz: a7cfa92fcfd22caf28ee5d211db38a04533b7b845a8ffc562ae87ed34864d2a439294b76bd8018eeabdeded96d719a8b0ae91bf690a43a30c43f6851b9e7966b
6
+ metadata.gz: d192049a5f08179804fb74810d828ab4facfcada4ffbecdbc18c0e3d7474c2151298f7da2b287882fe8b3a71f40ba9e3f23d3e798f731008170fac47456b2174
7
+ data.tar.gz: 8a7693d15e83fef6b7716e1aca5d0cec0d942aa42ab8a99356a5a98fab1d1a1310f29f9a3d1546981df277f30d0b29fc57ef21b60f64124efaea3d9953f99e5a
data/.standard.yml CHANGED
@@ -1,3 +1,4 @@
1
1
  # For available configuration options, see:
2
2
  # https://github.com/testdouble/standard
3
- ruby_version: 3.4
3
+ parallel: true
4
+ ruby_version: 3.2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ * IRCinch 2.4.3, 27 December 2025
2
+ - Fix SASL auth time out by fixing IRC message parsing expression (fix by @janikrabe)
3
+ - Remove various duplicate methods
4
+ - Update standardrb configuration and lint files
5
+ - Improve CI build and steps
6
+
7
+ * IRCinch 2.4.2, 3 April 2025
8
+ - Improve Gemspec metadata
9
+ - Performance and linting improvements
10
+
1
11
  * IRCinch 2.4.1, 1 April 2025
2
12
  - Gemspec updates for compatibility with Ruby >= 3.4.0
3
13
  - Minor readme and documentation updates
@@ -8,6 +8,7 @@ require "ircinch"
8
8
 
9
9
  class Autovoice
10
10
  include Cinch::Plugin
11
+
11
12
  listen_to :join
12
13
  match(/autovoice (on|off)$/)
13
14
 
@@ -5,6 +5,7 @@ require "open-uri"
5
5
 
6
6
  class Google
7
7
  include Cinch::Plugin
8
+
8
9
  match(/google (.+)/)
9
10
 
10
11
  def search(query)
@@ -2,6 +2,7 @@ require "ircinch"
2
2
 
3
3
  class Nickchange
4
4
  include Cinch::Plugin
5
+
5
6
  listen_to :nick
6
7
 
7
8
  def listen(m)
@@ -2,6 +2,7 @@ require "ircinch"
2
2
 
3
3
  class MultiCommands
4
4
  include Cinch::Plugin
5
+
5
6
  match(/command1 (.+)/, method: :command1)
6
7
  match(/command2 (.+)/, method: :command2)
7
8
  match(/^command3 (.+)/, use_prefix: false)
@@ -8,6 +8,7 @@ class Seen
8
8
  end
9
9
 
10
10
  include Cinch::Plugin
11
+
11
12
  listen_to :channel
12
13
  match(/seen (.+)/)
13
14
 
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.
@@ -36,6 +41,7 @@ Gem::Specification.new do |spec|
36
41
  spec.add_development_dependency "base64"
37
42
  spec.add_development_dependency "bundler-audit"
38
43
  spec.add_development_dependency "bundler-integrity"
44
+ spec.add_development_dependency "irb"
39
45
  spec.add_development_dependency "minitest"
40
46
  spec.add_development_dependency "rake"
41
47
  spec.add_development_dependency "simplecov"
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
@@ -25,7 +23,7 @@ module Cinch
25
23
  synced_attr_reader :users
26
24
 
27
25
  # @return [String] the channel's topic
28
- attr_accessor :topic
26
+ attr_reader :topic
29
27
  synced_attr_reader :topic
30
28
 
31
29
  # @return [Array<Ban>] all active bans
@@ -309,7 +307,6 @@ module Cinch
309
307
  @bot.irc.send("INVITE #{user} #{@name}")
310
308
  end
311
309
 
312
- undef_method(:topic=)
313
310
  # Sets the topic.
314
311
  #
315
312
  # @param [String] new_topic the new topic
@@ -418,12 +415,8 @@ module Cinch
418
415
  # allow colors.
419
416
  text = Cinch::Formatting.unformat(text)
420
417
  end
421
- super(text, notice)
418
+ super
422
419
  end
423
- alias_method :msg, :send # deprecated
424
- alias_method :privmsg, :send # deprecated
425
- undef_method(:msg) # yardoc hack
426
- undef_method(:privmsg) # yardoc hack
427
420
 
428
421
  # @deprecated
429
422
  def msg(*args)
@@ -449,8 +442,6 @@ module Cinch
449
442
  def to_s
450
443
  @name
451
444
  end
452
- alias_method :to_str, :to_s # deprecated
453
- undef_method(:to_str) # yardoc hack
454
445
 
455
446
  def to_str
456
447
  Cinch::Utilities::Deprecation.print_deprecation("2.2.0", "Channel#to_str", "Channel#to_s")
@@ -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/helpers.rb CHANGED
@@ -182,8 +182,6 @@ module Cinch
182
182
  def Format(*settings, string)
183
183
  Formatting.format(*settings, string)
184
184
  end
185
- alias_method :Color, :Format # deprecated
186
- undef_method(:Color) # yardoc hack
187
185
 
188
186
  def Color(*args)
189
187
  Cinch::Utilities::Deprecation.print_deprecation("2.2.0", "Helpers.Color", "Helpers.Format")
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
@@ -99,7 +99,7 @@ module Cinch
99
99
  # @api private
100
100
  # @return [void]
101
101
  def parse
102
- match = @raw.match(/(?:^@([^:]+))?(?::?(\S+) )?(\S+)(.*)/)
102
+ match = @raw.match(/\A(?:@([^ ]+) )?(?::(\S+) )?(\S+)(.*)/)
103
103
  tags, @prefix, @command, raw_params = match.captures
104
104
 
105
105
  if @bot.irc.network.ngametv?
@@ -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
@@ -48,10 +48,6 @@ module Cinch
48
48
  end
49
49
  end
50
50
  end
51
- alias_method :msg, :send # deprecated
52
- alias_method :privmsg, :send # deprecated
53
- undef_method(:msg) # yardoc hack
54
- undef_method(:privmsg) # yardoc hack
55
51
 
56
52
  # @deprecated
57
53
  def msg(*args)
@@ -80,21 +76,17 @@ module Cinch
80
76
  def safe_send(text, notice = false)
81
77
  send(Cinch::Helpers.sanitize(text), notice)
82
78
  end
83
- alias_method :safe_msg, :safe_send # deprecated
84
- alias_method :safe_privmsg, :safe_msg # deprecated
85
- undef_method(:safe_msg) # yardoc hack
86
- undef_method(:safe_privmsg) # yardoc hack
87
79
 
88
80
  # @deprecated
89
81
  def safe_msg(*args)
90
82
  Cinch::Utilities::Deprecation.print_deprecation("2.2.0", "Target#safe_msg", "Target#safe_send")
91
- send(*args)
83
+ safe_send(*args)
92
84
  end
93
85
 
94
86
  # @deprecated
95
87
  def safe_privmsg(*args)
96
88
  Cinch::Utilities::Deprecation.print_deprecation("2.2.0", "Target#safe_privmsg", "Target#safe_send")
97
- send(*args)
89
+ safe_send(*args)
98
90
  end
99
91
 
100
92
  # Like {#safe_msg} but for notices.
@@ -138,7 +130,7 @@ module Cinch
138
130
  # @param [#to_s] message the ctcp message
139
131
  # @return [void]
140
132
  def ctcp(message)
141
- send "\001#{message}\001"
133
+ send :"\001#{message}\001"
142
134
  end
143
135
 
144
136
  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
@@ -261,13 +261,11 @@ module Cinch
261
261
  @bot.irc.send "WHOIS #{@name} #{@name}"
262
262
  end
263
263
  end
264
- alias_method :whois, :refresh # deprecated
265
- undef_method(:whois) # yardoc hack
266
264
 
267
265
  # @deprecated
268
- def whois
266
+ def whois(*args)
269
267
  Cinch::Utilities::Deprecation.print_deprecation("2.2.0", "User#whois", "User#refresh")
270
- refresh
268
+ refresh(*args)
271
269
  end
272
270
 
273
271
  # @param [Hash, nil] values A hash of values gathered from WHOIS,
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.3"
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.3
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: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: ostruct
@@ -65,6 +65,20 @@ dependencies:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
+ - !ruby/object:Gem::Dependency
69
+ name: irb
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ type: :development
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
68
82
  - !ruby/object:Gem::Dependency
69
83
  name: minitest
70
84
  requirement: !ruby/object:Gem::Requirement
@@ -235,9 +249,12 @@ homepage: https://github.com/ircinchrb/ircinch
235
249
  licenses:
236
250
  - MIT
237
251
  metadata:
252
+ bug_tracker_uri: https://github.com/ircinchrb/ircinch/issues
253
+ changelog_uri: https://github.com/ircinchrb/ircinch/blob/main/CHANGELOG.md
254
+ documentation_uri: https://rubydoc.info/gems/ircinch
238
255
  homepage_uri: https://github.com/ircinchrb/ircinch
239
256
  source_code_uri: https://github.com/ircinchrb/ircinch
240
- changelog_uri: https://github.com/ircinchrb/ircinch/blob/main/CHANGELOG.md
257
+ rubygems_mfa_required: 'true'
241
258
  rdoc_options: []
242
259
  require_paths:
243
260
  - lib
@@ -252,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
252
269
  - !ruby/object:Gem::Version
253
270
  version: '0'
254
271
  requirements: []
255
- rubygems_version: 3.6.6
272
+ rubygems_version: 4.0.3
256
273
  specification_version: 4
257
274
  summary: An IRC Bot Building Ruby Framework
258
275
  test_files: []