Replace Jeweler with Bundler::GemHelper.install_tasks

Jeweler is an unnecessary abstraction of the Gem::Specification DSL.
This commit is contained in:
Erik Michaels-Ober 2012-03-06 14:47:34 -08:00
parent 316b258a42
commit 8ab6fadf0b
5 changed files with 18 additions and 116 deletions

View File

@ -1,10 +1,5 @@
source 'https://rubygems.org' source 'https://rubygems.org'
group :development do
gem 'jeweler', '>= 1.5.1'
gem 'rdoc', '>= 2.4.2'
end
group :test do group :test do
gem 'autotest-notification' gem 'autotest-notification'
gem 'capybara' gem 'capybara'
@ -20,3 +15,5 @@ group :test do
gem 'spork' gem 'spork'
gem 'systemu' gem 'systemu'
end end
gemspec

View File

@ -1,5 +1,7 @@
require 'rubygems' #!/usr/bin/env rake
require 'bundler' require 'bundler'
Bundler::GemHelper.install_tasks
begin begin
Bundler.setup(:default, :development) Bundler.setup(:default, :development)
@ -8,21 +10,6 @@ rescue Bundler::BundlerError => e
$stderr.puts "Run `bundle install` to install missing gems" $stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code exit e.status_code
end end
require 'rake'
require 'jeweler'
Jeweler::Tasks.new do |gem|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
gem.name = "impressionist"
gem.homepage = "https://github.com/charlotte-ruby/impressionist"
gem.license = "MIT"
gem.summary = %Q{Easy way to log impressions}
gem.description = %Q{Log impressions from controller actions or from a model}
gem.email = "john.mcaliley@gmail.com"
gem.authors = ["cowboycoded"]
gem.files.exclude "test_app/**/*", "test_app/**/.*"
end
Jeweler::RubygemsDotOrgTasks.new
require 'rake/testtask' require 'rake/testtask'
Rake::TestTask.new(:test) do |test| Rake::TestTask.new(:test) do |test|
@ -43,41 +30,6 @@ Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.include('lib/**/*.rb') rdoc.rdoc_files.include('lib/**/*.rb')
end end
namespace :version do
desc "create a new version, create tag and push to github"
task :patch_release do
if Jeweler::Commands::ReleaseToGit.new.clean_staging_area?
Rake::Task['version:bump:patch'].invoke
Rake::Task['gemspec:release'].invoke
Rake::Task['git:release'].invoke
else
puts "Commit your changed files first"
end
end
desc "create a new version, create tag and push to github"
task :minor_release do
if Jeweler::Commands::ReleaseToGit.new.clean_staging_area?
Rake::Task['version:bump:minor'].invoke
Rake::Task['gemspec:release'].invoke
Rake::Task['git:release'].invoke
else
puts "Commit your changed files first"
end
end
desc "create a new version, create tag and push to github"
task :major_release do
if Jeweler::Commands::ReleaseToGit.new.clean_staging_area?
Rake::Task['version:bump:major'].invoke
Rake::Task['gemspec:release'].invoke
Rake::Task['git:release'].invoke
else
puts "Commit your changed files first"
end
end
end
namespace :impressionist do namespace :impressionist do
require File.dirname(__FILE__) + "/lib/impressionist/bots" require File.dirname(__FILE__) + "/lib/impressionist/bots"

View File

@ -1 +0,0 @@
1.0.1

View File

@ -1,69 +1,20 @@
# Generated by jeweler # encoding: utf-8
# DO NOT EDIT THIS FILE DIRECTLY require File.expand_path('../lib/impressionist/version', __FILE__)
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = "impressionist" s.add_dependency 'httpclient', '~> 2.2'
s.version = "1.0.1" s.add_dependency 'nokogiri', '~> 1.5'
s.add_development_dependency 'rdoc', '>= 2.4.2'
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["cowboycoded"] s.authors = ["cowboycoded"]
s.date = "2012-03-06"
s.description = "Log impressions from controller actions or from a model" s.description = "Log impressions from controller actions or from a model"
s.email = "john.mcaliley@gmail.com" s.email = "john.mcaliley@gmail.com"
s.extra_rdoc_files = [ s.files = `git ls-files`.split("\n")
"LICENSE.txt",
"README.md"
]
s.files = [
"CHANGELOG.rdoc",
"Gemfile",
"LICENSE.txt",
"README.md",
"Rakefile",
"VERSION",
"app/controllers/impressionist_controller.rb",
"app/models/impression.rb",
"app/models/impressionist/bots.rb",
"app/models/impressionist/impressionable.rb",
"config/routes.rb",
"impressionist.gemspec",
"lib/generators/impressionist/impressionist_generator.rb",
"lib/generators/impressionist/templates/create_impressions_table.rb",
"lib/impressionist.rb",
"lib/impressionist/bots.rb",
"lib/impressionist/engine.rb",
"lib/impressionist/railties/tasks.rake",
"logo.png",
"upgrade_migrations/version_0_3_0.rb",
"upgrade_migrations/version_0_4_0.rb"
]
s.homepage = "https://github.com/charlotte-ruby/impressionist" s.homepage = "https://github.com/charlotte-ruby/impressionist"
s.licenses = ["MIT"] s.licenses = ["MIT"]
s.name = "impressionist"
s.require_paths = ["lib"] s.require_paths = ["lib"]
s.rubygems_version = "1.8.17" s.required_rubygems_version = Gem::Requirement.new('>= 1.3.6') if s.respond_to? :required_rubygems_version=
s.summary = "Easy way to log impressions" s.summary = "Easy way to log impressions"
s.test_files = `git ls-files -- test_app/*`.split("\n")
if s.respond_to? :specification_version then s.version = Impressionist::VERSION
s.specification_version = 3
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_development_dependency(%q<jeweler>, [">= 1.5.1"])
s.add_development_dependency(%q<rcov>, [">= 0"])
s.add_development_dependency(%q<rdoc>, [">= 2.4.2"])
s.add_development_dependency(%q<shoulda>, [">= 0"])
else
s.add_dependency(%q<jeweler>, [">= 1.5.1"])
s.add_dependency(%q<rcov>, [">= 0"])
s.add_dependency(%q<rdoc>, [">= 2.4.2"])
s.add_dependency(%q<shoulda>, [">= 0"])
end
else
s.add_dependency(%q<jeweler>, [">= 1.5.1"])
s.add_dependency(%q<rcov>, [">= 0"])
s.add_dependency(%q<rdoc>, [">= 2.4.2"])
s.add_dependency(%q<shoulda>, [">= 0"])
end
end end

View File

@ -0,0 +1,3 @@
module Impressionist
VERSION = "1.0.1"
end