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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16c1d1f4332b4e23e28a90842e9f6ac17f2bfd929f71e6e43876214468a48eff
4
- data.tar.gz: 74ddd8fdbb93519876d5e0c3d3388a28cef310142ac41fb70e09d30bf5f93289
3
+ metadata.gz: 164c42943de0925e50ab65b93855cd0676a9e095f3fa8433b4ae51c500a11288
4
+ data.tar.gz: 520c37a37cb8f3be79d5833f80a09a6e8e49d73fb903d641986c83aef410e8ef
5
5
  SHA512:
6
- metadata.gz: 5a1a4b0261e13073b9301d8526579d2b8a9edfb933e5788843961c6cc4856e3adf0be9d05874b42cb951d458bc6f58a2fcaf48feb52b75413882655df6062413
7
- data.tar.gz: 2d824fc1a8eb17815a903d386385f77ef5253175f77a64c37c3952ff11e89bcdf368760cecaf15c51f8045e8c9bd7211b6bfd545f4abb81e9c79b4156c4f7712
6
+ metadata.gz: c1b4888a42c4f177b829669bb6efd7df2371e9e9af06d7210b41bd6bf1212389f89abaef11ae10e65448d7f6fff993c31c3bb241edc327e0059dd792e718c1a0
7
+ data.tar.gz: 6ec520577624e2d306efad46632cc81fd3ea996b4a29476ff576c476fa158fa631205d7c0556f79c0ecc175a6e9a6cc493f1a7296443ec6ab8b6183d22c8dc79
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zetabot (2.0.5)
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.1)
46
- activesupport (= 6.0.1)
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.1)
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.3)
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.1.0)
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 Whois
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 = 'Whois'
9
- self.help = 'Resync your user'
8
+ self.plugin_name = 'Notice ME!'
9
+ self.help = 'Make sure zeta can see me!'
10
10
 
11
11
  # Regex
12
- match 'whois', method: :do_whois
12
+ match 'noticeme', method: :notice_me
13
13
 
14
14
  # Methods
15
- def do_whois(m)
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::Whois
25
+ Bot.config.plugins.plugins.push Plugins::Noticeme
@@ -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 = CGI.escape(ac.geometry.location.lat)
99
- lon = CGI.escape(ac.geometry.location.lng)
98
+ lat = ac.geometry.location.lat
99
+ lon = ac.geometry.location.lng
100
100
 
101
101
  # Get Data
102
102
  data = JSON.parse(
@@ -17,14 +17,16 @@ module Plugins
17
17
  match /calc (.+)/, method: :calculate
18
18
 
19
19
  def calculate(m, query)
20
- # Rescue incase something goes wrong
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
@@ -1,3 +1,3 @@
1
1
  module Zeta
2
- VERSION = '2.0.6'
2
+ VERSION = '2.0.7'
3
3
  end
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.6
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-08 00:00:00.000000000 Z
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