mercosur_plate_converter 0.1.0 → 1.0.0

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: 862163d8a94a20e03f1e3a769d06d2ac4b7ad088c53c97cc94f4f89cfc1fbcbc
4
- data.tar.gz: 7ae93d28afe4a90a236d9af6ef2baf2242dfc1c268c94fe5f8a31cc43f61433b
3
+ metadata.gz: 17c212f2e3b7ec528fc9c8d20d284b73c24875454de1bd03711c8c90435f0707
4
+ data.tar.gz: bd95caa8adafa4517e7988c85b38a04abc784a0c3ca790ec316a72f131f7422c
5
5
  SHA512:
6
- metadata.gz: 68ac243bd0507c78c3100549afa807c35b15be3324534d9aa96d41d13e11e29d0cc8d9e7a366b24e7f5c5f1d7800aff027ef59408ed9ca8d86e8e005d24be6ec
7
- data.tar.gz: 48dcc46e83c960c2ada799ab97b7e5fc4e62339a3e729d9d1d2ed41e7fb5f42d266e775a4d2f72e952a828249b60705a2239d2f7d1f46f675d40b9c50f6938db
6
+ metadata.gz: 3ca183dadab4659ce4c8fa527d61800438c88a3ff45c5c8f1b72ca709e0f858d2535683e281cd2db3df0a62c23acac57ce240c96344bf094edaf4d35a6eacca5
7
+ data.tar.gz: 1e767c92ae29a8f434adacdf229f3482e08bb5c348167e26bf89b3226f7d8be2f67a0532121ccce501944899ba8155fdae4ea30c73d372c86b256d7ee34dac32
@@ -3,70 +3,91 @@
3
3
  module MercosurPlateConverter
4
4
  # MercosurPlateConverter::Converter.new("ABC1C34") where "ABC1C34" is the vehicle's plate.
5
5
  class Converter
6
- FIFTH_TERM_MAP = ("A".."J").to_a.freeze
6
+ # Pre-computed mapping for better performance
7
+ FIFTH_TERM_MAP = %w[A B C D E F G H I J].freeze
8
+ FIFTH_TERM_MAP_REVERSE = FIFTH_TERM_MAP.each_with_index.to_h.freeze
9
+ private_constant :FIFTH_TERM_MAP_REVERSE
10
+
11
+ MERCOSUR_REGEX = /\A(BR\s?)?[A-Z]{3}[0-9][A-Z][0-9]{2}\z/
12
+ LEGACY_REGEX = /\A[A-Z]{3}[0-9]{4}\z/
7
13
 
8
14
  attr_reader :original_plate, :type, :plate
9
15
 
10
16
  def initialize(plate)
11
17
  @original_plate = sanitize_plate(plate)
12
18
  @plate = @original_plate.dup
13
- @type = nil
14
19
 
15
- validate_plate
20
+ validate_plate_presence
16
21
  detect_type
22
+ validate_plate_format
17
23
  convert
18
24
  end
19
25
 
20
- def convert
21
- send("convert_from_#{type}")
22
- end
23
-
24
26
  def valid?
25
- mercosur? || old_brazilian?
27
+ !@type.nil?
26
28
  end
27
29
 
28
30
  def mercosur?
29
- @original_plate.match?(/^(BR\s?)?[A-Z]{3}[0-9]{1}[A-Z]{1}[0-9]{2}$/)
31
+ @type == :mercosur
32
+ end
33
+
34
+ def legacy?
35
+ @type == :legacy
30
36
  end
31
37
 
32
38
  def old_brazilian?
33
- @original_plate.match?(/^[A-Z]{3}[0-9]{4}$/)
39
+ warn "[DEPRECATION] `old_brazilian?` is deprecated. Use `legacy?` instead."
40
+ legacy?
34
41
  end
35
42
 
36
43
  private
37
44
 
38
- def convert_from_old_brazilian
39
- return @plate if @type == :mercosur
45
+ def convert
46
+ case @type
47
+ when :mercosur
48
+ convert_from_mercosur
49
+ when :legacy
50
+ convert_from_legacy
51
+ else
52
+ @plate
53
+ end
54
+ end
40
55
 
41
- @plate[4] = FIFTH_TERM_MAP[@plate[4].to_i]
56
+ def convert_from_legacy
57
+ # Convert 5th position from number to letter
58
+ digit = @plate[4].to_i
59
+ @plate[4] = FIFTH_TERM_MAP[digit] if digit < FIFTH_TERM_MAP.size
42
60
  @plate
43
61
  end
44
62
 
45
63
  def convert_from_mercosur
46
- return @plate if @type == :old_brazilian
47
-
48
- @plate = @plate.gsub(/^(BR\s?)?/, "")
49
- @plate[4] = FIFTH_TERM_MAP.index(@plate[4]).to_s
64
+ # Remove optional BR prefix and convert 5th position from letter to number
65
+ @plate = @plate.delete_prefix("BR")
66
+ letter_index = FIFTH_TERM_MAP_REVERSE[@plate[4]]
67
+ @plate[4] = letter_index.to_s if letter_index
50
68
  @plate
51
69
  end
52
70
 
53
71
  def detect_type
54
- @type = if mercosur?
72
+ @type = if @original_plate.match?(MERCOSUR_REGEX)
55
73
  :mercosur
56
- elsif old_brazilian?
57
- :old_brazilian
74
+ elsif @original_plate.match?(LEGACY_REGEX)
75
+ :legacy
58
76
  end
59
77
  end
60
78
 
61
79
  def sanitize_plate(plate)
62
80
  return unless plate
63
81
 
64
- plate.to_s.upcase.gsub(/[^0-9A-Z]/, "")
82
+ plate.to_s.upcase.delete("^A-Z0-9")
83
+ end
84
+
85
+ def validate_plate_presence
86
+ raise MissingPlateError, "Missing plate" if @plate.nil? || @plate.empty?
65
87
  end
66
88
 
67
- def validate_plate
68
- raise MissingPlateError, "Missing plate" if @plate.nil?
69
- raise InvalidPlateError, "Invalid plate #{@plate}" unless valid?
89
+ def validate_plate_format
90
+ raise InvalidPlateError, "Invalid plate #{@plate}" unless @type
70
91
  end
71
92
  end
72
93
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MercosurPlateConverter
4
- VERSION = "0.1.0"
4
+ VERSION = "1.0.0"
5
5
  end
@@ -1,4 +1,64 @@
1
1
  module MercosurPlateConverter
2
2
  VERSION: String
3
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
3
+
4
+ # Main module method to create a converter instance from a plate string
5
+ def self.from_string: (String? plate) -> Converter
6
+
7
+ # Custom error classes
8
+ class MissingPlateError < StandardError
9
+ end
10
+
11
+ class InvalidPlateError < StandardError
12
+ end
13
+
14
+ # Main converter class
15
+ class Converter
16
+ # Constants
17
+ FIFTH_TERM_MAP: Array[String]
18
+ MERCOSUR_REGEX: Regexp
19
+ LEGACY_REGEX: Regexp
20
+
21
+ # Attributes
22
+ attr_reader original_plate: String
23
+ attr_reader type: (:mercosur | :legacy | nil)
24
+ attr_reader plate: String
25
+
26
+ # Initialize with a plate string
27
+ def initialize: (String? plate) -> void
28
+
29
+ # Check if the plate is valid
30
+ def valid?: () -> bool
31
+
32
+ # Check if the plate is in Mercosur format
33
+ def mercosur?: () -> bool
34
+
35
+ # Check if the plate is in legacy format
36
+ def legacy?: () -> bool
37
+
38
+ # DEPRECATED: Use legacy? instead
39
+ def old_brazilian?: () -> bool
40
+
41
+ private
42
+
43
+ # Convert the plate based on detected type
44
+ def convert: () -> String
45
+
46
+ # Convert from legacy format to Mercosur
47
+ def convert_from_legacy: () -> String
48
+
49
+ # Convert from Mercosur format to legacy
50
+ def convert_from_mercosur: () -> String
51
+
52
+ # Detect the type of the plate
53
+ def detect_type: () -> void
54
+
55
+ # Sanitize the input plate string
56
+ def sanitize_plate: (String? plate) -> String?
57
+
58
+ # Validate presence of the plate
59
+ def validate_plate_presence: () -> void
60
+
61
+ # Validate the plate format
62
+ def validate_plate_format: () -> void
63
+ end
4
64
  end
metadata CHANGED
@@ -1,43 +1,70 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercosur_plate_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renan Luiz Vendramini
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2022-03-30 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rbs
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '3.8'
19
+ type: :development
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '3.8'
13
26
  - !ruby/object:Gem::Dependency
14
27
  name: rspec
15
28
  requirement: !ruby/object:Gem::Requirement
16
29
  requirements:
17
30
  - - "~>"
18
31
  - !ruby/object:Gem::Version
19
- version: '3.0'
32
+ version: '3.13'
20
33
  type: :development
21
34
  prerelease: false
22
35
  version_requirements: !ruby/object:Gem::Requirement
23
36
  requirements:
24
37
  - - "~>"
25
38
  - !ruby/object:Gem::Version
26
- version: '3.0'
39
+ version: '3.13'
27
40
  - !ruby/object:Gem::Dependency
28
41
  name: rubocop
29
42
  requirement: !ruby/object:Gem::Requirement
30
43
  requirements:
31
44
  - - "~>"
32
45
  - !ruby/object:Gem::Version
33
- version: '1.2'
46
+ version: '1.69'
47
+ type: :development
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.69'
54
+ - !ruby/object:Gem::Dependency
55
+ name: rubocop-performance
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.23'
34
61
  type: :development
35
62
  prerelease: false
36
63
  version_requirements: !ruby/object:Gem::Requirement
37
64
  requirements:
38
65
  - - "~>"
39
66
  - !ruby/object:Gem::Version
40
- version: '1.2'
67
+ version: '1.23'
41
68
  - !ruby/object:Gem::Dependency
42
69
  name: rubocop-rake
43
70
  requirement: !ruby/object:Gem::Requirement
@@ -58,28 +85,28 @@ dependencies:
58
85
  requirements:
59
86
  - - "~>"
60
87
  - !ruby/object:Gem::Version
61
- version: 2.9.0
88
+ version: '3.2'
62
89
  type: :development
63
90
  prerelease: false
64
91
  version_requirements: !ruby/object:Gem::Requirement
65
92
  requirements:
66
93
  - - "~>"
67
94
  - !ruby/object:Gem::Version
68
- version: 2.9.0
95
+ version: '3.2'
69
96
  - !ruby/object:Gem::Dependency
70
97
  name: simplecov
71
98
  requirement: !ruby/object:Gem::Requirement
72
99
  requirements:
73
100
  - - "~>"
74
101
  - !ruby/object:Gem::Version
75
- version: 0.21.2
102
+ version: 0.22.0
76
103
  type: :development
77
104
  prerelease: false
78
105
  version_requirements: !ruby/object:Gem::Requirement
79
106
  requirements:
80
107
  - - "~>"
81
108
  - !ruby/object:Gem::Version
82
- version: 0.21.2
109
+ version: 0.22.0
83
110
  description: I created this gem to convert Mercosur plates to Brazilian plates and
84
111
  vice versa.
85
112
  email:
@@ -88,29 +115,18 @@ executables: []
88
115
  extensions: []
89
116
  extra_rdoc_files: []
90
117
  files:
91
- - ".rspec"
92
- - ".rubocop.yml"
93
- - Gemfile
94
- - LICENSE
95
- - README.md
96
- - README_en.md
97
- - Rakefile
98
- - bin/console
99
- - bin/setup
100
118
  - lib/mercosur_plate_converter.rb
101
119
  - lib/mercosur_plate_converter/converter.rb
102
120
  - lib/mercosur_plate_converter/errors.rb
103
121
  - lib/mercosur_plate_converter/version.rb
104
- - mercosur_plate_converter.gemspec
105
122
  - sig/mercosur_plate_converter.rbs
106
123
  homepage: https://github.com/rlvendramini/mercosur_plate_converter
107
124
  licenses:
108
125
  - MIT
109
126
  metadata:
110
- homepage_uri: https://github.com/rlvendramini/mercosur_plate_converter
111
- source_code_uri: https://github.com/rlvendramini/mercosur_plate_converter/blob/master/mercosur_plate_converter.gemspec
127
+ source_code_uri: https://github.com/rlvendramini/mercosur_plate_converter
112
128
  changelog_uri: https://github.com/rlvendramini/mercosur_plate_converter/blob/master/CHANGELOG.md
113
- post_install_message:
129
+ rubygems_mfa_required: 'true'
114
130
  rdoc_options: []
115
131
  require_paths:
116
132
  - lib
@@ -118,15 +134,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
134
  requirements:
119
135
  - - ">="
120
136
  - !ruby/object:Gem::Version
121
- version: 2.6.0
137
+ version: 3.1.0
122
138
  required_rubygems_version: !ruby/object:Gem::Requirement
123
139
  requirements:
124
140
  - - ">="
125
141
  - !ruby/object:Gem::Version
126
142
  version: '0'
127
143
  requirements: []
128
- rubygems_version: 3.3.3
129
- signing_key:
144
+ rubygems_version: 3.6.9
130
145
  specification_version: 4
131
146
  summary: An easy converter of Mercosur plates to Brazilian plates.
132
147
  test_files: []
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,13 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.6
3
-
4
- Style/StringLiterals:
5
- Enabled: true
6
- EnforcedStyle: double_quotes
7
-
8
- Style/StringLiteralsInInterpolation:
9
- Enabled: true
10
- EnforcedStyle: double_quotes
11
-
12
- Layout/LineLength:
13
- Max: 120
data/Gemfile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in mercosur_plate_converter.gemspec
6
- gemspec
7
-
8
- gem "rake", "~> 13.0"
9
-
10
- gem "rspec", "~> 3.0"
11
-
12
- gem "rubocop", "~> 1.21"
data/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Renan Luiz Vendramini
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
data/README.md DELETED
@@ -1,70 +0,0 @@
1
- # MercosurPlateConverter
2
-
3
- [ENGLISH 🇺🇸🇬🇧](README_en.md)
4
-
5
- A motivação por trás dessa GEM é validar e converter placas de veículos brasileiros do antigo modelo para o novo modelo adotado pelo Mercosul (e vice-versa).
6
-
7
- O padrão de numeração das placas de veículos brasileiros é o antigo modelo.
8
- O padrão de numeração das placas de veículos mercosul é o novo modelo.
9
-
10
- O padrão mercosul é composto por 3 letras, 1 número, 1 letra e 2 números.
11
- Para fazer a conversão do modelo antigo para o novo, é necessário que o número seja convertido para a letra equivalente.
12
- Essa conversão é feita a partir de uma sequência, como em um `Array`, onde cada elemento é uma letra de A a J de acordo com o índice desse `Array`.
13
-
14
- Assim sendo:
15
-
16
- |Número|Letra|
17
- |-----|------|
18
- |0|A|
19
- |1|B|
20
- |2|C|
21
- |3|D|
22
- |4|E|
23
- |5|F|
24
- |6|G|
25
- |7|H|
26
- |8|I|
27
- |9|J|
28
-
29
- ## Instalação
30
-
31
- Insira a linha abaixo em seu Gemfile:
32
-
33
- ```ruby
34
- gem 'mercosur_plate_converter'
35
- ```
36
-
37
- E então execute no terminal:
38
-
39
- $ bundle install
40
-
41
- Ou instale manualmente, também via terminal:
42
-
43
- $ gem install mercosur_plate_converter
44
-
45
- ## Uso
46
-
47
- Crie uma instância da classe MercosurPlateConverter e use os métodos para validar e converter placas.
48
-
49
- O exemplo abaixo considera que você fornece uma placa válida do tipo Mercosul:
50
-
51
- ```ruby
52
- plate = MercosurPlateConverter.from_string("ABC1C34")
53
-
54
- plate.original_plate #=> "ABC1C34"
55
- plate.plate #=> "ABC1234"
56
- plate.type #=> :mercosur
57
- plate.valid? #=> true
58
- plate.mercosur? #=> true
59
- plate.old_brazilian? #=> false
60
- ```
61
-
62
- ## Desenvolvimento
63
-
64
- Após verificar o repositório, execute `bin/setup` para instalar as dependências. Em seguida, execute `rake spec` para executar os testes. Você também pode executar `bin/console` para um prompt interativo que permitirá que você experimente.
65
-
66
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
67
-
68
- ## Como contribuir?
69
-
70
- Relatórios de bugs e pull requests são bem-vindos no GitHub em [github.com/rlvendramini/mercosur_plate_converter](https://github.com/rlvendramini/mercosur_plate_converter).
data/README_en.md DELETED
@@ -1,70 +0,0 @@
1
- # MercosurPlateConverter
2
-
3
- [PORTUGUESE 🇧🇷](README.md)
4
-
5
- With this GEM you can validate and convert Brazilian plates from the old model to the new model used by Mercosul (and vice-versa).
6
-
7
- The numbering standard for Brazilian vehicle license plates is the old model.
8
- The mercosur vehicle license plate numbering standard is the new model.
9
-
10
- The Mercosur standard is composed of 3 letters, 1 number, 1 letter and 2 numbers.
11
- To convert from the old model to the new one, it is necessary that the number be converted to the equivalent letter.
12
- This conversion is done from a sequence, as in an `Array`, where each element is a letter from A to J according to the index of that `Array`.
13
-
14
- So, for example:
15
-
16
- |Number|Letter|
17
- |-----|------|
18
- |0|A|
19
- |1|B|
20
- |2|C|
21
- |3|D|
22
- |4|E|
23
- |5|F|
24
- |6|G|
25
- |7|H|
26
- |8|I|
27
- |9|J|
28
-
29
- ## Installation
30
-
31
- Add this line to your application's Gemfile:
32
-
33
- ```ruby
34
- gem 'mercosur_plate_converter'
35
- ```
36
-
37
- And then execute:
38
-
39
- $ bundle install
40
-
41
- Or install it yourself as:
42
-
43
- $ gem install mercosur_plate_converter
44
-
45
- ## Usage
46
-
47
- Instantiate MercosurPlateConverter class and use the methods to validate and convert plates.
48
-
49
- The example below assumes that you supply a valid Mercosur-type license plate:
50
-
51
- ```ruby
52
- plate = MercosurPlateConverter.from_string("ABC1C34")
53
-
54
- plate.original_plate #=> "ABC1C34"
55
- plate.plate #=> "ABC1234"
56
- plate.type #=> :mercosur
57
- plate.valid? #=> true
58
- plate.mercosur? #=> true
59
- plate.old_brazilian? #=> false
60
- ```
61
-
62
- ## Development
63
-
64
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
65
-
66
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
67
-
68
- ## Contributing
69
-
70
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/mercosur_plate_converter.
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- require "rubocop/rake_task"
9
-
10
- RuboCop::RakeTask.new
11
-
12
- task default: %i[spec rubocop]
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "mercosur_plate_converter"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,42 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/mercosur_plate_converter/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "mercosur_plate_converter"
7
- spec.version = MercosurPlateConverter::VERSION
8
- spec.authors = ["Renan Luiz Vendramini"]
9
- spec.email = ["renanlvendramini@gmail.com"]
10
-
11
- spec.summary = "An easy converter of Mercosur plates to Brazilian plates."
12
- spec.description = "I created this gem to convert Mercosur plates to Brazilian plates and vice versa."
13
- spec.homepage = "https://github.com/rlvendramini/mercosur_plate_converter"
14
- spec.required_ruby_version = ">= 2.6.0"
15
- spec.license = "MIT"
16
-
17
- spec.metadata["homepage_uri"] = spec.homepage
18
- spec.metadata["source_code_uri"] = "#{spec.homepage}/blob/master/mercosur_plate_converter.gemspec"
19
- spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
20
-
21
- # Specify which files should be added to the gem when it is released.
22
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
- `git ls-files -z`.split("\x0").reject do |f|
25
- (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
26
- end
27
- end
28
- spec.bindir = "exe"
29
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
- spec.require_paths = ["lib"]
31
-
32
- # Uncomment to register a new dependency of your gem
33
- # spec.add_dependency "example-gem", "~> 1.0"
34
- spec.add_development_dependency "rspec", "~> 3.0"
35
- spec.add_development_dependency "rubocop", "~> 1.2"
36
- spec.add_development_dependency "rubocop-rake", "~> 0.6.0"
37
- spec.add_development_dependency "rubocop-rspec", "~> 2.9.0"
38
- spec.add_development_dependency "simplecov", "~> 0.21.2"
39
-
40
- # For more information and examples about making a new gem, check out our
41
- # guide at: https://bundler.io/guides/creating_gem.html
42
- end