aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2010-02-15 21:44:30 +0700
committerJosé Valim <jose.valim@gmail.com>2010-02-16 22:36:15 +0100
commitf0523f72b46db14e2f50c8347a8708734c650f84 (patch)
treecf6562eb8f6c2e302a33840f36f04d838aadb569 /activeresource
parent7cff54f5d3ae2e364f0d147ceb86ea701b21389c (diff)
downloadrails-f0523f72b46db14e2f50c8347a8708734c650f84.tar.gz
rails-f0523f72b46db14e2f50c8347a8708734c650f84.tar.bz2
rails-f0523f72b46db14e2f50c8347a8708734c650f84.zip
Rename Rails::Subscriber to Rails::LogSubscriber
Diffstat (limited to 'activeresource')
-rw-r--r--activeresource/lib/active_resource/railtie.rb4
-rw-r--r--activeresource/lib/active_resource/railties/log_subscriber.rb (renamed from activeresource/lib/active_resource/railties/subscriber.rb)2
-rw-r--r--activeresource/test/cases/log_subscriber_test.rb (renamed from activeresource/test/cases/subscriber_test.rb)10
3 files changed, 8 insertions, 8 deletions
diff --git a/activeresource/lib/active_resource/railtie.rb b/activeresource/lib/active_resource/railtie.rb
index 7e35fdc0eb..27c88415f6 100644
--- a/activeresource/lib/active_resource/railtie.rb
+++ b/activeresource/lib/active_resource/railtie.rb
@@ -5,8 +5,8 @@ module ActiveResource
class Railtie < Rails::Railtie
railtie_name :active_resource
- require "active_resource/railties/subscriber"
- subscriber ActiveResource::Railties::Subscriber.new
+ require "active_resource/railties/log_subscriber"
+ log_subscriber ActiveResource::Railties::LogSubscriber.new
initializer "active_resource.set_configs" do |app|
app.config.active_resource.each do |k,v|
diff --git a/activeresource/lib/active_resource/railties/subscriber.rb b/activeresource/lib/active_resource/railties/log_subscriber.rb
index fb98061b71..86806a93d0 100644
--- a/activeresource/lib/active_resource/railties/subscriber.rb
+++ b/activeresource/lib/active_resource/railties/log_subscriber.rb
@@ -1,6 +1,6 @@
module ActiveResource
module Railties
- class Subscriber < Rails::Subscriber
+ class LogSubscriber < Rails::LogSubscriber
def request(event)
result = event.payload[:result]
info "#{event.payload[:method].to_s.upcase} #{event.payload[:request_uri]}"
diff --git a/activeresource/test/cases/subscriber_test.rb b/activeresource/test/cases/log_subscriber_test.rb
index fb890e86cb..56709b6fd3 100644
--- a/activeresource/test/cases/subscriber_test.rb
+++ b/activeresource/test/cases/log_subscriber_test.rb
@@ -1,12 +1,12 @@
require "abstract_unit"
require "fixtures/person"
-require "rails/subscriber/test_helper"
-require "active_resource/railties/subscriber"
+require "rails/log_subscriber/test_helper"
+require "active_resource/railties/log_subscriber"
require "active_support/core_ext/hash/conversions"
-class SubscriberTest < ActiveSupport::TestCase
- include Rails::Subscriber::TestHelper
- Rails::Subscriber.add(:active_resource, ActiveResource::Railties::Subscriber.new)
+class LogSubscriberTest < ActiveSupport::TestCase
+ include Rails::LogSubscriber::TestHelper
+ Rails::LogSubscriber.add(:active_resource, ActiveResource::Railties::LogSubscriber.new)
def setup
@matz = { :id => 1, :name => 'Matz' }.to_xml(:root => 'person')