Skip to content

Commit

Permalink
Added rake console task, very nifty when working on the gem.
Browse files Browse the repository at this point in the history
  • Loading branch information
swanandp authored and jhawthorn committed Feb 17, 2014
1 parent f70f0a0 commit ee5aa16
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
source "http://rubygems.org"
source 'http://rubygems.org'

# Specify your gem's dependencies in dkim.gemspec
gemspec

gem "rake"
gem 'rake'
gem 'minitest'
gem 'guard-minitest'
gem 'mail'

platforms :jruby do
gem 'jruby-openssl'
end

12 changes: 12 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,15 @@ end

Bundler::GemHelper.install_tasks

desc 'Open an pry (or irb) session preloaded with Dkim'
task :console do
begin
require 'pry'
sh 'pry -I lib -r dkim.rb'
rescue LoadError => _
sh 'irb -rubygems -I lib -r dkim.rb'
end

end

task c: :console
2 changes: 2 additions & 0 deletions dkim.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- test/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

s.add_development_dependency 'awesome_print'
end

0 comments on commit ee5aa16

Please sign in to comment.