Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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