web-console 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +4 -0
- data/lib/web_console/mapper.rb +4 -1
- data/lib/web_console/session.rb +2 -2
- data/lib/web_console/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cccaecbc9077b0e460d946cc12b7a740c1832885
|
4
|
+
data.tar.gz: a554f379e1a93e39794530da43da5964da36a074
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 552ed1aca142857e5bb4d6e21b50c151348b9538018ed4464cf3c0b00d016272db4758cfbd0d96ee2c603f998536e8ab8f71e9a345f2d423d1fd2cbdebbd3335
|
7
|
+
data.tar.gz: 81df2259f8350875c61108d8edb3a274d4a169e91dd67a874d5b4dd32c2629fe17b7aaa1135fcd65c54b5316892aa83b61cab272c9df004986bfdfd53cd53ad7
|
data/CHANGELOG.markdown
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
## master (unreleased)
|
4
4
|
|
5
|
+
## 3.2.1
|
6
|
+
|
7
|
+
* [#202](https://github.com/rails/web-console/pull/202) Use first binding when there is no application binding ([@sh19910711])
|
8
|
+
|
5
9
|
## 3.2.0
|
6
10
|
|
7
11
|
* [#198](https://github.com/rails/web-console/pull/198) Pick the first application trace binding on errors ([@sh19910711])
|
data/lib/web_console/mapper.rb
CHANGED
@@ -2,10 +2,13 @@ module WebConsole
|
|
2
2
|
class Mapper
|
3
3
|
def initialize(exception)
|
4
4
|
@exception = exception
|
5
|
+
@bindings = exception.bindings
|
5
6
|
end
|
6
7
|
|
7
8
|
def [](index)
|
8
|
-
@exception.backtrace[index]
|
9
|
+
trace = @exception.backtrace[index]
|
10
|
+
file, line = trace.to_s.strip(':')
|
11
|
+
@bindings.find { |b| b.eval('__FILE__') == file && b.eval('__LINE__') == line }
|
9
12
|
end
|
10
13
|
end
|
11
14
|
end
|
data/lib/web_console/session.rb
CHANGED
@@ -43,7 +43,7 @@ module WebConsole
|
|
43
43
|
def initialize(bindings)
|
44
44
|
@id = SecureRandom.hex(16)
|
45
45
|
@bindings = Array(bindings)
|
46
|
-
@evaluator = Evaluator.new(
|
46
|
+
@evaluator = Evaluator.new(application_binding || @bindings.first)
|
47
47
|
|
48
48
|
store_into_memory
|
49
49
|
end
|
@@ -64,7 +64,7 @@ module WebConsole
|
|
64
64
|
|
65
65
|
private
|
66
66
|
|
67
|
-
def
|
67
|
+
def application_binding
|
68
68
|
@bindings.find { |b| b.eval('__FILE__').to_s.start_with?(Rails.root.to_s) }
|
69
69
|
end
|
70
70
|
|
data/lib/web_console/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web-console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Somerville
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-06-
|
14
|
+
date: 2016-06-14 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: railties
|