europe 0.0.12 → 0.0.17

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: aa46dc40ecd90942490472823d2557a6cffaed5467a8147a589323a3cfe81bc4
4
- data.tar.gz: 150097042834342df620e01663afad133e10ee7263a6740356ec108a7ff10e9e
3
+ metadata.gz: 2a51fd47c777826d6b43e650779d56da1dd6cade5cef5fbccdba86f9f0f1dbb5
4
+ data.tar.gz: aaf979e70a5e3dc6799824614c6d5c6d83c0ccd21d08960f66e6aee3d56006fa
5
5
  SHA512:
6
- metadata.gz: cf1c063eaa959b37e9202a0b962335c4479eab908210e4d5562c0ea7b667be366a20018f0334128a55ed51f2f31e9f6c3f13e108a62155d5d9f9ed3195d62d0a
7
- data.tar.gz: 8fd71a389816b6a02178419b975e00a9017e6c713be070ad365fe067e269dfcb18c4c2e881903b2b0111f2f0f89f3a6a57485d8ce3ed2a71321dfc25d75df69b
6
+ metadata.gz: e5473553fd2039a96277d7086dbc6d9e8b5a70891a70fb94361822ac1ce486000f1f18cde78796bb7d0eba35a443c47c5c6371d0497768bfcb4f8c81ad3d3c8a
7
+ data.tar.gz: 6f08b6079cf1bf521533e97d663b88779393fcddc4adda55860eb4329d99a22db2b610e3e106a2a798490e28301dbb3a5928a9b6b21be7b3e649d25f7f8fdfa0
@@ -0,0 +1,33 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
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
28
+ with:
29
+ ruby-version: 2.7
30
+ - name: Install dependencies
31
+ run: bundle install
32
+ - name: Run tests
33
+ run: bundle exec rake
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ mkmf.log
15
15
  .DS_Store
16
16
  coverage
17
17
  .byebug_history
18
+ *.gem
data/.pryrc CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # .pryrc
2
4
  require 'europe'
3
5
 
data/.rubocop.yml CHANGED
@@ -1,3 +1,18 @@
1
1
  AllCops:
2
+ NewCops: enable
3
+ TargetRubyVersion: 2.7
4
+ SuggestExtensions: false
2
5
  Exclude:
3
6
  - 'europe.gemspec'
7
+
8
+ Style/SlicingWithRange:
9
+ Enabled: false
10
+
11
+ Style/RedundantRegexpEscape:
12
+ Enabled: false
13
+
14
+ Style/RedundantRegexpCharacterClass:
15
+ Enabled: false
16
+
17
+ Style/CaseLikeIf:
18
+ Enabled: false
data/.travis.yml CHANGED
@@ -6,3 +6,6 @@ rvm:
6
6
  - 2.4.0
7
7
  - 2.5.0
8
8
  - 2.5.1
9
+ - 2.6.0
10
+ - 2.6.2
11
+ - 2.6.3
data/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
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
4
 
5
+ ## 0.0.17
6
+ - Removed all UK VAT logic
7
+ - Updated development dependencies
8
+ - [Full Changelog](https://github.com/VvanGemert/europe/compare/v0.0.15...v0.0.16)
9
+
10
+ ## 0.0.16
11
+ - Changed Slovak Republic to Slovakia in country names
12
+ - Updated outdated endpoint for VAT rates, thanks to @firstpromoter
13
+ - Fixed a couple of rubocop issues
14
+ - [Full Changelog](https://github.com/VvanGemert/europe/compare/v0.0.15...v0.0.16)
15
+ ## 0.0.15
16
+ - Checked library on Ruby 2.7
17
+ - Moved repository to gem-shards
18
+ - [Full Changelog](https://github.com/VvanGemert/europe/compare/v0.0.14...v0.0.15)
19
+
20
+ ## 0.0.14
21
+ - Fixed rubocop syntax issues
22
+ - Fixed issue with retrieving exchange rates when no valid JSON is returned
23
+ - [Full Changelog](https://github.com/VvanGemert/europe/compare/v0.0.13...v0.0.14)
24
+
25
+ ## 0.0.13
26
+ - Fixed rubocop syntax issues
27
+ - Changed ExchangeRate source from XML to JSON
28
+ - Fixed date parsing and soap:fault handling in VAT validation
29
+ - [Full Changelog](https://github.com/VvanGemert/europe/compare/v0.0.12...v0.0.13)
30
+
5
31
  ## 0.0.12
6
32
  - Fixed extracting vat validation data when it didn't exists
7
33
  - [Full Changelog](https://github.com/VvanGemert/europe/compare/v0.0.11...v0.0.12)
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in europe.gemspec
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ![Europe gem logo](https://s3-eu-west-1.amazonaws.com/valorsis.s3-website-eu-west-1.amazonaws.com/static/logo256.png)
2
- # Europe
2
+ # Europe :eu:
3
3
 
4
4
  This gem provides EU governmental data, extracted from various EU / EC websites. With this gem you can validate VAT numbers, retrieve VAT tax rates and currency exchange rates matched to the Euro. How to use this gem is pretty straightforward and written below.
5
5
 
@@ -43,16 +43,16 @@ where this gem can be used for.
43
43
  ** Updated: Parameter now consists of one value.**
44
44
  Call to validate VAT number (always starts with country code as specified in VIES)
45
45
  ```ruby
46
- Europe::Vat.validate('GB440627467')
46
+ Europe::Vat.validate('NL009291477B01')
47
47
  ```
48
48
  Response
49
49
  ```ruby
50
- { :country_code=>"GB",
51
- :vat_number=>"440627467",
52
- :request_date=>#<Date: 2015-12-15 ((2457372j,0s,0n),+0s,2299161j)>,
53
- :valid=>true,
54
- :name=>"SKY PLC",
55
- :address=>"6 CENTAURS BUSINESS PARK\nGRANT WAY\nISLEWORTH\nMIDDLESEX\n\nTW7 5QD" }
50
+ { :country_code => "NL",
51
+ :vat_number => "009291477B01",
52
+ :request_date => #<Date: 2015-12-15 ((2457372j,0s,0n),+0s,2299161j)>,
53
+ :valid => true,
54
+ :name => "KONINKLIJKE POSTNL B.V.",
55
+ :address => nil }
56
56
  ```
57
57
 
58
58
  ### Validate VAT number format
@@ -179,7 +179,7 @@ This gem is tested with the following Ruby versions on Linux and Mac OS X:
179
179
 
180
180
  ## Contributing
181
181
 
182
- 1. Fork it ( https://github.com/VvanGemert/europe/fork )
182
+ 1. Fork it ( https://github.com/gem-shards/europe.rb/fork )
183
183
  2. Create your feature branch (`git checkout -b my-new-feature`)
184
184
  3. Commit your changes (`git commit -am 'Add some feature'`)
185
185
  4. Push to the branch (`git push origin my-new-feature`)
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rake/testtask'
3
5
  require 'europe/rake_task'
data/europe.gemspec CHANGED
@@ -6,15 +6,15 @@ require 'europe/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'europe'
8
8
  spec.version = Europe::VERSION
9
- spec.authors = ['VvanGemert']
10
- spec.email = ['vincent@floorplanner.com']
9
+ spec.authors = ['Gem shards']
10
+ spec.email = ['vincent@gemshards.com']
11
11
  spec.summary = 'Europe is a gem for retrieving and validating ' \
12
12
  'EU government data.'
13
13
  spec.description = 'Europe is a simple library for retrieving ' \
14
14
  'EU government data such as VAT information, ' \
15
15
  'VAT validation, currency exchange rates and ' \
16
16
  'country information.'
17
- spec.homepage = 'https://github.com/VvanGemert/europe'
17
+ spec.homepage = 'https://github.com/gem-shards/europe.rb'
18
18
  spec.license = 'MIT'
19
19
 
20
20
  spec.files = `git ls-files -z`.split("\x0")
data/lib/europe.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'europe/version'
2
4
  require 'europe/countries/countries'
3
5
  require 'europe/currency/currency'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Source: http://publications.europa.eu/code/pdf/370000en.htm
2
4
 
3
5
  require 'europe/countries/reversed'
@@ -79,7 +81,7 @@ module Europe
79
81
  SI: { name: 'Slovenia', source_name: 'Slovenija',
80
82
  official_name: 'Republic of Slovenia',
81
83
  tld: '.si', currency: :EUR, capital: 'Ljubljana' },
82
- SK: { name: 'Slovak Republic', source_name: 'Slovensko',
84
+ SK: { name: 'Slovakia', source_name: 'Slovensko',
83
85
  official_name: 'Slovak Republic',
84
86
  tld: '.sk', currency: :EUR, capital: 'Bratislava' },
85
87
  FI: { name: 'Finland', source_name: 'Suomi',
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Europe
2
4
  # Countries
3
5
  module Countries
@@ -1,4 +1,6 @@
1
1
  #!/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  # Source: Wikipedia
3
5
  require 'europe/currency/exchange_rates'
4
6
 
@@ -1,4 +1,5 @@
1
- require 'rexml/document'
1
+ # frozen_string_literal: true
2
+
2
3
  require 'net/http'
3
4
  require 'date'
4
5
 
@@ -8,7 +9,7 @@ module Europe
8
9
  module Currency
9
10
  # exchange rates
10
11
  module ExchangeRates
11
- EXCHANGE_URL = 'https://www.floatrates.com/daily/eur.xml'.freeze
12
+ EXCHANGE_URL = 'https://www.floatrates.com/daily/eur.json'
12
13
 
13
14
  def self.retrieve
14
15
  resp = Net::HTTP.get_response(URI.parse(EXCHANGE_URL))
@@ -16,17 +17,19 @@ module Europe
16
17
  end
17
18
 
18
19
  def self.extract_rates(doc)
19
- xml = REXML::Document.new(doc)
20
+ data = JSON.parse(doc)
20
21
 
21
- rates = { date: Date.parse(xml.elements.first.elements[7].text),
22
+ rates = { date: Date.parse(data['usd']['date']),
22
23
  rates: {} }
23
24
 
24
- filter_rates(xml, rates)
25
+ filter_rates(data, rates)
26
+ rescue JSON::ParserError
27
+ :failed
25
28
  end
26
29
 
27
- def self.filter_rates(xml, rates)
28
- xml.elements.each('channel/item') do |item|
29
- rates[:rates][item[13].text.to_sym] = item[17].text.delete(',').to_f
30
+ def self.filter_rates(data, rates)
31
+ data.each do |currency, object|
32
+ rates[:rates][currency.upcase.to_sym] = object['rate'].to_f
30
33
  end
31
34
  rates
32
35
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'net/http'
2
4
  require 'uri'
3
5
  require 'json'
@@ -8,7 +10,7 @@ module Europe
8
10
  module Eurostat
9
11
  # http://ec.europa.eu/eurostat/data/database
10
12
  STAT_URL = 'http://ec.europa.eu/eurostat/wdds' \
11
- '/rest/data/v2.1/json/en/'.freeze
13
+ '/rest/data/v2.1/json/en/'
12
14
 
13
15
  def self.retrieve(dataset, filters)
14
16
  fetch_stats(dataset, filters)
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Europe Gem
2
4
  module Europe
3
5
  # VAT
4
6
  module Postal
5
- # rubocop:disable LineLength
7
+ # rubocop:disable Layout/LineLength
6
8
  POSTAL_REGEX = {
7
9
  AT: /^\d{4}$/,
8
10
  BE: /^\d{4}$/,
@@ -33,10 +35,11 @@ module Europe
33
35
  SI: /^\d{4}$/,
34
36
  SK: /^\d{3}[ ]?\d{2}$/
35
37
  }.freeze
36
- # rubocop:enable LineLength
38
+ # rubocop:enable Layout/LineLength
37
39
 
38
40
  def self.validate(country_code, postal_code)
39
- return false unless POSTAL_REGEX.keys.include?(country_code.to_sym)
41
+ return false unless POSTAL_REGEX.key?(country_code.to_sym)
42
+
40
43
  match_postal_code(postal_code, country_code)
41
44
  end
42
45
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Europe
2
4
  # RakeTask
3
5
  module RakeTask
@@ -1,14 +1,19 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'open-uri'
2
4
 
3
5
  namespace :eurostat do
4
- EUROSTAT_BULK_URL = 'http://ec.europa.eu/eurostat/' \
5
- 'estat-navtree-portlet-prod/BulkDownloadListing' \
6
- '?sort=1&file='.freeze
7
-
8
6
  desc 'Download categories from Eurostat Bulk Facility'
9
7
  task :download_categories do
8
+ eurostat_bulk_url = 'http://ec.europa.eu/eurostat/' \
9
+ 'estat-navtree-portlet-prod/BulkDownloadListing' \
10
+ '?sort=1&file='
11
+
12
+ data = Net::HTTP.get_response(
13
+ URI.parse("#{eurostat_bulk_url}table_of_contents_en.txt")
14
+ ).body
10
15
  File.open('cat.txt', 'w') do |f|
11
- IO.copy_stream(open(EUROSTAT_BULK_URL + 'table_of_contents_en.txt'), f)
16
+ IO.copy_stream(data, f)
12
17
  end
13
18
  end
14
19
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Europe Gem
2
4
  module Europe
3
5
  # VAT
@@ -17,7 +19,6 @@ module Europe
17
19
  ES: /^ES([A-Z0-9]\d{7}[A-Z0-9])$/,
18
20
  FI: /^FI\d{8}$/,
19
21
  FR: /^FR[A-Z0-9][A-Z0-9] \d{9}$/,
20
- GB: [/^GB(\d{3} \d{4} \d{2}( \d{3}5)?)$/, /^GB(HA|GD)\d{3}(6|7)$/],
21
22
  HR: /^HR\d{11}$/,
22
23
  HU: /^HU\d{8}$/,
23
24
  IE: /^IE\d[A-Z0-9\+\*|\d]\d{5}([A-Z]|WI)$/,
@@ -38,12 +39,13 @@ module Europe
38
39
  def self.validate(number)
39
40
  country_code = number[0..1].to_sym
40
41
  number = sanitize_number(number, country_code)
41
- return false unless VAT_REGEX.keys.include?(country_code)
42
+ return false unless VAT_REGEX.key?(country_code)
43
+
42
44
  match_vat_number(number, country_code)
43
45
  end
44
46
 
45
47
  def self.sanitize_number(number, country_code)
46
- if %i[GB DK FR].include?(country_code)
48
+ if %i[DK FR].include?(country_code)
47
49
  number.gsub(/\.|\t/, '').upcase
48
50
  else
49
51
  number.gsub(/\.|\t|\s/, '').upcase
@@ -1,14 +1,19 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rexml/document'
2
4
 
3
5
  module Europe
4
6
  module Vat
5
7
  # Rates
6
8
  module Rates
7
- RATES_URL = 'https://europa.eu/youreurope/business/taxation/' \
8
- 'vat/vat-rules-rates/index_en.htm'.freeze
9
+ RATES_URL = 'https://ec.europa.eu/taxation_customs/' \
10
+ 'business/vat/telecommunications-broadcasting' \
11
+ '-electronic-services/vat-rates_en'
12
+
9
13
  def self.retrieve
10
14
  resp = fetch_rates
11
15
  return resp if resp == :failed
16
+
12
17
  extract_rates(resp)
13
18
  end
14
19
 
@@ -19,15 +24,17 @@ module Europe
19
24
  xml = REXML::Document.new("<root>#{data}</root>")
20
25
  xml.first.elements.each('tr') do |result|
21
26
  next if result[3].nil?
27
+
22
28
  rates = filter_rate(result, rates)
23
29
  end
24
30
  rates
25
31
  end
26
32
 
27
33
  def self.filter_rate(result, rates)
28
- country = result[3].text
29
- rate = result[5].text
30
- rates[country.to_sym] = rate.to_f if country
34
+ country = result[0].text
35
+ rate = result[3].text
36
+ country_code = Europe::Countries::Reversed.generate(:name)[country]
37
+ rates[country_code] = rate.to_f if country_code
31
38
  rates
32
39
  end
33
40
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'europe/vat/rates'
2
4
  require 'europe/vat/format'
3
5
  require 'uri'
@@ -10,13 +12,13 @@ module Europe
10
12
  # VAT
11
13
  module Vat
12
14
  WSDL = 'http://ec.europa.eu/taxation_customs/vies/' \
13
- 'services/checkVatService'.freeze
15
+ 'services/checkVatService'
14
16
  HEADERS = {
15
17
  'Content-Type' => 'text/xml;charset=UTF-8',
16
18
  'SOAPAction' => ''
17
19
  }.freeze
18
20
 
19
- BODY = <<-XML.freeze
21
+ BODY = <<-XML
20
22
  <soapenv:Envelope
21
23
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
22
24
  xmlns:urn="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
@@ -33,11 +35,13 @@ module Europe
33
35
  def self.validate(number)
34
36
  response = send_request(number[0..1], number[2..-1])
35
37
  return :failed unless response.is_a? Net::HTTPSuccess
38
+ return :failed if response.body.include?('soap:Fault')
39
+
36
40
  setup_response(response)
37
41
  rescue Net::OpenTimeout
38
- return :timeout
42
+ :timeout
39
43
  rescue Net::HTTPServerError
40
- return :server_error
44
+ :server_error
41
45
  end
42
46
 
43
47
  def self.setup_response(response)
@@ -46,7 +50,7 @@ module Europe
46
50
  valid: extract_data(body, 4) == 'true',
47
51
  country_code: extract_data(body, 1),
48
52
  vat_number: extract_data(body, 2),
49
- request_date: Date.parse(extract_data(body, 3)),
53
+ request_date: convert_date(extract_data(body, 3)),
50
54
  name: extract_data(body, 5),
51
55
  address: extract_data(body, 6)
52
56
  }
@@ -57,18 +61,21 @@ module Europe
57
61
  xml.first.elements.first.elements.first.elements
58
62
  end
59
63
 
64
+ def self.convert_date(date)
65
+ return unless date
66
+
67
+ Date.parse(date)
68
+ end
69
+
60
70
  def self.extract_data(body, position)
61
- body[position].text if body[position]
71
+ body[position]&.text
62
72
  end
63
73
 
64
74
  def self.charge_vat?(origin_country, number)
65
75
  return false if number.nil? || number.empty?
66
- if origin_country.to_sym == number[0..1].to_sym
67
- true
68
- else
69
- Europe::Countries::COUNTRIES
70
- .keys.include?(number[0..1].to_sym)
71
- end
76
+
77
+ Europe::Vat::Fromat::VAT_REGEX.key?(origin_country.to_sym) ||
78
+ Europe::Vat::Fromat::VAT_REGEX.key?(number[0..1].to_sym)
72
79
  end
73
80
 
74
81
  def self.send_request(country_code, number)
@@ -1,4 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Europe version
2
4
  module Europe
3
- VERSION = '0.0.12'.freeze
5
+ VERSION = '0.0.17'
4
6
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_helper'
2
4
 
3
5
  module Europe
@@ -1,4 +1,6 @@
1
1
  #!/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  require 'test_helper'
3
5
 
4
6
  module Europe
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_helper'
2
4
 
3
5
  module Europe
@@ -12,7 +14,7 @@ module Europe
12
14
 
13
15
  def test_retrieval_exchange_rates
14
16
  rates = Europe::Currency::ExchangeRates.retrieve
15
- assert rates[:rates].keys.include?(:GBP)
17
+ assert rates[:rates].key?(:GBP)
16
18
  end
17
19
  end
18
20
  end
@@ -1,4 +1,6 @@
1
1
  #!/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  require 'test_helper'
3
5
 
4
6
  module Europe
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_helper'
2
4
 
3
5
  module Europe
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_helper'
2
4
 
3
5
  module Europe
@@ -19,10 +21,6 @@ module Europe
19
21
  ES: 'ESX9999999X',
20
22
  FI: 'FI99999999',
21
23
  FR: 'FRXX 999999999',
22
- GB: ['GB999 9999 99 9995',
23
- 'GBGD9996',
24
- 'GBHA9997',
25
- 'GB999 9999 99'],
26
24
  HR: 'HR99999999999',
27
25
  HU: 'HU99999999',
28
26
  IE: %w[IE9S99999L IE9999999WI],
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_helper'
2
4
 
3
5
  module Europe
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_helper'
2
4
 
3
5
  module Europe
@@ -21,11 +23,6 @@ module Europe
21
23
  assert validate_correct_vat[:valid] \
22
24
  unless %i[timeout failed].include?(validate_correct_vat)
23
25
 
24
- # Sky
25
- validate_correct_vat = Europe::Vat.validate('GB440627467')
26
- assert validate_correct_vat[:valid] \
27
- unless %i[timeout failed].include?(validate_correct_vat)
28
-
29
26
  # Volkswagen
30
27
  validate_correct_vat = Europe::Vat.validate('DE115235681')
31
28
  assert validate_correct_vat[:valid] \
data/test/test_helper.rb CHANGED
@@ -1,4 +1,6 @@
1
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
2
4
  require 'europe'
3
5
  require 'minitest/autorun'
4
6
  require 'webmock/minitest'
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.12
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
- - VvanGemert
8
- autorequire:
7
+ - Gem shards
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-14 00:00:00.000000000 Z
11
+ date: 2021-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -139,12 +139,13 @@ dependencies:
139
139
  description: Europe is a simple library for retrieving EU government data such as
140
140
  VAT information, VAT validation, currency exchange rates and country information.
141
141
  email:
142
- - vincent@floorplanner.com
142
+ - vincent@gemshards.com
143
143
  executables: []
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
147
  - ".coveralls.yml"
148
+ - ".github/workflows/ruby.yml"
148
149
  - ".gitignore"
149
150
  - ".pryrc"
150
151
  - ".rubocop.yml"
@@ -177,11 +178,11 @@ files:
177
178
  - test/europe/vat/rates_test.rb
178
179
  - test/europe/vat/validation_test.rb
179
180
  - test/test_helper.rb
180
- homepage: https://github.com/VvanGemert/europe
181
+ homepage: https://github.com/gem-shards/europe.rb
181
182
  licenses:
182
183
  - MIT
183
184
  metadata: {}
184
- post_install_message:
185
+ post_install_message:
185
186
  rdoc_options: []
186
187
  require_paths:
187
188
  - lib
@@ -196,9 +197,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
197
  - !ruby/object:Gem::Version
197
198
  version: '0'
198
199
  requirements: []
199
- rubyforge_project:
200
- rubygems_version: 2.7.7
201
- signing_key:
200
+ rubygems_version: 3.1.4
201
+ signing_key:
202
202
  specification_version: 4
203
203
  summary: Europe is a gem for retrieving and validating EU government data.
204
204
  test_files: