From b2121ee956e2a348d273d1e8172636e155ea0739 Mon Sep 17 00:00:00 2001 From: laserlemon Date: Mon, 11 Oct 2010 22:17:15 -0400 Subject: [PATCH] Integrated with Jeweler. --- .gitignore | 21 ++++++++++++++ MIT-LICENSE => LICENSE | 0 README | 13 --------- README.rdoc | 17 ++++++++++++ Rakefile | 62 ++++++++++++++++++++++++++++++++---------- 5 files changed, 85 insertions(+), 28 deletions(-) create mode 100644 .gitignore rename MIT-LICENSE => LICENSE (100%) delete mode 100644 README create mode 100644 README.rdoc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c1e0daf --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +## MAC OS +.DS_Store + +## TEXTMATE +*.tmproj +tmtags + +## EMACS +*~ +\#* +.\#* + +## VIM +*.swp + +## PROJECT::GENERAL +coverage +rdoc +pkg + +## PROJECT::SPECIFIC diff --git a/MIT-LICENSE b/LICENSE similarity index 100% rename from MIT-LICENSE rename to LICENSE diff --git a/README b/README deleted file mode 100644 index 34c15de..0000000 --- a/README +++ /dev/null @@ -1,13 +0,0 @@ -SimpleOauth -=========== - -Introduction goes here. - - -Example -======= - -Example goes here. - - -Copyright (c) 2010 [name of plugin creator], released under the MIT license diff --git a/README.rdoc b/README.rdoc new file mode 100644 index 0000000..9830dac --- /dev/null +++ b/README.rdoc @@ -0,0 +1,17 @@ += simple_oauth + +Simply builds and verifies OAuth headers + +== Note on Patches/Pull Requests + +* Fork the project. +* Make your feature addition or bug fix. +* Add tests for it. This is important so I don't break it in a + future version unintentionally. +* Commit, do not mess with rakefile, version, or history. + (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) +* Send me a pull request. Bonus points for topic branches. + +== Copyright + +Copyright (c) 2010 Steve Richert. See LICENSE for details. diff --git a/Rakefile b/Rakefile index 97b51ad..4728f20 100644 --- a/Rakefile +++ b/Rakefile @@ -1,23 +1,55 @@ +require './lib/simple_oauth' +require 'rubygems' require 'rake' require 'rake/testtask' require 'rake/rdoctask' -desc 'Default: run unit tests.' -task :default => :test - -desc 'Test the simple_oauth plugin.' -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = true +begin + require 'jeweler' + Jeweler::Tasks.new do |gem| + gem.name = 'simple_oauth' + gem.version = SimpleOAuth::Version::STRING + gem.summary = 'Simply builds and verifies OAuth headers' + gem.description = 'Simply builds and verifies OAuth headers' + gem.email = 'steve.richert@gmail.com' + gem.homepage = 'http://github.com/laserlemon/simple_oauth' + gem.authors = ['Steve Richert'] + gem.add_development_dependency 'mocha' + # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings + end + Jeweler::GemcutterTasks.new +rescue LoadError + puts 'Jeweler is not available. Install it with: gem install jeweler' end -desc 'Generate documentation for the simple_oauth plugin.' -Rake::RDocTask.new(:rdoc) do |rdoc| +Rake::TestTask.new do |test| + test.libs << 'lib' << 'test' + test.pattern = 'test/**/*_test.rb' + test.verbose = true +end + +task :test => :check_dependencies + +task :default => :test + +begin + require 'rcov/rcovtask' + Rcov::RcovTask.new do |rcov| + rcov.libs << 'lib' << 'test' + rcov.pattern = 'test/**/*_test.rb' + rcov.verbose = true + rcov.rcov_opts << '--exclude "gems/*"' + end +rescue LoadError + task :rcov do + abort 'RCov is not available. Install it with: gem install rcov' + end +end + +Rake::RDocTask.new do |rdoc| + version = SimpleOAuth::Version::STRING rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'SimpleOauth' - rdoc.options << '--line-numbers' << '--inline-source' - rdoc.rdoc_files.include('README') + rdoc.title = "simple_oauth #{version}" + rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') -end \ No newline at end of file +end