lita-ping 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8e473736885ea72d611012bdf20a47216113bf3c
4
+ data.tar.gz: 646e66c4b78012d6e4165d58a5a6839f1de0958b
5
+ SHA512:
6
+ metadata.gz: 38d500a156cc41e20478ff9bc7ed69ef43465a677b4e0fc3703a20bf1058e70921bb63a2550401aafe18661e268df6b38c9db1b96c3126a5878178a9075c1b6a
7
+ data.tar.gz: b429014b9ddeeedd0bb3e63a22365d8c0bb49d11399505e269deb90776359ff40261403f7b837c68565876dd7ea2f8e2fad81fff9eba82a4073d0b1c3c0772c1
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,49 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ lita-ping (1.0.0)
5
+ lita (~> 2.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ daemons (1.1.9)
11
+ diff-lcs (1.2.4)
12
+ eventmachine (1.0.3)
13
+ faraday (0.8.7)
14
+ multipart-post (~> 1.1)
15
+ lita (2.1.1)
16
+ bundler (~> 1.3)
17
+ faraday (~> 0.8.7)
18
+ multi_json (~> 1.7.7)
19
+ rack (~> 1.5.2)
20
+ redis-namespace (~> 1.3.0)
21
+ thin (~> 1.5.1)
22
+ thor (~> 0.18.1)
23
+ multi_json (1.7.7)
24
+ multipart-post (1.2.0)
25
+ rack (1.5.2)
26
+ redis (3.0.4)
27
+ redis-namespace (1.3.0)
28
+ redis (~> 3.0.0)
29
+ rspec (2.14.1)
30
+ rspec-core (~> 2.14.0)
31
+ rspec-expectations (~> 2.14.0)
32
+ rspec-mocks (~> 2.14.0)
33
+ rspec-core (2.14.3)
34
+ rspec-expectations (2.14.0)
35
+ diff-lcs (>= 1.1.3, < 2.0)
36
+ rspec-mocks (2.14.1)
37
+ thin (1.5.1)
38
+ daemons (>= 1.0.9)
39
+ eventmachine (>= 0.12.6)
40
+ rack (>= 1.0.0)
41
+ thor (0.18.1)
42
+
43
+ PLATFORMS
44
+ ruby
45
+
46
+ DEPENDENCIES
47
+ bundler (~> 1.3)
48
+ lita-ping!
49
+ rspec (~> 2.14)
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2013 Patrick Tulskie
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # lita-ping
2
+
3
+ **lita-ping** is a handler for [Lita](https://github.com/jimmycuadra/lita) that gives you back a response if the bot is listening.
4
+
5
+ ## Installation
6
+
7
+ Add lita-ping to your Lita instance's Gemfile:
8
+
9
+ ``` ruby
10
+ gem "lita-ping"
11
+ ```
12
+
13
+ ## Configuration
14
+
15
+ None. Just use it.
16
+
17
+ ## Usage
18
+
19
+ ```
20
+ Lita: ping
21
+ Lita: Ping
22
+ ```
23
+
24
+ ## License
25
+
26
+ [MIT](http://opensource.org/licenses/MIT)
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,20 @@
1
+ require "lita"
2
+
3
+ module Lita
4
+ module Handlers
5
+ class Ping < Handler
6
+ route(/(p|P)ing/, :reply, command: true, help: {
7
+ "ping" => "Gives you back a pong if the bot is online and listening."
8
+ })
9
+
10
+ def self.default_config(handler_config)
11
+ end
12
+
13
+ def reply(response)
14
+ response.reply "PoNg pOnG PoNg pOnG"
15
+ end
16
+ end
17
+
18
+ Lita.register_handler(Ping)
19
+ end
20
+ end
data/lib/lita-ping.rb ADDED
@@ -0,0 +1 @@
1
+ require "lita/handlers/ping"
data/lita-ping.gemspec ADDED
@@ -0,0 +1,20 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = "lita-ping"
3
+ spec.version = "1.0.0"
4
+ spec.authors = ["Patrick Tulskie", "Marcel de Graaf"]
5
+ spec.email = ["patricktulskie@gmail.com", "mail@marceldegraaf.net"]
6
+ spec.description = %q{A Lita handler for basic ping/pong.}
7
+ spec.summary = %q{A Lita handler for basic ping/pong.}
8
+ spec.homepage = "https://github.com/marceldegraaf/lita-ping"
9
+ spec.license = "MIT"
10
+
11
+ spec.files = `git ls-files`.split($/)
12
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
13
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
14
+ spec.require_paths = ["lib"]
15
+
16
+ spec.add_runtime_dependency "lita", "~> 2.0"
17
+
18
+ spec.add_development_dependency "bundler", "~> 1.3"
19
+ spec.add_development_dependency "rspec", "~> 2.14"
20
+ end
@@ -0,0 +1,14 @@
1
+ require "spec_helper"
2
+
3
+ describe Lita::Handlers::Ping, lita_handler: true do
4
+ it { routes_command("ping").to(:reply) }
5
+
6
+ describe "#foo" do
7
+
8
+ it "replies to the ping" do
9
+ send_command("ping")
10
+ expect(replies.last).to eq("PoNg pOnG PoNg pOnG")
11
+ end
12
+
13
+ end
14
+ end
@@ -0,0 +1,2 @@
1
+ require "lita-ping"
2
+ require "lita/rspec"
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lita-ping
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Patrick Tulskie
8
+ - Marcel de Graaf
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-02-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: lita
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ~>
19
+ - !ruby/object:Gem::Version
20
+ version: '2.0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: '2.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: bundler
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: '1.3'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ version: '1.3'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rspec
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ~>
47
+ - !ruby/object:Gem::Version
48
+ version: '2.14'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ version: '2.14'
56
+ description: A Lita handler for basic ping/pong.
57
+ email:
58
+ - patricktulskie@gmail.com
59
+ - mail@marceldegraaf.net
60
+ executables: []
61
+ extensions: []
62
+ extra_rdoc_files: []
63
+ files:
64
+ - Gemfile
65
+ - Gemfile.lock
66
+ - LICENSE
67
+ - README.md
68
+ - Rakefile
69
+ - lib/lita-ping.rb
70
+ - lib/lita/handlers/ping.rb
71
+ - lita-ping.gemspec
72
+ - spec/lita/handlers/ping_spec.rb
73
+ - spec/spec_helper.rb
74
+ homepage: https://github.com/marceldegraaf/lita-ping
75
+ licenses:
76
+ - MIT
77
+ metadata: {}
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 2.0.0
95
+ signing_key:
96
+ specification_version: 4
97
+ summary: A Lita handler for basic ping/pong.
98
+ test_files:
99
+ - spec/lita/handlers/ping_spec.rb
100
+ - spec/spec_helper.rb