From a063217a2198769edcc287e662e5c4691c0ae4d0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 11 Nov 2009 22:19:42 -0800 Subject: split upr/status out to its own file This prevent double loads that seem to be caused by "config.gem" in Rails from messing up due to the Struct re-definition. Of course we'll still warn when the VERSION constant is redefined so people will hopefully see a reason to avoid idiotic double loads... --- lib/upr.rb | 5 +---- lib/upr/status.rb | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 lib/upr/status.rb diff --git a/lib/upr.rb b/lib/upr.rb index 825562e..e1fc4c0 100644 --- a/lib/upr.rb +++ b/lib/upr.rb @@ -1,15 +1,12 @@ # -*- encoding: binary -*- require 'moneta' +require 'upr/status' module Upr # Upr version number VERSION = '0.1.0' - # this is what we store in the Moneta-backed monitor - class Status < Struct.new(:seen, :length) - end - autoload :Monitor, 'upr/monitor' autoload :InputWrapper, 'upr/input_wrapper' diff --git a/lib/upr/status.rb b/lib/upr/status.rb new file mode 100644 index 0000000..b84357e --- /dev/null +++ b/lib/upr/status.rb @@ -0,0 +1,6 @@ +module Upr + + # this is what we store in the Moneta-backed monitor + class Status < Struct.new(:seen, :length) + end +end -- cgit v1.2.3-24-ge0c7