Hello community, here is the log from the commit of package rubygem-web-console for openSUSE:Factory checked in at 2016-07-21 07:58:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-web-console (Old) and /work/SRC/openSUSE:Factory/.rubygem-web-console.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-web-console" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-web-console/rubygem-web-console.changes 2016-07-01 09:59:27.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-web-console.new/rubygem-web-console.changes 2016-07-21 07:58:41.000000000 +0200 @@ -1,0 +2,24 @@ +Wed Jul 6 04:35:44 UTC 2016 - coolo@suse.com + +- updated to version 3.3.1 + see installed CHANGELOG.markdown + + ## 3.3.1 + + Drop support for Rails `4.2.0`. + + ## 3.3.0 + + * [203](https://github.com/rails/web-console/pull/203) Map bindings to traces based on the trace __FILE__ and __LINE__ ([@gsamokovarov]) + +------------------------------------------------------------------- +Wed Jun 29 04:34:37 UTC 2016 - coolo@suse.com + +- updated to version 3.3.0 + see installed CHANGELOG.markdown + + ## 3.2.1 + + * [#202](https://github.com/rails/web-console/pull/202) Use first binding when there is no application binding ([@sh19910711]) + +------------------------------------------------------------------- Old: ---- web-console-3.2.0.gem New: ---- web-console-3.3.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-web-console.spec ++++++ --- /var/tmp/diff_new_pack.Ip0XcG/_old 2016-07-21 07:58:42.000000000 +0200 +++ /var/tmp/diff_new_pack.Ip0XcG/_new 2016-07-21 07:58:42.000000000 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-web-console -Version: 3.2.0 +Version: 3.3.1 Release: 0 %define mod_name web-console %define mod_full_name %{mod_name}-%{version} ++++++ web-console-3.2.0.gem -> web-console-3.3.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.markdown new/CHANGELOG.markdown --- old/CHANGELOG.markdown 2016-06-06 22:16:21.000000000 +0200 +++ new/CHANGELOG.markdown 2016-07-05 10:05:07.000000000 +0200 @@ -2,6 +2,18 @@ ## master (unreleased) +## 3.3.1 + +Drop support for Rails `4.2.0`. + +## 3.3.0 + +* [203](https://github.com/rails/web-console/pull/203) Map bindings to traces based on the trace __FILE__ and __LINE__ ([@gsamokovarov]) + +## 3.2.1 + +* [#202](https://github.com/rails/web-console/pull/202) Use first binding when there is no application binding ([@sh19910711]) + ## 3.2.0 * [#198](https://github.com/rails/web-console/pull/198) Pick the first application trace binding on errors ([@sh19910711]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.markdown new/README.markdown --- old/README.markdown 2016-06-06 22:16:21.000000000 +0200 +++ new/README.markdown 2016-07-05 10:05:07.000000000 +0200 @@ -26,7 +26,7 @@ ```ruby group :development do - gem 'web-console', '~> 3.0' + gem 'web-console' end ``` Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/web_console/exception_mapper.rb new/lib/web_console/exception_mapper.rb --- old/lib/web_console/exception_mapper.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/web_console/exception_mapper.rb 2016-07-05 10:05:07.000000000 +0200 @@ -0,0 +1,33 @@ +module WebConsole + class ExceptionMapper + def initialize(exception) + @backtrace = exception.backtrace + @bindings = exception.bindings + end + + def first + guess_the_first_application_binding || @bindings.first + end + + def [](index) + guess_binding_for_index(index) || @bindings[index] + end + + private + + def guess_binding_for_index(index) + file, line = @backtrace[index].to_s.split(':') + line = line.to_i + + @bindings.find do |binding| + binding.eval('__FILE__') == file && binding.eval('__LINE__') == line + end + end + + def guess_the_first_application_binding + @bindings.find do |binding| + binding.eval('__FILE__').to_s.start_with?(Rails.root.to_s) + end + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/web_console/extensions.rb new/lib/web_console/extensions.rb --- old/lib/web_console/extensions.rb 2016-06-06 22:16:21.000000000 +0200 +++ new/lib/web_console/extensions.rb 2016-07-05 10:05:07.000000000 +0200 @@ -24,10 +24,7 @@ class DebugExceptions def render_exception_with_web_console(request, exception) render_exception_without_web_console(request, exception).tap do - # Retain superficial Rails 4.2 compatibility. - env = Hash === request ? request : request.env - - backtrace_cleaner = env['action_dispatch.backtrace_cleaner'] + backtrace_cleaner = request.get_header('action_dispatch.backtrace_cleaner') error = ExceptionWrapper.new(backtrace_cleaner, exception).exception # Get the original exception if ExceptionWrapper decides to follow it. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/web_console/integration.rb new/lib/web_console/integration.rb --- old/lib/web_console/integration.rb 2016-06-06 22:16:21.000000000 +0200 +++ new/lib/web_console/integration.rb 2016-07-05 10:05:07.000000000 +0200 @@ -1,25 +1,12 @@ -module WebConsole - # Returns the Ruby bindings of Kernel#callers locations. - # - # The list of bindings here doesn't map 1 to 1 with Kernel#callers, as we - # can't build Ruby bindings for C functions or the equivalent native - # implementations in JRuby and Rubinius. - # - # This method needs to be overridden by every integration. - def self.caller_bindings - raise NotImplementedError - end -end - class Exception # Returns an array of the exception backtrace locations bindings. # # The list won't map to the traces in #backtrace 1 to 1, because we can't # build bindings for every trace (C functions, for example). # - # Every integration should the instance variable. + # Every integration should set the instance variable. def bindings - (defined?(@bindings) && @bindings) || [] + defined?(@bindings) ? @bindings : [] end end @@ -28,4 +15,19 @@ require 'web_console/integration/rubinius' when 'ruby' require 'web_console/integration/cruby' +else + # Prevent a `method redefined; discarding old caller_bindings` warning. + + module WebConsole + # Returns the Ruby bindings of Kernel#callers locations. + # + # The list of bindings here doesn't map 1 to 1 with Kernel#callers, as we + # can't build Ruby bindings for C functions or the equivalent native + # implementations in JRuby and Rubinius. + # + # This method needs to be overridden by every integration. + def self.caller_bindings + raise NotImplementedError + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/web_console/mapper.rb new/lib/web_console/mapper.rb --- old/lib/web_console/mapper.rb 2016-06-06 22:16:21.000000000 +0200 +++ new/lib/web_console/mapper.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -module WebConsole - class Mapper - def initialize(exception) - @exception = exception - end - - def [](index) - @exception.backtrace[index] - end - end -end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/web_console/session.rb new/lib/web_console/session.rb --- old/lib/web_console/session.rb 2016-06-06 22:16:21.000000000 +0200 +++ new/lib/web_console/session.rb 2016-07-05 10:05:07.000000000 +0200 @@ -30,9 +30,9 @@ # storage. def from(storage) if exc = storage[:__web_console_exception] - new(exc.bindings) + new(ExceptionMapper.new(exc)) elsif binding = storage[:__web_console_binding] - new(binding) + new([binding]) end end end @@ -42,8 +42,8 @@ def initialize(bindings) @id = SecureRandom.hex(16) - @bindings = Array(bindings) - @evaluator = Evaluator.new(initial_binding) + @bindings = bindings + @evaluator = Evaluator.new(bindings.first) store_into_memory end @@ -64,10 +64,6 @@ private - def initial_binding - @bindings.find { |b| b.eval('__FILE__').to_s.start_with?(Rails.root.to_s) } - end - def store_into_memory inmemory_storage[id] = self end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/web_console/version.rb new/lib/web_console/version.rb --- old/lib/web_console/version.rb 2016-06-06 22:16:21.000000000 +0200 +++ new/lib/web_console/version.rb 2016-07-05 10:05:07.000000000 +0200 @@ -1,3 +1,3 @@ module WebConsole - VERSION = '3.2.0' + VERSION = '3.3.1' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/web_console.rb new/lib/web_console.rb --- old/lib/web_console.rb 2016-06-06 22:16:21.000000000 +0200 +++ new/lib/web_console.rb 2016-07-05 10:05:07.000000000 +0200 @@ -7,6 +7,7 @@ autoload :View autoload :Evaluator + autoload :ExceptionMapper autoload :Session autoload :Response autoload :Request diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2016-06-06 22:16:21.000000000 +0200 +++ new/metadata 2016-07-05 10:05:07.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: web-console version: !ruby/object:Gem::Version - version: 3.2.0 + version: 3.3.1 platform: ruby authors: - Charlie Somerville @@ -11,7 +11,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2016-06-06 00:00:00.000000000 Z +date: 2016-07-05 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: railties @@ -19,28 +19,42 @@ requirements: - - ">=" - !ruby/object:Gem::Version - version: '4.2' + version: '5.0' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version - version: '4.2' + version: '5.0' - !ruby/object:Gem::Dependency name: activemodel requirement: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version - version: '4.2' + version: '5.0' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version - version: '4.2' + version: '5.0' +- !ruby/object:Gem::Dependency + name: actionview + requirement: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '5.0' + type: :runtime + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '5.0' - !ruby/object:Gem::Dependency name: debug_inspector requirement: !ruby/object:Gem::Requirement @@ -73,12 +87,12 @@ - lib/web_console.rb - lib/web_console/errors.rb - lib/web_console/evaluator.rb +- lib/web_console/exception_mapper.rb - lib/web_console/extensions.rb - lib/web_console/integration.rb - lib/web_console/integration/cruby.rb - lib/web_console/integration/rubinius.rb - lib/web_console/locales/en.yml -- lib/web_console/mapper.rb - lib/web_console/middleware.rb - lib/web_console/railtie.rb - lib/web_console/request.rb