Skip to content

Commit

Permalink
Use Bundler to manage dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
airblade committed Oct 15, 2010
1 parent 6f58a59 commit bd1877c
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 31 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,3 +1,6 @@
test/debug.log
test/paper_trail_plugin.sqlite3.db
coverage
pkg/*
*.gem
.bundle
2 changes: 2 additions & 0 deletions Gemfile
@@ -0,0 +1,2 @@
source :rubygems
gemspec
34 changes: 34 additions & 0 deletions Gemfile.lock
@@ -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)
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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
Expand Down
28 changes: 2 additions & 26 deletions Rakefile
@@ -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'
Expand Down
13 changes: 9 additions & 4 deletions paper_trail.gemspec
Expand Up @@ -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

0 comments on commit bd1877c

Please sign in to comment.