twitch-bot 2.1.0 → 2.1.1

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: e127546d8abb6ccd893003d8cbbac18fbce0bb31ca01070ace83b396100e3b63
4
- data.tar.gz: '0998e3ee31311c74981e00f1b1a846cfc5f6d09a18b5fd08cd8b565bcadabf33'
3
+ metadata.gz: 55f8f1fa119d4344d036c5644cc8544ab4b0f9b9bac3d2d5dad21ccf157f4bed
4
+ data.tar.gz: d0df1fc16260d45e0187377e3aa7574dad0a85fe57c907b648e943c3c5d9303a
5
5
  SHA512:
6
- metadata.gz: c7cfdae853bc0e994617c273ab6ba02496c0f55cbf92ba67ef4af4e46d5704e355b5bd2fa5bb677adff39d1d8e8723d0d846f9548af34998f8547282d46e71a2
7
- data.tar.gz: 644b140f23c27c178b243b91ccf2ddc797c49611f83cbfccdd8987b10c79573413feae4a72fdd7956169aef897be664a4ad36c50ff7e2bd66c7c67711f29df04
6
+ metadata.gz: 4a966f66085b1767a136e11947c316f9ece94893658b8dda98a1e519aadc7d2e720b9bd0dba904e3ee070041f799231ade30be3a78a33d275370dd426fba4cc8
7
+ data.tar.gz: f7340c7b36d5e2cf6f3e84a64d898013fe0c519361cffc6f6ad8eeacbd8b5c369f539ddfdebea90dabf034eaf648b32026805df27cca02538ae5eafbbd89357f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog Twitch::Bot
2
2
 
3
+ ## v2.1.1
4
+
5
+ * [FIXED] Fix a few bugs missed by not running tests. We need CI...
6
+
7
+ ## v2.1.0
8
+
9
+ * [NEW] Local development mode
10
+ * [CHANGED] Substantial refactoring introducing protocol Adapter classes and a central Logger class
11
+
3
12
  ## v2.0.0
4
13
 
5
14
  * [BREAKING] The standard text message class is now named
data/lib/twitch/bot.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "bundler/setup"
4
+ Bundler.require(:default)
5
+
3
6
  require_relative "bot/version"
4
7
  require_relative "bot/logger"
5
8
  require_relative "bot/event"
@@ -75,6 +75,7 @@ module Twitch
75
75
 
76
76
  # Acceptable :reek:NilCheck
77
77
  def socket_read_next
78
+ line = ""
78
79
  loop do
79
80
  line = socket.gets&.chomp
80
81
  break unless line.nil? || line.empty?
@@ -78,6 +78,14 @@ module Twitch
78
78
  messages_queue << message if messages_queue.last != message
79
79
  end
80
80
 
81
+ def add_moderator(user)
82
+ channel.add_moderator(user)
83
+ end
84
+
85
+ def remove_moderator(user)
86
+ channel.remove_moderator(user)
87
+ end
88
+
81
89
  def stop
82
90
  dispatch StopEvent.new
83
91
  stop_event_loop
@@ -152,14 +160,6 @@ module Twitch
152
160
  ENV["BOT_MODE"] == "development"
153
161
  end
154
162
 
155
- def add_moderator(user)
156
- channel.add_moderator(user)
157
- end
158
-
159
- def remove_moderator(user)
160
- channel.remove_moderator(user)
161
- end
162
-
163
163
  def execute_initialize_block(block)
164
164
  if block.arity == 1
165
165
  block.call self
@@ -37,6 +37,10 @@ module Twitch
37
37
  client.remove_moderator(user)
38
38
  end
39
39
  end
40
+
41
+ def self.handled_events
42
+ [:mode]
43
+ end
40
44
  end
41
45
  end
42
46
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Twitch
4
4
  module Bot
5
- VERSION = "2.1.0"
5
+ VERSION = "2.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitch-bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jochen Lillich