europe 0.0.18 → 0.0.19

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
  SHA256:
3
- metadata.gz: 794ad55570cf9ea7535ce493786274121a6c3617f64211b8676c70f877a5a113
4
- data.tar.gz: 699800827413a40143516a78211edd1bb542efd868c9d8cf0bfa740d19b2f2d1
3
+ metadata.gz: 4ed6dabe018e89d9bbf23e67b0137974b05035aa1bbe684634b5f486cb080675
4
+ data.tar.gz: 1d326773840b959bb92b198cc834ee1a90343c87ca5eed0f76b044f74cf5039e
5
5
  SHA512:
6
- metadata.gz: 2bccf16590f7a26f30512c63d350e53ef3ed1978357e70584e3c08d7d16cdcb072f25b09d537782ca03b8e74399299f4c20b7cafe35a128829a2d7b2707a944e
7
- data.tar.gz: 8227b36d84d9d131f27e286ffd7d29a0d132753da1a55989735ce4a4754125022af87381e4cb95d05b7bf1c93cf15f6860f7a57bd7797f2cb1186eb52700ecad
6
+ metadata.gz: e54ce40bbfa5985395dddbf38498b2a22887ebe12d81de4004b39a2643f0015a3adae16d49239e8b8ae3806f5300de3fa8aa474d36e545c9dab63548c5282094
7
+ data.tar.gz: 131df277ed531fe687f1f156d912d673f513e8806264572fb90343d5e0440cae6a4b20b8e1f0951bb964028d718d63a2b04f626070bddd375d784442ec7501d1
@@ -20,13 +20,9 @@ jobs:
20
20
 
21
21
  steps:
22
22
  - uses: actions/checkout@v2
23
- - name: Set up Ruby
24
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
25
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
26
- # uses: ruby/setup-ruby@v1
27
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
23
+ - uses: ruby/setup-ruby@v1
28
24
  with:
29
- ruby-version: 2.7
25
+ ruby-version: 3.1.1
30
26
  - name: Install dependencies
31
27
  run: bundle install
32
28
  - name: Run tests
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  AllCops:
2
2
  NewCops: enable
3
- TargetRubyVersion: 2.7
3
+ TargetRubyVersion: 3.1
4
4
  SuggestExtensions: false
5
5
  Exclude:
6
6
  - 'europe.gemspec'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
+ ## 0.0.19
5
+ - Fixed VAT validation call because XML response was updated
6
+ - [Full Changelog](https://github.com/gem-shards/europe.rb/compare/v0.0.18...v0.0.19)
4
7
  ## 0.0.18
5
8
  - Added Estonia and Lithuania to eurozone
6
9
  - [Full Changelog](https://github.com/gem-shards/europe.rb/compare/v0.0.17...v0.0.18)
@@ -47,18 +47,18 @@ module Europe
47
47
  def self.setup_response(response)
48
48
  body = response_xml(response)
49
49
  {
50
- valid: extract_data(body, 4) == 'true',
51
- country_code: extract_data(body, 1),
52
- vat_number: extract_data(body, 2),
53
- request_date: convert_date(extract_data(body, 3)),
54
- name: extract_data(body, 5),
55
- address: extract_data(body, 6)
50
+ valid: extract_data(body, 3) == 'true',
51
+ country_code: extract_data(body, 0),
52
+ vat_number: extract_data(body, 1),
53
+ request_date: convert_date(extract_data(body, 2)),
54
+ name: extract_data(body, 4),
55
+ address: extract_data(body, 5)
56
56
  }
57
57
  end
58
58
 
59
59
  def self.response_xml(response)
60
60
  xml = REXML::Document.new(response.body)
61
- xml.first.elements.first.elements.first.elements
61
+ xml.elements.first.elements[2].elements[1]
62
62
  end
63
63
 
64
64
  def self.convert_date(date)
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Europe version
4
4
  module Europe
5
- VERSION = '0.0.18'
5
+ VERSION = '0.0.19'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: europe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gem shards
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-20 00:00:00.000000000 Z
11
+ date: 2022-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  - !ruby/object:Gem::Version
200
200
  version: '0'
201
201
  requirements: []
202
- rubygems_version: 3.1.4
202
+ rubygems_version: 3.3.7
203
203
  signing_key:
204
204
  specification_version: 4
205
205
  summary: Europe is a gem for retrieving and validating EU government data.