Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix deprecation warnings with ActiveSupport ~> 2.3.5 #64

Closed
wants to merge 1 commit into from

6 participants

@cgriego

I've gotten tired of this message in my console. :)

DEPRECATION WARNING: require "activesupport" is deprecated and will be removed in Rails 3. Use require "active_support" instead. (called from /vendor/bundle/ruby/1.8/gems/activesupport-2.3.11/lib/activesupport.rb:2)

I chose this approach instead of a nested begin/rescue block so that people using versions before 2.3.5 didn't have to suffer the overhead of two exception backtraces being generated. I tested with the first and last patch versions of each minor version of ActiveSupport between 2.0.0 and 3.0.5

@marksim

+1 On this pull request.

@marksim

Any reason this hasn't been pulled in?

@steveklabnik

+1. I submitted this as a pull request back in January, but it sat for months and wasn't pulled in, so don't expect anything to be done anytime soon.

@krainboltgreene

Hoping to get more attention to this, as I've just started to use Metric Fu on a Rail3.1 project.

@christopher-john-czettel

+1 on this one.

@bf4 bf4 referenced this pull request in metricfu/metric_fu
Closed

Fix deprecation warnings with ActiveSupport ~> 2.3.5 #21

@bf4
Collaborator
bf4 commented

Gem no longer maintained, See https://github.com/metricfu/metric_fu

@bf4 bf4 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 4, 2011
  1. @cgriego
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/metric_fu.rb
View
3  lib/metric_fu.rb
@@ -1,11 +1,12 @@
require 'rake'
require 'yaml'
begin
+ require 'active_support'
require 'active_support/core_ext/object/to_json'
require 'active_support/core_ext/object/blank'
require 'active_support/inflector'
rescue LoadError
- require 'activesupport'
+ require 'activesupport' unless defined?(ActiveSupport)
end
# Load a few things to make our lives easier elsewhere.
Something went wrong with that request. Please try again.