Skip to content

Commit

Permalink
Update to work with Rails 3 and added gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
adambair committed Mar 15, 2011
1 parent 08d5a41 commit d8fa346
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 3 deletions.
8 changes: 7 additions & 1 deletion lib/profanity_filter.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
Expand Down Expand Up @@ -74,3 +78,5 @@ def replacement(word)
end
end
end

ActiveRecord::Base.send(:include, ProfanityFilter)
70 changes: 70 additions & 0 deletions profanity_filter.gemspec
@@ -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

2 changes: 0 additions & 2 deletions rails/init.rb

This file was deleted.

0 comments on commit d8fa346

Please sign in to comment.