lita-irasutoya 0.1.5 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0998d1140c3af231ba2c932ead2e6f861b1e0736ef254c306bfcd220a810f98
4
- data.tar.gz: 14d8e134dfe662eaef86c4763e28520afc5aa956abf942e965fca40b2f215d5a
3
+ metadata.gz: dbeab1c05240fc6582fda3da5cf2287b0cb2501c844cfe56b0dcd87ae0aa5834
4
+ data.tar.gz: 5dba361de4c2a40776cb63095e5fc9f9aa4a33a7fbbda3ea709e5d20009339a0
5
5
  SHA512:
6
- metadata.gz: fc3bd81f47427edbc96cf55e591548c688e6af80b4eb71620cccc3603ed7938c722ff096499c9772970daa9cc1893ae8162f4dfa26e204bdb739a788425d35be
7
- data.tar.gz: cead18c68b94b808891e3bb057b585fb8fd427b7b726e13bd9e3c64f61d25fe8fd8768532c6b03864e288906ed3018daa2ce3bc3b805a9d1e652ba001026b621
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
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,9 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ TargetRubyVersion: 2.5
4
+
5
+ Style/Documentation:
6
+ Enabled: false
7
+
8
+ Metrics/LineLength:
9
+ Max: 120
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in lita-irasutoya.gemspec
4
6
  gemspec
@@ -1,23 +1,55 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lita-irasutoya (0.1.5)
4
+ lita-irasutoya (1.0.0)
5
+ irasutoya
5
6
  lita (>= 4.7)
6
- nokogiri
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- concurrent-ruby (1.1.5)
12
- diff-lcs (1.3)
13
- faraday (0.15.4)
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)
14
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)
15
41
  http_router (0.11.2)
16
42
  rack (>= 1.0.0)
17
43
  url_mount (~> 0.2.1)
18
- i18n (1.6.0)
44
+ i18n (1.8.5)
19
45
  concurrent-ruby (~> 1.0)
20
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)
21
53
  lita (4.7.1)
22
54
  bundler (>= 1.3)
23
55
  faraday (>= 0.8.7)
@@ -30,34 +62,71 @@ GEM
30
62
  rb-readline (>= 0.5.1)
31
63
  redis-namespace (>= 1.3.0)
32
64
  thor (>= 0.18.1)
65
+ lumberjack (1.2.8)
66
+ method_source (1.0.0)
33
67
  mini_portile2 (2.4.0)
34
- multi_json (1.13.1)
68
+ multi_json (1.15.0)
35
69
  multipart-post (2.1.1)
36
- nio4r (2.4.0)
37
- nokogiri (1.10.4)
70
+ nenv (0.3.0)
71
+ nio4r (2.5.4)
72
+ nokogiri (1.10.10)
38
73
  mini_portile2 (~> 2.4.0)
39
- puma (4.1.0)
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)
40
84
  nio4r (~> 2.0)
41
- rack (1.6.11)
42
- rake (12.3.3)
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)
43
91
  rb-readline (0.5.5)
44
- redis (4.1.2)
45
- redis-namespace (1.6.0)
92
+ redis (4.2.2)
93
+ redis-namespace (1.8.0)
46
94
  redis (>= 3.0.4)
47
- rspec (3.8.0)
48
- rspec-core (~> 3.8.0)
49
- rspec-expectations (~> 3.8.0)
50
- rspec-mocks (~> 3.8.0)
51
- rspec-core (3.8.2)
52
- rspec-support (~> 3.8.0)
53
- rspec-expectations (3.8.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)
54
104
  diff-lcs (>= 1.2.0, < 2.0)
55
- rspec-support (~> 3.8.0)
56
- rspec-mocks (3.8.1)
105
+ rspec-support (~> 3.10.0)
106
+ rspec-mocks (3.10.0)
57
107
  diff-lcs (>= 1.2.0, < 2.0)
58
- rspec-support (~> 3.8.0)
59
- rspec-support (3.8.2)
60
- thor (0.20.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)
61
130
  url_mount (0.2.1)
62
131
  rack
63
132
 
@@ -66,9 +135,15 @@ PLATFORMS
66
135
 
67
136
  DEPENDENCIES
68
137
  bundler (~> 2.0)
138
+ codecov
139
+ guard
140
+ guard-rspec
141
+ guard-rubocop
69
142
  lita-irasutoya!
70
- rake (~> 12.3)
143
+ rake (~> 13.0)
71
144
  rspec (~> 3.0)
145
+ rubocop
146
+ simplecov
72
147
 
73
148
  BUNDLED WITH
74
149
  2.0.2
@@ -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,12 +1,16 @@
1
1
  # lita-irasutoya
2
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)
3
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)
4
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)
5
7
  ![](http://ruby-gem-downloads-badge.herokuapp.com/lita-irasutoya?type=total)
6
8
  ![GitHub](https://img.shields.io/github/license/unhappychoice/lita-irasutoya.svg)
7
9
 
8
10
  `lita-irasutoya` allows you to get random images from www.irasutoya.com.
9
11
 
12
+ ![](https://github.com/unhappychoice/lita-irasutoya/raw/master/images/usage.png)
13
+
10
14
  ## Installation
11
15
 
12
16
  ```ruby
@@ -15,7 +19,15 @@ gem 'lita-irasutoya'
15
19
 
16
20
  ## Usage
17
21
 
18
- ![](https://github.com/unhappychoice/lita-irasutoya/raw/master/images/usage.png)
22
+ ### Ramdom images
23
+ ```
24
+ irasutoya random
25
+ ```
26
+
27
+ ### Search images
28
+ ```
29
+ irasutoya search xxxx
30
+ ```
19
31
 
20
32
  ## Contributing
21
33
 
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ task default: :spec
@@ -1,69 +1,70 @@
1
- require 'open-uri'
2
- require 'nokogiri'
1
+ # frozen_string_literal: true
2
+
3
+ require 'lita'
4
+ require 'irasutoya'
3
5
 
4
6
  module Lita
5
7
  module Handlers
6
- class Irastoya < Handler
7
- route(
8
- /^irasutoya$/i,
9
- :irasutoya,
10
- help: { 'irasutoya' => 'いらすとやからランダムに画像を表示します。' }
11
- )
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
25
+
26
+ private
12
27
 
13
- def irasutoya(bot)
14
- url = get_random_url
15
- document = get_page_and_parse(url)
16
- image_url = document.css('.entry').search('img').attribute('src').value
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
17
38
 
18
- case robot.config.robot.adapter
19
- when :slack
39
+ def reply_to_slack(bot, irasuto)
40
+ irasuto.image_urls.each do |image_url|
20
41
  send_attachement(
21
42
  target: bot.room,
22
- url: url,
23
- title: document.css('.post').css('.title').search('h2').text,
24
- body: document.css('.entry').css('.separator')[1].text,
25
- image_url: image_url.chars.first == '/' ? 'http:' + image_url : image_url
43
+ url: irasuto.url,
44
+ title: irasuto.title,
45
+ body: irasuto.description,
46
+ image_url: image_url
26
47
  )
27
- else
28
- bot.reply document.css('.post').css('.title').search('h2').text
29
- bot.reply document.css('.entry').css('.separator')[1].text
30
- bot.reply image_url
31
48
  end
32
49
  end
33
50
 
34
- private def get_random_url
35
- luck = Random.rand(22208)
36
- jsonp = Net::HTTP.get('www.irasutoya.com', "/feeds/posts/summary?start-index=#{luck}&max-results=1&alt=json-in-script")
37
- JSON.parse(jsonp[/{.+}/])
38
- .dig('feed', 'entry')
39
- .first
40
- .dig('link')
41
- .filter { |link| link['rel'] == 'alternate' }
42
- .first
43
- .dig('href')
44
- end
45
-
46
- private def get_page_and_parse(url)
47
- charset = nil
48
- html = URI.parse(url).open do |f|
49
- charset = f.charset
50
- f.read
51
- end
52
- ::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")
53
53
  end
54
54
 
55
- private def send_attachement(target:, url:, title:, body:, image_url:)
56
- attachment = Lita::Adapters::Slack::Attachment.new(body, {
55
+ def send_attachement(target:, url:, title:, body:, image_url:)
56
+ attachment = Lita::Adapters::Slack::Attachment.new(
57
+ body,
57
58
  color: 'good',
58
59
  title: title,
59
60
  title_link: url,
60
61
  text: body,
61
62
  image_url: image_url
62
- })
63
+ )
63
64
  robot.chat_service.send_attachment(target, attachment)
64
65
  end
65
66
  end
66
67
 
67
- Lita.register_handler(Irastoya)
68
+ Lita.register_handler(Lita::Handlers::Irasutoya)
68
69
  end
69
70
  end
@@ -1,6 +1,7 @@
1
- require_relative "./handlers/irasutoya"
2
- require_relative "./irasutoya/version"
3
- require 'open-uri'
1
+ # frozen_string_literal: true
2
+
3
+ require_relative './handlers/irasutoya'
4
+ require_relative './irasutoya/version'
4
5
 
5
6
  module Lita
6
7
  module Irasutoya; end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Lita
2
4
  module Irasutoya
3
- VERSION = "0.1.5"
5
+ VERSION = '1.0.0'
4
6
  end
5
7
  end
@@ -1,37 +1,46 @@
1
- lib = File.expand_path("lib", __dir__)
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 "lita/irasutoya/version"
5
+ require 'lita/irasutoya/version'
4
6
 
5
7
  Gem::Specification.new do |spec|
6
- spec.name = "lita-irasutoya"
8
+ spec.name = 'lita-irasutoya'
7
9
  spec.version = Lita::Irasutoya::VERSION
8
- spec.authors = ["Yuji Ueki"]
9
- spec.email = ["unhappychoice@gmail.com"]
10
+ spec.required_ruby_version = '>= 2.5'
11
+ spec.authors = ['Yuji Ueki']
12
+ spec.email = ['unhappychoice@gmail.com']
10
13
 
11
- spec.summary = %q{Lita plugin for irasutoya}
12
- spec.description = %q{Lita plugin to get random images from www.irasutoya.com}
13
- spec.homepage = "https://github.com/unhappychoice/lita-irasutoya"
14
- spec.license = "MIT"
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["homepage_uri"] = spec.homepage
17
- spec.metadata["source_code_uri"] = "https://github.com/unhappychoice/lita-irasutoya"
18
- spec.metadata["changelog_uri"] = "https://github.com/unhappychoice/lita-irasutoya"
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'
19
22
  spec.metadata['lita_plugin_type'] = 'handler'
20
23
 
21
24
  # Specify which files should be added to the gem when it is released.
22
25
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
26
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
27
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
28
  end
26
- spec.bindir = "exe"
29
+ spec.bindir = 'exe'
27
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
- spec.require_paths = ["lib"]
31
+ spec.require_paths = ['lib']
29
32
 
30
- spec.add_runtime_dependency "lita", ">= 4.7"
33
+ spec.add_runtime_dependency 'lita', '>= 4.7'
31
34
 
32
- spec.add_dependency "nokogiri"
35
+ spec.add_dependency 'irasutoya'
33
36
 
34
- spec.add_development_dependency "bundler", "~> 2.0"
35
- spec.add_development_dependency "rake", "~> 12.3"
36
- spec.add_development_dependency "rspec", "~> 3.0"
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'
37
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-irasutoya
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
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: 2019-08-25 00:00:00.000000000 Z
11
+ date: 2020-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.7'
27
27
  - !ruby/object:Gem::Dependency
28
- name: nokogiri
28
+ name: irasutoya
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -52,20 +52,76 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
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'
55
111
  - !ruby/object:Gem::Dependency
56
112
  name: rake
57
113
  requirement: !ruby/object:Gem::Requirement
58
114
  requirements:
59
115
  - - "~>"
60
116
  - !ruby/object:Gem::Version
61
- version: '12.3'
117
+ version: '13.0'
62
118
  type: :development
63
119
  prerelease: false
64
120
  version_requirements: !ruby/object:Gem::Requirement
65
121
  requirements:
66
122
  - - "~>"
67
123
  - !ruby/object:Gem::Version
68
- version: '12.3'
124
+ version: '13.0'
69
125
  - !ruby/object:Gem::Dependency
70
126
  name: rspec
71
127
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +136,34 @@ dependencies:
80
136
  - - "~>"
81
137
  - !ruby/object:Gem::Version
82
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'
83
167
  description: Lita plugin to get random images from www.irasutoya.com
84
168
  email:
85
169
  - unhappychoice@gmail.com
@@ -87,11 +171,15 @@ executables: []
87
171
  extensions: []
88
172
  extra_rdoc_files: []
89
173
  files:
174
+ - ".circleci/config.yml"
90
175
  - ".gitignore"
176
+ - ".rspec"
177
+ - ".rubocop.yml"
91
178
  - ".travis.yml"
92
179
  - CODE_OF_CONDUCT.md
93
180
  - Gemfile
94
181
  - Gemfile.lock
182
+ - Guardfile
95
183
  - LICENSE.txt
96
184
  - README.md
97
185
  - Rakefile
@@ -116,15 +204,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
204
  requirements:
117
205
  - - ">="
118
206
  - !ruby/object:Gem::Version
119
- version: '0'
207
+ version: '2.5'
120
208
  required_rubygems_version: !ruby/object:Gem::Requirement
121
209
  requirements:
122
210
  - - ">="
123
211
  - !ruby/object:Gem::Version
124
212
  version: '0'
125
213
  requirements: []
126
- rubyforge_project:
127
- rubygems_version: 2.7.6
214
+ rubygems_version: 3.0.3
128
215
  signing_key:
129
216
  specification_version: 4
130
217
  summary: Lita plugin for irasutoya