westpac_com_au 0.6.1 → 0.6.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: 8553ad989a56d55230e2d87f5e5b113757bbdd58dd0c980e3d26228171380478
4
- data.tar.gz: ddc5a8b1eebb90eb798f4e3ae9a8a96ce84c3ac47e564f92e990d92250f4cd1c
3
+ metadata.gz: cb98ae0a5025296b5fe5a9762c293f090368e7ee1975e8257cd72fe3f0da379c
4
+ data.tar.gz: 7e9ab839fc81c08cfa1d019e811a3f426e19f3b8d2a8b218f2faef96e8450511
5
5
  SHA512:
6
- metadata.gz: d6c6d1d55abc6492efaf5fe8d1df3725f4a07d31afa6801f28f9124a4ece67385a734033cf44e8993c1f3748092168c38bfc7dbf8677be80f9f78290bcbf13a6
7
- data.tar.gz: 238e274515d2d3c3019f0c0e3a703cc38908476a8c6ba52bcc6e72bd8ab15d4847618b9aec5e2dc0c7f0bba2fb601a7037de380c7b531493d69fa4ce502e1141
6
+ metadata.gz: 43f2bf355a71eb74130e3a5c7bd33b49ce6a42736e41e4738e249fc91f366848764bdb7d44458ceb98879f37ad2c2153210c60a36b4948322baab3e98dda9836
7
+ data.tar.gz: 53668e5ab6b8f7c4b919d2d191cbd759357bf7fbbbe5032000ecb3976cf4d9373569ce53fb8cf8b3b85f3d3ba2b07fceecd6b23e3a5b476d34473ddd10a93d76
data/CHANGELOG CHANGED
@@ -1,7 +1,18 @@
1
- # CHANGELOG
1
+ # westpac_com_au/CHANGELOG
2
2
 
3
3
  ## 20261116
4
4
 
5
+ 0.6.2: The tests share a helper, and VERSION and the gemspec are tested; the gemspec links to the repository.
6
+
7
+ 1. + test/helper.rb
8
+ 2. ~ test/WestpacComAu/Account_test.rb: Requires the helper.
9
+ 3. ~ test/WestpacComAu/Transactions_test.rb: Requires the helper.
10
+ 4. + test/VERSION_test.rb
11
+ 5. + test/gemspec_test.rb
12
+ 6. ~ westpac_com_au.gemspec: A header line naming it, and metadata linking the repository's issues, CHANGELOG, source and README.
13
+ 7. ~ CHANGELOG: /# CHANGELOG/# westpac_com_au\/CHANGELOG/
14
+ 8. ~ WestpacComAu::VERSION: /0.6.1/0.6.2/
15
+
5
16
  0.6.1: - WestpacComAu::Account#login, #validate_args: Now uses superclass WebAccount.
6
17
 
7
18
  1. ~ westpac_com_au.gemspec: webaccount /'~> 0.9'/'~> 0.10'/
@@ -2,5 +2,5 @@
2
2
  # WestpacComAu::VERSION
3
3
 
4
4
  module WestpacComAu
5
- VERSION = '0.6.1'
5
+ VERSION = '0.6.2'
6
6
  end
@@ -0,0 +1,20 @@
1
+ # test/VERSION_test.rb
2
+
3
+ require_relative './helper'
4
+
5
+ describe WestpacComAu do
6
+ describe "VERSION" do
7
+ it "is a string" do
8
+ _(WestpacComAu::VERSION).must_be_instance_of String
9
+ end
10
+
11
+ it "is three numbers separated by dots" do
12
+ _(WestpacComAu::VERSION).must_match(/\A\d+\.\d+\.\d+\z/)
13
+ end
14
+
15
+ it "matches the newest entry in the CHANGELOG" do
16
+ changelog = File.read(File.expand_path('../CHANGELOG', __dir__))
17
+ _(changelog[/^(\d+\.\d+\.\d+):/, 1]).must_equal(WestpacComAu::VERSION)
18
+ end
19
+ end
20
+ end
@@ -3,11 +3,9 @@
3
3
  # Notes:
4
4
  # 1. No browser and no Westpac: 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.
5
5
 
6
- require_relative '../../lib/westpac_com_au'
6
+ require_relative '../helper'
7
7
 
8
8
  require 'date'
9
- require 'minitest/autorun'
10
- require 'minitest-spec-context'
11
9
 
12
10
  describe WestpacComAu::Account do
13
11
  def stand_in_element(displayed: true)
@@ -3,10 +3,7 @@
3
3
  # Notes:
4
4
  # 1. WestpacComAu::Account.new is swapped for a stand-in for the length of each example and put back afterwards, so as no browser is started.
5
5
 
6
- require_relative '../../lib/westpac_com_au'
7
-
8
- require 'minitest/autorun'
9
- require 'minitest-spec-context'
6
+ require_relative '../helper'
10
7
 
11
8
  describe WestpacComAu::Transactions do
12
9
  def with_stand_in_account(download: ->{'/downloads/transactions.csv'})
@@ -0,0 +1,37 @@
1
+ # test/gemspec_test.rb
2
+
3
+ require_relative './helper'
4
+
5
+ describe 'westpac_com_au.gemspec' do
6
+ let(:spec){Gem::Specification.load(File.expand_path('../westpac_com_au.gemspec', __dir__))}
7
+
8
+ it "is a valid specification" do
9
+ _(spec.validate).must_equal(true)
10
+ end
11
+
12
+ it "is named westpac_com_au" do
13
+ _(spec.name).must_equal('westpac_com_au')
14
+ end
15
+
16
+ it "does not pin a date" do
17
+ _(spec.date).must_equal(Gem::Specification.new.date)
18
+ end
19
+
20
+ it "takes its version from WestpacComAu::VERSION" do
21
+ _(spec.version.to_s).must_equal(WestpacComAu::VERSION)
22
+ end
23
+
24
+ it "declares its runtime dependencies" do
25
+ _(spec.runtime_dependencies.map(&:name).sort).must_equal(%w{selenium-webdriver webaccount})
26
+ end
27
+
28
+ it "ships the gemspec which names it" do
29
+ _(spec.files).must_include('westpac_com_au.gemspec')
30
+ end
31
+
32
+ it "links the homepage and each metadata link to the repository" do
33
+ links = [spec.homepage] + spec.metadata.values
34
+ _(spec.metadata.keys.sort).must_equal(%w{bug_tracker_uri changelog_uri documentation_uri source_code_uri})
35
+ links.each{|link| _(link).must_match(%r{\Ahttps://github\.com/thoran/westpac_com_au(/|\z)})}
36
+ end
37
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,8 @@
1
+ # test/helper.rb
2
+
3
+ require 'minitest/autorun'
4
+ require 'minitest/spec'
5
+ require 'minitest-spec-context'
6
+
7
+ $LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
8
+ require 'westpac_com_au'
@@ -1,3 +1,5 @@
1
+ # westpac_com_au.gemspec
2
+
1
3
  require_relative './lib/WestpacComAu/VERSION'
2
4
 
3
5
  class Gem::Specification
@@ -22,6 +24,13 @@ Gem::Specification.new do |spec|
22
24
  spec.homepage = 'https://github.com/thoran/westpac_com_au'
23
25
  spec.license = 'MIT'
24
26
 
27
+ spec.metadata = {
28
+ 'bug_tracker_uri' => 'https://github.com/thoran/westpac_com_au/issues',
29
+ 'changelog_uri' => 'https://github.com/thoran/westpac_com_au/blob/master/CHANGELOG',
30
+ 'source_code_uri' => 'https://github.com/thoran/westpac_com_au',
31
+ 'documentation_uri' => 'https://github.com/thoran/westpac_com_au/blob/master/README.md',
32
+ }
33
+
25
34
  spec.require_paths = ['lib']
26
35
  spec.required_ruby_version = '>= 3.3'
27
36
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: westpac_com_au
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran
@@ -95,13 +95,20 @@ files:
95
95
  - lib/WestpacComAu/Transactions.rb
96
96
  - lib/WestpacComAu/VERSION.rb
97
97
  - lib/westpac_com_au.rb
98
+ - test/VERSION_test.rb
98
99
  - test/WestpacComAu/Account_test.rb
99
100
  - test/WestpacComAu/Transactions_test.rb
101
+ - test/gemspec_test.rb
102
+ - test/helper.rb
100
103
  - westpac_com_au.gemspec
101
104
  homepage: https://github.com/thoran/westpac_com_au
102
105
  licenses:
103
106
  - MIT
104
- metadata: {}
107
+ metadata:
108
+ bug_tracker_uri: https://github.com/thoran/westpac_com_au/issues
109
+ changelog_uri: https://github.com/thoran/westpac_com_au/blob/master/CHANGELOG
110
+ source_code_uri: https://github.com/thoran/westpac_com_au
111
+ documentation_uri: https://github.com/thoran/westpac_com_au/blob/master/README.md
105
112
  rdoc_options: []
106
113
  require_paths:
107
114
  - lib