Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use bundle gem tasks and move gemspec from Rakefile the .gemspec

  • Loading branch information...
commit 2244d5e74d6c2da04858e2f9f8d76b459f90425e 1 parent 1c70af4
@adzap adzap authored
Showing with 18 additions and 71 deletions.
  1. +5 −46 Rakefile
  2. +13 −25 validates_timeliness.gemspec
View
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
View
38 validates_timeliness.gemspec
@@ -1,32 +1,20 @@
# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "validates_timeliness/version"
Gem::Specification.new do |s|
- s.name = %q{validates_timeliness}
- s.version = "3.0.5"
+ s.name = "validates_timeliness"
+ s.version = ValidatesTimeliness::VERSION
+ s.authors = ["Adam Meehan"]
+ s.summary = %q{Date and time validation plugin for Rails which allows custom formats}
+ s.description = %q{Adds validation methods to ActiveModel for validating dates and times. Works with multiple ORMS.}
+ s.email = %q{adam.meehan@gmail.com}
+ s.homepage = %q{http://github.com/adzap/validates_timeliness}
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Adam Meehan"]
- s.date = %q{2011-01-29}
- s.description = %q{Date and time validation plugin for Rails which allows custom formats}
- s.email = %q{adam.meehan@gmail.com}
+ s.require_paths = ["lib"]
+ s.files = `git ls-files`.split("\n") - %w{ .gitignore .rspec Gemfile Gemfile.lock autotest/discover.rb }
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG.rdoc", "LICENSE"]
- s.files = ["CHANGELOG.rdoc", "LICENSE", "README.rdoc", "Rakefile", "init.rb", "lib/generators/validates_timeliness/install_generator.rb", "lib/generators/validates_timeliness/templates/en.yml", "lib/generators/validates_timeliness/templates/validates_timeliness.rb", "lib/validates_timeliness.rb", "lib/validates_timeliness/attribute_methods.rb", "lib/validates_timeliness/conversion.rb", "lib/validates_timeliness/extensions.rb", "lib/validates_timeliness/extensions/date_time_select.rb", "lib/validates_timeliness/extensions/multiparameter_handler.rb", "lib/validates_timeliness/helper_methods.rb", "lib/validates_timeliness/orm/active_record.rb", "lib/validates_timeliness/orm/mongoid.rb", "lib/validates_timeliness/railtie.rb", "lib/validates_timeliness/validator.rb", "lib/validates_timeliness/version.rb", "spec/spec_helper.rb", "spec/support/config_helper.rb", "spec/support/model_helpers.rb", "spec/support/test_model.rb", "spec/validates_timeliness/attribute_methods_spec.rb", "spec/validates_timeliness/conversion_spec.rb", "spec/validates_timeliness/extensions/date_time_select_spec.rb", "spec/validates_timeliness/extensions/multiparameter_handler_spec.rb", "spec/validates_timeliness/helper_methods_spec.rb", "spec/validates_timeliness/orm/active_record_spec.rb", "spec/validates_timeliness/orm/mongoid_spec.rb", "spec/validates_timeliness/validator/after_spec.rb", "spec/validates_timeliness/validator/before_spec.rb", "spec/validates_timeliness/validator/is_at_spec.rb", "spec/validates_timeliness/validator/on_or_after_spec.rb", "spec/validates_timeliness/validator/on_or_before_spec.rb", "spec/validates_timeliness/validator_spec.rb", "spec/validates_timeliness_spec.rb", "validates_timeliness.gemspec"]
- s.homepage = %q{http://github.com/adzap/validates_timeliness}
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{Date and time validation plugin for Rails which allows custom formats}
- s.test_files = ["spec/spec_helper.rb", "spec/support/config_helper.rb", "spec/support/model_helpers.rb", "spec/support/test_model.rb", "spec/validates_timeliness/attribute_methods_spec.rb", "spec/validates_timeliness/conversion_spec.rb", "spec/validates_timeliness/extensions/date_time_select_spec.rb", "spec/validates_timeliness/extensions/multiparameter_handler_spec.rb", "spec/validates_timeliness/helper_methods_spec.rb", "spec/validates_timeliness/orm/active_record_spec.rb", "spec/validates_timeliness/orm/mongoid_spec.rb", "spec/validates_timeliness/validator/after_spec.rb", "spec/validates_timeliness/validator/before_spec.rb", "spec/validates_timeliness/validator/is_at_spec.rb", "spec/validates_timeliness/validator/on_or_after_spec.rb", "spec/validates_timeliness/validator/on_or_before_spec.rb", "spec/validates_timeliness/validator_spec.rb", "spec/validates_timeliness_spec.rb"]
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
-
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<timeliness>, ["~> 0.3.2"])
- else
- s.add_dependency(%q<timeliness>, ["~> 0.3.2"])
- end
- else
- s.add_dependency(%q<timeliness>, ["~> 0.3.2"])
- end
+ s.add_runtime_dependency(%q<timeliness>, ["~> 0.3.3"])
end
Please sign in to comment.
Something went wrong with that request. Please try again.