Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use .gemspec files

  • Loading branch information...
commit c806e5bed3fa7f58386daf534415a0fbff39fd53 1 parent 1eec821
@jfirebaugh jfirebaugh authored
Showing with 87 additions and 111 deletions.
  1. +9 −111 Rakefile
  2. +42 −0 ruby-debug-base.gemspec
  3. +36 −0 ruby-debug.gemspec
View
120 Rakefile
@@ -7,59 +7,22 @@ require 'rake/testtask'
require 'rake/extensiontask'
require 'rake/javaextensiontask'
-$:.push File.expand_path("../lib", __FILE__)
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "ruby-debug-base/version"
ROOT_DIR = File.dirname(__FILE__)
-# ------- Default Package ----------
-COMMON_FILES = FileList[
- 'AUTHORS',
- 'CHANGES',
- 'LICENSE',
- 'README',
- 'Rakefile',
-]
-
-CLI_TEST_FILE_LIST = FileList['test/cli/commands/unit/*.rb',
- 'test/cli/commands/*_test.rb',
- 'test/cli/**/*_test.rb',
- 'test/test-*.rb']
-CLI_FILES = COMMON_FILES + FileList[
- "cli/**/*",
- 'ChangeLog',
- 'bin/*',
- 'doc/rdebug.1',
- 'test/rdebug-save.1',
- 'test/**/data/*.cmd',
- 'test/**/data/*.right',
- 'test/**/example/*.rb',
- 'test/config.yaml',
- 'test/**/*.rb',
- 'rdbg.rb',
- CLI_TEST_FILE_LIST
-]
-
-BASE_TEST_FILE_LIST = FileList['test/base/*.rb']
-
-BASE_FILES = COMMON_FILES + FileList[
- 'ext/breakpoint.c',
- 'ext/extconf.rb',
- 'ext/ruby_debug.c',
- 'ext/ruby_debug.h',
- 'ext/win32/*',
- 'lib/ruby-debug-base.rb',
- 'lib/ruby-debug-base/version.rb',
- BASE_TEST_FILE_LIST,
-]
-
ext = File.join(ROOT_DIR, 'ext')
desc "Test everything."
Rake::TestTask.new(:test) do |t|
t.libs += %W(#{ROOT_DIR}/lib #{ROOT_DIR}/cli)
t.libs << ext if File.exist?(ext)
- t.test_files = CLI_TEST_FILE_LIST
+ t.test_files = FileList['test/cli/commands/unit/*.rb',
+ 'test/cli/commands/*_test.rb',
+ 'test/cli/**/*_test.rb',
+ 'test/test-*.rb']
t.options = '--verbose' if $VERBOSE
t.ruby_opts << "--debug" if defined?(JRUBY_VERSION)
end
@@ -69,7 +32,7 @@ task :test => :test_base if File.exist?(ext)
desc "Test ruby-debug-base."
Rake::TestTask.new(:test_base) do |t|
t.libs += ['./ext', './lib']
- t.test_files = FileList[BASE_TEST_FILE_LIST]
+ t.test_files = FileList['test/base/*.rb']
t.options = '--verbose' if $VERBOSE
t.ruby_opts << "--debug" if defined?(JRUBY_VERSION)
end
@@ -90,73 +53,8 @@ task :ChangeLog do
system('git log --pretty --numstat --summary lib | git2cl > lib/ChangeLog')
end
-# Base GEM Specification
-base_spec = Gem::Specification.new do |spec|
- spec.name = "ruby-debug-base"
-
- spec.homepage = "http://rubyforge.org/projects/ruby-debug/"
- spec.summary = "Fast Ruby debugger - core component"
- spec.description = <<-EOF
-ruby-debug is a fast implementation of the standard Ruby debugger debug.rb.
-It is implemented by utilizing a new Ruby C API hook. The core component
-provides support that front-ends can build on. It provides breakpoint
-handling, bindings for stack frames among other things.
-EOF
-
- spec.version = Debugger::VERSION
-
- spec.author = "Kent Sibilev"
- spec.email = "ksibilev@yahoo.com"
- spec.platform = Gem::Platform::RUBY
- spec.require_path = "lib"
- spec.extensions = ["ext/extconf.rb"]
- spec.files = BASE_FILES.to_a
-
- spec.required_ruby_version = '>= 1.8.2'
- spec.date = Time.now
- spec.rubyforge_project = 'ruby-debug'
- spec.add_dependency('linecache', '>= 0.3')
- spec.add_development_dependency('rake-compiler')
-
- spec.test_files = FileList[BASE_TEST_FILE_LIST]
-
- # rdoc
- spec.has_rdoc = true
- spec.extra_rdoc_files = ['README', 'ext/ruby_debug.c']
-end
-
-cli_spec = Gem::Specification.new do |spec|
- spec.name = "ruby-debug"
-
- spec.homepage = "http://rubyforge.org/projects/ruby-debug/"
- spec.summary = "Command line interface (CLI) for ruby-debug-base"
- spec.description = <<-EOF
-A generic command line interface for ruby-debug.
-EOF
-
- spec.version = Debugger::VERSION
-
- spec.author = "Kent Sibilev"
- spec.email = "ksibilev@yahoo.com"
- spec.platform = Gem::Platform::RUBY
- spec.require_path = "cli"
- spec.bindir = "bin"
- spec.executables = ["rdebug"]
- spec.files = CLI_FILES.to_a
-
- spec.required_ruby_version = '>= 1.8.2'
- spec.date = Time.now
- spec.rubyforge_project = 'ruby-debug'
- spec.add_dependency('columnize', '>= 0.1')
- spec.add_dependency('ruby-debug-base', "~> #{Debugger::VERSION}.0")
-
- # FIXME: work out operational logistics for this
- # spec.test_files = FileList[CLI_TEST_FILE_LIST]
-
- # rdoc
- spec.has_rdoc = true
- spec.extra_rdoc_files = ['README']
-end
+base_spec = Gem::Specification.load("ruby-debug-base.gemspec")
+cli_spec = Gem::Specification.load("ruby-debug.gemspec")
Gem::PackageTask.new(base_spec) {}
Gem::PackageTask.new(cli_spec) {}
View
42 ruby-debug-base.gemspec
@@ -0,0 +1,42 @@
+# -*- encoding: utf-8 -*-
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+require 'ruby-debug-base/version'
+
+Gem::Specification.new do |spec|
+ spec.name = "ruby-debug-base"
+ spec.version = Debugger::VERSION
+
+ spec.author = "Kent Sibilev"
+ spec.email = "ksibilev@yahoo.com"
+ spec.homepage = "https://github.com/ruby-debug/"
+ spec.summary = "Fast Ruby debugger - core component"
+ spec.description = <<-EOF
+ruby-debug is a fast implementation of the standard Ruby debugger debug.rb.
+It is implemented by utilizing a new Ruby C API hook. The core component
+provides support that front-ends can build on. It provides breakpoint
+handling, bindings for stack frames among other things.
+EOF
+
+ spec.extensions = ["ext/extconf.rb"]
+ spec.files = [
+ 'AUTHORS',
+ 'CHANGES',
+ 'LICENSE',
+ 'README',
+ 'Rakefile',
+ 'ext/breakpoint.c',
+ 'ext/extconf.rb',
+ 'ext/ruby_debug.c',
+ 'ext/ruby_debug.h',
+ 'lib/ruby-debug-base.rb',
+ 'lib/ruby-debug-base/version.rb']
+
+ spec.add_dependency 'linecache', '~> 0.46'
+
+ spec.add_development_dependency 'rake'
+ spec.add_development_dependency 'rdoc'
+ spec.add_development_dependency 'rake-compiler', '~> 0.8.1'
+
+ spec.extra_rdoc_files = ['README', 'ext/ruby_debug.c']
+end
View
36 ruby-debug.gemspec
@@ -0,0 +1,36 @@
+# -*- encoding: utf-8 -*-
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+require 'ruby-debug-base/version'
+
+Gem::Specification.new do |spec|
+ spec.name = "ruby-debug"
+ spec.version = Debugger::VERSION
+
+ spec.author = "Kent Sibilev"
+ spec.email = "ksibilev@yahoo.com"
+ spec.homepage = "https://github.com/ruby-debug/"
+ spec.summary = "Command line interface (CLI) for ruby-debug-base"
+ spec.description = <<-EOF
+A generic command line interface for ruby-debug.
+EOF
+
+ spec.require_path = "cli"
+ spec.executables = ["rdebug"]
+ spec.files = Dir[
+ 'AUTHORS',
+ 'CHANGES',
+ 'LICENSE',
+ 'README',
+ 'Rakefile',
+ 'cli/**/*',
+ 'ChangeLog',
+ 'bin/*',
+ 'doc/rdebug.1',
+ 'rdbg.rb']
+
+ spec.add_dependency 'columnize', '>= 0.1'
+ spec.add_dependency 'ruby-debug-base', "~> #{Debugger::VERSION}.0"
+
+ spec.extra_rdoc_files = ['README']
+end
Please sign in to comment.
Something went wrong with that request. Please try again.