qwtf_discord_bot 5.5.18 → 5.5.23

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: edf725dbe10cf8dd1f3a44adb214ccd9ebca849a86c898dc5012b180301da3eb
4
- data.tar.gz: 3c2dff10129f4f73b4b16337ed7413207d5aa2695457fa046158b5a8bf4a5240
3
+ metadata.gz: b79b320ef30f15f7f58d33b455bf9e51fc1799bf841d5de4a1df80cb9dbe4e6c
4
+ data.tar.gz: f64fb0a100846c24727ce10d81be331a38ee691f90363ac5be66a01299c8a15c
5
5
  SHA512:
6
- metadata.gz: f9a5f0e994c6ffd34c93af96d8b5b7ac9bcf80005532a6fa9e1918da72a05c42c74ab079cc7ab34bd03f5f0bf6a51d12c5a7510f10a692146dcb96dc6d35da47
7
- data.tar.gz: a6d3460b139e0386de4c5685ea978c8e98fafcd1fcdb9988ff620628e37df0ef5854d5adc5d72403cff072168c138e4fc8120f62f82f90f24a9cc7f822ec3a43
6
+ metadata.gz: d9dd18bd7aaa529d247ab3299fc16c3464a2b3211e9f979655865c31113caa52401cc551b3b2bff22114dfb0751ffa13717d8f3815f8f0d3f753bc009a57a59c
7
+ data.tar.gz: b657aa11ac84a7bf7f25b70c34ffa6b94993d175a768c467e723925aa4d506b72ae65a485b6b63b19e3b77adb854b9b8365da121cacf6f1da84de26a794714d1
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'bundler'
6
- gem 'discordrb'
6
+ gem 'discordrb', '3.4.0'
7
7
  gem 'redis'
8
8
  gem 'thor'
9
9
 
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qwtf_discord_bot (5.5.18)
5
- discordrb
6
- redis
7
- thor
4
+ qwtf_discord_bot (5.5.23)
5
+ discordrb (= 3.4.0)
6
+ redis (~> 4.2)
7
+ thor (~> 1.1)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -18,14 +18,14 @@ GEM
18
18
  coderay (1.1.3)
19
19
  concurrent-ruby (1.1.8)
20
20
  diff-lcs (1.4.4)
21
- discordrb (3.4.2)
22
- discordrb-webhooks (~> 3.4.2)
21
+ discordrb (3.4.0)
22
+ discordrb-webhooks (~> 3.3.0)
23
23
  ffi (>= 1.9.24)
24
24
  opus-ruby
25
25
  rest-client (>= 2.0.0)
26
26
  websocket-client-simple (>= 0.3.0)
27
- discordrb-webhooks (3.4.2)
28
- rest-client (>= 2.0.0)
27
+ discordrb-webhooks (3.3.0)
28
+ rest-client (>= 2.1.0.rc1)
29
29
  domain_name (0.5.20190701)
30
30
  unf (>= 0.0.5, < 1.0.0)
31
31
  event_emitter (0.2.6)
@@ -84,7 +84,7 @@ PLATFORMS
84
84
 
85
85
  DEPENDENCIES
86
86
  bundler
87
- discordrb
87
+ discordrb (= 3.4.0)
88
88
  factory_bot
89
89
  pry
90
90
  qwtf_discord_bot!
data/README.md CHANGED
@@ -131,7 +131,7 @@ Build:
131
131
 
132
132
  Install:
133
133
 
134
-
134
+
135
135
  gem install --local qwtf_discord_bot-$(cat VERSION).gem
136
136
 
137
137
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.5.18
1
+ 5.5.23
data/lib/dashboard.rb CHANGED
@@ -2,6 +2,8 @@ class Dashboard
2
2
  def initialize(dashboard_config, bot)
3
3
  @server = bot.server(dashboard_config["server_id"])
4
4
  @endpoints = dashboard_config["endpoints"]
5
+ @messages = {}
6
+
5
7
 
6
8
  channel_name = dashboard_config["name"]
7
9
 
@@ -32,15 +34,13 @@ class Dashboard
32
34
  end
33
35
 
34
36
  def update
35
- messages = {}
36
-
37
37
  @endpoints.each do |endpoint|
38
38
  qstat_request = QstatRequest.new(endpoint)
39
39
 
40
40
  if qstat_request.is_empty?
41
- if messages[endpoint]
42
- messages[endpoint].delete
43
- messages.delete(endpoint)
41
+ if @messages[endpoint]
42
+ @messages[endpoint].delete
43
+ @messages.delete(endpoint)
44
44
  end
45
45
 
46
46
  next
@@ -48,8 +48,8 @@ class Dashboard
48
48
 
49
49
  embed = qstat_request.to_full_embed
50
50
 
51
- messages[endpoint] = if messages[endpoint]
52
- messages[endpoint].edit(nil, embed)
51
+ @messages[endpoint] = if @messages[endpoint]
52
+ @messages[endpoint].edit(nil, embed)
53
53
  else
54
54
  @channel.send_embed(nil, embed)
55
55
  end
data/lib/qstat_request.rb CHANGED
@@ -17,7 +17,7 @@ class QstatRequest
17
17
  embed = Discordrb::Webhooks::Embed.new
18
18
 
19
19
  teams.each do |team|
20
- embed.add_field(team.to_embed_field)
20
+ embed.add_field << team.to_embed_field
21
21
  end
22
22
 
23
23
  embed
@@ -31,7 +31,7 @@ class QstatRequest
31
31
  )
32
32
 
33
33
  teams.each do |team|
34
- embed.add_field(team.to_embed_field)
34
+ embed << team.to_embed_field
35
35
  end
36
36
  end
37
37
  end
@@ -735,13 +735,9 @@ class QwtfDiscordBotPug # :nodoc:
735
735
  end
736
736
 
737
737
  embed.add_field(
738
- Discordrb::Webhooks::EmbedField.new(
739
- {
740
- inline: true,
741
- name: team_name(team_no),
742
- value: team_display_names.join("\n")
743
- }
744
- )
738
+ inline: true,
739
+ name: team_name(team_no),
740
+ value: team_display_names.join("\n")
745
741
  )
746
742
  end
747
743
  end
@@ -775,13 +771,9 @@ class QwtfDiscordBotPug # :nodoc:
775
771
  end
776
772
 
777
773
  embed.add_field(
778
- Discordrb::Webhooks::EmbedField.new(
779
- {
780
- inline: true,
781
- name: team_name(team_no),
782
- value: team_mentions.join("\n")
783
- }
784
- )
774
+ inline: true,
775
+ name: team_name(team_no),
776
+ value: team_mentions.join("\n")
785
777
  )
786
778
  end
787
779
  end
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ['lib']
29
29
 
30
- spec.add_runtime_dependency 'discordrb', '~> 3.4'
30
+ spec.add_runtime_dependency 'discordrb', '3.4.0'
31
31
  spec.add_runtime_dependency 'redis', '~> 4.2'
32
32
  spec.add_runtime_dependency 'thor', '~>1.1'
33
33
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qwtf_discord_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.18
4
+ version: 5.5.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sheldon Johnson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-18 00:00:00.000000000 Z
11
+ date: 2021-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: discordrb
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: '3.4'
19
+ version: 3.4.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: '3.4'
26
+ version: 3.4.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: redis
29
29
  requirement: !ruby/object:Gem::Requirement