Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
265 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# -*- Ruby -*- | ||
# -*- encoding: utf-8 -*- | ||
require 'rake' | ||
require 'rubygems' unless | ||
Object.const_defined?(:Gem) | ||
require File.dirname(__FILE__) + "/lib/set_trace" | ||
|
||
FILES = FileList[ | ||
'README', | ||
'ChangeLog', | ||
'LICENSE', | ||
'NEWS', | ||
'Rakefile', | ||
'THANKS', | ||
'app/*', | ||
'interface/*', | ||
'io/*', | ||
'lib/*', | ||
'processor/**/*.rb', | ||
'test/data/**/*.cmd', | ||
'test/data/**/*.right', | ||
'test/**/*.rb', | ||
] | ||
|
||
Gem::Specification.new do |spec| | ||
spec.add_dependency('diff-lcs') # For testing only | ||
spec.add_dependency('rbx-require-relative') | ||
spec.authors = ['R. Bernstein'] | ||
spec.date = Time.now | ||
spec.description = <<-EOF | ||
Emulates Ruby set_trace_func in Rubinus and contains related step-tracing | ||
features. | ||
EOF | ||
## spec.add_dependency('diff-lcs') # For testing only | ||
spec.author = 'R. Bernstein' | ||
spec.email = 'rockyb@rubyforge.net' | ||
spec.files = FILES.to_a | ||
spec.has_rdoc = true | ||
spec.homepage = 'http://wiki.github.com/rocky/rbx-tracer' | ||
spec.name = 'rbx-tracer' | ||
spec.license = 'MIT' | ||
spec.platform = Gem::Platform::new ['universal', 'rubinius'] | ||
spec.require_path = 'lib' | ||
spec.required_ruby_version = '~> 1.8.7' | ||
spec.summary = 'set_trace_func Rubinius 1.2 and above' | ||
spec.version = Rubinius::SetTrace::VERSION | ||
|
||
# Make the readme file the start page for the generated html | ||
## spec.rdoc_options += %w(--main README) | ||
spec.rdoc_options += ['--title', "Rubinius::SetTrace #{Rubinius::SetTrace::VERSION} Documentation"] | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
2010-12-23 rocky <rockyb@rubyforge.org> | ||
|
||
* breakpoint.rb, frame.rb, set_trace.rb: runtime_context -> | ||
vm_location | ||
|
||
2010-12-22 rocky <rockyb@rubyforge.org> | ||
|
||
* breakpoint.rb, commands.rb, frame.rb, set_trace.rb: Remove more | ||
(but not all) of the "command"-ness for step/continue that is not | ||
needed in set_trace_func. location -> runtime_context. | ||
|
||
2010-12-21 rocky <rockyb@rubyforge.org> | ||
|
||
* commands.rb, set_trace.rb: Handle set_trace_func nil. | ||
|
||
2010-12-21 rocky <rockyb@rubyforge.org> | ||
|
||
* breakpoint.rb, commands.rb, frame.rb, set_trace.rb: Set call and | ||
return events | ||
|
||
2010-12-21 rocky <rockyb@rubyforge.org> | ||
|
||
* set_trace.rb: Closer to having all of the set_trace_func | ||
parameters filled in. | ||
|
||
2010-12-21 rocky <rockyb@rubyforge.org> | ||
|
||
* README: See above | ||
|
||
2010-12-21 rocky <rockyb@rubyforge.org> | ||
|
||
* README: What we're about. github suggests this. | ||
|
||
2010-12-20 rvm <rocky-rvm@static-71-183-236-17.nycmny.fios.verizon.net> | ||
|
||
* First Hope (of sometine useful). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Copyright (c) 2007, Evan Phoenix | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright notice | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
* Neither the name of the Evan Phoenix nor the names of its contributors | ||
may be used to endorse or promote products derived from this software | ||
without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
#!/usr/bin/env rake | ||
# Are we Rubinius? We'll test by checking the specific function we need. | ||
raise RuntimeError, 'This package is for Rubinius 1.2 or 1.2.1dev only!' unless | ||
Object.constants.include?('Rubinius') && | ||
Rubinius.constants.include?('VM') && | ||
%w(1.2 1.2.1dev).member?(Rubinius::VERSION) | ||
|
||
require 'rubygems' | ||
require 'rake/gempackagetask' | ||
require 'rake/rdoctask' | ||
require 'rake/testtask' | ||
|
||
ROOT_DIR = File.dirname(__FILE__) | ||
|
||
def gemspec | ||
@gemspec ||= eval(File.read('.gemspec'), binding, '.gemspec') | ||
end | ||
|
||
desc "Build the gem" | ||
task :package=>:gem | ||
task :gem=>:gemspec do | ||
Dir.chdir(ROOT_DIR) do | ||
sh "gem build .gemspec" | ||
FileUtils.mkdir_p 'pkg' | ||
FileUtils.mv("#{gemspec.name}-#{gemspec.version}-universal-rubinius.gem", | ||
'pkg') | ||
end | ||
end | ||
|
||
desc "Install the gem locally" | ||
task :install => :gem do | ||
Dir.chdir(ROOT_DIR) do | ||
sh %{gem install --local pkg/#{gemspec.name}-#{gemspec.version}} | ||
end | ||
end | ||
|
||
require 'rbconfig' | ||
RUBY_PATH = File.join(RbConfig::CONFIG['bindir'], | ||
RbConfig::CONFIG['RUBY_INSTALL_NAME']) | ||
|
||
def run_standalone_ruby_files(list) | ||
puts '*' * 40 | ||
list.each do |ruby_file| | ||
system(RUBY_PATH, ruby_file) | ||
end | ||
end | ||
|
||
def run_standalone_ruby_file(directory) | ||
puts ('*' * 10) + ' ' + directory + ' ' + ('*' * 10) | ||
Dir.chdir(directory) do | ||
Dir.glob('*.rb').each do |ruby_file| | ||
puts(('-' * 20) + ' ' + ruby_file + ' ' + ('-' * 20)) | ||
system(RUBY_PATH, ruby_file) | ||
end | ||
end | ||
end | ||
|
||
desc 'Create a GNU-style ChangeLog via git2cl' | ||
task :ChangeLog do | ||
system('git log --pretty --numstat --summary | git2cl > ChangeLog') | ||
end | ||
|
||
desc 'the tests' | ||
Rake::TestTask.new(:'test') do |t| | ||
t.test_files = FileList['test**/test-*.rb'] | ||
# t.pattern = 'test/**/*test-*.rb' # instead of above | ||
t.verbose = true | ||
end | ||
|
||
desc 'Test everything - unit tests for now.' | ||
task :default => :test | ||
|
||
desc "Run each Ruby app file in standalone mode." | ||
task :'check:app' do | ||
run_standalone_ruby_file(File.join(%W(#{ROOT_DIR} app))) | ||
end | ||
|
||
desc "Generate the gemspec" | ||
task :generate do | ||
puts gemspec.to_ruby | ||
end | ||
|
||
desc "Validate the gemspec" | ||
task :gemspec do | ||
gemspec.validate | ||
end | ||
|
||
# --------- RDoc Documentation ------ | ||
desc "Generate rdoc documentation" | ||
Rake::RDocTask.new("rdoc") do |rdoc| | ||
rdoc.rdoc_dir = 'doc' | ||
# rdoc.title = "rbx-trepaning #{Rubinius::SetTrace::VERSION} Documentation" | ||
|
||
rdoc.rdoc_files.include(%w(lib/set_trace.rb app/*.rb)) | ||
end | ||
|
||
desc "Same as rdoc" | ||
task :doc => :rdoc | ||
|
||
task :clobber_package do | ||
FileUtils.rm_rf File.join(ROOT_DIR, 'pkg') | ||
end | ||
|
||
task :clobber_rdoc do | ||
FileUtils.rm_rf File.join(ROOT_DIR, 'doc') | ||
end | ||
|
||
desc "Remove built files" | ||
task :clean => [:clobber_package, :clobber_rdoc] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/*.rbc | ||
/*~ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/*.rbc | ||
/*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters