Skip to content

Commit

Permalink
Merge pull request #874 from rollbar/wj-remove-1.8.7
Browse files Browse the repository at this point in the history
Remove references to ruby 1.8.7, 1.9.2
  • Loading branch information
waltjones committed Jun 10, 2019
2 parents 0d23244 + 1e91e9e commit 56655a5
Show file tree
Hide file tree
Showing 25 changed files with 189 additions and 4,273 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ jdk:
- openjdk8
- oraclejdk8
- oraclejdk9
env:
- ROLLBAR_SSL_CERT_FILE=/home/travis/build/rollbar/rollbar-gem/spec/cacert.pem
gemfile:
- gemfiles/rails30.gemfile
- gemfiles/rails31.gemfile
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ unless is_jruby
end
end

if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
if RUBY_VERSION < '2.2.2'
gem 'sidekiq', '~> 2.13.0'
else
gem 'sidekiq', '>= 2.13.0' # rubocop:disable Bundler/DuplicatedGem
Expand Down
3 changes: 1 addition & 2 deletions gemfiles/rails30.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ gem 'rails', '3.0.20'
gem 'hitimes', '< 1.2.2'
gem 'rake', '< 11'
gem 'rspec-rails', '>= 2.14.0'
gem 'celluloid', '< 0.17.0' if RUBY_VERSION == '1.9.2'

unless is_jruby
if RUBY_VERSION >= '2.4.0'
Expand All @@ -29,7 +28,7 @@ unless is_jruby
end
end

if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
if RUBY_VERSION < '2.2.2'
gem 'sidekiq', '~> 2.13.0'
else
gem 'sidekiq', '>= 2.13.0'
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails31.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ unless is_jruby
end
end

if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
if RUBY_VERSION < '2.2.2'
gem 'sidekiq', '~> 2.13.0'
else
gem 'sidekiq', '>= 2.13.0'
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails32.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ unless is_jruby
end
end

if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
if RUBY_VERSION < '2.2.2'
gem 'sidekiq', '~> 2.13.0'
else
gem 'sidekiq', '>= 2.13.0'
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails40.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ unless is_jruby
end
end

if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
if RUBY_VERSION < '2.2.2'
gem 'sidekiq', '~> 2.13.0'
else
gem 'sidekiq', '>= 2.13.0'
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails41.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ unless is_jruby
end
end

if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
if RUBY_VERSION < '2.2.2'
gem 'sidekiq', '~> 2.13.0'
else
gem 'sidekiq', '>= 2.13.0'
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails42.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ unless is_jruby
end
end

if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
if RUBY_VERSION < '2.2.2'
gem 'sidekiq', '~> 2.13.0'
else
gem 'sidekiq', '>= 2.13.0'
Expand Down
51 changes: 0 additions & 51 deletions gemfiles/ruby_1_8_and_1_9_2.gemfile

This file was deleted.

22 changes: 3 additions & 19 deletions lib/rollbar/language_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,11 @@ module LanguageSupport
module_function

def const_defined?(mod, target, inherit = true)
if ruby_18?
mod.const_defined?(target)
else
mod.const_defined?(target, inherit)
end
mod.const_defined?(target, inherit)
end

def const_get(mod, target, inherit = true)
if ruby_18?
mod.const_get(target)
else
mod.const_get(target, inherit)
end
end

def can_scrub_url?
!version?('1.8')
end

def ruby_18?
version?('1.8')
mod.const_get(target, inherit)
end

def ruby_19?
Expand All @@ -37,7 +21,7 @@ def version?(version)
end

def timeout_exceptions
return [] if ruby_18? || ruby_19?
return [] if ruby_19?

[Net::ReadTimeout, Net::OpenTimeout]
end
Expand Down
4 changes: 1 addition & 3 deletions lib/rollbar/notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,6 @@ def do_post(uri, body, access_token)

if uri.scheme == 'https'
http.use_ssl = true
# This is needed to have 1.8.7 passing tests
http.ca_file = ENV['ROLLBAR_SSL_CERT_FILE'] if ENV.key?('ROLLBAR_SSL_CERT_FILE')
http.verify_mode = ssl_verify_mode
end

Expand Down Expand Up @@ -639,7 +637,7 @@ def handle_net_retries
end

def skip_retries?
Rollbar::LanguageSupport.ruby_18? || Rollbar::LanguageSupport.ruby_19?
Rollbar::LanguageSupport.ruby_19?
end

def handle_response(response)
Expand Down
1 change: 0 additions & 1 deletion lib/rollbar/scrubbers/url.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def self.call(*args)

def call(options = {})
url = options[:url]
return url unless Rollbar::LanguageSupport.can_scrub_url?

filter(url,
build_regex(options[:scrub_fields]),
Expand Down
Loading

0 comments on commit 56655a5

Please sign in to comment.