Ditch Jeweler: more trouble than it's worth.
This commit is contained in:
parent
e6eb077c8c
commit
6f58a59523
57
Rakefile
57
Rakefile
|
@ -1,19 +1,30 @@
|
|||
$LOAD_PATH.unshift 'lib'
|
||||
require 'paper_trail/version_number'
|
||||
|
||||
require 'rake'
|
||||
require 'rake/testtask'
|
||||
require 'rake/rdoctask'
|
||||
|
||||
begin
|
||||
require 'jeweler'
|
||||
Jeweler::Tasks.new do |gemspec|
|
||||
gemspec.name = 'paper_trail'
|
||||
gemspec.summary = "Track changes to your models' data. Good for auditing or versioning."
|
||||
gemspec.email = 'boss@airbladesoftware.com'
|
||||
gemspec.homepage = 'http://github.com/airblade/paper_trail'
|
||||
gemspec.authors = ['Andy Stewart']
|
||||
|
||||
desc 'Build the gem.'
|
||||
task :build do
|
||||
sh 'gem build paper_trail.gemspec'
|
||||
end
|
||||
Jeweler::GemcutterTasks.new
|
||||
rescue LoadError
|
||||
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
||||
|
||||
desc 'Build and install the gem locally.'
|
||||
task :install => :build do
|
||||
sh "gem install paper_trail-#{PaperTrail::VERSION}.gem"
|
||||
end
|
||||
|
||||
desc 'Tag the code and push tags to origin.'
|
||||
task :tag do
|
||||
sh "git tag v#{PaperTrail::VERSION}"
|
||||
sh "git push origin master --tags"
|
||||
end
|
||||
|
||||
desc 'Release gem to rubygems.org.'
|
||||
task :release => [:build, :tag] do
|
||||
sh "gem push paper_trail-#{PaperTrail::VERSION}.gem"
|
||||
# sh 'git clean -fd'
|
||||
end
|
||||
|
||||
desc 'Test the paper_trail plugin.'
|
||||
|
@ -24,27 +35,5 @@ Rake::TestTask.new(:test) do |t|
|
|||
t.verbose = true
|
||||
end
|
||||
|
||||
begin
|
||||
require 'rcov/rcovtask'
|
||||
Rcov::RcovTask.new do |test|
|
||||
test.libs << 'test'
|
||||
test.pattern = 'test/**/*_test.rb'
|
||||
test.verbose = true
|
||||
end
|
||||
rescue LoadError
|
||||
task :rcov do
|
||||
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
||||
end
|
||||
end
|
||||
|
||||
desc 'Generate documentation for the paper_trail plugin.'
|
||||
Rake::RDocTask.new(:rdoc) do |rdoc|
|
||||
rdoc.rdoc_dir = 'rdoc'
|
||||
rdoc.title = 'PaperTrail'
|
||||
rdoc.options << '--line-numbers' << '--inline-source'
|
||||
rdoc.rdoc_files.include('README')
|
||||
rdoc.rdoc_files.include('lib/**/*.rb')
|
||||
end
|
||||
|
||||
desc 'Default: run unit tests.'
|
||||
task :default => :test
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
require 'singleton'
|
||||
require 'yaml'
|
||||
|
||||
require 'action_controller'
|
||||
require 'active_record'
|
||||
|
||||
require 'paper_trail/config'
|
||||
require 'paper_trail/controller'
|
||||
require 'paper_trail/has_paper_trail'
|
||||
require 'paper_trail/version'
|
||||
|
||||
|
||||
# PaperTrail's module methods can be called in both models and controllers.
|
||||
module PaperTrail
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
module PaperTrail
|
||||
VERSION = '1.5.4'
|
||||
end
|
|
@ -1,72 +1,23 @@
|
|||
# Generated by jeweler
|
||||
# DO NOT EDIT THIS FILE DIRECTLY
|
||||
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
||||
# -*- encoding: utf-8 -*-
|
||||
$LOAD_PATH.unshift 'lib'
|
||||
require 'paper_trail/version_number'
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = %q{paper_trail}
|
||||
s.version = "1.5.3"
|
||||
s.name = 'paper_trail'
|
||||
s.version = PaperTrail::VERSION
|
||||
s.summary = "Track changes to your models' data. Good for auditing or versioning."
|
||||
s.description = s.summary
|
||||
s.homepage = 'http://github.com/airblade/paper_trail'
|
||||
s.authors = ['Andy Stewart']
|
||||
s.email = 'boss@airbladesoftware.com'
|
||||
s.files = %w[ README.md Rakefile paper_trail.gemspec ]
|
||||
s.files += %w[ init.rb install.rb ]
|
||||
s.files += Dir.glob("lib/**/*")
|
||||
s.files += Dir.glob("generators/**/*")
|
||||
s.require_path = 'lib'
|
||||
s.test_files = Dir.glob("test/**/*")
|
||||
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["Andy Stewart"]
|
||||
s.date = %q{2010-10-11}
|
||||
s.email = %q{boss@airbladesoftware.com}
|
||||
s.extra_rdoc_files = [
|
||||
"README.md"
|
||||
]
|
||||
s.files = [
|
||||
".gitignore",
|
||||
"MIT-LICENSE",
|
||||
"README.md",
|
||||
"Rakefile",
|
||||
"VERSION",
|
||||
"generators/paper_trail/USAGE",
|
||||
"generators/paper_trail/paper_trail_generator.rb",
|
||||
"generators/paper_trail/templates/create_versions.rb",
|
||||
"init.rb",
|
||||
"install.rb",
|
||||
"lib/generators/paper_trail/USAGE",
|
||||
"lib/generators/paper_trail/paper_trail_generator.rb",
|
||||
"lib/generators/paper_trail/templates/create_versions.rb",
|
||||
"lib/paper_trail.rb",
|
||||
"lib/paper_trail/config.rb",
|
||||
"lib/paper_trail/controller.rb",
|
||||
"lib/paper_trail/has_paper_trail.rb",
|
||||
"lib/paper_trail/version.rb",
|
||||
"paper_trail.gemspec",
|
||||
"tasks/paper_trail_tasks.rake",
|
||||
"test/paper_trail_controller_test.rb",
|
||||
"test/paper_trail_model_test.rb",
|
||||
"test/paper_trail_schema_test.rb",
|
||||
"test/schema.rb",
|
||||
"test/schema_change.rb",
|
||||
"test/test_helper.rb",
|
||||
"test/thread_safe_test.rb",
|
||||
"uninstall.rb"
|
||||
]
|
||||
s.homepage = %q{http://github.com/airblade/paper_trail}
|
||||
s.rdoc_options = ["--charset=UTF-8"]
|
||||
s.require_paths = ["lib"]
|
||||
s.rubygems_version = %q{1.3.7}
|
||||
s.summary = %q{Track changes to your models' data. Good for auditing or versioning.}
|
||||
s.test_files = [
|
||||
"test/paper_trail_controller_test.rb",
|
||||
"test/paper_trail_model_test.rb",
|
||||
"test/paper_trail_schema_test.rb",
|
||||
"test/schema.rb",
|
||||
"test/schema_change.rb",
|
||||
"test/test_helper.rb",
|
||||
"test/thread_safe_test.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
|
||||
else
|
||||
s.add_dependency 'activerecord'
|
||||
s.add_dependency 'actionpack'
|
||||
s.add_development_dependency 'shoulda'
|
||||
s.add_development_dependency 'activesupport'
|
||||
end
|
||||
else
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue