lita-irasutoya 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +69 -0
- data/.rspec +3 -0
- data/.rubocop.yml +9 -0
- data/Gemfile +3 -1
- data/Gemfile.lock +127 -17
- data/Guardfile +49 -0
- data/README.md +16 -1
- data/Rakefile +5 -3
- data/lib/lita/handlers/irasutoya.rb +47 -43
- data/lib/lita/irasutoya.rb +4 -3
- data/lib/lita/irasutoya/version.rb +3 -1
- data/lita-irasutoya.gemspec +31 -19
- metadata +109 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbeab1c05240fc6582fda3da5cf2287b0cb2501c844cfe56b0dcd87ae0aa5834
|
4
|
+
data.tar.gz: 5dba361de4c2a40776cb63095e5fc9f9aa4a33a7fbbda3ea709e5d20009339a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83f2ee0ebe87bb8e7aca32a38ea70eba53878f8f4d93cd9fdca1288d9f3dedc6e9efc82c7a9daa352f83c7e4f905e73f372054fb1d3a55ea2644ebe5bb120f4f
|
7
|
+
data.tar.gz: 58f73d2722cd19d3ff2a450f1165f21f6b4bd99459f779a828cf1774f1ccc18dcb4807bd21c9b2b3f2c6738d825ded15e4d3591c2a292a3a4777210e428dfcb5
|
@@ -0,0 +1,69 @@
|
|
1
|
+
|
2
|
+
version: 2.1
|
3
|
+
|
4
|
+
update_bundler: &update_bundler
|
5
|
+
run:
|
6
|
+
name: update bundler
|
7
|
+
command: gem update bundler
|
8
|
+
|
9
|
+
bundle_install: &bundle_install
|
10
|
+
run:
|
11
|
+
name: bundle install
|
12
|
+
command: bundle install --path vendor/bundle --jobs 4
|
13
|
+
|
14
|
+
restore_bundle_cache: &restore_bundle_cache
|
15
|
+
restore_cache:
|
16
|
+
key: cache-bundler-{{ checksum "Gemfile.lock" }}
|
17
|
+
|
18
|
+
wait_redis_service: &wait_redis_service
|
19
|
+
run:
|
20
|
+
name: wait for redis
|
21
|
+
command: dockerize -wait tcp://127.0.0.1:6379 -timeout 1m
|
22
|
+
|
23
|
+
jobs:
|
24
|
+
build:
|
25
|
+
docker:
|
26
|
+
- image: circleci/ruby
|
27
|
+
steps:
|
28
|
+
- checkout
|
29
|
+
- *restore_bundle_cache
|
30
|
+
- *update_bundler
|
31
|
+
- *bundle_install
|
32
|
+
- save_cache:
|
33
|
+
key: cache-bundler-{{ checksum "Gemfile.lock" }}
|
34
|
+
paths:
|
35
|
+
- vendor/bundle
|
36
|
+
rubocop:
|
37
|
+
docker:
|
38
|
+
- image: circleci/ruby
|
39
|
+
steps:
|
40
|
+
- checkout
|
41
|
+
- *restore_bundle_cache
|
42
|
+
- *update_bundler
|
43
|
+
- *bundle_install
|
44
|
+
- run: bundle exec rubocop
|
45
|
+
rspec:
|
46
|
+
docker:
|
47
|
+
- image: circleci/ruby
|
48
|
+
- image: redis
|
49
|
+
steps:
|
50
|
+
- checkout
|
51
|
+
- *restore_bundle_cache
|
52
|
+
- *update_bundler
|
53
|
+
- *bundle_install
|
54
|
+
- *wait_redis_service
|
55
|
+
- run:
|
56
|
+
environment:
|
57
|
+
RAILS_ENV: test
|
58
|
+
COVERAGE: true
|
59
|
+
CODECOV_TOKEN: 0fdf6f58-374b-4082-bada-d3407b6eaf81
|
60
|
+
command: bundle exec rspec
|
61
|
+
workflows:
|
62
|
+
version: 2.1
|
63
|
+
rspec:
|
64
|
+
jobs:
|
65
|
+
- build
|
66
|
+
- rubocop:
|
67
|
+
requires: [build]
|
68
|
+
- rspec:
|
69
|
+
requires: [build]
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,39 +1,149 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lita-irasutoya (0.
|
5
|
-
|
4
|
+
lita-irasutoya (1.0.0)
|
5
|
+
irasutoya
|
6
|
+
lita (>= 4.7)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
9
10
|
specs:
|
10
|
-
|
11
|
+
ast (2.4.1)
|
12
|
+
codecov (0.2.12)
|
13
|
+
json
|
14
|
+
simplecov
|
15
|
+
coderay (1.1.3)
|
16
|
+
concurrent-ruby (1.1.7)
|
17
|
+
diff-lcs (1.4.4)
|
18
|
+
docile (1.3.2)
|
19
|
+
faraday (1.1.0)
|
20
|
+
multipart-post (>= 1.2, < 3)
|
21
|
+
ruby2_keywords
|
22
|
+
ffi (1.13.1)
|
23
|
+
formatador (0.2.5)
|
24
|
+
guard (2.16.2)
|
25
|
+
formatador (>= 0.2.4)
|
26
|
+
listen (>= 2.7, < 4.0)
|
27
|
+
lumberjack (>= 1.0.12, < 2.0)
|
28
|
+
nenv (~> 0.1)
|
29
|
+
notiffany (~> 0.0)
|
30
|
+
pry (>= 0.9.12)
|
31
|
+
shellany (~> 0.0)
|
32
|
+
thor (>= 0.18.1)
|
33
|
+
guard-compat (1.2.1)
|
34
|
+
guard-rspec (4.7.3)
|
35
|
+
guard (~> 2.1)
|
36
|
+
guard-compat (~> 1.1)
|
37
|
+
rspec (>= 2.99.0, < 4.0)
|
38
|
+
guard-rubocop (1.4.0)
|
39
|
+
guard (~> 2.0)
|
40
|
+
rubocop (< 2.0)
|
41
|
+
http_router (0.11.2)
|
42
|
+
rack (>= 1.0.0)
|
43
|
+
url_mount (~> 0.2.1)
|
44
|
+
i18n (1.8.5)
|
45
|
+
concurrent-ruby (~> 1.0)
|
46
|
+
ice_nine (0.11.2)
|
47
|
+
irasutoya (1.1.0)
|
48
|
+
nokogiri
|
49
|
+
json (2.3.1)
|
50
|
+
listen (3.2.1)
|
51
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
52
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
53
|
+
lita (4.7.1)
|
54
|
+
bundler (>= 1.3)
|
55
|
+
faraday (>= 0.8.7)
|
56
|
+
http_router (>= 0.11.2)
|
57
|
+
i18n (>= 0.6.9)
|
58
|
+
ice_nine (>= 0.11.0)
|
59
|
+
multi_json (>= 1.7.7)
|
60
|
+
puma (>= 2.7.1)
|
61
|
+
rack (>= 1.5.2, < 2.0.0)
|
62
|
+
rb-readline (>= 0.5.1)
|
63
|
+
redis-namespace (>= 1.3.0)
|
64
|
+
thor (>= 0.18.1)
|
65
|
+
lumberjack (1.2.8)
|
66
|
+
method_source (1.0.0)
|
11
67
|
mini_portile2 (2.4.0)
|
12
|
-
|
68
|
+
multi_json (1.15.0)
|
69
|
+
multipart-post (2.1.1)
|
70
|
+
nenv (0.3.0)
|
71
|
+
nio4r (2.5.4)
|
72
|
+
nokogiri (1.10.10)
|
13
73
|
mini_portile2 (~> 2.4.0)
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
74
|
+
notiffany (0.1.3)
|
75
|
+
nenv (~> 0.1)
|
76
|
+
shellany (~> 0.0)
|
77
|
+
parallel (1.19.2)
|
78
|
+
parser (2.7.2.0)
|
79
|
+
ast (~> 2.4.1)
|
80
|
+
pry (0.13.1)
|
81
|
+
coderay (~> 1.1)
|
82
|
+
method_source (~> 1.0)
|
83
|
+
puma (5.0.4)
|
84
|
+
nio4r (~> 2.0)
|
85
|
+
rack (1.6.13)
|
86
|
+
rainbow (3.0.0)
|
87
|
+
rake (13.0.1)
|
88
|
+
rb-fsevent (0.10.4)
|
89
|
+
rb-inotify (0.10.1)
|
90
|
+
ffi (~> 1.0)
|
91
|
+
rb-readline (0.5.5)
|
92
|
+
redis (4.2.2)
|
93
|
+
redis-namespace (1.8.0)
|
94
|
+
redis (>= 3.0.4)
|
95
|
+
regexp_parser (1.8.2)
|
96
|
+
rexml (3.2.4)
|
97
|
+
rspec (3.10.0)
|
98
|
+
rspec-core (~> 3.10.0)
|
99
|
+
rspec-expectations (~> 3.10.0)
|
100
|
+
rspec-mocks (~> 3.10.0)
|
101
|
+
rspec-core (3.10.0)
|
102
|
+
rspec-support (~> 3.10.0)
|
103
|
+
rspec-expectations (3.10.0)
|
22
104
|
diff-lcs (>= 1.2.0, < 2.0)
|
23
|
-
rspec-support (~> 3.
|
24
|
-
rspec-mocks (3.
|
105
|
+
rspec-support (~> 3.10.0)
|
106
|
+
rspec-mocks (3.10.0)
|
25
107
|
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
-
rspec-support (~> 3.
|
27
|
-
rspec-support (3.
|
108
|
+
rspec-support (~> 3.10.0)
|
109
|
+
rspec-support (3.10.0)
|
110
|
+
rubocop (1.1.0)
|
111
|
+
parallel (~> 1.10)
|
112
|
+
parser (>= 2.7.1.5)
|
113
|
+
rainbow (>= 2.2.2, < 4.0)
|
114
|
+
regexp_parser (>= 1.8)
|
115
|
+
rexml
|
116
|
+
rubocop-ast (>= 1.0.1)
|
117
|
+
ruby-progressbar (~> 1.7)
|
118
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
119
|
+
rubocop-ast (1.1.1)
|
120
|
+
parser (>= 2.7.1.5)
|
121
|
+
ruby-progressbar (1.10.1)
|
122
|
+
ruby2_keywords (0.0.2)
|
123
|
+
shellany (0.0.1)
|
124
|
+
simplecov (0.19.1)
|
125
|
+
docile (~> 1.1)
|
126
|
+
simplecov-html (~> 0.11)
|
127
|
+
simplecov-html (0.12.3)
|
128
|
+
thor (1.0.1)
|
129
|
+
unicode-display_width (1.7.0)
|
130
|
+
url_mount (0.2.1)
|
131
|
+
rack
|
28
132
|
|
29
133
|
PLATFORMS
|
30
134
|
ruby
|
31
135
|
|
32
136
|
DEPENDENCIES
|
33
137
|
bundler (~> 2.0)
|
138
|
+
codecov
|
139
|
+
guard
|
140
|
+
guard-rspec
|
141
|
+
guard-rubocop
|
34
142
|
lita-irasutoya!
|
35
|
-
rake (~>
|
143
|
+
rake (~> 13.0)
|
36
144
|
rspec (~> 3.0)
|
145
|
+
rubocop
|
146
|
+
simplecov
|
37
147
|
|
38
148
|
BUNDLED WITH
|
39
149
|
2.0.2
|
data/Guardfile
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# A sample Guardfile
|
4
|
+
# More info at https://github.com/guard/guard#readme
|
5
|
+
|
6
|
+
## Uncomment and set this to only include directories you want to watch
|
7
|
+
# directories %w(app lib config test spec features) \
|
8
|
+
# .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
9
|
+
|
10
|
+
## Note: if you are using the `directories` clause above and you are not
|
11
|
+
## watching the project directory ('.'), then you will want to move
|
12
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
13
|
+
#
|
14
|
+
# $ mkdir config
|
15
|
+
# $ mv Guardfile config/
|
16
|
+
# $ ln -s config/Guardfile .
|
17
|
+
#
|
18
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
19
|
+
|
20
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
21
|
+
# rspec may be run, below are examples of the most common uses.
|
22
|
+
# * bundler: 'bundle exec rspec'
|
23
|
+
# * bundler binstubs: 'bin/rspec'
|
24
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
25
|
+
# installed the spring binstubs per the docs)
|
26
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
27
|
+
# * 'just' rspec: 'rspec'
|
28
|
+
|
29
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
30
|
+
require 'guard/rspec/dsl'
|
31
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
32
|
+
|
33
|
+
# Feel free to open issues for suggestions and improvements
|
34
|
+
|
35
|
+
# RSpec files
|
36
|
+
rspec = dsl.rspec
|
37
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
38
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
39
|
+
watch(rspec.spec_files)
|
40
|
+
|
41
|
+
# Ruby files
|
42
|
+
ruby = dsl.ruby
|
43
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
44
|
+
end
|
45
|
+
|
46
|
+
guard :rubocop do
|
47
|
+
watch(/.+\.rb$/)
|
48
|
+
watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
|
49
|
+
end
|
data/README.md
CHANGED
@@ -1,9 +1,16 @@
|
|
1
|
+
# lita-irasutoya
|
1
2
|
[![Gem Version](https://badge.fury.io/rb/lita-irasutoya.svg)](https://badge.fury.io/rb/lita-irasutoya)
|
3
|
+
[![Circle CI](https://circleci.com/gh/unhappychoice/lita-irasutoya.svg?style=shield)](https://circleci.com/gh/unhappychoice/lita-irasutoya)
|
2
4
|
[![Code Climate](https://codeclimate.com/github/unhappychoice/lita-irasutoya/badges/gpa.svg)](https://codeclimate.com/github/unhappychoice/lita-irasutoya)
|
5
|
+
[![codecov](https://codecov.io/gh/unhappychoice/lita-irasutoya/branch/master/graph/badge.svg)](https://codecov.io/gh/unhappychoice/lita-irasutoya)
|
3
6
|
[![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/unhappychoice/lita-irasutoya.svg)](https://libraries.io/github/unhappychoice/lita-irasutoya)
|
4
7
|
![](http://ruby-gem-downloads-badge.herokuapp.com/lita-irasutoya?type=total)
|
5
8
|
![GitHub](https://img.shields.io/github/license/unhappychoice/lita-irasutoya.svg)
|
6
9
|
|
10
|
+
`lita-irasutoya` allows you to get random images from www.irasutoya.com.
|
11
|
+
|
12
|
+
![](https://github.com/unhappychoice/lita-irasutoya/raw/master/images/usage.png)
|
13
|
+
|
7
14
|
## Installation
|
8
15
|
|
9
16
|
```ruby
|
@@ -12,7 +19,15 @@ gem 'lita-irasutoya'
|
|
12
19
|
|
13
20
|
## Usage
|
14
21
|
|
15
|
-
|
22
|
+
### Ramdom images
|
23
|
+
```
|
24
|
+
irasutoya random
|
25
|
+
```
|
26
|
+
|
27
|
+
### Search images
|
28
|
+
```
|
29
|
+
irasutoya search xxxx
|
30
|
+
```
|
16
31
|
|
17
32
|
## Contributing
|
18
33
|
|
data/Rakefile
CHANGED
@@ -1,66 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'lita'
|
4
|
+
require 'irasutoya'
|
5
|
+
|
1
6
|
module Lita
|
2
7
|
module Handlers
|
3
|
-
class
|
4
|
-
route(
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
)
|
8
|
+
class Irasutoya < Handler
|
9
|
+
route(/^irasutoya$/i, help: { 'irasutoya' => 'いらすとやからランダムに画像を表示します。' }) do |bot|
|
10
|
+
reply(bot, ::Irasutoya::Irasuto.random)
|
11
|
+
end
|
12
|
+
|
13
|
+
route(/^irasutoya random$/i, help: { 'irasutoya' => 'いらすとやからランダムに画像を表示します。' }) do |bot|
|
14
|
+
reply(bot, ::Irasutoya::Irasuto.random)
|
15
|
+
end
|
16
|
+
|
17
|
+
route(/^irasutoya search (.*)$/i, help: { 'irasutoya search' => 'いらすとやから画像を検索します。' }) do |bot|
|
18
|
+
::Irasutoya::Irasuto
|
19
|
+
.search(query: bot.matches.dig(0, 0))
|
20
|
+
.take(3)
|
21
|
+
.flat_map(&:fetch_irasuto)
|
22
|
+
.compact
|
23
|
+
.each { |irasuto| reply(bot, irasuto) }
|
24
|
+
end
|
9
25
|
|
10
|
-
|
11
|
-
url = get_random_url
|
12
|
-
document = get_page_and_parse(url)
|
13
|
-
image_url = document.css('.entry').search('img').attribute('src').value
|
26
|
+
private
|
14
27
|
|
15
|
-
|
16
|
-
|
28
|
+
def adapter
|
29
|
+
robot.config.robot.adapter
|
30
|
+
end
|
31
|
+
|
32
|
+
def reply(bot, irasuto)
|
33
|
+
case adapter
|
34
|
+
when :slack then reply_to_slack(bot, irasuto)
|
35
|
+
else reply_to_others bot, irasuto
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def reply_to_slack(bot, irasuto)
|
40
|
+
irasuto.image_urls.each do |image_url|
|
17
41
|
send_attachement(
|
18
42
|
target: bot.room,
|
19
|
-
url: url,
|
20
|
-
title:
|
21
|
-
body:
|
22
|
-
image_url: image_url
|
43
|
+
url: irasuto.url,
|
44
|
+
title: irasuto.title,
|
45
|
+
body: irasuto.description,
|
46
|
+
image_url: image_url
|
23
47
|
)
|
24
|
-
else
|
25
|
-
bot.reply document.css('.post').css('.title').search('h2').text
|
26
|
-
bot.reply document.css('.entry').css('.separator')[1].text
|
27
|
-
bot.reply image_url
|
28
48
|
end
|
29
49
|
end
|
30
50
|
|
31
|
-
|
32
|
-
|
33
|
-
jsonp = Net::HTTP.get('www.irasutoya.com', "/feeds/posts/summary?start-index=#{luck}&max-results=1&alt=json-in-script")
|
34
|
-
JSON.parse(jsonp[/{.+}/])
|
35
|
-
.dig('feed', 'entry')
|
36
|
-
.first
|
37
|
-
.dig('link')
|
38
|
-
.filter { |link| link['rel'] == 'alternate' }
|
39
|
-
.first
|
40
|
-
.dig('href')
|
41
|
-
end
|
42
|
-
|
43
|
-
private def get_page_and_parse(url)
|
44
|
-
charset = nil
|
45
|
-
html = URI.parse(url).open do |f|
|
46
|
-
charset = f.charset
|
47
|
-
f.read
|
48
|
-
end
|
49
|
-
Nokogiri::HTML.parse(html, nil, charset)
|
51
|
+
def reply_to_others(bot, irasuto)
|
52
|
+
bot.reply [irasuto.url, irasuto.title, irasuto.description, irasuto.image_urls].flatten.join("\n")
|
50
53
|
end
|
51
54
|
|
52
|
-
|
53
|
-
attachment = Lita::Adapters::Slack::Attachment.new(
|
55
|
+
def send_attachement(target:, url:, title:, body:, image_url:)
|
56
|
+
attachment = Lita::Adapters::Slack::Attachment.new(
|
57
|
+
body,
|
54
58
|
color: 'good',
|
55
59
|
title: title,
|
56
60
|
title_link: url,
|
57
61
|
text: body,
|
58
62
|
image_url: image_url
|
59
|
-
|
63
|
+
)
|
60
64
|
robot.chat_service.send_attachment(target, attachment)
|
61
65
|
end
|
62
66
|
end
|
63
67
|
|
64
|
-
Lita.register_handler(
|
68
|
+
Lita.register_handler(Lita::Handlers::Irasutoya)
|
65
69
|
end
|
66
70
|
end
|
data/lib/lita/irasutoya.rb
CHANGED
data/lita-irasutoya.gemspec
CHANGED
@@ -1,34 +1,46 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require
|
5
|
+
require 'lita/irasutoya/version'
|
4
6
|
|
5
7
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name =
|
8
|
+
spec.name = 'lita-irasutoya'
|
7
9
|
spec.version = Lita::Irasutoya::VERSION
|
8
|
-
spec.
|
9
|
-
spec.
|
10
|
+
spec.required_ruby_version = '>= 2.5'
|
11
|
+
spec.authors = ['Yuji Ueki']
|
12
|
+
spec.email = ['unhappychoice@gmail.com']
|
10
13
|
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
14
|
+
spec.summary = 'Lita plugin for irasutoya'
|
15
|
+
spec.description = 'Lita plugin to get random images from www.irasutoya.com'
|
16
|
+
spec.homepage = 'https://github.com/unhappychoice/lita-irasutoya'
|
17
|
+
spec.license = 'MIT'
|
15
18
|
|
16
|
-
spec.metadata[
|
17
|
-
spec.metadata[
|
18
|
-
spec.metadata[
|
19
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
20
|
+
spec.metadata['source_code_uri'] = 'https://github.com/unhappychoice/lita-irasutoya'
|
21
|
+
spec.metadata['changelog_uri'] = 'https://github.com/unhappychoice/lita-irasutoya'
|
22
|
+
spec.metadata['lita_plugin_type'] = 'handler'
|
19
23
|
|
20
24
|
# Specify which files should be added to the gem when it is released.
|
21
25
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
|
-
spec.files
|
26
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
23
27
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
28
|
end
|
25
|
-
spec.bindir =
|
29
|
+
spec.bindir = 'exe'
|
26
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
|
-
spec.require_paths = [
|
31
|
+
spec.require_paths = ['lib']
|
32
|
+
|
33
|
+
spec.add_runtime_dependency 'lita', '>= 4.7'
|
28
34
|
|
29
|
-
spec.add_dependency
|
35
|
+
spec.add_dependency 'irasutoya'
|
30
36
|
|
31
|
-
spec.add_development_dependency
|
32
|
-
spec.add_development_dependency
|
33
|
-
spec.add_development_dependency
|
37
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
38
|
+
spec.add_development_dependency 'codecov'
|
39
|
+
spec.add_development_dependency 'guard'
|
40
|
+
spec.add_development_dependency 'guard-rspec'
|
41
|
+
spec.add_development_dependency 'guard-rubocop'
|
42
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
43
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
44
|
+
spec.add_development_dependency 'rubocop'
|
45
|
+
spec.add_development_dependency 'simplecov'
|
34
46
|
end
|
metadata
CHANGED
@@ -1,17 +1,31 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-irasutoya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuji Ueki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: lita
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.7'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: irasutoya
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - ">="
|
@@ -38,20 +52,76 @@ dependencies:
|
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '2.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: codecov
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard-rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: guard-rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
41
111
|
- !ruby/object:Gem::Dependency
|
42
112
|
name: rake
|
43
113
|
requirement: !ruby/object:Gem::Requirement
|
44
114
|
requirements:
|
45
115
|
- - "~>"
|
46
116
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
117
|
+
version: '13.0'
|
48
118
|
type: :development
|
49
119
|
prerelease: false
|
50
120
|
version_requirements: !ruby/object:Gem::Requirement
|
51
121
|
requirements:
|
52
122
|
- - "~>"
|
53
123
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
124
|
+
version: '13.0'
|
55
125
|
- !ruby/object:Gem::Dependency
|
56
126
|
name: rspec
|
57
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +136,34 @@ dependencies:
|
|
66
136
|
- - "~>"
|
67
137
|
- !ruby/object:Gem::Version
|
68
138
|
version: '3.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: simplecov
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
69
167
|
description: Lita plugin to get random images from www.irasutoya.com
|
70
168
|
email:
|
71
169
|
- unhappychoice@gmail.com
|
@@ -73,11 +171,15 @@ executables: []
|
|
73
171
|
extensions: []
|
74
172
|
extra_rdoc_files: []
|
75
173
|
files:
|
174
|
+
- ".circleci/config.yml"
|
76
175
|
- ".gitignore"
|
176
|
+
- ".rspec"
|
177
|
+
- ".rubocop.yml"
|
77
178
|
- ".travis.yml"
|
78
179
|
- CODE_OF_CONDUCT.md
|
79
180
|
- Gemfile
|
80
181
|
- Gemfile.lock
|
182
|
+
- Guardfile
|
81
183
|
- LICENSE.txt
|
82
184
|
- README.md
|
83
185
|
- Rakefile
|
@@ -93,6 +195,7 @@ metadata:
|
|
93
195
|
homepage_uri: https://github.com/unhappychoice/lita-irasutoya
|
94
196
|
source_code_uri: https://github.com/unhappychoice/lita-irasutoya
|
95
197
|
changelog_uri: https://github.com/unhappychoice/lita-irasutoya
|
198
|
+
lita_plugin_type: handler
|
96
199
|
post_install_message:
|
97
200
|
rdoc_options: []
|
98
201
|
require_paths:
|
@@ -101,7 +204,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
101
204
|
requirements:
|
102
205
|
- - ">="
|
103
206
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
207
|
+
version: '2.5'
|
105
208
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
209
|
requirements:
|
107
210
|
- - ">="
|