zetabot 2.0.6 → 2.0.7
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 +4 -4
- data/Gemfile.lock +6 -6
- data/lib/Zeta/plugins/{whois.rb → noticeme.rb} +6 -6
- data/lib/Zeta/plugins/weather.rb +2 -2
- data/lib/Zeta/plugins/wolfram.rb +4 -2
- data/lib/Zeta/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 164c42943de0925e50ab65b93855cd0676a9e095f3fa8433b4ae51c500a11288
|
4
|
+
data.tar.gz: 520c37a37cb8f3be79d5833f80a09a6e8e49d73fb903d641986c83aef410e8ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1b4888a42c4f177b829669bb6efd7df2371e9e9af06d7210b41bd6bf1212389f89abaef11ae10e65448d7f6fff993c31c3bb241edc327e0059dd792e718c1a0
|
7
|
+
data.tar.gz: 6ec520577624e2d306efad46632cc81fd3ea996b4a29476ff576c476fa158fa631205d7c0556f79c0ecc175a6e9a6cc493f1a7296443ec6ab8b6183d22c8dc79
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
zetabot (2.0.
|
4
|
+
zetabot (2.0.7)
|
5
5
|
actionview
|
6
6
|
chronic
|
7
7
|
chronic_duration
|
@@ -42,13 +42,13 @@ GEM
|
|
42
42
|
remote: https://rubygems.org/
|
43
43
|
specs:
|
44
44
|
Ascii85 (1.0.3)
|
45
|
-
actionview (6.0.
|
46
|
-
activesupport (= 6.0.
|
45
|
+
actionview (6.0.2)
|
46
|
+
activesupport (= 6.0.2)
|
47
47
|
builder (~> 3.1)
|
48
48
|
erubi (~> 1.4)
|
49
49
|
rails-dom-testing (~> 2.0)
|
50
50
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
51
|
-
activesupport (6.0.
|
51
|
+
activesupport (6.0.2)
|
52
52
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
53
53
|
i18n (>= 0.7, < 2)
|
54
54
|
minitest (~> 5.1)
|
@@ -60,7 +60,7 @@ GEM
|
|
60
60
|
ansi (1.5.0)
|
61
61
|
ast (2.4.0)
|
62
62
|
binding.repl (3.0.0)
|
63
|
-
builder (3.2.
|
63
|
+
builder (3.2.4)
|
64
64
|
cd (1.0.1)
|
65
65
|
chronic (0.10.2)
|
66
66
|
chronic_duration (0.10.6)
|
@@ -138,7 +138,7 @@ GEM
|
|
138
138
|
interactive_editor (0.0.11)
|
139
139
|
spoon (>= 0.0.1)
|
140
140
|
ipaddress (0.8.3)
|
141
|
-
irb (1.
|
141
|
+
irb (1.2.0)
|
142
142
|
reline (>= 0.0.1)
|
143
143
|
irbtools (3.0.1)
|
144
144
|
binding.repl (~> 3.0)
|
@@ -1,18 +1,18 @@
|
|
1
1
|
module Plugins
|
2
|
-
class
|
2
|
+
class Noticeme
|
3
3
|
include Cinch::Plugin
|
4
4
|
include Cinch::Helpers
|
5
5
|
|
6
6
|
# enable_acl
|
7
7
|
|
8
|
-
self.plugin_name = '
|
9
|
-
self.help = '
|
8
|
+
self.plugin_name = 'Notice ME!'
|
9
|
+
self.help = 'Make sure zeta can see me!'
|
10
10
|
|
11
11
|
# Regex
|
12
|
-
match '
|
12
|
+
match 'noticeme', method: :notice_me
|
13
13
|
|
14
14
|
# Methods
|
15
|
-
def
|
15
|
+
def notice_me(m)
|
16
16
|
m.user.refresh
|
17
17
|
m.user.notice "Refreshing #{m.user.nick}"
|
18
18
|
end
|
@@ -22,4 +22,4 @@ module Plugins
|
|
22
22
|
end
|
23
23
|
|
24
24
|
# AutoLoad
|
25
|
-
Bot.config.plugins.plugins.push Plugins::
|
25
|
+
Bot.config.plugins.plugins.push Plugins::Noticeme
|
data/lib/Zeta/plugins/weather.rb
CHANGED
@@ -95,8 +95,8 @@ module Plugins
|
|
95
95
|
return nil if ac.results.nil? ## Unable to locate
|
96
96
|
|
97
97
|
ac = ac.results[0]
|
98
|
-
lat =
|
99
|
-
lon =
|
98
|
+
lat = ac.geometry.location.lat
|
99
|
+
lon = ac.geometry.location.lng
|
100
100
|
|
101
101
|
# Get Data
|
102
102
|
data = JSON.parse(
|
data/lib/Zeta/plugins/wolfram.rb
CHANGED
@@ -17,14 +17,16 @@ module Plugins
|
|
17
17
|
match /calc (.+)/, method: :calculate
|
18
18
|
|
19
19
|
def calculate(m, query)
|
20
|
-
# Rescue
|
20
|
+
# Rescue in case something goes wrong
|
21
21
|
begin
|
22
|
-
debug 'Query: ' + CGI.escape(query)
|
23
22
|
url = "http://api.wolframalpha.com/v2/query?input=#{CGI.escape(query)}&appid=#{Config.secrets[:wolfram]}&primary=true&format=plaintext"
|
24
23
|
request = open(url).read
|
24
|
+
|
25
25
|
data = Crack::XML.parse(request)
|
26
|
+
|
26
27
|
pod0 = data['queryresult']['pod'][0]['subpod']['plaintext'].strip
|
27
28
|
pod1 = data['queryresult']['pod'][1]['subpod']['plaintext'].strip
|
29
|
+
|
28
30
|
return 'Unable to get a results' if pod0.nil?
|
29
31
|
|
30
32
|
if pod1.lines.count > 2
|
data/lib/Zeta/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zetabot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Liothen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -621,6 +621,7 @@ files:
|
|
621
621
|
- lib/Zeta/plugins/help.rb
|
622
622
|
- lib/Zeta/plugins/macros.rb
|
623
623
|
- lib/Zeta/plugins/movie.rb
|
624
|
+
- lib/Zeta/plugins/noticeme.rb
|
624
625
|
- lib/Zeta/plugins/pdfinfo.rb
|
625
626
|
- lib/Zeta/plugins/rainbow.rb
|
626
627
|
- lib/Zeta/plugins/russian_roulette.rb
|
@@ -629,7 +630,6 @@ files:
|
|
629
630
|
- lib/Zeta/plugins/snooper.rb
|
630
631
|
- lib/Zeta/plugins/urban.rb
|
631
632
|
- lib/Zeta/plugins/weather.rb
|
632
|
-
- lib/Zeta/plugins/whois.rb
|
633
633
|
- lib/Zeta/plugins/wiki.rb
|
634
634
|
- lib/Zeta/plugins/wolfram.rb
|
635
635
|
- lib/Zeta/tasks/db.rb
|