Permalink
Browse files

s/active_record-observers/rails-observers/

  • Loading branch information...
1 parent 0e82d65 commit 0544c78bcaf7e3de05395fa987ce50d1a4065e81 Rafael Mendonça França committed Oct 14, 2012
View
2 Gemfile
@@ -6,4 +6,4 @@ gemspec
gem 'activerecord-deprecated_finders', git: 'git://github.com/rails/activerecord-deprecated_finders'
gem 'journey', git: 'https://github.com/rails/journey.git'
-gem 'rails', git: 'git://github.com/rails/rails', branch: 'extract_observers'
+gem 'rails', git: 'git://github.com/rafaelfranca/rails', branch: 'extract_observers'
View
6 README.md
@@ -1,20 +1,20 @@
-# ActiveRecord::Observers
+# Rails::Observers
TODO: Write a gem description
## Installation
Add this line to your application's Gemfile:
- gem 'active_record-observers'
+ gem 'rails-observers'
And then execute:
$ bundle
Or install it yourself as:
- $ gem install active_record-observers
+ $ gem install rails-observers
## Usage
View
7 lib/active_record-observers.rb
@@ -1,7 +0,0 @@
-require "active_record-observers/version"
-
-module ActiveRecord
- module Observers
- # Your code goes here...
- end
-end
View
11 lib/active_record-observers/action_controller/caching.rb
@@ -1,11 +0,0 @@
-module ActionController #:nodoc:
- module Caching
-
- eager_autoload do
- autoload :Sweeper, 'active_record-observers/action_controller/caching/sweeping'
- autoload :Sweeping, 'active_record-observers/action_controller/caching/sweeping'
- end
-
- include Sweeping if defined?(ActiveRecord)
- end
-end
View
4 lib/active_record-observers/active_model/active_model.rb
@@ -1,4 +0,0 @@
-module ActiveModel
- autoload :Observer, 'active_record-observers/active_model/observing'
- autoload :Observing, 'active_record-observers/active_model/observing'
-end
View
4 lib/rails-observers.rb
@@ -0,0 +1,4 @@
+require "rails/observers/version"
+
+require "rails/observers/activerecord/observer"
+require "rails/observers/action_controller/caching"
View
12 lib/rails/observers/action_controller/caching.rb
@@ -0,0 +1,12 @@
+module ActionController #:nodoc:
+ module Caching
+ extend ActiveSupport::Autoload
+
+ eager_autoload do
+ autoload :Sweeper, 'rails/observers/action_controller/caching/sweeping'
+ autoload :Sweeping, 'rails/observers/action_controller/caching/sweeping'
+ end
+
+ include Sweeping if defined?(ActiveRecord)
+ end
+end
View
0 ...ers/action_controller/caching/sweeping.rb → ...ers/action_controller/caching/sweeping.rb
File renamed without changes.
View
4 lib/rails/observers/active_model/active_model.rb
@@ -0,0 +1,4 @@
+module ActiveModel
+ autoload :Observer, 'rails/observers/active_model/observing'
+ autoload :Observing, 'rails/observers/active_model/observing'
+end
View
0 ...-observers/active_model/observer_array.rb → .../observers/active_model/observer_array.rb
File renamed without changes.
View
2 ...ecord-observers/active_model/observing.rb → ...rails/observers/active_model/observing.rb
@@ -1,5 +1,5 @@
require 'singleton'
-require 'active_record-observers/active_model/observer_array'
+require 'rails/observers/active_model/observer_array'
require 'active_support/core_ext/module/aliasing'
require 'active_support/core_ext/module/remove_method'
require 'active_support/core_ext/string/inflections'
View
0 ...d-observers/activerecord/active_record.rb → ...s/observers/activerecord/active_record.rb
File renamed without changes.
View
0 ...ve_record-observers/activerecord/model.rb → lib/rails/observers/activerecord/model.rb
File renamed without changes.
View
2 ...record-observers/activerecord/observer.rb → lib/rails/observers/activerecord/observer.rb
@@ -1,4 +1,4 @@
-require 'active_record-observers/active_model/active_model'
+require 'rails/observers/active_model/active_model'
module ActiveRecord
# = Active Record Observer
View
0 ..._record-observers/activerecord/railtie.rb → lib/rails/observers/activerecord/railtie.rb
File renamed without changes.
View
2 lib/active_record-observers/version.rb → lib/rails/observers/version.rb
@@ -1,4 +1,4 @@
-module ActiveRecord
+module Rails
module Observers
VERSION = "0.0.1"
end
View
6 active_record-observers.gemspec → rails-observers.gemspec
@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
-require File.expand_path('../lib/active_record-observers/version', __FILE__)
+require File.expand_path('../lib/rails/observers/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["Steve Klabnik"]
@@ -11,9 +11,9 @@ Gem::Specification.new do |gem|
gem.files = `git ls-files`.split($\)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
- gem.name = "active_record-observers"
+ gem.name = "rails-observers"
gem.require_paths = ["lib"]
- gem.version = ActiveRecord::Observers::VERSION
+ gem.version = Rails::Observers::VERSION
gem.add_development_dependency 'minitest', '>= 3'
gem.add_development_dependency 'mocha'
View
2 test/observer_array_test.rb
@@ -1,6 +1,6 @@
require 'minitest/autorun'
require 'active_model'
-require 'active_record-observers/active_model/observing'
+require 'rails-observers'
require 'models/observers'
class ObserverArrayTest < ActiveModel::TestCase
View
2 test/observing_test.rb
@@ -1,6 +1,6 @@
require 'minitest/autorun'
require 'active_model'
-require 'active_record-observers/active_model/observing'
+require 'rails-observers'
class ObservedModel
include ActiveModel::Observing
View
3 test/sweeper_test.rb
@@ -1,7 +1,6 @@
require 'minitest/autorun'
require 'action_controller'
-require 'active_record-observers/activerecord/observer'
-require 'active_record-observers/action_controller/caching'
+require 'rails-observers'
SharedTestRoutes = ActionDispatch::Routing::RouteSet.new

0 comments on commit 0544c78

Please sign in to comment.