Skip to content

Commit

Permalink
moderize gem, pull in useful bits
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbuddy committed Jul 6, 2011
1 parent 956915e commit 1cdee1a
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 69 deletions.
3 changes: 3 additions & 0 deletions Gemfile
@@ -0,0 +1,3 @@
source :rubygems

gemspec
21 changes: 21 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,21 @@
PATH
remote: .
specs:
swearjar (0.0.3)
fuzzyhash (~> 0.0.11)

GEM
remote: http://rubygems.org/
specs:
fuzzyhash (0.0.11)
rake (0.8.7)
rspec (1.3.2)

PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1.0.0)
rake (~> 0.8.7)
rspec (~> 1.3.0)
swearjar!
33 changes: 2 additions & 31 deletions Rakefile
@@ -1,22 +1,5 @@
# encoding: utf-8 # encoding: utf-8


begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "swearjar"
s.description = s.summary = "Put another nickel in the swearjar. Simple profanity detection with content analysis."
s.email = "joshbuddy@gmail.com"
s.homepage = "http://github.com/joshbuddy/swearjar"
s.authors = "Joshua Hull"
s.files = FileList["[A-Z]*", "{lib,spec,config}/**/*"]
s.add_dependency 'fuzzyhash', '>=0.0.11'
s.add_dependency 'dirge', '>=0.0.3'
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end

require 'spec' require 'spec'
require 'spec/rake/spectask' require 'spec/rake/spectask'
task :spec => 'spec:all' task :spec => 'spec:all'
Expand All @@ -29,17 +12,5 @@ namespace(:spec) do
end end
end end


desc "Run all examples with RCov" require 'bundler'
Spec::Rake::SpecTask.new('spec_with_rcov') do |t| Bundler::GemHelper.install_tasks
t.spec_files = FileList['spec/**/*.rb']
t.rcov = true
t.rcov_opts = ['--exclude', 'spec']
end

require 'rake/rdoctask'
desc "Generate documentation"
Rake::RDocTask.new do |rd|
rd.main = "README.rdoc"
rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
rd.rdoc_dir = 'rdoc'
end
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

File renamed without changes.
3 changes: 1 addition & 2 deletions lib/swearjar.rb
@@ -1,6 +1,5 @@
require 'yaml' require 'yaml'
require 'fuzzy_hash' require 'fuzzy_hash'
require 'dirge'


class Swearjar class Swearjar


Expand All @@ -9,7 +8,7 @@ def self.default
end end


def self.from_language(language = 'en') def self.from_language(language = 'en')
new(~File.join('..', 'config', "#{language}.yml")) new(File.join(File.dirname(__FILE__), 'config', "#{language}.yml"))
end end


attr_reader :tester, :hash attr_reader :tester, :hash
Expand Down
3 changes: 3 additions & 0 deletions lib/swearjar/version.rb
@@ -0,0 +1,3 @@
class Swearjar
VERSION = '0.0.3'
end
53 changes: 18 additions & 35 deletions swearjar.gemspec
@@ -1,55 +1,38 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-


Gem::Specification.new do |s| require File.join(File.dirname(__FILE__), 'lib', 'swearjar', 'version')
s.name = %q{swearjar}
s.version = "0.0.2"


Gem::Specification.new do |s|
s.name = 'swearjar'
s.version = Swearjar::VERSION
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Joshua Hull"] s.authors = ["Joshua Hull"]
s.date = %q{2010-05-19} s.summary = "Put another nickel in the swearjar. Simple profanity detection with content analysis"
s.description = %q{Put another nickel in the swearjar. Simple profanity detection with content analysis.} s.description = "#{s.summary}."
s.email = %q{joshbuddy@gmail.com} s.email = %q{joshbuddy@gmail.com}
s.extra_rdoc_files = [ s.extra_rdoc_files = ['README.rdoc']
"README.rdoc" s.files = `git ls-files`.split("\n")
]
s.files = [
"README.rdoc",
"Rakefile",
"VERSION",
"config/en.yml",
"lib/swearjar.rb",
"lib/swearjar/tester.rb",
"spec/spec.opts",
"spec/spec_helper.rb",
"spec/swearjar_spec.rb"
]
s.homepage = %q{http://github.com/joshbuddy/swearjar} s.homepage = %q{http://github.com/joshbuddy/swearjar}
s.rdoc_options = ["--charset=UTF-8"] s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"] s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.6} s.rubygems_version = %q{1.3.7}
s.summary = %q{Put another nickel in the swearjar. Simple profanity detection with content analysis.} s.test_files = `git ls-files`.split("\n").select{|f| f =~ /^spec/}
s.test_files = [ s.rubyforge_project = 'swearjar'
"spec/spec_helper.rb",
"spec/swearjar_spec.rb" # dependencies
] s.add_runtime_dependency 'fuzzyhash', '~> 0.0.11'
s.add_development_dependency 'bundler', '~> 1.0.0'
s.add_development_dependency 'rake', '~> 0.8.7'
s.add_development_dependency 'rspec', '~> 1.3.0'


if s.respond_to? :specification_version then if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3 s.specification_version = 3


if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<fuzzyhash>, [">= 0.0.11"])
s.add_runtime_dependency(%q<dirge>, [">= 0.0.3"])
else else
s.add_dependency(%q<fuzzyhash>, [">= 0.0.11"])
s.add_dependency(%q<dirge>, [">= 0.0.3"])
end end
else else
s.add_dependency(%q<fuzzyhash>, [">= 0.0.11"])
s.add_dependency(%q<dirge>, [">= 0.0.3"])
end end
end end


0 comments on commit 1cdee1a

Please sign in to comment.