robut 0.5.1 → 0.5.2
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 +2 -2
- data/bin/robut +6 -1
- data/lib/robut/plugin/lunch.rb +3 -3
- data/lib/robut/version.rb +1 -1
- data/test/unit/plugin/pick_test.rb +4 -4
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19f30909113d57c4fe78dd4ef1ee33b95111c4f0
|
4
|
+
data.tar.gz: b4fc25aae0b69c80764f5a8bbb8dbedb6ff2f395
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec3fbbc4878c9949a87e08dfdc2cdefca3a5aa4387259ccbc15e36712adbec1ce57dac1a2c3ab4b5dd1c83ca3cb1e2c8e4d4a3578dde16f8a025dcd8b8838411
|
7
|
+
data.tar.gz: e3f68af93c2421d927d6a38b889dea0e88fcc024807d2c27b9e7d1d325677de005496bb8a79a88b9d7de4d758d09a9a1052b6cc2321aa8478f9f5e9fc6c5bb6c
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
robut (0.5.
|
4
|
+
robut (0.5.2)
|
5
5
|
sinatra (~> 1.3)
|
6
6
|
xmpp4r (~> 0.5.0)
|
7
7
|
|
@@ -17,7 +17,7 @@ GEM
|
|
17
17
|
nokogiri (~> 1.4)
|
18
18
|
metaclass (0.0.1)
|
19
19
|
mini_portile (0.5.2)
|
20
|
-
mocha (0.
|
20
|
+
mocha (0.14.0)
|
21
21
|
metaclass (~> 0.0.1)
|
22
22
|
nokogiri (1.6.0)
|
23
23
|
mini_portile (~> 0.5.0)
|
data/bin/robut
CHANGED
data/lib/robut/plugin/lunch.rb
CHANGED
@@ -7,7 +7,7 @@ class Robut::Plugin::Lunch
|
|
7
7
|
[
|
8
8
|
"lunch? / food? - #{nick} will suggest a place to go eat",
|
9
9
|
"#{at_nick} lunch places - lists all the lunch places #{nick} knows about",
|
10
|
-
"#{at_nick} new lunch place <place> - tells #{nick} about a new place to eat",
|
10
|
+
"#{at_nick} (add|new) lunch place <place> - tells #{nick} about a new place to eat",
|
11
11
|
"#{at_nick} remove lunch place <place> - tells #{nick} not to suggest <place> anymore"
|
12
12
|
]
|
13
13
|
end
|
@@ -31,11 +31,11 @@ class Robut::Plugin::Lunch
|
|
31
31
|
reply places.join(', ')
|
32
32
|
end
|
33
33
|
# @robut new lunch place Green Leaf
|
34
|
-
elsif phrase =~ /new lunch place (.*)/i && sent_to_me?(message)
|
34
|
+
elsif phrase =~ /(?:new|add) lunch place (.*)/i && sent_to_me?(message)
|
35
35
|
place = $1
|
36
36
|
new_place(place)
|
37
37
|
reply "Ok, I'll add \"#{place}\" to the the list of lunch places"
|
38
|
-
# @robut remove
|
38
|
+
# @robut remove lunch place Green Leaf
|
39
39
|
elsif phrase =~ /remove lunch place (.*)/i && sent_to_me?(message)
|
40
40
|
place = $1
|
41
41
|
remove_place(place)
|
data/lib/robut/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
require 'robut/plugin/pick'
|
3
|
-
require 'mocha'
|
3
|
+
require 'mocha/setup'
|
4
4
|
|
5
5
|
class Robut::Plugin::PickTest < Test::Unit::TestCase
|
6
6
|
|
@@ -15,7 +15,7 @@ class Robut::Plugin::PickTest < Test::Unit::TestCase
|
|
15
15
|
@plugin.handle(Time.now, "@john", "@robut pick a, b, c")
|
16
16
|
assert_equal ["And the winner is... a"], @plugin.reply_to.replies
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def test_does_nothing_when_no_options_are_given
|
20
20
|
@plugin.handle(Time.now, "@john", "@robut pick")
|
21
21
|
assert @plugin.reply_to.replies.empty?
|
@@ -25,11 +25,11 @@ class Robut::Plugin::PickTest < Test::Unit::TestCase
|
|
25
25
|
@plugin.handle(Time.now, "@john", "@robut pick a")
|
26
26
|
assert_equal ["And the winner is... a"], @plugin.reply_to.replies
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
def test_handles_spaces
|
30
30
|
@plugin.stubs(:random).returns(1)
|
31
31
|
@plugin.handle(Time.now, "@john", "@robut pick this is the first option, this is the second option, this is the third option")
|
32
32
|
assert_equal ["And the winner is... this is the second option"], @plugin.reply_to.replies
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
end
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: robut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Weiss
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xmpp4r
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.5.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
26
|
version: 0.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sinatra
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.3'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.3'
|
41
41
|
description: A simple plugin-enabled HipChat bot
|
@@ -46,8 +46,8 @@ executables:
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
-
- .gitignore
|
50
|
-
- .travis.yml
|
49
|
+
- ".gitignore"
|
50
|
+
- ".travis.yml"
|
51
51
|
- Gemfile
|
52
52
|
- Gemfile.lock
|
53
53
|
- README.rdoc
|
@@ -119,17 +119,17 @@ require_paths:
|
|
119
119
|
- lib
|
120
120
|
required_ruby_version: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- -
|
127
|
+
- - ">="
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
131
|
rubyforge_project: robut
|
132
|
-
rubygems_version: 2.1
|
132
|
+
rubygems_version: 2.2.0.rc.1
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: A simple plugin-enabled HipChat bot
|