ensure gem environment matches gemspec before some rake tasks
This commit is contained in:
parent
cb65c26b9e
commit
36d685f71f
35
Rakefile
35
Rakefile
|
@ -27,31 +27,44 @@ def apply_spec_defaults(s)
|
|||
s.add_development_dependency('rake', '~> 0.9')
|
||||
end
|
||||
|
||||
def check_dependencies
|
||||
require 'bundler'
|
||||
|
||||
ENV["BUNDLE_GEMFILE"] = File.expand_path("../Gemfile", __FILE__)
|
||||
Bundler.definition.missing_specs
|
||||
rescue LoadError
|
||||
# if Bundler isn't installed, we'll just assume your setup is ok.
|
||||
rescue Bundler::GemNotFound
|
||||
raise RuntimeError, "You're missing one or more required gems. Run `bundle install` first."
|
||||
end
|
||||
|
||||
desc "Set up and run tests"
|
||||
task :default => [:test]
|
||||
|
||||
desc "Run tests"
|
||||
task :test do
|
||||
check_dependencies unless ENV['SKIP_DEP_CHECK']
|
||||
sh "bacon -Itest -rubygems -a -q"
|
||||
end
|
||||
|
||||
desc "profile pry's startup time"
|
||||
desc "Run pry"
|
||||
task :pry do
|
||||
check_dependencies unless ENV['SKIP_DEP_CHECK']
|
||||
load 'bin/pry'
|
||||
end
|
||||
|
||||
desc "Show pry version"
|
||||
task :version do
|
||||
puts "Pry version: #{Pry::VERSION}"
|
||||
end
|
||||
|
||||
desc "Profile pry's startup time"
|
||||
task :profile do
|
||||
require 'profile'
|
||||
require 'pry'
|
||||
Pry.start(TOPLEVEL_BINDING, :input => StringIO.new('exit'))
|
||||
end
|
||||
|
||||
desc "run pry"
|
||||
task :pry do
|
||||
load 'bin/pry'
|
||||
end
|
||||
|
||||
desc "show pry version"
|
||||
task :version do
|
||||
puts "Pry version: #{Pry::VERSION}"
|
||||
end
|
||||
|
||||
namespace :ruby do
|
||||
spec = Gem::Specification.new do |s|
|
||||
apply_spec_defaults(s)
|
||||
|
|
45
pry.gemspec
45
pry.gemspec
|
@ -2,48 +2,45 @@
|
|||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "pry"
|
||||
s.version = "0.9.7.4"
|
||||
s.version = "0.9.8.0pre1"
|
||||
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["John Mair (banisterfiend)"]
|
||||
s.date = "2011-11-05"
|
||||
s.date = "2011-12-17"
|
||||
s.description = "An IRB alternative and runtime developer console"
|
||||
s.email = "jrmair@gmail.com"
|
||||
s.executables = ["pry"]
|
||||
s.files = [".document", ".gemtest", ".gitignore", ".travis.yml", ".yardopts", "CHANGELOG", "CONTRIBUTORS", "Gemfile", "LICENSE", "README.markdown", "Rakefile", "TODO", "bin/pry", "examples/example_basic.rb", "examples/example_command_override.rb", "examples/example_commands.rb", "examples/example_hooks.rb", "examples/example_image_edit.rb", "examples/example_input.rb", "examples/example_input2.rb", "examples/example_output.rb", "examples/example_print.rb", "examples/example_prompt.rb", "examples/helper.rb", "lib/pry.rb", "lib/pry/command_context.rb", "lib/pry/command_processor.rb", "lib/pry/command_set.rb", "lib/pry/commands.rb", "lib/pry/completion.rb", "lib/pry/config.rb", "lib/pry/core_extensions.rb", "lib/pry/custom_completions.rb", "lib/pry/default_commands/basic.rb", "lib/pry/default_commands/context.rb", "lib/pry/default_commands/documentation.rb", "lib/pry/default_commands/easter_eggs.rb", "lib/pry/default_commands/gems.rb", "lib/pry/default_commands/input.rb", "lib/pry/default_commands/introspection.rb", "lib/pry/default_commands/ls.rb", "lib/pry/default_commands/shell.rb", "lib/pry/extended_commands/experimental.rb", "lib/pry/extended_commands/user_command_api.rb", "lib/pry/helpers.rb", "lib/pry/helpers/base_helpers.rb", "lib/pry/helpers/command_helpers.rb", "lib/pry/helpers/options_helpers.rb", "lib/pry/helpers/text.rb", "lib/pry/history.rb", "lib/pry/history_array.rb", "lib/pry/indent.rb", "lib/pry/method.rb", "lib/pry/plugins.rb", "lib/pry/pry_class.rb", "lib/pry/pry_instance.rb", "lib/pry/rbx_method.rb", "lib/pry/rbx_path.rb", "lib/pry/version.rb", "pry.gemspec", "test/helper.rb", "test/test_command_helpers.rb", "test/test_command_processor.rb", "test/test_command_set.rb", "test/test_completion.rb", "test/test_default_commands.rb", "test/test_default_commands/test_context.rb", "test/test_default_commands/test_documentation.rb", "test/test_default_commands/test_gems.rb", "test/test_default_commands/test_input.rb", "test/test_default_commands/test_introspection.rb", "test/test_default_commands/test_ls.rb", "test/test_default_commands/test_shell.rb", "test/test_exception_whitelist.rb", "test/test_history_array.rb", "test/test_indent.rb", "test/test_input_stack.rb", "test/test_method.rb", "test/test_pry.rb", "test/test_pry_history.rb", "test/test_pry_output.rb", "test/test_special_locals.rb", "test/testrc", "test/testrcbad", "wiki/Customizing-pry.md", "wiki/Home.md"]
|
||||
s.files = [".document", ".gemtest", ".gitignore", ".travis.yml", ".yardopts", "CHANGELOG", "CONTRIBUTORS", "Gemfile", "LICENSE", "README.markdown", "Rakefile", "TODO", "bin/pry", "examples/example_basic.rb", "examples/example_command_override.rb", "examples/example_commands.rb", "examples/example_hooks.rb", "examples/example_image_edit.rb", "examples/example_input.rb", "examples/example_input2.rb", "examples/example_output.rb", "examples/example_print.rb", "examples/example_prompt.rb", "examples/helper.rb", "lib/pry.rb", "lib/pry/cli.rb", "lib/pry/command_context.rb", "lib/pry/command_processor.rb", "lib/pry/command_set.rb", "lib/pry/commands.rb", "lib/pry/completion.rb", "lib/pry/config.rb", "lib/pry/core_extensions.rb", "lib/pry/custom_completions.rb", "lib/pry/default_commands/basic.rb", "lib/pry/default_commands/context.rb", "lib/pry/default_commands/documentation.rb", "lib/pry/default_commands/easter_eggs.rb", "lib/pry/default_commands/gems.rb", "lib/pry/default_commands/input.rb", "lib/pry/default_commands/introspection.rb", "lib/pry/default_commands/ls.rb", "lib/pry/default_commands/shell.rb", "lib/pry/extended_commands/experimental.rb", "lib/pry/extended_commands/user_command_api.rb", "lib/pry/helpers.rb", "lib/pry/helpers/base_helpers.rb", "lib/pry/helpers/command_helpers.rb", "lib/pry/helpers/options_helpers.rb", "lib/pry/helpers/text.rb", "lib/pry/history.rb", "lib/pry/history_array.rb", "lib/pry/hooks.rb", "lib/pry/indent.rb", "lib/pry/method.rb", "lib/pry/plugins.rb", "lib/pry/pry_class.rb", "lib/pry/pry_instance.rb", "lib/pry/rbx_method.rb", "lib/pry/rbx_path.rb", "lib/pry/version.rb", "lib/pry/wrapped_module.rb", "man/pry.1", "man/pry.1.html", "man/pry.1.ronn", "pry.gemspec", "test/helper.rb", "test/test_cli.rb", "test/test_command_helpers.rb", "test/test_command_processor.rb", "test/test_command_set.rb", "test/test_completion.rb", "test/test_default_commands.rb", "test/test_default_commands/test_context.rb", "test/test_default_commands/test_documentation.rb", "test/test_default_commands/test_gems.rb", "test/test_default_commands/test_input.rb", "test/test_default_commands/test_introspection.rb", "test/test_default_commands/test_ls.rb", "test/test_default_commands/test_shell.rb", "test/test_exception_whitelist.rb", "test/test_history_array.rb", "test/test_hooks.rb", "test/test_indent.rb", "test/test_input_stack.rb", "test/test_method.rb", "test/test_pry.rb", "test/test_pry_history.rb", "test/test_pry_output.rb", "test/test_special_locals.rb", "test/test_syntax_checking.rb", "test/test_wrapped_module.rb", "test/testrc", "test/testrcbad", "wiki/Customizing-pry.md", "wiki/Home.md"]
|
||||
s.homepage = "http://pry.github.com"
|
||||
s.require_paths = ["lib"]
|
||||
s.rubygems_version = "1.8.11"
|
||||
s.rubygems_version = "1.8.10"
|
||||
s.summary = "An IRB alternative and runtime developer console"
|
||||
s.test_files = ["test/helper.rb", "test/test_command_helpers.rb", "test/test_command_processor.rb", "test/test_command_set.rb", "test/test_completion.rb", "test/test_default_commands.rb", "test/test_default_commands/test_context.rb", "test/test_default_commands/test_documentation.rb", "test/test_default_commands/test_gems.rb", "test/test_default_commands/test_input.rb", "test/test_default_commands/test_introspection.rb", "test/test_default_commands/test_ls.rb", "test/test_default_commands/test_shell.rb", "test/test_exception_whitelist.rb", "test/test_history_array.rb", "test/test_indent.rb", "test/test_input_stack.rb", "test/test_method.rb", "test/test_pry.rb", "test/test_pry_history.rb", "test/test_pry_output.rb", "test/test_special_locals.rb", "test/testrc", "test/testrcbad"]
|
||||
s.test_files = ["test/helper.rb", "test/test_cli.rb", "test/test_command_helpers.rb", "test/test_command_processor.rb", "test/test_command_set.rb", "test/test_completion.rb", "test/test_default_commands.rb", "test/test_default_commands/test_context.rb", "test/test_default_commands/test_documentation.rb", "test/test_default_commands/test_gems.rb", "test/test_default_commands/test_input.rb", "test/test_default_commands/test_introspection.rb", "test/test_default_commands/test_ls.rb", "test/test_default_commands/test_shell.rb", "test/test_exception_whitelist.rb", "test/test_history_array.rb", "test/test_hooks.rb", "test/test_indent.rb", "test/test_input_stack.rb", "test/test_method.rb", "test/test_pry.rb", "test/test_pry_history.rb", "test/test_pry_output.rb", "test/test_special_locals.rb", "test/test_syntax_checking.rb", "test/test_wrapped_module.rb", "test/testrc", "test/testrcbad"]
|
||||
|
||||
if s.respond_to? :specification_version then
|
||||
s.specification_version = 3
|
||||
|
||||
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
||||
s.add_runtime_dependency(%q<ruby_parser>, [">= 2.3.1"])
|
||||
s.add_runtime_dependency(%q<coderay>, ["~> 0.9.8"])
|
||||
s.add_runtime_dependency(%q<slop>, ["~> 2.2.0"])
|
||||
s.add_runtime_dependency(%q<method_source>, ["~> 0.6.7"])
|
||||
s.add_development_dependency(%q<bacon>, ["~> 1.1.0"])
|
||||
s.add_development_dependency(%q<open4>, ["~> 1.0.1"])
|
||||
s.add_runtime_dependency(%q<coderay>, ["~> 0.9"])
|
||||
s.add_runtime_dependency(%q<slop>, ["< 3", ">= 2.4.1"])
|
||||
s.add_runtime_dependency(%q<method_source>, ["~> 0.6"])
|
||||
s.add_development_dependency(%q<bacon>, ["~> 1.1"])
|
||||
s.add_development_dependency(%q<open4>, ["~> 1.3"])
|
||||
s.add_development_dependency(%q<rake>, ["~> 0.9"])
|
||||
else
|
||||
s.add_dependency(%q<ruby_parser>, [">= 2.3.1"])
|
||||
s.add_dependency(%q<coderay>, ["~> 0.9.8"])
|
||||
s.add_dependency(%q<slop>, ["~> 2.2.0"])
|
||||
s.add_dependency(%q<method_source>, ["~> 0.6.7"])
|
||||
s.add_dependency(%q<bacon>, ["~> 1.1.0"])
|
||||
s.add_dependency(%q<open4>, ["~> 1.0.1"])
|
||||
s.add_dependency(%q<coderay>, ["~> 0.9"])
|
||||
s.add_dependency(%q<slop>, ["< 3", ">= 2.4.1"])
|
||||
s.add_dependency(%q<method_source>, ["~> 0.6"])
|
||||
s.add_dependency(%q<bacon>, ["~> 1.1"])
|
||||
s.add_dependency(%q<open4>, ["~> 1.3"])
|
||||
s.add_dependency(%q<rake>, ["~> 0.9"])
|
||||
end
|
||||
else
|
||||
s.add_dependency(%q<ruby_parser>, [">= 2.3.1"])
|
||||
s.add_dependency(%q<coderay>, ["~> 0.9.8"])
|
||||
s.add_dependency(%q<slop>, ["~> 2.2.0"])
|
||||
s.add_dependency(%q<method_source>, ["~> 0.6.7"])
|
||||
s.add_dependency(%q<bacon>, ["~> 1.1.0"])
|
||||
s.add_dependency(%q<open4>, ["~> 1.0.1"])
|
||||
s.add_dependency(%q<coderay>, ["~> 0.9"])
|
||||
s.add_dependency(%q<slop>, ["< 3", ">= 2.4.1"])
|
||||
s.add_dependency(%q<method_source>, ["~> 0.6"])
|
||||
s.add_dependency(%q<bacon>, ["~> 1.1"])
|
||||
s.add_dependency(%q<open4>, ["~> 1.3"])
|
||||
s.add_dependency(%q<rake>, ["~> 0.9"])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue