mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 15:22:58 +00:00
Use bundle gem tasks and move gemspec from Rakefile the .gemspec
This commit is contained in:
51
Rakefile
51
Rakefile
@@ -1,36 +1,8 @@
|
||||
require 'rubygems'
|
||||
require 'bundler'
|
||||
Bundler::GemHelper.install_tasks
|
||||
|
||||
require 'rake/rdoctask'
|
||||
require 'rake/gempackagetask'
|
||||
require 'rubygems/specification'
|
||||
require 'rspec/core/rake_task'
|
||||
require 'lib/validates_timeliness/version'
|
||||
|
||||
GEM_NAME = "validates_timeliness"
|
||||
GEM_VERSION = ValidatesTimeliness::VERSION
|
||||
|
||||
spec = Gem::Specification.new do |s|
|
||||
s.name = GEM_NAME
|
||||
s.version = GEM_VERSION
|
||||
s.platform = Gem::Platform::RUBY
|
||||
s.summary = %q{Date and time validation plugin for Rails which allows custom formats}
|
||||
s.description = s.summary
|
||||
s.author = "Adam Meehan"
|
||||
s.email = "adam.meehan@gmail.com"
|
||||
s.homepage = "http://github.com/adzap/validates_timeliness"
|
||||
s.require_path = 'lib'
|
||||
|
||||
s.add_runtime_dependency 'timeliness', '~> 0.3.2'
|
||||
|
||||
s.files = `git ls-files`.split("\n") - %w{ .rspec .gitignore autotest/discover.rb Gemfile Gemfile.lock }
|
||||
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.has_rdoc = true
|
||||
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG.rdoc", "LICENSE"]
|
||||
end
|
||||
|
||||
desc 'Default: run specs.'
|
||||
task :default => :spec
|
||||
|
||||
desc "Run specs"
|
||||
RSpec::Core::RakeTask.new(:spec)
|
||||
@@ -50,18 +22,5 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
|
||||
rdoc.rdoc_files.include('lib/**/*.rb')
|
||||
end
|
||||
|
||||
Rake::GemPackageTask.new(spec) do |pkg|
|
||||
pkg.gem_spec = spec
|
||||
end
|
||||
|
||||
desc "Install the gem locally"
|
||||
task :install => [:package] do
|
||||
sh %{gem install pkg/#{GEM_NAME}-#{GEM_VERSION}}
|
||||
end
|
||||
|
||||
desc "Create a gemspec file"
|
||||
task :make_spec do
|
||||
File.open("#{GEM_NAME}.gemspec", "w") do |file|
|
||||
file.puts spec.to_ruby
|
||||
end
|
||||
end
|
||||
desc 'Default: run specs.'
|
||||
task :default => :spec
|
||||
|
||||
Reference in New Issue
Block a user