gless 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/gless/session.rb +15 -10
  2. data/lib/gless.rb +1 -1
  3. metadata +1 -1
data/lib/gless/session.rb CHANGED
@@ -353,8 +353,11 @@ module Gless
353
353
 
354
354
  if @acceptable_pages.member?( @current_page )
355
355
  good_page = true
356
+ new_page = @current_page
356
357
  break
357
358
  else
359
+ new_page = nil
360
+
358
361
  if @acceptable_pages.nil?
359
362
  # If we haven't gone anywhere yet, anything is good
360
363
  log.debug "Session: change_pages: no acceptable pages, so accepting the current page."
@@ -376,17 +379,19 @@ module Gless
376
379
  end
377
380
  end
378
381
 
379
- if not new_page.match_url(url)
380
- good_page = false
381
- error_message = "Current URL is #{url}, which doesn't match that expected for any of the acceptable pages: #{@acceptable_pages}"
382
- next
383
- end
382
+ if new_page
383
+ if not new_page.match_url(url)
384
+ good_page = false
385
+ error_message = "Current URL is #{url}, which doesn't match that expected for any of the acceptable pages: #{@acceptable_pages}"
386
+ next
387
+ end
384
388
 
385
- log.debug "Session: change_pages: checking for arrival at #{new_page.class.name}"
386
- if not new_page.arrived?
387
- good_page = false
388
- error_message = "The current page, at #{url}, doesn't have all of the elements for any of the acceptable pages: #{@acceptable_pages}"
389
- next
389
+ log.debug "Session: change_pages: checking for arrival at #{new_page.class.name}"
390
+ if not new_page.arrived?
391
+ good_page = false
392
+ error_message = "The current page, at #{url}, doesn't have all of the elements for any of the acceptable pages: #{@acceptable_pages}"
393
+ next
394
+ end
390
395
  end
391
396
 
392
397
  if good_page == true
data/lib/gless.rb CHANGED
@@ -6,7 +6,7 @@
6
6
  # project.
7
7
  module Gless
8
8
  # The current version number.
9
- VERSION = '1.1.2'
9
+ VERSION = '1.1.3'
10
10
 
11
11
  # Sets up the config, logger and browser instances, the ordering
12
12
  # of which is slightly tricky.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gless
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: