lita-onewheel-xkcd 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.travis.yml +8 -0
- data/Gemfile +3 -0
- data/Rakefile +6 -0
- data/lib/lita/handlers/onewheel_xkcd.rb +171 -0
- data/lib/lita/models/comic.rb +10 -0
- data/lib/lita-onewheel-xkcd.rb +12 -0
- data/lita-onewheel-xkcd.gemspec +29 -0
- data/lita_config.rb.sample +7 -0
- data/readme.rst +56 -0
- data/scripts/pop.rb +25 -0
- data/scripts/schema.rb +13 -0
- data/spec/lita/handlers/onewheel_xkcd_spec.rb +97 -0
- data/spec/spec_helper.rb +14 -0
- metadata +217 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c35d89afb36af4bc8f816521dc5efc28dd017308
|
4
|
+
data.tar.gz: 6b4d2430623972cebad8afb4474a97d8c7908534
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5d55c341e5dc44673d53c9fefad480017890f535a6eb94216ab3c642393c2b6df14a0c068f4afa952e543100291c90d33ada38638dcc2ef0b03768b8003a1dc7
|
7
|
+
data.tar.gz: d5a2e0ed7a4eed78e0b3bff00424940ccd149618f6a763226d71ba7a698dc6de6fdf6f619121ea7b54deed0bba113d5a714d40f3aefd0a23450ec994e89e5185
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
require 'sequel'
|
2
|
+
require 'json'
|
3
|
+
require_relative '../models/comic'
|
4
|
+
|
5
|
+
module Lita
|
6
|
+
module Handlers
|
7
|
+
class OnewheelXkcd < Handler
|
8
|
+
config :db_host, required: true, default: 'localhost'
|
9
|
+
config :db_name, required: true, default: 'lita_xkcd'
|
10
|
+
config :db_user, required: true, default: 'root'
|
11
|
+
config :db_pass, required: true, default: ''
|
12
|
+
config :db_port, required: true, default: 5432
|
13
|
+
config :alt_delay, default: 9
|
14
|
+
|
15
|
+
route /^xkcd$/i,
|
16
|
+
:random,
|
17
|
+
command: true,
|
18
|
+
help: {'xkcd' => 'return a random XKCD comic.'}
|
19
|
+
|
20
|
+
route /^xkcd ([a-zA-Z ]+)/i,
|
21
|
+
:find_by_keyword,
|
22
|
+
command: true,
|
23
|
+
help: {'xkcd (keyword)' => 'return an XKCD comic with the keyword(s) specified.'}
|
24
|
+
|
25
|
+
route /^xkcd (\d+)/i,
|
26
|
+
:find_by_number,
|
27
|
+
command: true,
|
28
|
+
help: {'xkcd (number)' => 'return an XKCD comic by it\'s number (somewhere between 1 and 1600).'}
|
29
|
+
|
30
|
+
route /^xkcd prev/i,
|
31
|
+
:find_prev,
|
32
|
+
command: true,
|
33
|
+
help: {'xkcd prev' => 'return the previous XKCD comic by date.'}
|
34
|
+
|
35
|
+
route /^xkcd next/i,
|
36
|
+
:find_next,
|
37
|
+
command: true,
|
38
|
+
help: {'xkcd prev' => 'return the next XKCD comic by date.'}
|
39
|
+
|
40
|
+
##
|
41
|
+
# Search the title for a string, and return the comic.
|
42
|
+
#
|
43
|
+
def find_by_keyword(response)
|
44
|
+
db = init_db
|
45
|
+
keywords = response.matches[0][0]
|
46
|
+
result = db["
|
47
|
+
select id, data->'img' as img, data->'title' as title, data->'alt' as alt
|
48
|
+
from comics
|
49
|
+
where data->>'title' ilike ? order by RANDOM() limit 1", "%#{keywords}%"]
|
50
|
+
if row = result[:data]
|
51
|
+
comic = Comic.new(row[:id], row[:img], row[:title], row[:alt])
|
52
|
+
reply_with_comic response, comic
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# Find by xkcd id.
|
58
|
+
#
|
59
|
+
def find_by_number(response)
|
60
|
+
db = init_db
|
61
|
+
number = response.matches[0][0]
|
62
|
+
result = db["
|
63
|
+
select id, data->'img' as img, data->'title' as title, data->'alt' as alt
|
64
|
+
from comics
|
65
|
+
where id = ?", number]
|
66
|
+
if row = result[:data]
|
67
|
+
comic = Comic.new(row[:id], row[:img], row[:title], row[:alt])
|
68
|
+
reply_with_comic response, comic
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
##
|
73
|
+
# Get a random comic
|
74
|
+
#
|
75
|
+
def random(response)
|
76
|
+
db = init_db
|
77
|
+
row = db["
|
78
|
+
select id, data->'img' as img, data->'title' as title, data->'alt' as alt
|
79
|
+
from comics
|
80
|
+
order by RANDOM()
|
81
|
+
limit 1"
|
82
|
+
][:data]
|
83
|
+
comic = Comic.new(row[:id], row[:img], row[:title], row[:alt])
|
84
|
+
reply_with_comic response, comic
|
85
|
+
end
|
86
|
+
|
87
|
+
##
|
88
|
+
# Find the next comic based on user state
|
89
|
+
#
|
90
|
+
def find_next(response)
|
91
|
+
db = init_db
|
92
|
+
if last_comic = get_last_comic(response.user)
|
93
|
+
last_comic += 1
|
94
|
+
comic = get_comic_by_id(db, last_comic)
|
95
|
+
reply_with_comic response, comic
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
##
|
100
|
+
# Find the previous comic based on user state
|
101
|
+
#
|
102
|
+
def find_prev(response)
|
103
|
+
db = init_db
|
104
|
+
if last_comic = get_last_comic(response.user)
|
105
|
+
last_comic -= 1
|
106
|
+
comic = get_comic_by_id(db, last_comic)
|
107
|
+
reply_with_comic response, comic
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
##
|
112
|
+
# Grab the comic object by xkcd id (which is also db id)
|
113
|
+
#
|
114
|
+
def get_comic_by_id(db, last_comic)
|
115
|
+
row = db["
|
116
|
+
select id, data->'img' as img, data->'title' as title, data->'alt' as alt
|
117
|
+
from comics
|
118
|
+
where id = ?", last_comic][:data]
|
119
|
+
|
120
|
+
Comic.new(row[:id], row[:img], row[:title], row[:alt])
|
121
|
+
end
|
122
|
+
|
123
|
+
##
|
124
|
+
# Helper function to display comic and set timer for alt tag.
|
125
|
+
#
|
126
|
+
def reply_with_comic(response, comic)
|
127
|
+
set_state comic, response.user
|
128
|
+
response.reply "XKCD #{comic.id} \"#{comic.title}\" #{comic.image}"
|
129
|
+
after(config.alt_delay) do |timer|
|
130
|
+
response.reply comic.alt
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Save the state oh the recently displayed comic by user.
|
136
|
+
#
|
137
|
+
def set_state(comic, user)
|
138
|
+
db = init_db
|
139
|
+
state = db[:state]
|
140
|
+
user_state = state.where(:user => user.name)
|
141
|
+
puts user_state.count
|
142
|
+
if user_state.count > 0
|
143
|
+
log.debug 'Updating state!'
|
144
|
+
user_state.update(:last_comic => comic.id)
|
145
|
+
else
|
146
|
+
log.debug 'Creating state!'
|
147
|
+
state.insert(user: user.name, last_comic: comic.id)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
##
|
152
|
+
# Grab the user's last_comic for informational purposes.
|
153
|
+
#
|
154
|
+
def get_last_comic(user)
|
155
|
+
db = init_db
|
156
|
+
dataset = db[:state].where(:user => user.name)
|
157
|
+
if dataset.count > 0
|
158
|
+
dataset.first[:last_comic]
|
159
|
+
else
|
160
|
+
log.debug("get_last_comic called with no user state for #{user.name}")
|
161
|
+
end
|
162
|
+
|
163
|
+
end
|
164
|
+
|
165
|
+
def init_db
|
166
|
+
Sequel.connect("postgres://#{config.db_user}:#{config.db_pass}@#{config.db_host}:#{config.db_port}/#{config.db_name}")
|
167
|
+
end
|
168
|
+
Lita.register_handler(self)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'lita'
|
2
|
+
|
3
|
+
Lita.load_locales Dir[File.expand_path(
|
4
|
+
File.join('..', '..', 'locales', '*.yml'), __FILE__
|
5
|
+
)]
|
6
|
+
|
7
|
+
require 'lita/handlers/onewheel_xkcd'
|
8
|
+
|
9
|
+
Lita::Handlers::OnewheelXkcd.template_root File.expand_path(
|
10
|
+
File.join('..', '..', 'templates'),
|
11
|
+
__FILE__
|
12
|
+
)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
Gem::Specification.new do |spec|
|
2
|
+
spec.name = 'lita-onewheel-xkcd'
|
3
|
+
spec.version = '0.0.0'
|
4
|
+
spec.authors = ['Andrew Kreps']
|
5
|
+
spec.email = ['andrew.kreps@gmail.com']
|
6
|
+
spec.description = 'XKCD searchable archive for comics by keyword, id and date*. * date coming soon to a minor update near you'
|
7
|
+
spec.summary = 'Ever wanted a way to display XKCD comics in your chat client of choice? Look no further!'
|
8
|
+
spec.homepage = 'https://github.com/onewheelskyward/lita-onewheel-xkcd'
|
9
|
+
spec.license = 'MIT'
|
10
|
+
spec.metadata = { 'lita_plugin_type' => 'handler' }
|
11
|
+
|
12
|
+
spec.files = `git ls-files`.split($/)
|
13
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
14
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
15
|
+
spec.require_paths = ['lib']
|
16
|
+
|
17
|
+
spec.add_runtime_dependency 'lita', '~> 4.6'
|
18
|
+
spec.add_runtime_dependency 'lita-irc', '~> 2.0'
|
19
|
+
spec.add_runtime_dependency 'sequel', '~> 4.27'
|
20
|
+
spec.add_runtime_dependency 'sequel_pg', '~> 1.6'
|
21
|
+
spec.add_runtime_dependency 'pg', '~> 0.18'
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.4'
|
25
|
+
spec.add_development_dependency 'rack-test', '~> 0.6'
|
26
|
+
spec.add_development_dependency 'rspec', '~> 3.3'
|
27
|
+
spec.add_development_dependency 'simplecov', '~> 0.10'
|
28
|
+
spec.add_development_dependency 'coveralls', '~> 0.8'
|
29
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Lita.configure do |config|
|
2
|
+
config.handlers.onewheel_xkcd.db_host = 'localhost'
|
3
|
+
config.handlers.onewheel_xkcd.db_name = 'lita_xkcd'
|
4
|
+
config.handlers.onewheel_xkcd.db_user = 'root'
|
5
|
+
config.handlers.onewheel_xkcd.db_pass = ''
|
6
|
+
config.handlers.onewheel_xkcd.db_port = 5432
|
7
|
+
end
|
data/readme.rst
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
lita-onewheel-xkcd
|
2
|
+
==================
|
3
|
+
|
4
|
+
.. image:: https://travis-ci.org/onewheelskyward/lita-onewheel-xkcd.png?branch=master :target: https://travis-ci.org/onewheelskyward/lita-onewheel-xkcd
|
5
|
+
.. image:: https://coveralls.io/repos/onewheelskyward/lita-onewheel-xkcd/badge.svg?branch=master&service=github :target: https://coveralls.io/github/onewheelskyward/lita-onewheel-xkcd?branch=master
|
6
|
+
|
7
|
+
A Lita_ handler to display XKCD comics in your chat handler of choice.
|
8
|
+
|
9
|
+
|
10
|
+
Installation
|
11
|
+
------------
|
12
|
+
Add lita-onewheel-xkcd to your Lita instance's Gemfile:
|
13
|
+
::
|
14
|
+
gem "lita-onewheel-xkcd"
|
15
|
+
|
16
|
+
|
17
|
+
Configuration
|
18
|
+
-------------
|
19
|
+
Unless you're running the defaults, you'll want to specify your database connection values like so:
|
20
|
+
::
|
21
|
+
Lita.configure do |config|
|
22
|
+
config.handlers.onewheel_xkcd.db_host = 'localhost'
|
23
|
+
config.handlers.onewheel_xkcd.db_name = 'lita_xkcd'
|
24
|
+
config.handlers.onewheel_xkcd.db_user = 'root'
|
25
|
+
config.handlers.onewheel_xkcd.db_pass = ''
|
26
|
+
config.handlers.onewheel_xkcd.db_port = 5432
|
27
|
+
config.handlers.onewheel-xkcd.alt_delay = 15 # Optional; 9 is the default.
|
28
|
+
end
|
29
|
+
|
30
|
+
Usage
|
31
|
+
-----
|
32
|
+
All commands return the comic, and then display the alt text alt_delay seconds later.
|
33
|
+
|
34
|
+
:xkcd: Returns a random XKCD comic.
|
35
|
+
:xkcd 411: Returns xkcd.com/411's comic.
|
36
|
+
:xkcd ballmer: returns my favorite Steve Ballmer comic.
|
37
|
+
:xkcd next: returns the next comic by index.
|
38
|
+
:xkcd prev: returns the previous comic by index.
|
39
|
+
|
40
|
+
|
41
|
+
Engineering Notes
|
42
|
+
-----------------
|
43
|
+
|
44
|
+
Current comic(including top number): http://xkcd.com/info.0.json
|
45
|
+
|
46
|
+
Comic by number: http://xkcd.com/1/info.0.json
|
47
|
+
|
48
|
+
How to map # to date? - it's in the meta
|
49
|
+
|
50
|
+
Parser script, import into postgres? Best way to handle json
|
51
|
+
|
52
|
+
Keyword tokenizer, it's substring searching at the moment.
|
53
|
+
|
54
|
+
Add postgres setup and details on how to update the database with new comics.
|
55
|
+
|
56
|
+
.. _Lita: http://lita.io/
|
data/scripts/pop.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'sequel'
|
2
|
+
require 'rest-client'
|
3
|
+
|
4
|
+
db = Sequel.connect('postgres://root@localhost:5432/lita_xkcd')
|
5
|
+
|
6
|
+
max_id = db[:comics].max(:id) || 1
|
7
|
+
|
8
|
+
puts "max_id: #{max_id}"
|
9
|
+
db_comics = db[:comics]
|
10
|
+
|
11
|
+
top_response = RestClient.get 'http://xkcd.com/info.0.json'
|
12
|
+
top_json = JSON.parse top_response
|
13
|
+
puts top_json['num']
|
14
|
+
|
15
|
+
for num in max_id..top_json['num'] do
|
16
|
+
if num == 404
|
17
|
+
puts '404!'
|
18
|
+
db_comics.insert(data: '{"status":"not found"}')
|
19
|
+
next
|
20
|
+
end
|
21
|
+
response = RestClient.get "http://xkcd.com/#{num}/info.0.json"
|
22
|
+
db_comics.insert(data: response)
|
23
|
+
puts "#{num}/#{top_json['num']}"
|
24
|
+
end
|
25
|
+
|
data/scripts/schema.rb
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Lita::Handlers::OnewheelXkcd, lita_handler: true do
|
4
|
+
it { is_expected.to route_command('xkcd') }
|
5
|
+
it { is_expected.to route_command('xkcd random') }
|
6
|
+
it { is_expected.to route_command('xkcd first') }
|
7
|
+
it { is_expected.to route_command('xkcd last') }
|
8
|
+
it { is_expected.to route_command('xkcd today') }
|
9
|
+
it { is_expected.to route_command('xkcd 5/5/1998') }
|
10
|
+
it { is_expected.to route_command('xkcd 5-5-1998') }
|
11
|
+
it { is_expected.to route_command('xkcd 1998-5-5') }
|
12
|
+
it { is_expected.to route_command('xkcd prev') }
|
13
|
+
it { is_expected.to route_command('xkcd next') }
|
14
|
+
|
15
|
+
@img_url = 'http://imgs.xkcd.com/comics/'
|
16
|
+
|
17
|
+
it 'will return a random xkcd comic' do
|
18
|
+
send_command 'xkcd random'
|
19
|
+
expect(replies.last).to include(@img_url)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'will return a today\'s then a random xkcd comic' do
|
23
|
+
send_command 'xkcd'
|
24
|
+
expect(replies.last).to include(@img_url)
|
25
|
+
send_command 'xkcd'
|
26
|
+
expect(replies.last).to include(@img_url)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'will return today\'s xkcd comic' do
|
30
|
+
send_command 'xkcd today'
|
31
|
+
expect(replies.last).to include(@img_url)
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'will return today\'s xkcd comic' do
|
35
|
+
send_command 'xkcd last'
|
36
|
+
expect(replies.last).to include(@img_url)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'will return the first xkcd comic' do
|
40
|
+
send_command 'xkcd first'
|
41
|
+
expect(replies.last).to include(@img_url)
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'will return a xkcd comic for a specific y-m-d date' do
|
45
|
+
send_command 'xkcd 1998-5-5'
|
46
|
+
expect(replies.last).to include(@img_url)
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'will return a xkcd comic for a specific m-d-y date' do
|
50
|
+
send_command 'xkcd 5-5-1998'
|
51
|
+
expect(replies.last).to include(@img_url)
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'will return a xkcd comic for a specific / date' do
|
55
|
+
send_command 'xkcd 5/5/1998'
|
56
|
+
expect(replies.last).to include(@img_url)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Test the saved state of the last comic you requested.
|
60
|
+
it 'will return the first and then the next and then the previous xkcd comic' do
|
61
|
+
send_command 'xkcd first'
|
62
|
+
expect(replies.last).to include(@img_url)
|
63
|
+
send_command 'xkcd next'
|
64
|
+
expect(replies.last).to include(@img_url)
|
65
|
+
send_command 'xkcd prev'
|
66
|
+
expect(replies.last).to include(@img_url)
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'will edge case prev and next' do
|
70
|
+
today = Date.today
|
71
|
+
|
72
|
+
first = @img_url
|
73
|
+
last = "#{@img_url}#{today.year}-#{zero_prefix today.month}-#{zero_prefix today.day}.jpg"
|
74
|
+
|
75
|
+
send_command 'xkcd first'
|
76
|
+
expect(replies.last).to include(first)
|
77
|
+
send_command 'xkcd prev'
|
78
|
+
expect(replies.last).to include(first)
|
79
|
+
send_command 'xkcd last'
|
80
|
+
expect(replies.last).to include(last)
|
81
|
+
send_command 'xkcd next'
|
82
|
+
expect(replies.last).to include(last)
|
83
|
+
end
|
84
|
+
|
85
|
+
def zero_prefix(dat)
|
86
|
+
if dat.to_i < 10
|
87
|
+
"0#{dat}"
|
88
|
+
else
|
89
|
+
dat
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
def get_todays_image_filename
|
94
|
+
date = Date.today
|
95
|
+
"#{date.year}-#{zero_prefix date.month}-#{zero_prefix date.day}"
|
96
|
+
end
|
97
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
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-onewheel-xkcd'
|
10
|
+
require 'lita/rspec'
|
11
|
+
|
12
|
+
# A compatibility mode is provided for older plugins upgrading from Lita 3. Since this plugin
|
13
|
+
# was generated with Lita 4, the compatibility mode should be left disabled.
|
14
|
+
Lita.version_3_compatibility_mode = false
|
metadata
ADDED
@@ -0,0 +1,217 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: lita-onewheel-xkcd
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andrew Kreps
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-11-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: lita
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: lita-irc
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sequel
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '4.27'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '4.27'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sequel_pg
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.6'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.6'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pg
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.18'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.18'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.3'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.3'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '10.4'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '10.4'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rack-test
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.6'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.6'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '3.3'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '3.3'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.10'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.10'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: coveralls
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.8'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0.8'
|
167
|
+
description: XKCD searchable archive for comics by keyword, id and date*. * date
|
168
|
+
coming soon to a minor update near you
|
169
|
+
email:
|
170
|
+
- andrew.kreps@gmail.com
|
171
|
+
executables: []
|
172
|
+
extensions: []
|
173
|
+
extra_rdoc_files: []
|
174
|
+
files:
|
175
|
+
- ".gitignore"
|
176
|
+
- ".travis.yml"
|
177
|
+
- Gemfile
|
178
|
+
- Rakefile
|
179
|
+
- lib/lita-onewheel-xkcd.rb
|
180
|
+
- lib/lita/handlers/onewheel_xkcd.rb
|
181
|
+
- lib/lita/models/comic.rb
|
182
|
+
- lita-onewheel-xkcd.gemspec
|
183
|
+
- lita_config.rb.sample
|
184
|
+
- readme.rst
|
185
|
+
- scripts/pop.rb
|
186
|
+
- scripts/schema.rb
|
187
|
+
- spec/lita/handlers/onewheel_xkcd_spec.rb
|
188
|
+
- spec/spec_helper.rb
|
189
|
+
homepage: https://github.com/onewheelskyward/lita-onewheel-xkcd
|
190
|
+
licenses:
|
191
|
+
- MIT
|
192
|
+
metadata:
|
193
|
+
lita_plugin_type: handler
|
194
|
+
post_install_message:
|
195
|
+
rdoc_options: []
|
196
|
+
require_paths:
|
197
|
+
- lib
|
198
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
199
|
+
requirements:
|
200
|
+
- - ">="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: '0'
|
203
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - ">="
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
208
|
+
requirements: []
|
209
|
+
rubyforge_project:
|
210
|
+
rubygems_version: 2.4.5.1
|
211
|
+
signing_key:
|
212
|
+
specification_version: 4
|
213
|
+
summary: Ever wanted a way to display XKCD comics in your chat client of choice? Look
|
214
|
+
no further!
|
215
|
+
test_files:
|
216
|
+
- spec/lita/handlers/onewheel_xkcd_spec.rb
|
217
|
+
- spec/spec_helper.rb
|