diff --git a/.travis.yml b/.travis.yml index 15a86ed..f812bcb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,39 +1,35 @@ language: ruby dist: trusty -os: - - linux - - osx - -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 - - 2.1.10 - - 2.2.8 - - 2.3.8 - - 2.4.6 - - 2.5.5 - - 2.6.3 - - ruby-head - matrix: fast_finish: true - allow_failures: - - rvm: ruby-head - - exclude: + include: + - os: linux + rvm: 3.2 - os: osx - rvm: 1.9.3 + rvm: 3.2 + - os: linux + rvm: 3.1 - os: osx - rvm: 2.0.0 - + rvm: 3.1 + - os: linux + rvm: 3.0 - os: osx - rvm: 1.8.7 - -# include: -# - os: osx -# rvm: 1.9.3 -# before_script: rvm install ruby-1.9.3 # not binary -# - os: osx -# rvm: 2.0.0 -# before_script: rvm install ruby-2.0.0 # not binary + rvm: 3.0 + - os: linux + rvm: 2.7 + - os: osx + rvm: 2.7 + - os: linux + rvm: 2.6 + - os: osx + rvm: 2.6 + - os: linux + rvm: 2.5 + - os: osx + rvm: 2.5 + - os: linux + rvm: 2.4 + - os: osx + rvm: 2.4 + - os: linux + rvm: 2.3 diff --git a/Gemfile b/Gemfile index c36df53..af81c0e 100644 --- a/Gemfile +++ b/Gemfile @@ -14,12 +14,12 @@ if RUBY_VERSION < '1.9' || defined?(JRUBY_VERSION) gem "ruby-debug-base", :platforms => [:jruby, *mries('18')] end -if RUBY_VERSION && RUBY_VERSION >= "1.9" - gem "ruby-debug-base19x", ">= 0.11.32", :platforms => mries('19') +if RUBY_VERSION && RUBY_VERSION >= "1.9" && RUBY_VERSION < "2.0" + gem "ruby-debug-base19x", ">= 0.11.32" end if RUBY_VERSION && RUBY_VERSION >= "2.0" - gem "debase", "~> 0.2", ">= 0.2.2", :platforms => mries('20', '21', '22', '23', '24', '25') + gem "debase", "~> 0.2", ">= 0.2.9" end gemspec diff --git a/README.md b/README.md index 0125c3b..df07515 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -[![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub) [![Gem Version](https://badge.fury.io/rb/ruby-debug-ide.svg)][gem] [![Build Status](https://travis-ci.org/ruby-debug/ruby-debug-ide.svg?branch=master)](https://travis-ci.org/ruby-debug/ruby-debug-ide) diff --git a/Rakefile b/Rakefile index a169aee..7a74d18 100644 --- a/Rakefile +++ b/Rakefile @@ -39,4 +39,55 @@ task :changelog, :since_c, :until_c do |t,args| end puts changelog_content +end + +desc "Generates travis.yaml" +task :gen_travis do + versions = [] + + def versions.add(major:, minor:, include_macos: true) + self << { major: major, minor: [minor], include_macos: include_macos } + end + + versions.add major: '3.0', minor: 1 + versions.add major: '2.7', minor: 3 + versions.add major: '2.6', minor: 7 + versions.add major: '2.5', minor: 9 + versions.add major: '2.4', minor: 10 + versions.add major: '2.3', minor: 8, include_macos: false + versions.add major: '2.2', minor: 10, include_macos: false + versions.add major: '2.1', minor: 10, include_macos: false + versions.add major: '2.0', minor: 0, include_macos: false + versions.add major: '1.9', minor: 3, include_macos: false + versions.add major: '1.8', minor: 7, include_macos: false + + puts < :local).find_gems_with_sources(dep).empty? || - !Gem::DependencyInstaller.new(:domain => :local,:prerelease => true).find_gems_with_sources(dep).empty? -end - -unless jruby || rbx +if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' require 'rubygems' require 'rubygems/command.rb' require 'rubygems/dependency.rb' @@ -15,14 +8,14 @@ def already_installed(dep) begin Gem::Command.build_args = ARGV - rescue NoMethodError + rescue NoMethodError end if RUBY_VERSION < "1.9" dep = Gem::Dependency.new("ruby-debug-base", '>=0.10.4') elsif RUBY_VERSION < '2.0' dep = Gem::Dependency.new("ruby-debug-base19x", '>=0.11.30.pre15') - else + else dep = Gem::Dependency.new("debase", '> 0') end @@ -39,7 +32,7 @@ def already_installed(dep) puts e.backtrace.join "\n " exit(1) end - end unless dep.nil? || already_installed(dep) + end unless dep.nil? || dep.matching_specs.any? end # create dummy rakefile to indicate success diff --git a/lib/ruby-debug-ide/thread_alias.rb b/lib/ruby-debug-ide/thread_alias.rb index 4e10a7b..4b2054d 100644 --- a/lib/ruby-debug-ide/thread_alias.rb +++ b/lib/ruby-debug-ide/thread_alias.rb @@ -8,7 +8,7 @@ def do_thread_alias end Object.const_set :OldThread, ::Thread - Object.send :remove_const, :Thread + Object.__send__ :remove_const, :Thread Object.const_set :Thread, ::Debugger::DebugThread end @@ -18,9 +18,9 @@ def undo_thread_alias return end - Object.send :remove_const, :Thread + Object.__send__ :remove_const, :Thread Object.const_set :Thread, ::OldThread - Object.send :remove_const, :OldThread + Object.__send__ :remove_const, :OldThread end end end diff --git a/lib/ruby-debug-ide/version.rb b/lib/ruby-debug-ide/version.rb index 5caee7d..22185b9 100755 --- a/lib/ruby-debug-ide/version.rb +++ b/lib/ruby-debug-ide/version.rb @@ -1,3 +1,3 @@ module Debugger - IDE_VERSION='0.7.1.beta3' + IDE_VERSION='0.7.5' end diff --git a/lib/ruby-debug-ide/xml_printer.rb b/lib/ruby-debug-ide/xml_printer.rb index b009fdd..9dcf0c9 100644 --- a/lib/ruby-debug-ide/xml_printer.rb +++ b/lib/ruby-debug-ide/xml_printer.rb @@ -208,13 +208,13 @@ def exec_with_timeout(sec, error_message) end def exec_with_allocation_control(value, exec_method, overflow_message_type) - return value.send exec_method unless Debugger.trace_to_s + return value.__send__ exec_method unless Debugger.trace_to_s memory_limit = Debugger.debugger_memory_limit time_limit = Debugger.inspect_time_limit if defined?(JRUBY_VERSION) || RUBY_VERSION < '2.0' || memory_limit <= 0 - return exec_with_timeout(time_limit * 1e-3, "Timeout: evaluation of #{exec_method} took longer than #{time_limit}ms.") { value.send exec_method } + return exec_with_timeout(time_limit * 1e-3, "Timeout: evaluation of #{exec_method} took longer than #{time_limit}ms.") { value.__send__ exec_method } end require 'objspace' @@ -245,7 +245,7 @@ def exec_with_allocation_control(value, exec_method, overflow_message_type) end end trace_point.enable - result = value.send exec_method + result = value.__send__ exec_method trace_queue << result trace_point.disable end diff --git a/ruby-debug-ide.gemspec b/ruby-debug-ide.gemspec index 47af820..be0917f 100644 --- a/ruby-debug-ide.gemspec +++ b/ruby-debug-ide.gemspec @@ -30,8 +30,8 @@ EOF spec.version = RUBY_DEBUG_IDE_VERSION - spec.author = "Markus Barchfeld, Martin Krauskopf, Mark Moseley, JetBrains RubyMine Team" - spec.email = "rubymine-feedback@jetbrains.com" + spec.author = "Markus Barchfeld, Martin Krauskopf, Mark Moseley, Alexandr Evstigneev" + spec.email = "hurricup@gmail.com" spec.license = "MIT" spec.platform = Gem::Platform::RUBY spec.require_path = "lib" @@ -44,5 +44,4 @@ EOF spec.required_ruby_version = '>= 1.8.2' spec.date = DateTime.now - spec.rubyforge_project = 'debug-commons' end