Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 140 lines (116 sloc) 3.538 kB
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
1 require 'rake/clean'
a588a23 @sferik Replace deprecated rake/gempackagetask with rubygems/package_task
sferik authored
2 require 'rubygems/package_task'
7e59e5c no need for this variable, rearrange requires
Lee Jarvis authored
3
4 $:.unshift 'lib'
71ac555 unshift lib into load path
Lee Jarvis authored
5 require 'pry/version'
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
6
fd64f75 @sferik Update gem dependencies
sferik authored
7 CLOBBER.include('**/*~', '**/*#*', '**/*.log')
8 CLEAN.include('**/*#*', '**/*#*.*', '**/*_flymake*.*', '**/*_flymake', '**/*.rbc', '**/.#*.*')
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
9
10 def apply_spec_defaults(s)
fd64f75 @sferik Update gem dependencies
sferik authored
11 s.name = 'pry'
9ff0530 @banister upated homepage for gem
banister authored
12 s.summary = "An IRB alternative and runtime developer console"
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
13 s.version = Pry::VERSION
14 s.date = Time.now.strftime '%Y-%m-%d'
e7d350b @rf- Add self to author list
rf- authored
15 s.authors = ["John Mair (banisterfiend)", "Conrad Irwin", "Ryan Fitzgerald"]
16 s.email = ['jrmair@gmail.com', 'conrad.irwin@gmail.com', 'rwfitzge@gmail.com']
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
17 s.description = s.summary
fd64f75 @sferik Update gem dependencies
sferik authored
18 s.homepage = 'http://pry.github.com'
19 s.executables = ['pry']
164ff67 use git ls-files instead of globbing ourselves
Lee Jarvis authored
20 s.files = `git ls-files`.split("\n")
8cccb4c added test_files to spec
Lee Jarvis authored
21 s.test_files = `git ls-files -- test/*`.split("\n")
358b9ed @envygeeks Upgrade Coderay now that the $: issue is fixed, also fixes :"string".
envygeeks authored
22 s.add_dependency('coderay', '~> 1.0.5')
f9ec9c0 @ConradIrwin Update to slop 3.3.1
ConradIrwin authored
23 s.add_dependency('slop', ['~> 3.3.1'])
c06d7b6 @ConradIrwin version 0.10.pre.1
ConradIrwin authored
24 s.add_dependency('method_source','~> 0.8')
fd64f75 @sferik Update gem dependencies
sferik authored
25 s.add_development_dependency('bacon', '~> 1.1')
26 s.add_development_dependency('open4', '~> 1.3')
27 s.add_development_dependency('rake', '~> 0.9')
6617856 @rking Add Bond completion (when available) cirwin++
rking authored
28 # TODO: make this a plain dependency:
29 s.add_development_dependency('bond', '~> 0.4.2')
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
30 end
31
36d685f @rf- ensure gem environment matches gemspec before some rake tasks
rf- authored
32 def check_dependencies
33 require 'bundler'
34 Bundler.definition.missing_specs
22ae454 @rf- add workaround for issue #395
rf- authored
35
cfe5515 @rf- better choice of __FILE__ (see issue #395)
rf- authored
36 eval('nil', TOPLEVEL_BINDING, '<main>') # workaround for issue #395
36d685f @rf- ensure gem environment matches gemspec before some rake tasks
rf- authored
37 rescue LoadError
38 # if Bundler isn't installed, we'll just assume your setup is ok.
39 rescue Bundler::GemNotFound
40 raise RuntimeError, "You're missing one or more required gems. Run `bundle install` first."
41 end
42
bab85e7 @rue Behave like a nice library and run rake test as default
rue authored
43 desc "Set up and run tests"
44 task :default => [:test]
45
28b58fb Adding a Desc to the test task so it shows up running "rake -T"
David Palm authored
46 desc "Run tests"
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
47 task :test do
36d685f @rf- ensure gem environment matches gemspec before some rake tasks
rf- authored
48 check_dependencies unless ENV['SKIP_DEP_CHECK']
ad7f348 @rf- Quiet mode for tests again
rf- authored
49 sh "bacon -Itest -rubygems -a -q"
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
50 end
51
36d685f @rf- ensure gem environment matches gemspec before some rake tasks
rf- authored
52 desc "Run pry"
228b95f @banister added new 'alias_command' and 'desc' commands to CommandBase; also ma…
banister authored
53 task :pry do
36d685f @rf- ensure gem environment matches gemspec before some rake tasks
rf- authored
54 check_dependencies unless ENV['SKIP_DEP_CHECK']
bbb375d @banister changed 'rake pry' to invoke executable instead of starting pry sessi…
banister authored
55 load 'bin/pry'
228b95f @banister added new 'alias_command' and 'desc' commands to CommandBase; also ma…
banister authored
56 end
57
36d685f @rf- ensure gem environment matches gemspec before some rake tasks
rf- authored
58 desc "Show pry version"
8682e26 @banister Version 0.4.2
banister authored
59 task :version do
60 puts "Pry version: #{Pry::VERSION}"
61 end
62
36d685f @rf- ensure gem environment matches gemspec before some rake tasks
rf- authored
63 desc "Profile pry's startup time"
64 task :profile do
65 require 'profile'
66 require 'pry'
67 Pry.start(TOPLEVEL_BINDING, :input => StringIO.new('exit'))
68 end
69
0eeef45 @banister make :gems task regenerate gemspec
banister authored
70 desc "Build the gemspec file"
71 task :gemspec => "ruby:gemspec"
72
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
73 namespace :ruby do
74 spec = Gem::Specification.new do |s|
7ed6c17 @banister version 0.6.6, building separate jruby gem since it breaks with the r…
banister authored
75 apply_spec_defaults(s)
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
76 s.platform = Gem::Platform::RUBY
77 end
169090c dont alter LOAD_PATH and require files relative to lib/
Lee Jarvis authored
78
a588a23 @sferik Replace deprecated rake/gempackagetask with rubygems/package_task
sferik authored
79 Gem::PackageTask.new(spec) do |pkg|
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
80 pkg.need_zip = false
81 pkg.need_tar = false
82 end
57073b7 @banister updated slop and method_source dependencies
banister authored
83
164ff2b Adding rake ruby:gemspec to dump a .gemspec file so I can bundle the …
David Palm authored
84 task :gemspec do
4bba687 Removing versioning from gemspec file: just plain "pry.gemspec" now
David Palm authored
85 File.open("#{spec.name}.gemspec", "w") do |f|
164ff2b Adding rake ruby:gemspec to dump a .gemspec file so I can bundle the …
David Palm authored
86 f << spec.to_ruby
7fe09c8 whitespace
David Palm authored
87 end
164ff2b Adding rake ruby:gemspec to dump a .gemspec file so I can bundle the …
David Palm authored
88 end
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
89 end
90
e589710 @banister JRuby finally supported, passing 100% of tests - requires updated met…
banister authored
91 namespace :jruby do
92 spec = Gem::Specification.new do |s|
93 apply_spec_defaults(s)
fd64f75 @sferik Update gem dependencies
sferik authored
94 s.add_dependency('spoon', '~> 0.0')
95 s.platform = 'java'
e589710 @banister JRuby finally supported, passing 100% of tests - requires updated met…
banister authored
96 end
97
a588a23 @sferik Replace deprecated rake/gempackagetask with rubygems/package_task
sferik authored
98 Gem::PackageTask.new(spec) do |pkg|
e589710 @banister JRuby finally supported, passing 100% of tests - requires updated met…
banister authored
99 pkg.need_zip = false
100 pkg.need_tar = false
101 end
102 end
103
104
f1c5fa4 @banister version 0.6.7pre3, getting syntax higlighting working and adding new …
banister authored
105 [:mingw32, :mswin32].each do |v|
106 namespace v do
107 spec = Gem::Specification.new do |s|
169090c dont alter LOAD_PATH and require files relative to lib/
Lee Jarvis authored
108 apply_spec_defaults(s)
fd64f75 @sferik Update gem dependencies
sferik authored
109 s.add_dependency('win32console', '~> 1.3')
f1c5fa4 @banister version 0.6.7pre3, getting syntax higlighting working and adding new …
banister authored
110 s.platform = "i386-#{v}"
111 end
112
a588a23 @sferik Replace deprecated rake/gempackagetask with rubygems/package_task
sferik authored
113 Gem::PackageTask.new(spec) do |pkg|
f1c5fa4 @banister version 0.6.7pre3, getting syntax higlighting working and adding new …
banister authored
114 pkg.need_zip = false
115 pkg.need_tar = false
116 end
117 end
118 end
119
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
120 desc "build all platform gems at once"
55cd93b @banister got rid of unbelievably annoying automatic regeneration of gemspec
banister authored
121 task :gems => [:clean, :rmgems, 'ruby:gem', 'mswin32:gem', 'mingw32:gem', 'jruby:gem']
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
122
123 desc "remove all platform gems"
fd64f75 @sferik Update gem dependencies
sferik authored
124 task :rmgems => ['ruby:clobber_package']
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
125
3bce2f9 @banister added gem reinstall task to Rakefile (for easy local testing)
banister authored
126 desc "reinstall gem"
127 task :reinstall => :gems do
2cca181 @banister bumped version and fixed reinstall rake task
banister authored
128 sh "gem uninstall pry" rescue nil
79b1641 @banister fixed rake reinstall task
banister authored
129 sh "gem install #{File.dirname(__FILE__)}/pkg/pry-#{Pry::VERSION}.gem"
3bce2f9 @banister added gem reinstall task to Rakefile (for easy local testing)
banister authored
130 end
131
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
132 desc "build and push latest gems"
133 task :pushgems => :gems do
bbcf802 @banister fixed Rakefile path for pushgems task
banister authored
134 chdir("#{File.dirname(__FILE__)}/pkg") do
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
135 Dir["*.gem"].each do |gemfile|
136 sh "gem push #{gemfile}"
137 end
138 end
139 end
Something went wrong with that request. Please try again.