Permalink
Browse files

Update to work with Rails 3 and added gemspec

  • Loading branch information...
1 parent 08d5a41 commit d8fa3467d95106c512717666e5f2ee68ed41d1ed @adambair adambair committed Mar 15, 2011
Showing with 77 additions and 3 deletions.
  1. +7 −1 lib/profanity_filter.rb
  2. +70 −0 profanity_filter.gemspec
  3. +0 −2 rails/init.rb
@@ -1,6 +1,10 @@
module ProfanityFilter
def self.included(base)
- base.extend(ClassMethods)
+ # base.send :extend, ClassMethods
+ base.class_eval do
+ extend ClassMethods
+ end
+
end
module ClassMethods
@@ -74,3 +78,5 @@ def replacement(word)
end
end
end
+
+ActiveRecord::Base.send(:include, ProfanityFilter)
@@ -0,0 +1,70 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{profanity_filter}
+ s.version = "0.0.0"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Adam Bair"]
+ s.date = %q{2011-03-15}
+ s.description = %q{Allows you to filter profanity using basic replacement or a dictionary term.}
+ s.email = %q{adambair@gmail.com}
+ s.extra_rdoc_files = [
+ "README.rdoc"
+ ]
+ s.files = [
+ "MIT-LICENSE",
+ "README.rdoc",
+ "Rakefile",
+ "VERSION",
+ "config/dictionary.yml",
+ "lib/profanity_filter.rb",
+ "test/benchmark/dictionary_test_100.yml",
+ "test/benchmark/dictionary_test_1000.yml",
+ "test/benchmark/dictionary_test_100000.yml",
+ "test/benchmark/dictionary_test_25000.yml",
+ "test/benchmark/dictionary_test_5000.yml",
+ "test/benchmark/dictionary_test_50000.yml",
+ "test/benchmark/fu-fu_benchmark.rb",
+ "test/benchmark/last_run.txt",
+ "test/benchmark/text_test_100.txt",
+ "test/benchmark/text_test_1000.txt",
+ "test/benchmark/text_test_10000.txt",
+ "test/benchmark/text_test_5000.txt",
+ "test/benign_filter_test.rb",
+ "test/connection_and_schema.rb",
+ "test/database.yml",
+ "test/destructive_filter_test.rb",
+ "test/profanity_filter_test.rb",
+ "test/schema.rb",
+ "test/test_harness.rb"
+ ]
+ s.homepage = %q{http://github.com/intridea/profanity_filter}
+ s.licenses = ["MIT"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.6}
+ s.summary = %q{A Rails plugin gem for filtering out profanity.}
+ s.test_files = [
+ "test/benchmark/fu-fu_benchmark.rb",
+ "test/benign_filter_test.rb",
+ "test/connection_and_schema.rb",
+ "test/destructive_filter_test.rb",
+ "test/profanity_filter_test.rb",
+ "test/schema.rb",
+ "test/test_harness.rb"
+ ]
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ else
+ end
+ else
+ end
+end
+
View
@@ -1,2 +0,0 @@
-require 'profanity_filter'
-ActiveRecord::Base.send(:include, ProfanityFilter)

0 comments on commit d8fa346

Please sign in to comment.