1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00

Use Bundler to manage dependencies.

This commit is contained in:
Andy Stewart 2010-10-15 12:53:33 +01:00
parent 6f58a59523
commit bd1877cab0
6 changed files with 51 additions and 31 deletions

3
.gitignore vendored
View file

@ -1,3 +1,6 @@
test/debug.log
test/paper_trail_plugin.sqlite3.db
coverage
pkg/*
*.gem
.bundle

2
Gemfile Normal file
View file

@ -0,0 +1,2 @@
source :rubygems
gemspec

34
Gemfile.lock Normal file
View file

@ -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)

View file

@ -392,7 +392,7 @@ Over time your `versions` table will grow to an unwieldy size. Because each ver
## 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

View file

@ -1,32 +1,8 @@
$LOAD_PATH.unshift 'lib'
require 'paper_trail/version_number'
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rake'
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.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'

View file

@ -16,8 +16,13 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.test_files = Dir.glob("test/**/*")
s.add_dependency 'activerecord'
s.add_dependency 'actionpack'
s.add_development_dependency 'shoulda'
s.add_development_dependency 'activesupport'
s.add_development_dependency 'bundler', '~> 1.0'
s.add_development_dependency 'rake', '0.8.7' # TODO: why do we need to list rake?
s.add_development_dependency 'shoulda', '2.10.3'
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