lita-vader 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.travis.yml +8 -0
- data/Gemfile +3 -0
- data/LICENSE +19 -0
- data/README.md +33 -0
- data/Rakefile +6 -0
- data/lib/lita/handlers/vader.rb +16 -0
- data/lib/lita-vader.rb +7 -0
- data/lita-vader.gemspec +23 -0
- data/locales/en.yml +4 -0
- data/spec/lita/handlers/vader_spec.rb +15 -0
- data/spec/spec_helper.rb +12 -0
- metadata +143 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1dfb06da70c6c9985de3327359c63342f0c476c0
|
4
|
+
data.tar.gz: 521985e28543fb6f38ee1cccd0f1ca1b8be2852d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f34e825a0ca7e2374dfcd65b197f6cc6bf0a5bae921e88233a194bb95c77c092cdfd501e3d79f9ccab34ab2b11422d10476d6f5be29188bcbdd1114afd0cd1bd
|
7
|
+
data.tar.gz: c54458489d16c6c89406397aea97292583a3c7df24232c7f63c694bfdea626fa6d3eef602225d3374b3ca4f6b39e232a0de790228f40521a1e51a84d57f13c25
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2014 TODO: Write your name
|
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,33 @@
|
|
1
|
+
# lita-vader
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/lonelyplanet/lita-vader.svg)](https://travis-ci.org/lonelyplanet/lita-vader)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/lonelyplanet/lita-vader/badges/gpa.svg)](https://codeclimate.com/github/lonelyplanet/lita-vader)
|
5
|
+
[![Coverage Status](https://img.shields.io/coveralls/lonelyplanet/lita-vader.svg)](https://coveralls.io/r/lonelyplanet/lita-vader)
|
6
|
+
|
7
|
+
Lita handler to tell you who a user's father is
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add lita-vader to your Lita instance's Gemfile:
|
12
|
+
|
13
|
+
``` ruby
|
14
|
+
gem "lita-vader"
|
15
|
+
```
|
16
|
+
|
17
|
+
|
18
|
+
## Configuration
|
19
|
+
|
20
|
+
No configuration is required.
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
The following is how you ask Lita who Luke's father is. You can specify any user in your chat instead of _Luke_.
|
25
|
+
|
26
|
+
```
|
27
|
+
You: Lita who is Luke's father?
|
28
|
+
Lita: @Luke, I am your father!
|
29
|
+
```
|
30
|
+
|
31
|
+
## License
|
32
|
+
|
33
|
+
[MIT](http://opensource.org/licenses/MIT)
|
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
module Lita
|
2
|
+
module Handlers
|
3
|
+
class Vader < Handler
|
4
|
+
route(/who is (.*)'s father\?/, :father, command: true, help: {
|
5
|
+
"who is USER's father?" => "Replies back with the suprising truth."
|
6
|
+
})
|
7
|
+
|
8
|
+
def father(response)
|
9
|
+
child = response.matches[0][0]
|
10
|
+
response.reply("@#{child}, I am your father!")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
Lita.register_handler(Vader)
|
15
|
+
end
|
16
|
+
end
|
data/lib/lita-vader.rb
ADDED
data/lita-vader.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Gem::Specification.new do |spec|
|
2
|
+
spec.name = "lita-vader"
|
3
|
+
spec.version = "0.1.0"
|
4
|
+
spec.authors = ["Lee Jones", "Brian Pitts"]
|
5
|
+
spec.description = %q{Lita handler to tell you who a user's father is}
|
6
|
+
spec.summary = spec.description
|
7
|
+
spec.homepage = "https://github.com/lonelyplanet/lita-vader"
|
8
|
+
spec.license = "MIT"
|
9
|
+
spec.metadata = { "lita_plugin_type" => "handler" }
|
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", ">= 3.3"
|
17
|
+
|
18
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
19
|
+
spec.add_development_dependency "rake"
|
20
|
+
spec.add_development_dependency "rspec", ">= 3.0.0"
|
21
|
+
spec.add_development_dependency "simplecov"
|
22
|
+
spec.add_development_dependency "coveralls"
|
23
|
+
end
|
data/locales/en.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Lita::Handlers::Vader, lita_handler: true do
|
4
|
+
|
5
|
+
it 'routes questions about fathers' do
|
6
|
+
expect(subject).to route_command("who is Luke's father?").to(:father)
|
7
|
+
end
|
8
|
+
|
9
|
+
describe 'father' do
|
10
|
+
it "explains who a user's father is" do
|
11
|
+
send_command("who is Luke's father?")
|
12
|
+
expect(replies.last).to eq("@Luke, I am your father!")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require "simplecov"
|
2
|
+
require "coveralls"
|
3
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
4
|
+
SimpleCov::Formatter::HTMLFormatter,
|
5
|
+
Coveralls::SimpleCov::Formatter
|
6
|
+
]
|
7
|
+
SimpleCov.start { add_filter "/spec/" }
|
8
|
+
|
9
|
+
require "lita-vader"
|
10
|
+
require "lita/rspec"
|
11
|
+
|
12
|
+
Lita.version_3_compatibility_mode = false
|
metadata
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: lita-vader
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Lee Jones
|
8
|
+
- Brian Pitts
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-11-08 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: '3.3'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '3.3'
|
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: rake
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rspec
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 3.0.0
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 3.0.0
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: simplecov
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: coveralls
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
description: Lita handler to tell you who a user's father is
|
99
|
+
email:
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".travis.yml"
|
106
|
+
- Gemfile
|
107
|
+
- LICENSE
|
108
|
+
- README.md
|
109
|
+
- Rakefile
|
110
|
+
- lib/lita-vader.rb
|
111
|
+
- lib/lita/handlers/vader.rb
|
112
|
+
- lita-vader.gemspec
|
113
|
+
- locales/en.yml
|
114
|
+
- spec/lita/handlers/vader_spec.rb
|
115
|
+
- spec/spec_helper.rb
|
116
|
+
homepage: https://github.com/lonelyplanet/lita-vader
|
117
|
+
licenses:
|
118
|
+
- MIT
|
119
|
+
metadata:
|
120
|
+
lita_plugin_type: handler
|
121
|
+
post_install_message:
|
122
|
+
rdoc_options: []
|
123
|
+
require_paths:
|
124
|
+
- lib
|
125
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
requirements: []
|
136
|
+
rubyforge_project:
|
137
|
+
rubygems_version: 2.2.2
|
138
|
+
signing_key:
|
139
|
+
specification_version: 4
|
140
|
+
summary: Lita handler to tell you who a user's father is
|
141
|
+
test_files:
|
142
|
+
- spec/lita/handlers/vader_spec.rb
|
143
|
+
- spec/spec_helper.rb
|