From fecad3b6c548bfdbb9eb12d1480d1f5f70691b54 Mon Sep 17 00:00:00 2001 From: Tyler Hunt Date: Mon, 2 Mar 2009 18:43:30 -0500 Subject: [PATCH] Gemified plugin. --- .gitignore | 3 +++ Manifest | 8 ++++++++ README => README.markdown | 0 Rakefile | 32 +++++++++++--------------------- comeback.gemspec | 38 ++++++++++++++++++++++++++++++++++++++ init.rb | 3 --- rails/init.rb | 5 +++++ 7 files changed, 65 insertions(+), 24 deletions(-) create mode 100644 .gitignore create mode 100644 Manifest rename README => README.markdown (100%) create mode 100644 comeback.gemspec delete mode 100644 init.rb create mode 100644 rails/init.rb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e77b9af --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +doc +pkg diff --git a/Manifest b/Manifest new file mode 100644 index 0000000..5cba5a8 --- /dev/null +++ b/Manifest @@ -0,0 +1,8 @@ +comeback.gemspec +lib/comeback.rb +Manifest +MIT-LICENSE +rails/init.rb +Rakefile +README.markdown +test/comeback_test.rb diff --git a/README b/README.markdown similarity index 100% rename from README rename to README.markdown diff --git a/Rakefile b/Rakefile index 38e6dd4..670d36a 100644 --- a/Rakefile +++ b/Rakefile @@ -1,22 +1,12 @@ -require 'rake' -require 'rake/testtask' -require 'rake/rdoctask' - -desc 'Default: run unit tests.' -task :default => :test - -desc 'Test the comeback plugin.' -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.pattern = 'test/**/*_test.rb' - t.verbose = true -end - -desc 'Generate documentation for the comeback plugin.' -Rake::RDocTask.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'Comeback' - rdoc.options << '--line-numbers' << '--inline-source' - rdoc.rdoc_files.include('README') - rdoc.rdoc_files.include('lib/**/*.rb') +require 'rubygems' +require 'echoe' + +Echoe.new 'comeback' do |p| + p.version = "0.0.1" + p.author = "Tyler Hunt" + p.email = "tyler@tylerhunt.com" + p.summary = "Provides a mechanism for storing and accessing return URLs." + p.url = "http://github.com/tylerhunt/comeback" + p.dependencies = %w(actionpack) + p.development_dependencies = %w(echoe) end diff --git a/comeback.gemspec b/comeback.gemspec new file mode 100644 index 0000000..96c50d4 --- /dev/null +++ b/comeback.gemspec @@ -0,0 +1,38 @@ +# -*- encoding: utf-8 -*- + +Gem::Specification.new do |s| + s.name = %q{comeback} + s.version = "0.0.1" + + s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version= + s.authors = ["Tyler Hunt"] + s.date = %q{2009-03-02} + s.description = %q{Provides a mechanism for storing and accessing return URLs.} + s.email = %q{tyler@tylerhunt.com} + s.extra_rdoc_files = ["lib/comeback.rb", "README.markdown"] + s.files = ["comeback.gemspec", "lib/comeback.rb", "Manifest", "MIT-LICENSE", "rails/init.rb", "Rakefile", "README.markdown", "test/comeback_test.rb"] + s.has_rdoc = true + s.homepage = %q{http://github.com/tylerhunt/comeback} + s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Comeback", "--main", "README.markdown"] + s.require_paths = ["lib"] + s.rubyforge_project = %q{comeback} + s.rubygems_version = %q{1.3.1} + s.summary = %q{Provides a mechanism for storing and accessing return URLs.} + s.test_files = ["test/comeback_test.rb"] + + if s.respond_to? :specification_version then + current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION + s.specification_version = 2 + + if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then + s.add_runtime_dependency(%q, [">= 0"]) + s.add_development_dependency(%q, [">= 0"]) + else + s.add_dependency(%q, [">= 0"]) + s.add_dependency(%q, [">= 0"]) + end + else + s.add_dependency(%q, [">= 0"]) + s.add_dependency(%q, [">= 0"]) + end +end diff --git a/init.rb b/init.rb deleted file mode 100644 index 9bf505e..0000000 --- a/init.rb +++ /dev/null @@ -1,3 +0,0 @@ -require 'comeback' - -ActionController::Base.send(:include, Comeback) diff --git a/rails/init.rb b/rails/init.rb new file mode 100644 index 0000000..1b21632 --- /dev/null +++ b/rails/init.rb @@ -0,0 +1,5 @@ +require File.join(File.dirname(__FILE__), '..', 'lib', 'comeback') + +ActionController::Base.class_eval do + include Comeback +end