Skip to content

Commit

Permalink
add experimental support for jruby-9000-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
stevecrozz committed Jan 26, 2015
1 parent 0bed90d commit 5ea0e27
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ rvm:
- 2.2
- rbx-2
- ruby-head
- jruby-head

env:
- RAILS_ENV=test COVERAGE=true
Expand All @@ -22,3 +23,4 @@ matrix:
allow_failures:
- rvm: rbx-2
- rvm: ruby-head
- rvm: jruby-head
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ gem 'flowdock'
gem 'omniauth-github'

gem 'ri_cal'
gem 'yajl-ruby', :require => "yajl"
gem 'yajl-ruby', platform: 'ruby'
gem 'json', platform: 'jruby'

group :development, :test do
gem 'airbrake', :require => false
Expand All @@ -72,7 +73,7 @@ group :development do

# better errors
gem 'better_errors'
gem 'binding_of_caller'
gem 'binding_of_caller', platform: 'ruby'
gem 'meta_request'
gem 'foreman', :require => false
end
Expand All @@ -96,7 +97,7 @@ end

group :heroku, :production do
gem 'rails_12factor', require: !!ENV["HEROKU"]
gem 'unicorn', :require => false
gem 'unicorn', require: false, platform: 'ruby'
end

gem 'sass-rails'
Expand Down
20 changes: 20 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ GEM
json
arel (5.0.1.20140414130214)
bcrypt (3.1.9)
bcrypt (3.1.9-java)
better_errors (1.0.1)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bson (2.3.0)
bson (2.3.0-java)
builder (3.2.2)
byebug (2.7.0)
columnize (~> 0.3)
Expand Down Expand Up @@ -132,6 +134,7 @@ GEM
fabrication (2.9.0)
faraday (0.8.9)
multipart-post (~> 1.2.0)
ffi (1.9.6-java)
flowdock (0.3.1)
httparty (~> 0.7)
multi_json
Expand Down Expand Up @@ -160,6 +163,7 @@ GEM
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.2)
json (1.8.2-java)
jwt (0.1.8)
multi_json (>= 1.5)
kaminari (0.14.1)
Expand All @@ -168,6 +172,9 @@ GEM
kgio (2.9.2)
launchy (2.4.3)
addressable (~> 2.3)
launchy (2.4.3-java)
addressable (~> 2.3)
spoon (~> 0.0.1)
mail (2.6.3)
mime-types (>= 1.16, < 3)
meta_request (0.2.8)
Expand Down Expand Up @@ -204,6 +211,7 @@ GEM
net-ssh (2.9.1)
nokogiri (1.6.5)
mini_portile (~> 0.6.0)
nokogiri (1.6.5-java)
oauth2 (0.8.1)
faraday (~> 0.8)
httpauth (~> 0.1)
Expand Down Expand Up @@ -239,6 +247,11 @@ GEM
coderay (~> 1.0.5)
method_source (~> 0.8)
slop (~> 3.4)
pry (0.9.12.2-java)
coderay (~> 1.0.5)
method_source (~> 0.8)
slop (~> 3.4)
spoon (~> 0.0)
pry-byebug (1.3.2)
byebug (~> 2.7)
pry (~> 0.9.12)
Expand Down Expand Up @@ -332,6 +345,8 @@ GEM
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
slop (3.4.6)
spoon (0.0.4)
ffi
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
Expand All @@ -351,6 +366,7 @@ GEM
power_assert
thor (0.19.1)
thread_safe (0.3.4)
thread_safe (0.3.4-java)
tilt (1.4.1)
timecop (0.6.3)
tins (0.12.0)
Expand All @@ -369,13 +385,16 @@ GEM
rack (>= 1.0)
websocket-driver (0.5.1)
websocket-extensions (>= 0.1.0)
websocket-driver (0.5.1-java)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.1)
xmpp4r (0.5.5)
xpath (2.0.0)
nokogiri (~> 1.3)
yajl-ruby (1.1.0)

PLATFORMS
java
ruby

DEPENDENCIES
Expand Down Expand Up @@ -411,6 +430,7 @@ DEPENDENCIES
htmlentities
httparty
jquery-rails (~> 2.1.4)
json
kaminari (>= 0.14.1)
launchy
meta_request
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/notices_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def index
end

respond_to do |format|
format.any(:html, :json) { render :json => Yajl.dump(results) } # render JSON if no extension specified on path
format.any(:html, :json) { render :json => JSON.dump(results) } # render JSON if no extension specified on path
format.xml { render :xml => results }
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/problems_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def index
end

respond_to do |format|
format.any(:html, :json) { render :json => Yajl.dump(results) } # render JSON if no extension specified on path
format.any(:html, :json) { render :json => JSON.dump(results) } # render JSON if no extension specified on path
format.xml { render :xml => results }
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/stats_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def app
}

respond_to do |format|
format.any(:html, :json) { render :json => Yajl.dump(stats) } # render JSON if no extension specified on path
format.any(:html, :json) { render :json => JSON.dump(stats) } # render JSON if no extension specified on path
format.xml { render :xml => stats }
end
end
Expand Down
8 changes: 8 additions & 0 deletions config/boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)

require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
require 'json'

begin
# try to use Yajl, the json_gem compatibility layer must be loaded after json
require 'yajl/json_gem'
rescue LoadError
# fail silently because json gem is fine
end

0 comments on commit 5ea0e27

Please sign in to comment.