boq_com_au 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0252da91e37261676f7c2a2f41459c3d8bbe70f715d1808bb5530c513a9ef51d
4
- data.tar.gz: 5b3010aea80019aa1336b511895a505e0d8c5d87b0a0abcbd9c5e89f4061cad4
3
+ metadata.gz: 9e8b7799cae1e5018367e722f35b0c1bb22dae5bd4405cbc1e20319b7b6fd9d9
4
+ data.tar.gz: 68b9c98144244ffe4bc0c14eb499595884c9e5a3bffc3b866c7484363ba28cea
5
5
  SHA512:
6
- metadata.gz: 4a6772c45aaa2da596222c102604d062a224f500cb59f5c324608e0cce5a1f9f09819712262eddf4ab34a215afc31fb6aa244d38e373ed8a0555d2020a7e08c7
7
- data.tar.gz: 03fa091d411acdced848ee3236819acdd927c32bce55812c501bec3b603b31bd6094a5c04de69322e0ab4daca1e83697fc8aee70efdad3beaa1176f694211f28
6
+ metadata.gz: 59fcd1b13e6f05cc96ff15056e54bd44565a2ee236c79568d1a341632747971fd6c9f42e29df8e4fd0970ed2a006fce28f2c1c3ed700876fad2badb66d48e949
7
+ data.tar.gz: 38405561fc456dcd62b48e0bb32529d4a8ef08ef75ec6e8b6a56fd6bee006a07dfcf9c159bfad35ef40f2e8612dd4bd5a5ffb5cb4ed07a6b9f49d9c95b4ebd19
data/CHANGELOG CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## 20261103
4
4
 
5
+ 0.0.2: BoqComAu::Account#shutdown is WebAccount 0.6.1's, which quits the browser even where logging out fails.
6
+
7
+ 1. - BoqComAu::Account#shutdown
8
+ 2. ~ boq_com_au.gemspec: webaccount >= 0.6.1
9
+ 3. - test/BoqComAu/Account_test.rb: shutdown.
10
+ 4. ~ BoqComAu::VERSION: /0.0.1/0.0.2/
11
+
5
12
  0.0.1: ~ BoqComAu::Account#logout returns once logged off, rather than after a 30 second timeout.
6
13
 
7
14
  1. ~ BoqComAu::Account::PAGE_SELECTORS[:logged_out_xpath]: + the Log On Again link. The page shown after logging off has no sign-in button, so logged_out? waited for one until it timed out.
data/boq_com_au.gemspec CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
38
38
 
39
39
  spec.dependencies = [
40
40
  ['selenium-webdriver', '>= 4.0'],
41
- ['webaccount', '>= 0.6.0']
41
+ ['webaccount', '>= 0.6.1']
42
42
  ]
43
43
 
44
44
  spec.development_dependencies = %w{
@@ -42,13 +42,6 @@ module BoqComAu
42
42
  end
43
43
  alias_method :logon, :login
44
44
 
45
- # Chrome is quit whether or not logging out succeeds, so as a failed logout doesn't leave a logged-in browser behind.
46
- def shutdown
47
- logout if logged_in?
48
- ensure
49
- driver.quit
50
- end
51
-
52
45
  private
53
46
 
54
47
  def initialize(username: nil, password: nil, chrome_profile_directory: nil, browser: nil, driver_options: nil)
@@ -2,5 +2,5 @@
2
2
  # BoqComAu::VERSION
3
3
 
4
4
  module BoqComAu
5
- VERSION = '0.0.1'
5
+ VERSION = '0.0.2'
6
6
  end
@@ -1,7 +1,7 @@
1
1
  # test/BoqComAu/Account_test.rb
2
2
 
3
3
  # Notes:
4
- # 1. No browser and no BOQ: only what doesn't depend on the site is tested. Every account which might reach for its browser is given a stand-in, so as none is started.
4
+ # 1. No browser and no BOQ: only what doesn't depend on the site is tested.
5
5
 
6
6
  require_relative '../../lib/boq_com_au'
7
7
 
@@ -9,20 +9,6 @@ require 'minitest/autorun'
9
9
  require 'minitest-spec-context'
10
10
 
11
11
  describe BoqComAu::Account do
12
- def stand_in_driver
13
- driver = Object.new
14
- driver.define_singleton_method(:quit){@quit = true}
15
- driver.define_singleton_method(:quit?){!!@quit}
16
- driver
17
- end
18
-
19
- def account_with_driver(driver, logged_in: true)
20
- account = BoqComAu::Account.new
21
- account.instance_variable_set(:@driver, driver)
22
- account.instance_variable_set(:@logged_in, logged_in)
23
- account
24
- end
25
-
26
12
  describe "#username and #password" do
27
13
  it "are those given" do
28
14
  account = BoqComAu::Account.new(username: 'customer', password: 'secret')
@@ -48,16 +34,6 @@ describe BoqComAu::Account do
48
34
  end
49
35
  end
50
36
 
51
- describe "#shutdown" do
52
- it "quits the browser even where logging out fails" do
53
- driver = stand_in_driver
54
- account = account_with_driver(driver)
55
- account.define_singleton_method(:logout){raise Selenium::WebDriver::Error::TimeoutError}
56
- _{account.shutdown}.must_raise(Selenium::WebDriver::Error::TimeoutError)
57
- _(driver.quit?).must_equal(true)
58
- end
59
- end
60
-
61
37
  describe "#default_driver_options" do
62
38
  it "masks Chrome's automation flags, leaving the profile to Chrome where none is given" do
63
39
  options = BoqComAu::Account.new.send(:default_driver_options)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boq_com_au
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.6.0
32
+ version: 0.6.1
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 0.6.0
39
+ version: 0.6.1
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: minitest
42
42
  requirement: !ruby/object:Gem::Requirement