Hello community, here is the log from the commit of package rubygem-debug_inspector for openSUSE:Factory checked in at 2017-06-08 15:01:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-debug_inspector (Old) and /work/SRC/openSUSE:Factory/.rubygem-debug_inspector.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-debug_inspector" Thu Jun 8 15:01:49 2017 rev:2 rq:497719 version:0.0.3 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-debug_inspector/rubygem-debug_inspector.changes 2015-02-18 12:08:37.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-debug_inspector.new/rubygem-debug_inspector.changes 2017-06-08 15:01:50.720827143 +0200 @@ -1,0 +2,6 @@ +Tue May 23 09:48:35 UTC 2017 - co...@suse.com + +- updated to version 0.0.3 + no changelog found + +------------------------------------------------------------------- Old: ---- debug_inspector-0.0.2.gem New: ---- debug_inspector-0.0.3.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-debug_inspector.spec ++++++ --- /var/tmp/diff_new_pack.7U0Pm2/_old 2017-06-08 15:01:51.444724979 +0200 +++ /var/tmp/diff_new_pack.7U0Pm2/_new 2017-06-08 15:01:51.444724979 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-debug_inspector # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-debug_inspector -Version: 0.0.2 +Version: 0.0.3 Release: 0 %define mod_name debug_inspector %define mod_full_name %{mod_name}-%{version} ++++++ debug_inspector-0.0.2.gem -> debug_inspector-0.0.3.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/.travis.yml 2017-05-09 01:49:46.000000000 +0200 @@ -0,0 +1,15 @@ +language: ruby +sudo: false +before_install: + - gem install bundler +rvm: +- 2.0.0 +- 2.1.10 +- 2.2.7 +- 2.3.4 +- 2.4.1 +- ruby-head +matrix: + allow_failures: + - rvm: ruby-head + fast_finish: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile new/Gemfile --- old/Gemfile 1970-01-01 01:00:00.000000000 +0100 +++ new/Gemfile 2017-05-09 01:49:46.000000000 +0200 @@ -0,0 +1,5 @@ +source "https://rubygems.org" + +gemspec + +gem 'rake' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/README.md 2017-05-09 01:49:46.000000000 +0200 @@ -1,11 +1,15 @@ -debug_inspector +debug_inspector [![Build Status](https://travis-ci.org/banister/debug_inspector.svg?branch=master)](https://travis-ci.org/banister/debug_inspector) =============== -(C) John Mair (banisterfiend) 2012 - _A Ruby wrapper for the new MRI 2.0 debug\_inspector API_ -**This library only works on MRI 2.0. Requiring it on unsupported Rubies will result in a no-op** +The `debug_inspector` C extension and API were designed and built by [Koichi Sasada](https://github.com/ko1), this project +is just a gemification of his work. + +**NOTES:** + +* This library makes use of the new debug inspector API in MRI 2.0.0, **do not use this library outside of debugging situations**. +* Only works on MRI 2.0. Requiring it on unsupported Rubies will result in a no-op Usage ----- @@ -13,17 +17,24 @@ ```ruby require 'debug_inspector' -# binding of nth caller frame (returns a Binding object) -RubyVM::DebugInspector.open { |i| i.frame_binding(n) } - -# iseq of nth caller frame (returns a RubyVM::InstructionSequence object) -RubyVM::DebugInspector.open { |i| i.frame_iseq(n) } - -# class of nth caller frame -RubyVM::DebugInspector.open { |i| i.frame_class(n) } - -# backtrace locations (returns an array of Thread::Backtrace::Location objects) -RubyVM::DebugInspector.open { |i| i.backtrace_locations } +# Open debug context +# Passed `dc' is only active in a block +RubyVM::DebugInspector.open { |dc| + # backtrace locations (returns an array of Thread::Backtrace::Location objects) + locs = dc.backtrace_locations + + # you can get depth of stack frame with `locs.size' + locs.size.times do |i| + # binding of i-th caller frame (returns a Binding object or nil) + p dc.frame_binding(i) + + # iseq of i-th caller frame (returns a RubyVM::InstructionSequence object or nil) + p dc.frame_iseq(i) + + # class of i-th caller frame + p dc.frame_class(i) + end +} ``` Contact @@ -36,7 +47,7 @@ (The MIT License) -Copyright (c) 2012 (John Mair) +Copyright (c) 2012-2013 (John Mair) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 1970-01-01 01:00:00.000000000 +0100 +++ new/Rakefile 2017-05-09 01:49:46.000000000 +0200 @@ -1,6 +1,7 @@ $:.unshift 'lib' require 'rake/clean' require "debug_inspector/version" +require 'rake/testtask' dlext = RbConfig::CONFIG['DLEXT'] direc = File.expand_path(File.dirname(__FILE__)) @@ -8,18 +9,21 @@ CLEAN.include("ext/**/*.#{dlext}", "ext/**/*.log", "ext/**/*.o", "ext/**/*~", "ext/**/*#*", "ext/**/*.obj", "**/*#*", "**/*#*.*", "ext/**/*.def", "ext/**/*.pdb", "**/*_flymake*.*", "**/*_flymake", "**/*.rbc") + +Rake::TestTask.new(:test) do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true + t.verbose = true +end + desc "Show version" task :version do puts "debug_inspector version: #{DebugInspector::VERSION}" end desc "run tests" -task :default => [:test] - -desc "Run tests" -task :test do - sh "bacon -Itest -rubygems -a -q" -end +task :default => [:compile, :test] task :pry do puts "loading debug_inspector into pry" Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debug_inspector.gemspec new/debug_inspector.gemspec --- old/debug_inspector.gemspec 1970-01-01 01:00:00.000000000 +0100 +++ new/debug_inspector.gemspec 2017-05-09 01:49:46.000000000 +0200 @@ -12,4 +12,6 @@ s.files = `git ls-files`.split("\n") s.platform = Gem::Platform::RUBY s.extensions = ["ext/debug_inspector/extconf.rb"] + s.license = 'MIT' + s.add_development_dependency 'minitest', '>= 5' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/debug_inspector/debug_inspector.c new/ext/debug_inspector/debug_inspector.c --- old/ext/debug_inspector/debug_inspector.c 1970-01-01 01:00:00.000000000 +0100 +++ new/ext/debug_inspector/debug_inspector.c 2017-05-09 01:49:46.000000000 +0200 @@ -10,15 +10,7 @@ **********************************************************************/ #include "ruby/ruby.h" - -typedef struct rb_debug_inspector_struct rb_debug_inspector_t; -typedef VALUE (*rb_debug_inspector_func_t)(const rb_debug_inspector_t *, void *); - -VALUE rb_debug_inspector_open(rb_debug_inspector_func_t func, void *data); -VALUE rb_debug_inspector_frame_binding_get(const rb_debug_inspector_t *dc, int index); -VALUE rb_debug_inspector_frame_class_get(const rb_debug_inspector_t *dc, int index); -VALUE rb_debug_inspector_frame_iseq_get(const rb_debug_inspector_t *dc, int index); -VALUE rb_debug_inspector_backtrace_locations(const rb_debug_inspector_t *dc); +#include "ruby/debug.h" static size_t di_size(const void *dummy) @@ -37,7 +29,7 @@ const rb_debug_inspector_t *dc; TypedData_Get_Struct(self, const rb_debug_inspector_t, &di_data_type, dc); if (dc == 0) { - rb_raise(rb_eArgError, "invalid inspector context"); + rb_raise(rb_eArgError, "invalid debug context"); } return dc; } @@ -71,6 +63,13 @@ } static VALUE +di_frame_self(VALUE self, VALUE index) +{ + const rb_debug_inspector_t *dc = di_get_dc(self); + return rb_debug_inspector_frame_self_get(dc, NUM2INT(index)); +} + +static VALUE breakpoint_i(const rb_debug_inspector_t *dc, void *ptr) { VALUE self = (VALUE)ptr; @@ -114,4 +113,5 @@ rb_define_method(cDebugInspector, "frame_binding", di_binding, 1); rb_define_method(cDebugInspector, "frame_class", di_frame_class, 1); rb_define_method(cDebugInspector, "frame_iseq", di_frame_iseq, 1); + rb_define_method(cDebugInspector, "frame_self", di_frame_self, 1); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/debug_inspector/version.rb new/lib/debug_inspector/version.rb --- old/lib/debug_inspector/version.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/debug_inspector/version.rb 2017-05-09 01:49:46.000000000 +0200 @@ -1,3 +1,3 @@ module DebugInspector - VERSION = "0.0.2" + VERSION = "0.0.3" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 1970-01-01 01:00:00.000000000 +0100 +++ new/metadata 2017-05-09 01:49:46.000000000 +0200 @@ -1,16 +1,29 @@ --- !ruby/object:Gem::Specification name: debug_inspector version: !ruby/object:Gem::Version - version: 0.0.2 - prerelease: + version: 0.0.3 platform: ruby authors: - John Mair (banisterfiend) autorequire: bindir: bin cert_chain: [] -date: 2013-02-13 00:00:00.000000000 Z -dependencies: [] +date: 2017-05-08 00:00:00.000000000 Z +dependencies: +- !ruby/object:Gem::Dependency + name: minitest + requirement: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '5' + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '5' description: A Ruby wrapper for the MRI 2.0 debug_inspector API email: - jrm...@gmail.com @@ -19,6 +32,8 @@ - ext/debug_inspector/extconf.rb extra_rdoc_files: [] files: +- ".travis.yml" +- Gemfile - README.md - Rakefile - debug_inspector.gemspec @@ -26,28 +41,30 @@ - ext/debug_inspector/extconf.rb - lib/debug_inspector.rb - lib/debug_inspector/version.rb +- test/basic_test.rb +- test/test_helper.rb homepage: https://github.com/banister/debug_inspector -licenses: [] +licenses: +- MIT +metadata: {} post_install_message: rdoc_options: [] require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement - none: false requirements: - - - ! '>=' + - - ">=" - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement - none: false requirements: - - - ! '>=' + - - ">=" - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: -rubygems_version: 1.8.23 +rubygems_version: 2.5.1 signing_key: -specification_version: 3 +specification_version: 4 summary: A Ruby wrapper for the MRI 2.0 debug_inspector API test_files: [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/basic_test.rb new/test/basic_test.rb --- old/test/basic_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/test/basic_test.rb 2017-05-09 01:49:46.000000000 +0200 @@ -0,0 +1,7 @@ +require File.dirname(__FILE__) + '/test_helper' + +class BasicTest < MiniTest::Test + def test_version + assert(DebugInspector::VERSION) + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test_helper.rb new/test/test_helper.rb --- old/test/test_helper.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/test/test_helper.rb 2017-05-09 01:49:46.000000000 +0200 @@ -0,0 +1,5 @@ +lib_dir = File.dirname(__FILE__) + '/../lib' + +require 'minitest/autorun' +$:.unshift lib_dir unless $:.include?(lib_dir) +require 'debug_inspector'