webdrone 1.0.0 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18327a95145f6320c3ebebd258f7b3a3f1546276
4
- data.tar.gz: 5c806d95e56819bdcc228330ffe649e9b64ff59e
3
+ metadata.gz: 64c654a025eb0472f1fb89926d62ca6e9c4de51d
4
+ data.tar.gz: 8ae214fbe1d02a4a15e5bff878c0ade333e8db11
5
5
  SHA512:
6
- metadata.gz: 31ddf69bc8c078320a66c07cbf16d0c52890fd3d088431b6cfcc1fde914d6fcc9d7ecd68d5b419865889d413cbc72aaba871a02531bc140e6f4307d6cc5ebb01
7
- data.tar.gz: 474e733306f50f3a39a027e53365261098d6534158800bd68e23fa68bf13861f50e9be94e83cb86d017b2fdc9cf0a5a9251ef03605c456cbe4d7d15002e51707
6
+ metadata.gz: 0d52f1d053cd9716e893a606d288b80ba5af59d8ba9b0a0be5a6f955fbce2252f3fe8f28da75ee19ecdfcad81fb13fb1f6be2c113e75e3226bda7b87e2c1c471
7
+ data.tar.gz: 683117fff323a66d68c7dc6be27a3e2b7a61a60a4e7ea1e636efd77e66e060161fff93d87b8f570c956d7ecf5e31a70d91c266f60f7b7c50a33ecdba9d1a62bb
@@ -134,10 +134,25 @@ module Webdrone
134
134
  print "Enter stack index [#{@caller_index}] or 'exit': "
135
135
  input = gets.chomp
136
136
  break if input.include? 'exit'
137
- @caller_index = input.to_i unless input.empty?
138
- location = @original.backtrace_locations[@caller_index]
139
- index = Kernel.caller_locations.index { |item| item.path == location.path and item.lineno == location.lineno }
140
- Webdrone.irb_console Kernel.binding.of_caller(index + 1)
137
+ begin
138
+ @caller_index = input.to_i if not input.empty?
139
+ location = @original.backtrace_locations[@caller_index]
140
+ raise '' if location == nil
141
+ rescue => e
142
+ puts "** INVALID STACK NUMBER **"
143
+ next
144
+ end
145
+
146
+ @a0.ctxt.with_conf error: :raise, developer: false do
147
+ begin
148
+ index = Kernel.caller_locations.index do |item|
149
+ item.path == location.path and item.lineno == location.lineno
150
+ end
151
+ Webdrone.irb_console Kernel.binding.of_caller(index + 1) if index != nil
152
+ rescue => e
153
+ puts "** INVALID STACK NUMBER #{e} **"
154
+ end
155
+ end
141
156
  report_exception
142
157
  end
143
158
  end
data/lib/webdrone/form.rb CHANGED
@@ -13,10 +13,12 @@ module Webdrone
13
13
  end
14
14
 
15
15
  def with_xpath(xpath = nil, &block)
16
- @xpath = xpath
16
+ old_xpath, @xpath = @xpath, xpath
17
17
  instance_eval &block
18
18
  rescue => exception
19
19
  Webdrone.report_error(@a0, exception, Kernel.caller_locations)
20
+ ensure
21
+ @xpath = old_xpath
20
22
  end
21
23
 
22
24
  def set(key, val, n: 1, visible: true)
@@ -1,3 +1,3 @@
1
1
  module Webdrone
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webdrone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aldrin Martoq
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-04 00:00:00.000000000 Z
11
+ date: 2016-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler