Use Bundler to manage dependencies.
This commit is contained in:
parent
6f58a59523
commit
bd1877cab0
|
@ -1,3 +1,6 @@
|
||||||
test/debug.log
|
test/debug.log
|
||||||
test/paper_trail_plugin.sqlite3.db
|
test/paper_trail_plugin.sqlite3.db
|
||||||
coverage
|
coverage
|
||||||
|
pkg/*
|
||||||
|
*.gem
|
||||||
|
.bundle
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
PATH
|
||||||
|
remote: .
|
||||||
|
specs:
|
||||||
|
paper_trail (1.5.4)
|
||||||
|
actionpack (~> 2.3)
|
||||||
|
activerecord (~> 2.3)
|
||||||
|
activerecord (~> 2.3)
|
||||||
|
|
||||||
|
GEM
|
||||||
|
remote: http://rubygems.org/
|
||||||
|
specs:
|
||||||
|
actionpack (2.3.5)
|
||||||
|
activesupport (= 2.3.5)
|
||||||
|
rack (~> 1.0.0)
|
||||||
|
activerecord (2.3.5)
|
||||||
|
activesupport (= 2.3.5)
|
||||||
|
activesupport (2.3.5)
|
||||||
|
rack (1.0.1)
|
||||||
|
rake (0.8.7)
|
||||||
|
shoulda (2.10.3)
|
||||||
|
sqlite3-ruby (1.3.1)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
ruby
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
actionpack (~> 2.3)
|
||||||
|
activerecord (~> 2.3)
|
||||||
|
activesupport (~> 2.3)
|
||||||
|
bundler (~> 1.0)
|
||||||
|
paper_trail!
|
||||||
|
rake (= 0.8.7)
|
||||||
|
shoulda (= 2.10.3)
|
||||||
|
sqlite3-ruby (~> 1.2)
|
|
@ -392,7 +392,7 @@ Over time your `versions` table will grow to an unwieldy size. Because each ver
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
PaperTrail has a thorough suite of tests.
|
PaperTrail uses Bundler to manage its dependencies (in development and testing). You can run the tests with `bundle exec rake test`. (You may need to `bundle install` first.)
|
||||||
|
|
||||||
|
|
||||||
## Articles
|
## Articles
|
||||||
|
|
28
Rakefile
28
Rakefile
|
@ -1,32 +1,8 @@
|
||||||
$LOAD_PATH.unshift 'lib'
|
require 'bundler'
|
||||||
require 'paper_trail/version_number'
|
Bundler::GemHelper.install_tasks
|
||||||
|
|
||||||
require 'rake'
|
|
||||||
require 'rake/testtask'
|
require 'rake/testtask'
|
||||||
|
|
||||||
|
|
||||||
desc 'Build the gem.'
|
|
||||||
task :build do
|
|
||||||
sh 'gem build paper_trail.gemspec'
|
|
||||||
end
|
|
||||||
|
|
||||||
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.'
|
desc 'Test the paper_trail plugin.'
|
||||||
Rake::TestTask.new(:test) do |t|
|
Rake::TestTask.new(:test) do |t|
|
||||||
t.libs << 'lib'
|
t.libs << 'lib'
|
||||||
|
|
|
@ -16,8 +16,13 @@ Gem::Specification.new do |s|
|
||||||
s.require_path = 'lib'
|
s.require_path = 'lib'
|
||||||
s.test_files = Dir.glob("test/**/*")
|
s.test_files = Dir.glob("test/**/*")
|
||||||
|
|
||||||
s.add_dependency 'activerecord'
|
s.add_development_dependency 'bundler', '~> 1.0'
|
||||||
s.add_dependency 'actionpack'
|
s.add_development_dependency 'rake', '0.8.7' # TODO: why do we need to list rake?
|
||||||
s.add_development_dependency 'shoulda'
|
s.add_development_dependency 'shoulda', '2.10.3'
|
||||||
s.add_development_dependency 'activesupport'
|
s.add_development_dependency 'activesupport', '~> 2.3'
|
||||||
|
s.add_development_dependency 'sqlite3-ruby', '~> 1.2'
|
||||||
|
|
||||||
|
s.add_dependency 'activerecord', '~> 2.3'
|
||||||
|
s.add_dependency 'activerecord', '~> 2.3'
|
||||||
|
s.add_dependency 'actionpack', '~> 2.3'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue