Skip to content

Commit

Permalink
Merge pull request #82 from cre-ne-jp/ruby24
Browse files Browse the repository at this point in the history
Ruby2.4 系列に対応する
  • Loading branch information
ochaochaocha3 committed Mar 13, 2017
2 parents 9c490d9 + c06f1f3 commit fc8a52c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ language: ruby
cache: bundler
bundler_args: --deployment
rvm:
- 2.1.10
- 2.2.6
- 2.3.1
- 2.3.3
- 2.4.0
notifications:
irc:
use_notice: true
Expand Down
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'activesupport', '~> 4.2'
gem 'activesupport', '~> 5.0'
gem 'cinch'
gem 'twitter', '~> 5.11'
gem 'lumberjack', '~> 1.0'
Expand All @@ -9,7 +9,7 @@ gem 'http', '~> 0.9'
gem 'guess_html_encoding'
gem 'charlock_holmes', '~> 0.7'
gem 'nokogiri', '~> 1.6'
gem 'd1lcs', '~> 0.5.1'
gem 'd1lcs'
gem 'mail', '~> 2.6.3'

group :development, :test do
Expand All @@ -22,7 +22,7 @@ group :test do
gem 'rake', '~> 10.4'
gem 'rspec', '~> 3.1'
gem 'coveralls', require: false
gem 'webmock', '~> 1.20'
gem 'webmock', '~> 2.3'
end

# パス設定
Expand Down
22 changes: 11 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.7.1)
activesupport (5.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
Expand All @@ -14,6 +13,7 @@ GEM
charlock_holmes (0.7.3)
cinch (2.3.3)
coderay (1.1.1)
concurrent-ruby (1.0.5)
coveralls (0.8.19)
json (>= 1.8, < 3)
simplecov (~> 0.12.0)
Expand All @@ -25,7 +25,7 @@ GEM
d1lcs (0.5.3)
diff-lcs (1.3)
docile (1.1.5)
domain_name (0.5.20161129)
domain_name (0.5.20170223)
unf (>= 0.0.5, < 1.0.0)
equalizer (0.0.10)
faraday (0.9.2)
Expand All @@ -41,7 +41,7 @@ GEM
domain_name (~> 0.5)
http-form_data (1.0.1)
http_parser.rb (0.6.0)
i18n (0.8.0)
i18n (0.8.1)
json (1.8.6)
lumberjack (1.0.11)
mail (2.6.4)
Expand Down Expand Up @@ -100,7 +100,7 @@ GEM
term-ansicolor (1.4.0)
tins (~> 1.0)
thor (0.19.4)
thread_safe (0.3.5)
thread_safe (0.3.6)
tins (1.13.2)
twitter (5.15.0)
addressable (~> 2.3)
Expand All @@ -119,7 +119,7 @@ GEM
unf_ext
unf_ext (0.0.7.2)
unicode-display_width (1.1.3)
webmock (1.24.6)
webmock (2.3.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
Expand All @@ -129,11 +129,11 @@ PLATFORMS
ruby

DEPENDENCIES
activesupport (~> 4.2)
activesupport (~> 5.0)
charlock_holmes (~> 0.7)
cinch
coveralls
d1lcs (~> 0.5.1)
d1lcs
guess_html_encoding
http (~> 0.9)
lumberjack (~> 1.0)
Expand All @@ -145,8 +145,8 @@ DEPENDENCIES
rubocop (~> 0.28)
sysexits (~> 1.2)
twitter (~> 5.11)
webmock (~> 1.20)
webmock (~> 2.3)
yard (~> 0.8)

BUNDLED WITH
1.14.3
1.14.5
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RGRB は Ruby で実装されている汎用 IRC ボットです。プラグイ

* Linux または OSX
* 現在のところ Windows には未対応。
* Ruby 2.1.0 以降
* Ruby 2.2.2 以降

インストール
------------
Expand Down
10 changes: 5 additions & 5 deletions lib/rgrb/plugin/dice_roll/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def initialize
end

# 基本的なダイスロールの結果を返す
# @param [Fixnum] rolls ダイスの個数
# @param [Fixnum] sides ダイスの最大値
# @param [Integer] rolls ダイスの個数
# @param [Integer] sides ダイスの最大値
# @return [String]
def basic_dice(rolls, sides)
if rolls > 100
Expand Down Expand Up @@ -51,8 +51,8 @@ def dxx_dice_ja(rolls_ja)
end

# ダイスロールの結果を返す
# @param [Fixnum] rolls ダイスの個数
# @param [Fixnum] sides ダイスの最大値
# @param [Integer] rolls ダイスの個数
# @param [Integer] sides ダイスの最大値
# @return [DiceRollResult]
def dice_roll(rolls, sides)
values = Array.new(rolls) { @random.rand(1..sides) }
Expand All @@ -61,7 +61,7 @@ def dice_roll(rolls, sides)

# dXX ロールの結果を返す
# @param [String] rolls ダイスの面数と数
# @return [Array<Fixnum>]
# @return [Array<Integer>]
def dxx_roll(rolls)
values = []
rolls.each_char { |max| values << @random.rand(1..max.to_i) }
Expand Down
10 changes: 5 additions & 5 deletions lib/rgrb/plugin/trpg/detatoko/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def initialize
end

# スキルランクから判定値を算出します
# @param [Fixnum] skill_rank スキルランク
# @param [Integer] skill_rank スキルランク
# @param [String] calc 計算記号
# @param [Fixnum] solid 追加ダメージ(固定値)
# @param [Fixnum] flag フラグ
# @param [Integer] solid 追加ダメージ(固定値)
# @param [Integer] flag フラグ
# @return [String]
def skill_decision(skill_rank, calc, solid, flag)
header = "スキルランク = #{skill_rank} -> "
Expand Down Expand Up @@ -181,7 +181,7 @@ def get_stigma

# 出目から対応する烙印を決定する
# @param [Symbol] type 体力・気力のどちらか
# @param [Fixnum] number ダイスの出目
# @param [Integer] number ダイスの出目
# @return [String]
def stigma_text(type, number)
STIGMAS[type][number - 3] &&
Expand All @@ -191,7 +191,7 @@ def stigma_text(type, number)

# 出目から対応するバッドエンドを決定する
# @param [Symbol] type 体力・気力のどちらか
# @param [Fixnum] number ダイスの出目
# @param [Integer] number ダイスの出目
# @return [String]
def badend_text(type, number)
"#{number}: 【#{BADENDS[type][number - 2]}】"
Expand Down

0 comments on commit fc8a52c

Please sign in to comment.