Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 100 lines (83 sloc) 2.359 kb
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
1 direc = File.dirname(__FILE__)
2
3 require 'rake/clean'
4 require 'rake/gempackagetask'
5 require "#{direc}/lib/pry/version"
6
6866088 remove extension specific globs from clean/clobber
Lee Jarvis authored
7 CLOBBER.include("**/*.#{dlext}", "**/*~", "**/*#*", "**/*.log")
8 CLEAN.include("**/*#*", "**/*#*.*", "**/*_flymake*.*", "**/*_flymake", "**/*.rbc")
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
9
10 def apply_spec_defaults(s)
11 s.name = "pry"
890ca85 @banister rescuing SyntaxError as well in valid_expression?
banister authored
12 s.summary = "attach an irb-like session to any object at runtime"
2dc06b2 @banister 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
18 s.homepage = "http://banisterfiend.wordpress.com"
19 s.has_rdoc = 'yard'
22d31c0 @banister version 0.5.7, added Pry executable, pry --help at command line for m…
banister authored
20 s.executables = ["pry"]
164ff67 use git ls-files instead of globbing ourselves
Lee Jarvis authored
21 s.files = `git ls-files`.split("\n")
8cccb4c added test_files to spec
Lee Jarvis authored
22 s.test_files = `git ls-files -- test/*`.split("\n")
a6bf33e move method_source dep to default gemspec
Lee Jarvis authored
23 s.add_dependency("ruby_parser",">=2.0.5")
24 s.add_dependency("coderay",">=0.9.7")
25 s.add_dependency("slop",">=1.5.3")
26 s.add_dependency("method_source",">=0.4.0")
27 s.add_development_dependency("bacon",">=1.1.0")
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
28 end
29
30 task :test do
fad6cf9 simplify test running
Lee Jarvis authored
31 sh "bacon -Itest -rubygems test/test.rb"
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
32 end
33
228b95f @banister added new 'alias_command' and 'desc' commands to CommandBase; also ma…
banister authored
34 desc "run pry"
35 task :pry do
169090c dont alter LOAD_PATH and require files relative to lib/
Lee Jarvis authored
36 $LOAD_PATH.unshift "#{direc}/lib"
37 require 'pry'
3c271ff @banister turned chomp! into an rstrip! in process_line(). Fixed 1.8.7 compat
banister authored
38 binding.pry
228b95f @banister added new 'alias_command' and 'desc' commands to CommandBase; also ma…
banister authored
39 end
40
8682e26 @banister Version 0.4.2
banister authored
41 desc "show pry version"
42 task :version do
43 puts "Pry version: #{Pry::VERSION}"
44 end
45
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
46 namespace :ruby do
47 spec = Gem::Specification.new do |s|
7ed6c17 @banister version 0.6.6, building separate jruby gem since it breaks with the r…
banister authored
48 apply_spec_defaults(s)
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
49 s.platform = Gem::Platform::RUBY
50 end
169090c dont alter LOAD_PATH and require files relative to lib/
Lee Jarvis authored
51
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
52 Rake::GemPackageTask.new(spec) do |pkg|
53 pkg.need_zip = false
54 pkg.need_tar = false
55 end
56 end
57
f1c5fa4 @banister version 0.6.7pre3, getting syntax higlighting working and adding new …
banister authored
58 [:mingw32, :mswin32].each do |v|
59 namespace v do
60 spec = Gem::Specification.new do |s|
169090c dont alter LOAD_PATH and require files relative to lib/
Lee Jarvis authored
61 apply_spec_defaults(s)
f1c5fa4 @banister version 0.6.7pre3, getting syntax higlighting working and adding new …
banister authored
62 s.add_dependency("win32console", ">=1.3.0")
63 s.platform = "i386-#{v}"
64 end
65
66 Rake::GemPackageTask.new(spec) do |pkg|
67 pkg.need_zip = false
68 pkg.need_tar = false
69 end
70 end
71 end
72
7ed6c17 @banister version 0.6.6, building separate jruby gem since it breaks with the r…
banister authored
73 namespace :jruby do
74 spec = Gem::Specification.new do |s|
75 apply_spec_defaults(s)
76 s.platform = "java"
77 end
169090c dont alter LOAD_PATH and require files relative to lib/
Lee Jarvis authored
78
7ed6c17 @banister version 0.6.6, building separate jruby gem since it breaks with the r…
banister authored
79 Rake::GemPackageTask.new(spec) do |pkg|
80 pkg.need_zip = false
81 pkg.need_tar = false
82 end
83 end
84
85
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
86 desc "build all platform gems at once"
cc15c76 @banister Added clean task as prerequisite to gems task
banister authored
87 task :gems => [:clean, :rmgems, "ruby:gem", "jruby:gem", "mswin32:gem", "mingw32:gem"]
2dc06b2 @banister adding READMEs and CHANGELOG etc
banister authored
88
89 desc "remove all platform gems"
90 task :rmgems => ["ruby:clobber_package"]
91
92 desc "build and push latest gems"
93 task :pushgems => :gems do
94 chdir("#{direc}/pkg") do
95 Dir["*.gem"].each do |gemfile|
96 sh "gem push #{gemfile}"
97 end
98 end
99 end
Something went wrong with that request. Please try again.