Skip to content
Browse files

Converted to gem

  • Loading branch information...
1 parent cc2525c commit 96cb5d2442341626c5dde6022faa025156b4c345 @christianhellsten committed
Showing with 150 additions and 11 deletions.
  1. +5 −0 .gitignore
  2. +50 −10 Rakefile
  3. +1 −1 VERSION
  4. +94 −0 wikipedia-client.gemspec
View
5 .gitignore
@@ -0,0 +1,5 @@
+*.swp
+*.tmp
+*.log
+pkg/*
+
View
60 Rakefile
@@ -1,20 +1,60 @@
+require 'rubygems'
require 'rake'
-require 'rake/rdoctask'
-desc 'Default: run specifications.'
-task :default => :spec
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gem|
+ gem.name = "wikipedia-client"
+ gem.summary = %Q{Ruby client for the Wikipedia API}
+ gem.description = %Q{Ruby client for the Wikipedia API}
+ gem.email = "christian.hellsten@gmail.com"
+ gem.homepage = "http://github.com/christianhellsten/wikipedia-client"
+ gem.authors = ["Cyril David", "Ken Pratt"]
+ gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
+ end
+ Jeweler::GemcutterTasks.new
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
+end
+
+require 'rake/testtask'
+Rake::TestTask.new(:test) do |test|
+ test.libs << 'lib' << 'test'
+ test.pattern = 'test/**/test_*.rb'
+ test.verbose = true
+end
+
desc 'Test the wikipedia plugin.'
task :spec do
- spec_path = File.expand_path(File.dirname(__FILE__) + '/spec/**/*.rb')
- system("spec -cfs #{spec_path}")
+ spec_path = File.expand_path(File.dirname(__FILE__) + '/spec/**/*.rb')
+ system("spec -cfs #{spec_path}")
end
-desc 'Generate documentation for the wikipedia plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
+begin
+ require 'rcov/rcovtask'
+ Rcov::RcovTask.new do |test|
+ test.libs << 'test'
+ test.pattern = 'test/**/test_*.rb'
+ test.verbose = true
+ end
+rescue LoadError
+ task :rcov do
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
+ end
+end
+
+task :spec => :check_dependencies
+
+task :default => :spec
+
+require 'rake/rdoctask'
+Rake::RDocTask.new do |rdoc|
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
+
rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'Wikipedia'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README')
+ rdoc.title = "wikipedia-client #{version}"
+ rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
View
2 VERSION
@@ -1 +1 @@
-0.0.0
+1.0.0
View
94 wikipedia-client.gemspec
@@ -0,0 +1,94 @@
+# 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{wikipedia-client}
+ s.version = "0.0.0"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Cyril David", "Ken Pratt"]
+ s.date = %q{2010-08-09}
+ s.description = %q{Ruby client for the Wikipedia API}
+ s.email = %q{christian.hellsten@gmail.com}
+ s.extra_rdoc_files = [
+ "README.textile"
+ ]
+ s.files = [
+ "MIT-LICENSE",
+ "README.textile",
+ "Rakefile",
+ "VERSION",
+ "init.rb",
+ "install.rb",
+ "lib/wikipedia.rb",
+ "lib/wikipedia/client.rb",
+ "lib/wikipedia/configuration.rb",
+ "lib/wikipedia/page.rb",
+ "lib/wikipedia/url.rb",
+ "script/add_sanitization_test",
+ "spec/fixtures/Edsger_Dijkstra.json",
+ "spec/fixtures/Edsger_Dijkstra.yaml",
+ "spec/fixtures/Edsger_Dijkstra_section_0.json",
+ "spec/fixtures/Edsger_content.txt",
+ "spec/fixtures/File_Edsger_Wybe_Dijkstra_jpg.json",
+ "spec/fixtures/sanitization_samples/Ceawlin_of_Wessex-raw.txt",
+ "spec/fixtures/sanitization_samples/Ceawlin_of_Wessex-sanitized.txt",
+ "spec/fixtures/sanitization_samples/Edsger_W_Dijkstra-raw.txt",
+ "spec/fixtures/sanitization_samples/Edsger_W_Dijkstra-sanitized.txt",
+ "spec/fixtures/sanitization_samples/Flower_video_game-raw.txt",
+ "spec/fixtures/sanitization_samples/Flower_video_game-sanitized.txt",
+ "spec/fixtures/sanitization_samples/How_to_Lose_Friends__Alienate_People_film-raw.txt",
+ "spec/fixtures/sanitization_samples/How_to_Lose_Friends__Alienate_People_film-sanitized.txt",
+ "spec/fixtures/sanitization_samples/Kirsten_Dunst-raw.txt",
+ "spec/fixtures/sanitization_samples/Kirsten_Dunst-sanitized.txt",
+ "spec/fixtures/sanitization_samples/Large_Hadron_Collider-raw.txt",
+ "spec/fixtures/sanitization_samples/Large_Hadron_Collider-sanitized.txt",
+ "spec/fixtures/sanitization_samples/Metro_Goldwyn_Mayer-raw.txt",
+ "spec/fixtures/sanitization_samples/Metro_Goldwyn_Mayer-sanitized.txt",
+ "spec/fixtures/sanitization_samples/Middle_Ages-raw.txt",
+ "spec/fixtures/sanitization_samples/Middle_Ages-sanitized.txt",
+ "spec/fixtures/sanitization_samples/SMS_Elbing-raw.txt",
+ "spec/fixtures/sanitization_samples/SMS_Elbing-sanitized.txt",
+ "spec/fixtures/sanitization_samples/Sashimi-raw.txt",
+ "spec/fixtures/sanitization_samples/Sashimi-sanitized.txt",
+ "spec/fixtures/sanitization_samples/Superb_Fairywren-raw.txt",
+ "spec/fixtures/sanitization_samples/Superb_Fairywren-sanitized.txt",
+ "spec/fixtures/sanitization_samples/Velociraptor-raw.txt",
+ "spec/fixtures/sanitization_samples/Velociraptor-sanitized.txt",
+ "spec/lib/client_spec.rb",
+ "spec/lib/sanitize_spec.rb",
+ "spec/lib/url_spec.rb",
+ "spec/lib/wikipedia_spec.rb",
+ "spec/spec_helper.rb",
+ "tasks/wikipedia_tasks.rake",
+ "uninstall.rb"
+ ]
+ s.homepage = %q{http://github.com/christianhellsten/wikipedia-client}
+ s.rdoc_options = ["--charset=UTF-8"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.7}
+ s.summary = %q{Ruby client for the Wikipedia API}
+ s.test_files = [
+ "spec/lib/client_spec.rb",
+ "spec/lib/sanitize_spec.rb",
+ "spec/lib/url_spec.rb",
+ "spec/lib/wikipedia_spec.rb",
+ "spec/spec_helper.rb"
+ ]
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
+ else
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
+ end
+ else
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
+ end
+end
+

0 comments on commit 96cb5d2

Please sign in to comment.
Something went wrong with that request. Please try again.