robut-weather 0.1.2 → 0.1.4

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
  SHA1:
3
- metadata.gz: 38cba8c65e2f1479a030057e78eb0d42c0a73bad
4
- data.tar.gz: 7e3fb10e09c35816cd0944068a903754f504cef7
3
+ metadata.gz: 50397ac505fc52609f22907592d0591d20c1313f
4
+ data.tar.gz: c0fd91e76500c30b15ace8f53f8ba1953f64d978
5
5
  SHA512:
6
- metadata.gz: d3dd5b862de4a1a41d97d7050004ea650bef28b61aa5cf168c9ad4adce926cf514bbdfa8e8155cd59dedbd678cd3ce172085189d038ba52ef59f93a453bb5524
7
- data.tar.gz: 60a69af90af8132f97a17273399a08aab6d3f8a5ae595b5fa47b1ea07efb82fcde5358efdb8c8c1009dcc5090a9d0a05416125ab32151fdcfb895aae1efe5b0e
6
+ metadata.gz: a318b79fd5ff9565adc2b4f8520875329bf1fe065e13fe657f1c3872c9c2473c0910e6ed3f612aebeaa6c60f5198a1f7222c29689af5eb13778681655a3bd8a0
7
+ data.tar.gz: 907870d020c4f3979eea3153069847e18775edc80f898b4a46bf566a6faa86c0a5b82b0142c8948dc582b6d475974ddb9f81daf748fc1da283a7f6fefbcd1167
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source "http://rubygems.org"
3
3
  # Example:
4
4
  # gem "activesupport", ">= 2.3.5"
5
5
 
6
- gem "robut", ">= 0.4"
6
+ gem "robut", ">= 0.4.0"
7
7
  gem "json"
8
8
  gem "wunderground"
9
9
 
data/README.rdoc CHANGED
@@ -2,19 +2,34 @@
2
2
 
3
3
  A {Weather Underground}[http://www.wunderground.com] based weather module for robut[https://github.com/justinweiss/robut]
4
4
 
5
+ {<img src="https://badge.fury.io/rb/robut-weather.png" alt="Gem Version" />}[http://badge.fury.io/rb/robut-weather]
6
+
5
7
  == Installation and usage
6
8
 
7
- Robut can be installed by running <tt>gem install robut-weather</tt>. This will require the additional gems <tt>robut</tt>, <tt>json</tt>, and <tt>{wunderground}[https://github.com/wnadeau/wunderground]</tt>, which may or may not require their own dependencies.
9
+ This module can be installed by running <tt>gem install robut-weather</tt>. This will require the additional gems <tt>robut</tt>, <tt>json</tt>, and <tt>{wunderground}[https://github.com/wnadeau/wunderground]</tt>, which may or may not require their own dependencies.
8
10
 
9
11
  Your Chatfile will need to have the Weather plugin loaded.
10
12
 
11
13
  require 'robut-weather'
12
- Robut::Plugin::Weather.default_location = "DEFAULT LOCATION"
14
+ Robut::Plugin::Weather.default_location = "[DEFAULT LOCATION]"
13
15
  Robut::Plugin::Weather.api_key = "[API KEY]"
14
16
  Robut::Plugin.plugins << Robut::Plugin::Weather
15
17
 
16
18
  [DEFAULT LOCATION] must be in an acceptible Weather Underground format. See Location Formats below.
17
19
  [API KEY] must be obtained through Weather Underground. The Weather Underground API is only available to registered members. For light use, there is no charge. A key can be obtained from http://api.wunderground.com/weather/api/
20
+
21
+ == Changelog
22
+
23
+ [v0.1.4 released 9/28/2014]
24
+ Command now requires you to specify the bot's name as an @mention
25
+
26
+ Re-pushed gem with new version to include changelog
27
+
28
+ [v0.1.3 released 9/24/2014]
29
+ Command now requires you to specify the bot's name as an @mention
30
+
31
+ [0.1.2 released 12/21/2013]
32
+ Initial official release
18
33
 
19
34
  == Location Formats
20
35
 
@@ -41,4 +56,4 @@ See http://api.wunderground.com/weather/api/d/docs?d=data/geolookup#examples for
41
56
  == Weather Underground API Usage
42
57
 
43
58
  The data provided by this module comes from {Weather Underground}[http://www.wunderground.com].
44
- http://icons.wxug.com/logos/images/wundergroundLogo_4c_horz.jpg
59
+ http://icons.wxug.com/logos/images/wundergroundLogo_4c_horz.jpg
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.4
data/lib/robut-weather.rb CHANGED
@@ -19,24 +19,26 @@ class Robut::Plugin::Weather
19
19
  end
20
20
 
21
21
  def handle(time, sender_nick, message)
22
- words = words(message)
22
+ if sent_to_me?(message)
23
+ words = words(message)
23
24
 
24
- i = words.index("weather")
25
- # ignore messages that don't have "weather" in them
26
- return if i.nil?
25
+ i = words.index("weather")
26
+ # ignore messages that don't have "weather" in them
27
+ return if i.nil?
27
28
 
28
- l = location(words(message)[i + 1])
29
- if l.nil?
30
- error_output "I don't have a default location!"
31
- return
32
- end
29
+ l = location(words(message)[i + 1])
30
+ if l.nil?
31
+ error_output "I don't have a default location!"
32
+ return
33
+ end
33
34
 
34
- begin
35
- o = current_conditions(l)
36
- reply o unless o.nil? || o == ""
37
- rescue Exception => msg
38
- puts msg
39
- error_output(msg)
35
+ begin
36
+ o = current_conditions(l)
37
+ reply o unless o.nil? || o == ""
38
+ rescue Exception => msg
39
+ puts msg
40
+ error_output(msg)
41
+ end
40
42
  end
41
43
  end
42
44
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "robut-weather"
8
- s.version = "0.1.2"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Richard Lynskey"]
12
- s.date = "2013-12-21"
12
+ s.date = "2014-09-28"
13
13
  s.description = "A Wunderground based weather plugin for robut"
14
14
  s.email = "richard@mozor.net"
15
15
  s.extra_rdoc_files = [
@@ -41,7 +41,7 @@ Gem::Specification.new do |s|
41
41
  s.specification_version = 4
42
42
 
43
43
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
44
- s.add_runtime_dependency(%q<robut>, [">= 0.4"])
44
+ s.add_runtime_dependency(%q<robut>, [">= 0.4.0"])
45
45
  s.add_runtime_dependency(%q<json>, [">= 0"])
46
46
  s.add_runtime_dependency(%q<wunderground>, [">= 0"])
47
47
  s.add_development_dependency(%q<simplecov>, [">= 0"])
@@ -50,7 +50,7 @@ Gem::Specification.new do |s|
50
50
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
51
51
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.7"])
52
52
  else
53
- s.add_dependency(%q<robut>, [">= 0.4"])
53
+ s.add_dependency(%q<robut>, [">= 0.4.0"])
54
54
  s.add_dependency(%q<json>, [">= 0"])
55
55
  s.add_dependency(%q<wunderground>, [">= 0"])
56
56
  s.add_dependency(%q<simplecov>, [">= 0"])
@@ -60,7 +60,7 @@ Gem::Specification.new do |s|
60
60
  s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
61
61
  end
62
62
  else
63
- s.add_dependency(%q<robut>, [">= 0.4"])
63
+ s.add_dependency(%q<robut>, [">= 0.4.0"])
64
64
  s.add_dependency(%q<json>, [">= 0"])
65
65
  s.add_dependency(%q<wunderground>, [">= 0"])
66
66
  s.add_dependency(%q<simplecov>, [">= 0"])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robut-weather
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Lynskey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-21 00:00:00.000000000 Z
11
+ date: 2014-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: robut
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: '0.4'
19
+ version: 0.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: '0.4'
26
+ version: 0.4.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement