Skip to content

Commit d4542cf

Browse files
authored
Merge pull request #23 from RadiusNetworks/ruby-2.4
Ruby 2.4
2 parents d2bcc18 + d90a404 commit d4542cf

File tree

4 files changed

+54
-2
lines changed

4 files changed

+54
-2
lines changed

.travis.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,25 @@ cache: bundler
44
sudo: false
55
script: bin/rake
66
rvm:
7-
- 2.3.1
7+
- 2.3.3
8+
- 2.4.0
9+
env:
10+
- RAILS_VERSION='~> 5.0.0'
11+
- RAILS_VERSION='~> 4.2.0'
12+
matrix:
13+
include:
14+
- rvm: 2.2.3
15+
env: RAILS_VERSION="4.2.5"
16+
# Rails doesn't officially support Ruby 2.4 yet (so also test latest stable)
17+
- rvm: 2.4.0
18+
env: RAILS_VERSION='4-2-stable'
19+
allow_failures:
20+
# Rails doesn't officially support Ruby 2.4 yet (so also test latest stable)
21+
- rvm: 2.4.0
22+
env: RAILS_VERSION='~> 4.2.0'
23+
- rvm: 2.4.0
24+
env: RAILS_VERSION='4-2-stable'
25+
# Rails doesn't officially support Ruby 2.4 yet (multiple fixes in pipeline)
26+
- rvm: 2.4.0
27+
env: RAILS_VERSION='~> 4.2.0'
28+
fast_finish: true

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ gemspec
1212

1313
# To use debugger
1414
# gem 'debugger'
15+
16+
rails_dependencies_gemfile = File.expand_path("../Gemfile-rails-dependencies", __FILE__)
17+
eval_gemfile rails_dependencies_gemfile

Gemfile-rails-dependencies

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version_file = File.expand_path("../.rails-version", __FILE__)
2+
version = ENV.fetch('RAILS_VERSION') {
3+
File.read(version_file).chomp if File.exist?(version_file)
4+
}
5+
6+
if version && !version.empty?
7+
if version.end_with?("stable")
8+
gem_list = %w[
9+
rails
10+
railties
11+
actionmailer
12+
actionpack
13+
activerecord
14+
activesupport
15+
activejob
16+
actionview
17+
]
18+
gem_list.each do |rails_gem|
19+
gem rails_gem, git: "https://github.com/rails/rails.git", branch: version
20+
end
21+
else
22+
gem "rails", version
23+
end
24+
elsif RUBY_VERSION.to_f < 2.4
25+
gem "rails", "~> 4.2.0"
26+
else
27+
gem "rails", "~> 5.0"
28+
end

lib/kracken/json_api/public_exceptions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def numeric_code(status)
109109
case status
110110
when Symbol
111111
code = Rack::Utils::SYMBOL_TO_STATUS_CODE[status]
112-
when Fixnum
112+
when Integer
113113
code = status
114114
when String
115115
code = status.to_i

0 commit comments

Comments
 (0)