cpf_cnpj_tools 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +22 -13
- data/CHANGELOG.md +9 -5
- data/README.md +40 -42
- data/lib/cpf_cnpj_tools/version.rb +1 -1
- data/lib/cpf_cnpj_tools.rb +165 -123
- data/lib/invalid_cpf_cnpj_format_exception.rb +10 -0
- metadata +3 -6
- data/.idea/cpf_cnpj_tools.iml +0 -70
- data/.idea/modules.xml +0 -8
- data/.idea/vcs.xml +0 -6
- data/.idea/workspace.xml +0 -69
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7d9d6635470921bf186a6348efe25fa7ee27c724be249310355e5f1c37a229b
|
4
|
+
data.tar.gz: 3ae4d8e0bf686a9b749728cdc2b246b52a5b2c21459b2401c9d0e135c66aa564
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7ee4d37f9949766db7d72586394badfb74dc28bea3f04396dd5624e775ae1db2621fdf1f25f88dbc2b2c26ac765a1418ce313efd8c12e34dd328710db094424
|
7
|
+
data.tar.gz: 95f4e0df9235d19681183db299c24b1c75b3e309b175a3b79e2c209391c76314fd261139ba1530f506feedd2be18530911b01f268c218859e68072cec0e82131
|
data/.rubocop.yml
CHANGED
@@ -1,13 +1,22 @@
|
|
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
|
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
|
14
|
+
|
15
|
+
Style/EndOfLine:
|
16
|
+
Enabled: False
|
17
|
+
|
18
|
+
Lint/ScriptPermission:
|
19
|
+
Enabled: False
|
20
|
+
|
21
|
+
Metrics/MethodLength:
|
22
|
+
Max: 15
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,42 +1,40 @@
|
|
1
|
-
# CpfCnpjTools
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
$
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
generate
|
25
|
-
|
26
|
-
puts generate.
|
27
|
-
puts generate.
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
Everyone interacting in the CpfCnpjTools project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ariasdiniz/cpf_cnpj_tools/blob/main/CODE_OF_CONDUCT.md).
|
1
|
+
# CpfCnpjTools
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
Install the gem and add to the application's Gemfile by executing:
|
6
|
+
|
7
|
+
$ bundle add cpf_cnpj_tools
|
8
|
+
|
9
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
10
|
+
|
11
|
+
$ gem install cpf_cnpj_tools
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
For usage, import the gem and create a new instance of it:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require "cpf_cnpj_tools"
|
19
|
+
|
20
|
+
generate = CpfCnpjTools::Generator.new
|
21
|
+
|
22
|
+
puts generate.generate_cpf # returns a valid CPF
|
23
|
+
puts generate.generate_cnpj # returns a valid cnpj
|
24
|
+
puts generate.cpf_valid?("999999900") # validate returning true or false
|
25
|
+
puts generate.cnpj_valid?("99999999000100") # validate returning true or false
|
26
|
+
puts generate.formatted?("99999999900") # validate if cpf/cnpj is formatted returning true or false
|
27
|
+
puts generate.format("16255648800") # return the formatted cpf/cnpj. Ex: 162.556.488-00
|
28
|
+
```
|
29
|
+
|
30
|
+
## Contributing
|
31
|
+
|
32
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ariasdiniz/cpf_cnpj_tools. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/ariasdiniz/cpf_cnpj_tools/blob/main/CODE_OF_CONDUCT.md).
|
33
|
+
|
34
|
+
## License
|
35
|
+
|
36
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
37
|
+
|
38
|
+
## Code of Conduct
|
39
|
+
|
40
|
+
Everyone interacting in the CpfCnpjTools project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ariasdiniz/cpf_cnpj_tools/blob/main/CODE_OF_CONDUCT.md).
|
data/lib/cpf_cnpj_tools.rb
CHANGED
@@ -1,123 +1,165 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "cpf_cnpj_tools/version"
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
#
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
#
|
18
|
-
|
19
|
-
|
20
|
-
base
|
21
|
-
base << generate_identifier(base,
|
22
|
-
base
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
base
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
end
|
121
|
-
|
122
|
-
|
123
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "cpf_cnpj_tools/version"
|
4
|
+
require_relative "invalid_cpf_cnpj_format_exception"
|
5
|
+
|
6
|
+
module CpfCnpjTools
|
7
|
+
##
|
8
|
+
# Class responsible for generating and
|
9
|
+
# validating CPF and CNPJ numbers
|
10
|
+
class Generator
|
11
|
+
CPF1DIGIT = [10, 9, 8, 7, 6, 5, 4, 3, 2].freeze
|
12
|
+
CPF2DIGIT = [11, 10, 9, 8, 7, 6, 5, 4, 3, 2].freeze
|
13
|
+
CNPJ1DIGIT = [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2].freeze
|
14
|
+
CNPJ2DIGIT = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2].freeze
|
15
|
+
|
16
|
+
##
|
17
|
+
# Method for generating valid CPF numbers
|
18
|
+
# @return String
|
19
|
+
def generate_cpf(formatted: true)
|
20
|
+
base = generate_base
|
21
|
+
base << generate_identifier(base, true)
|
22
|
+
base << generate_identifier(base, false)
|
23
|
+
return base.join unless formatted
|
24
|
+
|
25
|
+
format(base.join)
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Method for generating valid CNPJ numbers
|
30
|
+
# @return String
|
31
|
+
def generate_cnpj(formatted: true)
|
32
|
+
base = generate_base(cnpj: true)
|
33
|
+
base << generate_identifier(base, true, cpf: false)
|
34
|
+
base << generate_identifier(base, false, cpf: false)
|
35
|
+
return base.join unless formatted
|
36
|
+
|
37
|
+
format(base.join)
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# Method for validating CPF numbers.
|
42
|
+
# @param cpf (String, Integer)
|
43
|
+
# @return Boolean
|
44
|
+
def cpf_valid?(cpf)
|
45
|
+
cpf_array = remove_formatting(cpf.to_s).split("").map!(&:to_i)
|
46
|
+
first_digit = cpf_array[-2]
|
47
|
+
second_digit = cpf_array[-1]
|
48
|
+
base_cpf = cpf_array[0..8]
|
49
|
+
calculated_first_digit = generate_identifier(base_cpf, true)
|
50
|
+
calculated_second_digit = generate_identifier(base_cpf << calculated_first_digit, false)
|
51
|
+
return false if (first_digit != calculated_first_digit) || (second_digit != calculated_second_digit)
|
52
|
+
|
53
|
+
true
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# Method for validating CNPJ numbers.
|
58
|
+
# @param cnpj (String, Integer)
|
59
|
+
# @return Boolean
|
60
|
+
def cnpj_valid?(cnpj)
|
61
|
+
cnpj_array = remove_formatting(cnpj.to_s).split("").map!(&:to_i)
|
62
|
+
first_digit = cnpj_array[-2]
|
63
|
+
second_digit = cnpj_array[-1]
|
64
|
+
base_cnpj = cnpj_array[0..11]
|
65
|
+
calculated_first_digit = generate_identifier(base_cnpj, true, cpf: false)
|
66
|
+
calculated_second_digit = generate_identifier(base_cnpj << calculated_first_digit, false, cpf: false)
|
67
|
+
return false if (first_digit != calculated_first_digit) || (second_digit != calculated_second_digit)
|
68
|
+
|
69
|
+
true
|
70
|
+
end
|
71
|
+
|
72
|
+
def formatted?(cpf_or_cnpj)
|
73
|
+
number = cpf_or_cnpj.to_s
|
74
|
+
return true if (number =~ /\d{3}\.\d{3}\.\d{3}-\d{2}/) || (number =~ %r{\d{2}\.\d{3}\.\d{3}/0001-\d{2}})
|
75
|
+
|
76
|
+
false
|
77
|
+
end
|
78
|
+
|
79
|
+
##
|
80
|
+
# Returns an unformatted CPF or CNPJ.
|
81
|
+
# If the value is already unformatted,
|
82
|
+
# the method returns the value passed as argument.
|
83
|
+
# @param cpf_or_cnpj (String, Integer)
|
84
|
+
# @return String
|
85
|
+
def remove_formatting(cpf_or_cnpj)
|
86
|
+
unformatted = cpf_or_cnpj.to_s.delete("./-")
|
87
|
+
return unformatted unless unformatted.nil?
|
88
|
+
|
89
|
+
cpf_or_cnpj.to_s
|
90
|
+
end
|
91
|
+
|
92
|
+
def format(cpf_or_cnpj)
|
93
|
+
if cpf_valid?(cpf_or_cnpj)
|
94
|
+
cpf = cpf_or_cnpj.to_s.dup
|
95
|
+
cpf.insert(3, ".")
|
96
|
+
.insert(7, ".")
|
97
|
+
.insert(-3, "-")
|
98
|
+
elsif cnpj_valid?(cpf_or_cnpj)
|
99
|
+
cnpj = cpf_or_cnpj.to_s.dup
|
100
|
+
cnpj.insert(2, ".")
|
101
|
+
.insert(6, ".")
|
102
|
+
.insert(10, "/")
|
103
|
+
.insert(-3, "-")
|
104
|
+
else
|
105
|
+
raise InvalidCpfCnpjFormatError
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
private
|
110
|
+
|
111
|
+
##
|
112
|
+
# Generate the first numbers of CPF/CNPJ
|
113
|
+
# randomly.
|
114
|
+
# @param cnpj (Boolean)
|
115
|
+
# @return (Array)
|
116
|
+
def generate_base(cnpj: false)
|
117
|
+
base_number = []
|
118
|
+
9.times do
|
119
|
+
base_number << rand(10)
|
120
|
+
end
|
121
|
+
if cnpj
|
122
|
+
base_number.delete_at(-1)
|
123
|
+
base_number.push 0, 0, 0, 1
|
124
|
+
end
|
125
|
+
base_number
|
126
|
+
end
|
127
|
+
|
128
|
+
##
|
129
|
+
# Generate the first and second identifier numbers
|
130
|
+
# of the CPF/CNPJ.
|
131
|
+
# @param first_numbers (Array)
|
132
|
+
# @param first (Boolean)
|
133
|
+
# @param cpf (Boolean)
|
134
|
+
# @return Integer
|
135
|
+
def generate_identifier(first_numbers, first, cpf: true)
|
136
|
+
multipliers = if cpf
|
137
|
+
first ? CPF1DIGIT : CPF2DIGIT
|
138
|
+
else
|
139
|
+
first ? CNPJ1DIGIT : CNPJ2DIGIT
|
140
|
+
end
|
141
|
+
product = []
|
142
|
+
first_numbers.length.times do |index|
|
143
|
+
product << first_numbers[index] * multipliers[index]
|
144
|
+
end
|
145
|
+
generate_valid_digit(product)
|
146
|
+
end
|
147
|
+
|
148
|
+
##
|
149
|
+
# Calculates the value of a valid identifier digit.
|
150
|
+
# @param digits (Array)
|
151
|
+
# @return Integer
|
152
|
+
def generate_valid_digit(digits)
|
153
|
+
sum = 0
|
154
|
+
digits.each do |item|
|
155
|
+
sum += item
|
156
|
+
end
|
157
|
+
remainder = sum % 11
|
158
|
+
if remainder < 2
|
159
|
+
0
|
160
|
+
else
|
161
|
+
11 - remainder
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpf_cnpj_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aria Diniz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: With this tool you will be able to generate and validate brazilian CPF
|
14
14
|
and CNPJ numbers.
|
@@ -18,10 +18,6 @@ executables: []
|
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
|
-
- ".idea/cpf_cnpj_tools.iml"
|
22
|
-
- ".idea/modules.xml"
|
23
|
-
- ".idea/vcs.xml"
|
24
|
-
- ".idea/workspace.xml"
|
25
21
|
- ".rubocop.yml"
|
26
22
|
- CHANGELOG.md
|
27
23
|
- CODE_OF_CONDUCT.md
|
@@ -32,6 +28,7 @@ files:
|
|
32
28
|
- cpf_cnpj_tools.gemspec
|
33
29
|
- lib/cpf_cnpj_tools.rb
|
34
30
|
- lib/cpf_cnpj_tools/version.rb
|
31
|
+
- lib/invalid_cpf_cnpj_format_exception.rb
|
35
32
|
- sig/cpf_cnpj_tools.rbs
|
36
33
|
homepage: https://github.com/ariasdiniz/cpf_cnpj_tools
|
37
34
|
licenses:
|
data/.idea/cpf_cnpj_tools.iml
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<module type="RUBY_MODULE" version="4">
|
3
|
-
<component name="ModuleRunConfigurationManager">
|
4
|
-
<shared />
|
5
|
-
</component>
|
6
|
-
<component name="NewModuleRootManager">
|
7
|
-
<content url="file://$MODULE_DIR$">
|
8
|
-
<sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
|
9
|
-
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
10
|
-
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
11
|
-
</content>
|
12
|
-
<orderEntry type="jdk" jdkName="ruby-3.1.2-p20" jdkType="RUBY_SDK" />
|
13
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
14
|
-
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, ruby-3.1.2-p20) [gem]" level="application" />
|
15
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.3.18, ruby-3.1.2-p20) [gem]" level="application" />
|
16
|
-
<orderEntry type="library" scope="PROVIDED" name="json (v2.6.2, ruby-3.1.2-p20) [gem]" level="application" />
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.16.3, ruby-3.1.2-p20) [gem]" level="application" />
|
18
|
-
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.22.1, ruby-3.1.2-p20) [gem]" level="application" />
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="parser (v3.1.2.0, ruby-3.1.2-p20) [gem]" level="application" />
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, ruby-3.1.2-p20) [gem]" level="application" />
|
21
|
-
<orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, ruby-3.1.2-p20) [gem]" level="application" />
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.5.0, ruby-3.1.2-p20) [gem]" level="application" />
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, ruby-3.1.2-p20) [gem]" level="application" />
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="rubocop (v1.33.0, ruby-3.1.2-p20) [gem]" level="application" />
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.19.1, ruby-3.1.2-p20) [gem]" level="application" />
|
26
|
-
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, ruby-3.1.2-p20) [gem]" level="application" />
|
27
|
-
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.2.0, ruby-3.1.2-p20) [gem]" level="application" />
|
28
|
-
</component>
|
29
|
-
<component name="RakeTasksCache">
|
30
|
-
<option name="myRootTask">
|
31
|
-
<RakeTaskImpl id="rake">
|
32
|
-
<subtasks>
|
33
|
-
<RakeTaskImpl description="Build cpf_cnpj_tools-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
|
34
|
-
<RakeTaskImpl id="build">
|
35
|
-
<subtasks>
|
36
|
-
<RakeTaskImpl description="Generate SHA512 checksum if cpf_cnpj_tools-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
|
37
|
-
</subtasks>
|
38
|
-
</RakeTaskImpl>
|
39
|
-
<RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
|
40
|
-
<RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
|
41
|
-
<RakeTaskImpl description="Build and install cpf_cnpj_tools-0.1.0.gem into system gems" fullCommand="install" id="install" />
|
42
|
-
<RakeTaskImpl id="install">
|
43
|
-
<subtasks>
|
44
|
-
<RakeTaskImpl description="Build and install cpf_cnpj_tools-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
|
45
|
-
</subtasks>
|
46
|
-
</RakeTaskImpl>
|
47
|
-
<RakeTaskImpl description="Create tag v0.1.0 and build and push cpf_cnpj_tools-0.1.0.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
|
48
|
-
<RakeTaskImpl description="Run RuboCop" fullCommand="rubocop" id="rubocop" />
|
49
|
-
<RakeTaskImpl id="rubocop">
|
50
|
-
<subtasks>
|
51
|
-
<RakeTaskImpl description="Autocorrect RuboCop offenses (only when it's safe)" fullCommand="rubocop:autocorrect" id="autocorrect" />
|
52
|
-
<RakeTaskImpl description="Autocorrect RuboCop offenses (safe and unsafe)" fullCommand="rubocop:autocorrect_all" id="autocorrect_all" />
|
53
|
-
<RakeTaskImpl description="" fullCommand="rubocop:auto_correct" id="auto_correct" />
|
54
|
-
</subtasks>
|
55
|
-
</RakeTaskImpl>
|
56
|
-
<RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
|
57
|
-
<RakeTaskImpl description="" fullCommand="default" id="default" />
|
58
|
-
<RakeTaskImpl description="" fullCommand="release" id="release" />
|
59
|
-
<RakeTaskImpl id="release">
|
60
|
-
<subtasks>
|
61
|
-
<RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
|
62
|
-
<RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
|
63
|
-
<RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
|
64
|
-
</subtasks>
|
65
|
-
</RakeTaskImpl>
|
66
|
-
</subtasks>
|
67
|
-
</RakeTaskImpl>
|
68
|
-
</option>
|
69
|
-
</component>
|
70
|
-
</module>
|
data/.idea/modules.xml
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project version="4">
|
3
|
-
<component name="ProjectModuleManager">
|
4
|
-
<modules>
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/cpf_cnpj_tools.iml" filepath="$PROJECT_DIR$/.idea/cpf_cnpj_tools.iml" />
|
6
|
-
</modules>
|
7
|
-
</component>
|
8
|
-
</project>
|
data/.idea/vcs.xml
DELETED
data/.idea/workspace.xml
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project version="4">
|
3
|
-
<component name="ChangeListManager">
|
4
|
-
<list default="true" id="ad094d7b-c701-4696-aa6d-20811d69a9f4" name="Changes" comment="">
|
5
|
-
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
|
6
|
-
</list>
|
7
|
-
<option name="SHOW_DIALOG" value="false" />
|
8
|
-
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
9
|
-
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
10
|
-
<option name="LAST_RESOLUTION" value="IGNORE" />
|
11
|
-
</component>
|
12
|
-
<component name="Git.Settings">
|
13
|
-
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
14
|
-
</component>
|
15
|
-
<component name="MarkdownSettingsMigration">
|
16
|
-
<option name="stateVersion" value="1" />
|
17
|
-
</component>
|
18
|
-
<component name="ProjectId" id="2G0YdJp5P5d5f3HnUFKl61CT7ew" />
|
19
|
-
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
20
|
-
<component name="ProjectViewState">
|
21
|
-
<option name="hideEmptyMiddlePackages" value="true" />
|
22
|
-
<option name="showLibraryContents" value="true" />
|
23
|
-
</component>
|
24
|
-
<component name="PropertiesComponent"><![CDATA[{
|
25
|
-
"keyToString": {
|
26
|
-
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
27
|
-
"RunOnceActivity.ShowReadmeOnStart": "true",
|
28
|
-
"WebServerToolWindowFactoryState": "false",
|
29
|
-
"nodejs_package_manager_path": "npm",
|
30
|
-
"ruby.rails.projectView.checked": "true",
|
31
|
-
"settings.editor.selected.configurable": "Errors"
|
32
|
-
}
|
33
|
-
}]]></component>
|
34
|
-
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
35
|
-
<component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" RAKE_SPRING_PRE_LOADER_OPTION="true" RAILS_SPRING_PRE_LOADER_OPTION="true" />
|
36
|
-
<component name="TaskManager">
|
37
|
-
<task active="true" id="Default" summary="Default task">
|
38
|
-
<changelist id="ad094d7b-c701-4696-aa6d-20811d69a9f4" name="Changes" comment="" />
|
39
|
-
<created>1665527053664</created>
|
40
|
-
<option name="number" value="Default" />
|
41
|
-
<option name="presentableId" value="Default" />
|
42
|
-
<updated>1665527053664</updated>
|
43
|
-
<workItem from="1665527054889" duration="1995000" />
|
44
|
-
</task>
|
45
|
-
<servers />
|
46
|
-
</component>
|
47
|
-
<component name="TypeScriptGeneratedFilesManager">
|
48
|
-
<option name="version" value="3" />
|
49
|
-
</component>
|
50
|
-
<component name="Vcs.Log.Tabs.Properties">
|
51
|
-
<option name="TAB_STATES">
|
52
|
-
<map>
|
53
|
-
<entry key="MAIN">
|
54
|
-
<value>
|
55
|
-
<State />
|
56
|
-
</value>
|
57
|
-
</entry>
|
58
|
-
</map>
|
59
|
-
</option>
|
60
|
-
</component>
|
61
|
-
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
62
|
-
<SUITE FILE_PATH="coverage/cpf_cnpj_tools@test_invalid_cpf.rcov" NAME="test_invalid_cpf Coverage Results" MODIFIED="1665527793284" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="cpf_cnpj_tools" />
|
63
|
-
<SUITE FILE_PATH="coverage/cpf_cnpj_tools@TestCpfCnpjTools.rcov" NAME="TestCpfCnpjTools Coverage Results" MODIFIED="1665528330730" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="cpf_cnpj_tools" />
|
64
|
-
<SUITE FILE_PATH="coverage/cpf_cnpj_tools@test_invalid_cnpj.rcov" NAME="test_invalid_cnpj Coverage Results" MODIFIED="1665527916319" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="cpf_cnpj_tools" />
|
65
|
-
<SUITE FILE_PATH="coverage/cpf_cnpj_tools@test_cnpj.rcov" NAME="test_cnpj Coverage Results" MODIFIED="1665527920522" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="cpf_cnpj_tools" />
|
66
|
-
<SUITE FILE_PATH="coverage/cpf_cnpj_tools@test_cpf.rcov" NAME="test_cpf Coverage Results" MODIFIED="1665528568296" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="cpf_cnpj_tools" />
|
67
|
-
<SUITE FILE_PATH="coverage/cpf_cnpj_tools@Testing.rcov" NAME="Testing Coverage Results" MODIFIED="1665528574697" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="cpf_cnpj_tools" />
|
68
|
-
</component>
|
69
|
-
</project>
|