From ffdc672bbe9687ba134560e379121efbbf992ba9 Mon Sep 17 00:00:00 2001 From: Gabe Berke-Williams Date: Sat, 12 Nov 2011 15:07:14 -0500 Subject: [PATCH] Use Bundler gem conventions. --- Gemfile | 8 +------- Gemfile.lock | 4 ++-- Rakefile | 24 ++++-------------------- flutie.gemspec | 30 ++++++++++++++++++++++-------- gemfiles/rails-3.0.10.gemfile | 6 ------ gemfiles/rails-3.1.0.gemfile | 6 ------ lib/flutie/version.rb | 3 +++ 7 files changed, 32 insertions(+), 49 deletions(-) create mode 100644 lib/flutie/version.rb diff --git a/Gemfile b/Gemfile index 8caa194..c80ee36 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,3 @@ source "http://rubygems.org" -gemspec -gem "appraisal" -gem "rspec-rails" -gem "capybara", ">= 0.4.0" -gem "sqlite3" -gem "sass" -gem "mocha" \ No newline at end of file +gemspec diff --git a/Gemfile.lock b/Gemfile.lock index 1dff567..2c25106 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,7 +22,7 @@ GEM builder (~> 2.1.2) i18n (~> 0.5.0) activesupport (3.0.10) - appraisal (0.3.8) + appraisal (0.4.0) bundler rake builder (2.1.2) @@ -89,7 +89,7 @@ PLATFORMS ruby DEPENDENCIES - appraisal + appraisal (~> 0.4) capybara (>= 0.4.0) flutie! mocha diff --git a/Rakefile b/Rakefile index 189598c..6402012 100644 --- a/Rakefile +++ b/Rakefile @@ -1,17 +1,9 @@ -# encoding: UTF-8 -require 'rubygems' -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end - -require 'rake' -require 'rdoc/task' +require 'bundler' require 'appraisal' - -require 'rspec/core' require 'rspec/core/rake_task' + +Bundler::GemHelper.install_tasks + RSpec::Core::RakeTask.new(:spec) desc "Default: run the unit tests." @@ -21,11 +13,3 @@ desc 'Test the plugin under all supported Rails versions.' task :all => ["appraisal:install"] do |t| exec('rake appraisal spec') end - -Rake::RDocTask.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'Flutie' - rdoc.options << '--line-numbers' << '--inline-source' - rdoc.rdoc_files.include('README.rdoc') - rdoc.rdoc_files.include('lib/**/*.rb') -end diff --git a/flutie.gemspec b/flutie.gemspec index 82af7dc..82f86a1 100644 --- a/flutie.gemspec +++ b/flutie.gemspec @@ -1,11 +1,25 @@ +# -*- encoding: utf-8 -*- +$:.push File.expand_path("../lib", __FILE__) +require "flutie/version" + Gem::Specification.new do |s| - s.name = 'flutie' - s.version = '1.3.3' - s.date = %q{2011-10-01} - s.email = 'support@thoughtbot.com' - s.homepage = 'http://github.com/thoughtbot/flutie' - s.summary = 'Flutie adds default stylesheets to web apps' + s.name = 'flutie' + s.version = Flutie::VERSION.dup + s.authors = ['Matt Jankowski', 'Chad Pytel', 'Kevin Burg', 'Chad Mazzola', 'Phil LaPier', 'Dan Croak', 'Fred Yates', 'OZAWA Sakuro', 'Mike Burns', 'Greg Sterndale', 'Joe Ferris', 'J. Edward Dewyea', 'Emilien Taque', 'Aaron Suggs', 'Nick Quaranto'] + s.email = ['support@thoughtbot.com'] + s.homepage = 'http://github.com/thoughtbot/flutie' + s.summary = 'Flutie adds default stylesheets to web apps' s.description = 'Flutie is a starting point for personal discovery' - s.files = Dir["{app,config,lib,public}/**/*"] + ["LICENSE", "Rakefile", "Gemfile", "README.md"] - s.authors = ['Matt Jankowski', 'Chad Pytel', 'Kevin Burg', 'Chad Mazzola', 'Phil LaPier', 'Dan Croak', 'Fred Yates', 'OZAWA Sakuro', 'Mike Burns', 'Greg Sterndale', 'Joe Ferris', 'J. Edward Dewyea', 'Emilien Taque', 'Aaron Suggs', 'Nick Quaranto'] + + 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_development_dependency('appraisal', '~> 0.4') + s.add_development_dependency('rspec-rails') + s.add_development_dependency('capybara', '>= 0.4.0') + s.add_development_dependency('sqlite3') + s.add_development_dependency('sass') + s.add_development_dependency('mocha') end diff --git a/gemfiles/rails-3.0.10.gemfile b/gemfiles/rails-3.0.10.gemfile index f2d20fa..37cb9df 100644 --- a/gemfiles/rails-3.0.10.gemfile +++ b/gemfiles/rails-3.0.10.gemfile @@ -2,12 +2,6 @@ source "http://rubygems.org" -gem "appraisal" -gem "rspec-rails" -gem "capybara", ">= 0.4.0" -gem "sqlite3" -gem "sass" -gem "mocha" gem "rails", "3.0.10" gemspec :path=>"../" \ No newline at end of file diff --git a/gemfiles/rails-3.1.0.gemfile b/gemfiles/rails-3.1.0.gemfile index 9a48e1f..965a680 100644 --- a/gemfiles/rails-3.1.0.gemfile +++ b/gemfiles/rails-3.1.0.gemfile @@ -2,12 +2,6 @@ source "http://rubygems.org" -gem "appraisal" -gem "rspec-rails" -gem "capybara", ">= 0.4.0" -gem "sqlite3" -gem "sass" -gem "mocha" gem "rails", "3.1.0" gemspec :path=>"../" \ No newline at end of file diff --git a/lib/flutie/version.rb b/lib/flutie/version.rb new file mode 100644 index 0000000..9378ff3 --- /dev/null +++ b/lib/flutie/version.rb @@ -0,0 +1,3 @@ +module Flutie + VERSION = '1.3.3'.freeze +end