Permalink
Browse files

moderize gem, pull in useful bits

  • Loading branch information...
1 parent 956915e commit 1cdee1a6857c35032d61647aab616daa06d5a4a9 @joshbuddy committed Jul 6, 2011
Showing with 48 additions and 69 deletions.
  1. +3 −0 Gemfile
  2. +21 −0 Gemfile.lock
  3. +2 −31 Rakefile
  4. +0 −1 VERSION
  5. 0 { → lib}/config/en.yml
  6. +1 −2 lib/swearjar.rb
  7. +3 −0 lib/swearjar/version.rb
  8. +18 −35 swearjar.gemspec
View
@@ -0,0 +1,3 @@
+source :rubygems
+
+gemspec
View
@@ -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!
View
@@ -1,22 +1,5 @@
# 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/rake/spectask'
task :spec => 'spec:all'
@@ -29,17 +12,5 @@ namespace(:spec) do
end
end
-desc "Run all examples with RCov"
-Spec::Rake::SpecTask.new('spec_with_rcov') do |t|
- 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
+require 'bundler'
+Bundler::GemHelper.install_tasks
View
@@ -1 +0,0 @@
-0.0.2
File renamed without changes.
View
@@ -1,6 +1,5 @@
require 'yaml'
require 'fuzzy_hash'
-require 'dirge'
class Swearjar
@@ -9,7 +8,7 @@ def self.default
end
def self.from_language(language = 'en')
- new(~File.join('..', 'config', "#{language}.yml"))
+ new(File.join(File.dirname(__FILE__), 'config', "#{language}.yml"))
end
attr_reader :tester, :hash
View
@@ -0,0 +1,3 @@
+class Swearjar
+ VERSION = '0.0.3'
+end
View
@@ -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 -*-
-Gem::Specification.new do |s|
- s.name = %q{swearjar}
- s.version = "0.0.2"
+require File.join(File.dirname(__FILE__), 'lib', 'swearjar', 'version')
+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.authors = ["Joshua Hull"]
- s.date = %q{2010-05-19}
- s.description = %q{Put another nickel in the swearjar. Simple profanity detection with content analysis.}
+ s.summary = "Put another nickel in the swearjar. Simple profanity detection with content analysis"
+ s.description = "#{s.summary}."
s.email = %q{joshbuddy@gmail.com}
- s.extra_rdoc_files = [
- "README.rdoc"
- ]
- 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.extra_rdoc_files = ['README.rdoc']
+ s.files = `git ls-files`.split("\n")
s.homepage = %q{http://github.com/joshbuddy/swearjar}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.6}
- s.summary = %q{Put another nickel in the swearjar. Simple profanity detection with content analysis.}
- s.test_files = [
- "spec/spec_helper.rb",
- "spec/swearjar_spec.rb"
- ]
+ s.rubygems_version = %q{1.3.7}
+ s.test_files = `git ls-files`.split("\n").select{|f| f =~ /^spec/}
+ s.rubyforge_project = 'swearjar'
+
+ # 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
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
- if Gem::Version.new(Gem::RubyGemsVersion) >= 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"])
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
else
- s.add_dependency(%q<fuzzyhash>, [">= 0.0.11"])
- s.add_dependency(%q<dirge>, [">= 0.0.3"])
end
else
- s.add_dependency(%q<fuzzyhash>, [">= 0.0.11"])
- s.add_dependency(%q<dirge>, [">= 0.0.3"])
end
end

0 comments on commit 1cdee1a

Please sign in to comment.