Skip to content

Commit

Permalink
Merge pull request #186 from cre-ne-jp/mcinch
Browse files Browse the repository at this point in the history
mcinchを使う
  • Loading branch information
koi-chan committed May 31, 2020
2 parents 93a34cb + 84390cd commit 89482cb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ gem 'json'
gem 'mail', '~> 2.7'

group :irc do
gem 'grinch'
gem 'mcinch'

# DiceRollプラグインで使用する
gem 'gdbm'
Expand Down
13 changes: 8 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ GEM
event_emitter (0.2.6)
ffi (1.12.2)
gdbm (2.1.0)
grinch (1.0.1)
guess_html_encoding (0.0.11)
hashdiff (1.0.1)
http (3.3.0)
Expand All @@ -56,9 +55,10 @@ GEM
i18n (1.8.2)
concurrent-ruby (~> 1.0)
json (2.3.0)
lumberjack (1.2.4)
lumberjack (1.2.5)
mail (2.7.1)
mini_mime (>= 0.1.1)
mcinch (2.4.1)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
method_source (1.0.0)
Expand All @@ -76,7 +76,7 @@ GEM
opus-ruby (1.0.1)
ffi
parallel (1.19.1)
parser (2.7.1.2)
parser (2.7.1.3)
ast (~> 2.4.0)
pry (0.13.1)
coderay (~> 1.1)
Expand Down Expand Up @@ -105,13 +105,16 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.3)
rubocop (0.83.0)
rubocop (0.84.0)
parallel (~> 1.10)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
rexml
rubocop-ast (>= 0.0.3)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.0.3)
parser (>= 2.7.0.1)
ruby-progressbar (1.10.1)
safe_yaml (1.0.5)
simple_oauth (0.3.1)
Expand Down Expand Up @@ -166,12 +169,12 @@ DEPENDENCIES
d1lcs
discordrb
gdbm
grinch
guess_html_encoding
http (> 3.0)
json
lumberjack (~> 1.0)
mail (~> 2.7)
mcinch
nokogiri (~> 1.6)
pry (~> 0.10)
rake (~> 13.0)
Expand Down
6 changes: 1 addition & 5 deletions lib/rgrb/exec/irc_bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,9 @@ def new_logger(log_level)
# @return [void]
def set_signal_handler(bot, quit)
# シグナルを捕捉し、ボットを終了させる処理
# trap 内で普通に bot.quit すると ThreadError が出るので
# 新しい Thread で包む
%i(SIGINT SIGTERM).each do |signal|
Signal.trap(signal) do
Thread.new(signal) do |sig|
bot.quit(quit.empty? ? "Caught #{sig}" : quit)
end
bot.quit(quit.empty? ? "Caught #{signal}" : quit)
end
end
end
Expand Down

0 comments on commit 89482cb

Please sign in to comment.