Permalink
Browse files

Remove vestiges of Uber::Version

Removed in Uber 0.1.0:
apotonick/uber@faf9349

Signed-off-by: Alex Coles <alex@alexbcoles.com>
  • Loading branch information...
myabc committed Jan 15, 2017
1 parent 988b401 commit 995ef36ab0bc547950e4a96daa691c87a5c18bcd
Showing with 11 additions and 11 deletions.
  1. +8 −8 lib/roar-rails.rb
  2. +1 −1 lib/roar/rails/railtie.rb
  3. +1 −1 test/dummy/config/environments/test.rb
  4. +1 −1 test/responder_test.rb
View
@@ -18,22 +18,22 @@ module JSON
module Roar
module Rails
require 'uber/version'
def self.rails_version
Uber::Version.new(::ActionPack::VERSION::STRING)
Gem::Version.new([ActionPack::VERSION::MAJOR, ActionPack::VERSION::MINOR].join('.'))
end
if rails_version.~ 3.0
case rails_version
when Gem::Version.new(3.0)
require 'roar/rails/rails3_0_strategy'
elsif rails_version.~ 3.1
when Gem::Version.new(3.1)
require 'roar/rails/rails3_1_strategy'
elsif rails_version.~ 3.2
when Gem::Version.new(3.2)
require 'roar/rails/rails3_2_strategy'
elsif rails_version.~ 4.0
when Gem::Version.new(4.0), Gem::Version.new(4.1)
require 'roar/rails/rails4_0_strategy'
elsif rails_version.~ 4.2
when Gem::Version.new(4.2)
require 'roar/rails/rails4_2_strategy'
elsif rails_version.~ 5.0
when Gem::Version.new(5.0)
require 'roar/rails/rails5_0_strategy'
else
# fallback to 4.0 strategy
@@ -14,7 +14,7 @@ class Railtie < ::Rails::Railtie
initializer "roar.set_configs" do |app|
::Roar::Representer.module_eval do
include app.routes.url_helpers
include app.routes.mounted_helpers unless Roar::Rails.rails_version.~ 3.0
include app.routes.mounted_helpers unless (::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR == 0)
include UrlMethods # provide an initial #default_url_options.
end
@@ -32,7 +32,7 @@
config.representer.default_url_options = {:host => "roar.apotomo.de"}
if Roar::Rails.rails_version.~ 4.2
if Rails::VERSION::MAJOR >= 4
config.eager_load = false
config.active_support.test_order = :random
end
View
@@ -417,7 +417,7 @@ def singers
end
def bumi_json
return "[\"Bumi\"]" if Roar::Rails.rails_version.~ 3.0
return "[\"Bumi\"]" if (::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR == 0)
"{\"name\":\"Bumi\"}"
end
end

0 comments on commit 995ef36

Please sign in to comment.