Permalink
Browse files

Myriad of changes to switch from Jeweler to Bundler

  • Loading branch information...
peterc committed Dec 19, 2010
1 parent 47e51f0 commit 050e2ea0d15997deff52d4eb8474daa2d1af7b04
Showing with 41 additions and 125 deletions.
  1. +5 −0 .gitignore
  2. +4 −0 Gemfile
  3. +3 −2 README.markdown
  4. +2 −28 Rakefile
  5. +0 −1 VERSION
  6. +3 −0 lib/pismo/version.rb
  7. +24 −94 pismo.gemspec
View
@@ -1,3 +1,8 @@
+pkg/*
+*.gem
+.bundle
+Gemfile.lock
+
## MAC OS
.DS_Store
View
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in pismo.gemspec
+gemspec
View
@@ -6,7 +6,7 @@ Pismo extracts machine-usable metadata from unstructured (or poorly structured)
Data that Pismo can extract include titles, feed URLs, ledes, body text, image URLs, date, and keywords.
Pismo is used heavily in production on http://coder.io/ to extract data from Web pages.
-All tests pass on Ruby 1.8.7 (MRI) and Ruby 1.9.1-p378 (MRI).
+All tests pass on Ruby 1.8.7 and Ruby 1.9.2 (both MRI).
## USAGE:
@@ -57,7 +57,8 @@ You can also pass an array to keywords with :hints => arr if you want only words
There are some shortcomings or problems that I'm aware of and am going to pursue:
-* I do not know how Pismo fares on Rubinius or other versions of 1.9 (e.g. 1.9.2) yet
+* I do not know how Pismo fares on Rubinius
+* pismo requires Bundler - get it :-)
* pismo does not install on JRuby due to a problem in the fast-stemmer dependency
* Some users have had issues with using Pismo from irb. This appears to be related to Nokogiri use causing a segfault
* The "Reader" content extraction algorithm is not perfect. It can sometimes return crap and can barf on certain types of characters for sentence extraction
View
@@ -1,29 +1,5 @@
-require 'rubygems'
-require 'rake'
-
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "pismo"
- gem.summary = %Q{Extracts or retrieves content-related metadata from HTML pages}
- gem.description = %Q{Pismo extracts and retrieves content-related metadata from HTML pages - you can use the resulting data in an organized way, such as a summary/first paragraph, body text, keywords, RSS feed URL, favicon, etc.}
- gem.email = "git@peterc.org"
- gem.homepage = "http://github.com/peterc/pismo"
- gem.authors = ["Peter Cooper"]
- gem.executables = "pismo"
- gem.default_executable = "pismo"
- gem.add_development_dependency "shoulda", ">= 0"
- gem.add_development_dependency "awesome_print"
- gem.add_dependency "jeweler"
- gem.add_dependency "nokogiri"
- gem.add_dependency "sanitize"
- gem.add_dependency "fast-stemmer"
- gem.add_dependency "chronic"
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
-end
+require 'bundler'
+Bundler::GemHelper.install_tasks
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
@@ -45,8 +21,6 @@ rescue LoadError
end
end
-task :test => :check_dependencies
-
task :default => :test
require 'rake/rdoctask'
View
@@ -1 +0,0 @@
-0.7.0
View
@@ -0,0 +1,3 @@
+module Pismo
+ VERSION = "0.7.1"
+end
View
@@ -1,101 +1,31 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "pismo/version"
Gem::Specification.new do |s|
- s.name = %q{pismo}
- s.version = "0.7.0"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Peter Cooper"]
- s.date = %q{2010-07-27}
- s.default_executable = %q{pismo}
+ s.name = "pismo"
+ s.version = Pismo::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Peter Cooper"]
+ s.email = ["git@peterc.org"]
+ s.homepage = "http://github.com/peterc/pismo"
+ s.summary = %q{TODO: Write a gem summary}
s.description = %q{Pismo extracts and retrieves content-related metadata from HTML pages - you can use the resulting data in an organized way, such as a summary/first paragraph, body text, keywords, RSS feed URL, favicon, etc.}
- s.email = %q{git@peterc.org}
- s.executables = ["pismo"]
- s.extra_rdoc_files = [
- "LICENSE",
- "README.markdown"
- ]
- s.files = [
- ".document",
- ".gitignore",
- "LICENSE",
- "NOTICE",
- "README.markdown",
- "Rakefile",
- "VERSION",
- "bin/pismo",
- "lib/pismo.rb",
- "lib/pismo/document.rb",
- "lib/pismo/external_attributes.rb",
- "lib/pismo/internal_attributes.rb",
- "lib/pismo/reader.rb",
- "lib/pismo/stopwords.txt",
- "pismo.gemspec",
- "test/corpus/bbcnews.html",
- "test/corpus/bbcnews2.html",
- "test/corpus/briancray.html",
- "test/corpus/cant_read.html",
- "test/corpus/factor.html",
- "test/corpus/gmane.html",
- "test/corpus/huffington.html",
- "test/corpus/metadata_expected.yaml",
- "test/corpus/metadata_expected.yaml.old",
- "test/corpus/queness.html",
- "test/corpus/reader_expected.yaml",
- "test/corpus/rubyinside.html",
- "test/corpus/rww.html",
- "test/corpus/spolsky.html",
- "test/corpus/techcrunch.html",
- "test/corpus/tweet.html",
- "test/corpus/youtube.html",
- "test/corpus/zefrank.html",
- "test/helper.rb",
- "test/test_corpus.rb",
- "test/test_pismo_document.rb"
- ]
- s.homepage = %q{http://github.com/peterc/pismo}
- s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.5}
- s.summary = %q{Extracts or retrieves content-related metadata from HTML pages}
- s.test_files = [
- "test/helper.rb",
- "test/test_corpus.rb",
- "test/test_pismo_document.rb"
- ]
+ s.summary = %q{Extracts or retrieves content-related metadata from HTML pages}
+ s.date = %q{2010-07-27}
+ s.default_executable = %q{pismo}
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
+ s.rubyforge_project = "pismo"
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
- s.add_development_dependency(%q<shoulda>, [">= 0"])
- s.add_development_dependency(%q<awesome_print>, [">= 0"])
- s.add_runtime_dependency(%q<jeweler>, [">= 0"])
- s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
- s.add_runtime_dependency(%q<sanitize>, [">= 0"])
- s.add_runtime_dependency(%q<fast-stemmer>, [">= 0"])
- s.add_runtime_dependency(%q<chronic>, [">= 0"])
- else
- s.add_dependency(%q<shoulda>, [">= 0"])
- s.add_dependency(%q<awesome_print>, [">= 0"])
- s.add_dependency(%q<jeweler>, [">= 0"])
- s.add_dependency(%q<nokogiri>, [">= 0"])
- s.add_dependency(%q<sanitize>, [">= 0"])
- s.add_dependency(%q<fast-stemmer>, [">= 0"])
- s.add_dependency(%q<chronic>, [">= 0"])
- end
- else
- s.add_dependency(%q<shoulda>, [">= 0"])
- s.add_dependency(%q<awesome_print>, [">= 0"])
- s.add_dependency(%q<jeweler>, [">= 0"])
- s.add_dependency(%q<nokogiri>, [">= 0"])
- s.add_dependency(%q<sanitize>, [">= 0"])
- s.add_dependency(%q<fast-stemmer>, [">= 0"])
- s.add_dependency(%q<chronic>, [">= 0"])
- end
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ s.add_dependency(%q<shoulda>, [">= 0"])
+ s.add_dependency(%q<awesome_print>, [">= 0"])
+ s.add_dependency(%q<nokogiri>, [">= 0"])
+ s.add_dependency(%q<sanitize>, [">= 0"])
+ s.add_dependency(%q<fast-stemmer>, [">= 0"])
+ s.add_dependency(%q<chronic>, [">= 0"])
end
-

0 comments on commit 050e2ea

Please sign in to comment.