Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 124 lines (98 sloc) 3.015 kb
9027d52 @banister version bump
banister authored
1 $:.unshift 'lib'
2
3db9a52 @banister added gemspec, hopefully this fixes travis-ci
banister authored
3 dlext = RbConfig::CONFIG['DLEXT']
9027d52 @banister version bump
banister authored
4 direc = File.dirname(__FILE__)
5 PROJECT_NAME = "pry-exception_explorer"
1d59c54 @banister displaying whether EE is enabled
banister authored
6 $VERBOSE = nil
9027d52 @banister version bump
banister authored
7
8 require 'rake/clean'
9 require 'rake/gempackagetask'
10 require "#{PROJECT_NAME}/version"
11
12 CLOBBER.include("**/*~", "**/*#*", "**/*.log")
13 CLEAN.include("**/*#*", "**/*#*.*", "**/*_flymake*.*", "**/*_flymake",
14 "**/*.rbc", "**/.#*.*")
15
16 def apply_spec_defaults(s)
17 s.name = PROJECT_NAME
501547c @banister updated some more testing stuff, blegh
banister authored
18 s.summary = "Enter the context of exceptions"
9027d52 @banister version bump
banister authored
19 s.version = PryExceptionExplorer::VERSION
20 s.date = Time.now.strftime '%Y-%m-%d'
21 s.author = "John Mair (banisterfiend)"
22 s.email = 'jrmair@gmail.com'
23 s.description = s.summary
24 s.require_path = 'lib'
25 s.homepage = "https://github.com/banister/pry-exception_explorer"
1800e27 @banister enter-exception now works everywhere, closes #11
banister authored
26 s.add_dependency('pry-stack_explorer', ">=0.4.6")
501547c @banister updated some more testing stuff, blegh
banister authored
27 s.add_development_dependency("bacon","~>1.1.0")
28 s.add_development_dependency('rake', '~> 0.9')
29
30 s.files = `git ls-files`.split("\n")
31 s.test_files = `git ls-files -- test/*`.split("\n")
9027d52 @banister version bump
banister authored
32 end
33
34 desc "run pry with plugin enabled"
35 task :pry do
36 exec("pry -I#{direc}/lib/ -r #{direc}/lib/#{PROJECT_NAME}")
37 end
38
39 desc "reinstall gem"
40 task :reinstall => :gems do
5ee07c6 @banister start on overriding rb_exc_raise
banister authored
41 sh "rm -rf ~/.pry-exception_explorer"
5e13bf5 @banister added guards for invalid exceptions etc
banister authored
42 sh "gem uninstall pry-exception_explorer" rescue nil
9027d52 @banister version bump
banister authored
43 sh "gem install #{direc}/pkg/pry-exception_explorer-#{PryExceptionExplorer::VERSION}.gem"
44 end
45
f7ef783 @banister added example_inline.rb example
banister authored
46 desc "Run example wrap"
47 task :example_wrap do
48 sh "ruby -I#{direc}/lib/ #{direc}/examples/example_wrap.rb "
49 end
50
51 desc "Run example inline"
52 task :example_inline do
53 sh "ruby -I#{direc}/lib/ #{direc}/examples/example_inline.rb "
dc05a2b @banister added examples/example.rb and 'rake example' rake task
banister authored
54 end
55
fdddd25 @banister added example + rake task for c exception interception
banister authored
56 desc "Run example C inline"
57 task :example_c_inline do
99bce4f @banister version 0.2.0 release
banister authored
58 sh "ruby -I#{direc}/lib/ #{direc}/examples/example_c_inline.rb "
59 end
60
61 desc "Run example C wrap"
62 task :example_c_wrap do
63 sh "ruby -I#{direc}/lib/ #{direc}/examples/example_c_wrap.rb "
64 end
65
66 desc "Run example post mortem"
67 task :example_post_mortem do
68 sh "ruby -I#{direc}/lib/ #{direc}/examples/example_post_mortem.rb "
fdddd25 @banister added example + rake task for c exception interception
banister authored
69 end
70
73092ad @banister got rid of uninitialized constant warnings, also added default rake tast
banister authored
71 task :default => :test
72
e8e6e9b @banister travis fix attempt 2
banister authored
73 desc "Show version"
74 task :version do
75 puts "PryExceptionExplorer version: #{PryExceptionExplorer::VERSION}"
76 end
77
9027d52 @banister version bump
banister authored
78 desc "run tests"
79 task :test do
c789262 @banister almost finished this bitch, just gotta remove pry-shim and wrap_activ…
banister authored
80 sh "bacon -Itest -rubygems -a -q"
9027d52 @banister version bump
banister authored
81 end
82
9efef6c @banister Refactored so wrap_active is true by default
banister authored
83 desc "Build gemspec"
84 task :gemspec => "ruby:gemspec"
85
9027d52 @banister version bump
banister authored
86 namespace :ruby do
87 spec = Gem::Specification.new do |s|
88 apply_spec_defaults(s)
89 s.platform = Gem::Platform::RUBY
90 end
91
92 Rake::GemPackageTask.new(spec) do |pkg|
93 pkg.need_zip = false
94 pkg.need_tar = false
95 end
501547c @banister updated some more testing stuff, blegh
banister authored
96
97 desc "Generate gemspec file"
98 task :gemspec do
99 File.open("#{spec.name}.gemspec", "w") do |f|
100 f << spec.to_ruby
101 end
102 end
9027d52 @banister version bump
banister authored
103 end
104
105 desc "shorthand for :gems task"
106 task :gem => :gems
107
108 desc "build all platform gems at once"
109 task :gems => [:clean, :rmgems, "ruby:gem"]
110
111 desc "remove all platform gems"
112 task :rmgems => ["ruby:clobber_package"]
113
114 desc "build and push latest gems"
115 task :pushgems => :gems do
116 chdir("#{File.dirname(__FILE__)}/pkg") do
117 Dir["*.gem"].each do |gemfile|
118 sh "gem push #{gemfile}"
119 end
120 end
5e13bf5 @banister added guards for invalid exceptions etc
banister authored
121 end
9027d52 @banister version bump
banister authored
122
123
Something went wrong with that request. Please try again.