statbank_denmark 0.1.0 → 0.1.1

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: 183b691efeb61af245aaaddb2f7e736c4509f7a99619447b46baec3c5b318dcb
4
- data.tar.gz: c1b14881d01331e323f354c7f809e03370b5bbb7e819dc8fc27ba9764a2a10e1
3
+ metadata.gz: 6d0a8e0c92420913c343d904f90f28636ff241d0a9d218d9ca24c170aff2a6ad
4
+ data.tar.gz: b9dc4ace09453161698d89f42fded461dc84be0f7d6b18c2c8a40ed9fd2e2c2b
5
5
  SHA512:
6
- metadata.gz: efccb6b847ccf3d941baa91107d3b02f9afc88ca98cf5cefd22460833f1eb9858eaa7ae34a84a95676d626662604855b4f572f15050a19bcde74861ade568223
7
- data.tar.gz: dd6d92d90f93ab9ade68bf709072984f827d1c885fb80523023cd6e6a4fbfd76415265c7ba44edc7e8994a10cbf4c11493b039e8d76d651f86819eab2f7f69e6
6
+ metadata.gz: 24f71e8c419da107d3398b516d6813f15dd6f70fb9c718daccd622565435d7aabcc10f22887061969b727f23e0891f5a506fc69c16576951cea25f1b83e20356
7
+ data.tar.gz: 7416ec1be1476ea1738bc9058a049927b03f6b61308f04be7d1f35a409c52e0f7a1218b1bb5d4e3e809f9d269a1e7fd927019e661f30e09c60170ee4bd9ca74b
data/CHANGELOG CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## 20260928
4
4
 
5
+ 0.1.1: alias_method :tableinfo, :table_info
6
+
7
+ 1. + StatBankDenmark.tableinfo
8
+ 2. + StatBankDenmark::Client#tableinfo
9
+ 3. ~ StatBankDenmark::VERSION: /0.1.0/0.1.1/
10
+
5
11
  0.1.0: + StatBankDenmark::Tables
6
12
 
7
13
  1. + StatBankDenmark::Tables: six crime and population tables and their dimensions, taken from table_info.
data/README.md CHANGED
@@ -58,6 +58,7 @@ StatBankDenmark.tables(include_inactive: true, subject: 4)
58
58
  StatBankDenmark.table_info('STRAF42') # implicitly format: 'json'
59
59
  StatBankDenmark.table_info('STRAF42', format: 'json') # explicitly format: 'json'
60
60
  StatBankDenmark.table_info('STRAF42', format: 'csv') # format: 'csv'
61
+ StatBankDenmark.tableinfo('STRAF42') # an alias, /tableinfo being the endpoint
61
62
 
62
63
  # Get data from a specific table
63
64
  StatBankDenmark.data('STRAF42') # implicitly format: 'csv'
@@ -72,6 +72,9 @@ module StatBankDenmark
72
72
  )
73
73
  handle_response(response)
74
74
  end
75
+ # The endpoint is /tableinfo, which is how StatBank's own documentation names
76
+ # it, and the spelling anyone arriving from there reaches for first.
77
+ alias_method :tableinfo, :table_info
75
78
 
76
79
  def data(
77
80
  table_id,
@@ -2,5 +2,5 @@
2
2
  # StatBankDenmark::VERSION
3
3
 
4
4
  module StatBankDenmark
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
@@ -18,6 +18,9 @@ module StatBankDenmark
18
18
  def table_info(table_id, **options)
19
19
  client.table_info(table_id, **options)
20
20
  end
21
+ # The endpoint is /tableinfo, which is how StatBank's own documentation names
22
+ # it, and the spelling anyone arriving from there reaches for first.
23
+ alias_method :tableinfo, :table_info
21
24
 
22
25
  def data(table_id, **options)
23
26
  client.data(table_id, **options)
@@ -132,6 +132,11 @@ describe StatBankDenmark::Client do
132
132
  end
133
133
  end
134
134
 
135
+ it "answers to tableinfo, which is what the endpoint is called" do
136
+ _(client).must_respond_to(:tableinfo)
137
+ _(StatBankDenmark::Client.instance_method(:tableinfo).original_name).must_equal(:table_info)
138
+ end
139
+
135
140
  it "raises ArgumentError for nil table_id" do
136
141
  _(proc{client.table_info(nil)}).must_raise(ArgumentError)
137
142
  end
@@ -11,5 +11,10 @@ describe StatBankDenmark do
11
11
  _(StatBankDenmark).must_respond_to(:data)
12
12
  _(StatBankDenmark).must_respond_to(:search)
13
13
  end
14
+
15
+ it "answers to tableinfo, which is what the endpoint is called" do
16
+ _(StatBankDenmark).must_respond_to(:tableinfo)
17
+ _(StatBankDenmark.method(:tableinfo).original_name).must_equal(:table_info)
18
+ end
14
19
  end
15
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statbank_denmark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran