br_documents 0.0.14 → 0.0.15

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
  SHA1:
3
- metadata.gz: 8a1d30ad368278bb84c8e042fdf444957d9446f9
4
- data.tar.gz: 354f2944e1f35a1457a14cf03d61463d1f091c9b
3
+ metadata.gz: 85b3dba0a5cb19581015f983a1ec5f186521756d
4
+ data.tar.gz: f4166ebcf7711bc8849438bd317649ce0c02a5a4
5
5
  SHA512:
6
- metadata.gz: f78bbcdb13703e2737aeee5a026c0bdc5ea5e3325fd23e3924b1e0f504276611bf307eb039daf066c9e19e20ea5b6df8bab97a9f8a16455b33685a8b46787a0d
7
- data.tar.gz: 74b59bab7e885a5f7a8d8c6bd137867bcd617d7a2f184aa0822984626ffc48b541a654c1b809c364b98ba8e005148fccc40ddf36f0a0096566fbbfacbc1aacb4
6
+ metadata.gz: 74be958176462d91c7eeb8779b0976191dd34fdf361b086717806d1462ffcb9d89b08c63fc2efb20513986e70ac8056e9876531d16c391793dabcc340b2109d2
7
+ data.tar.gz: 69fc04d5fa9cc32d5b52544b094281fa923cec602c11a92f7ea58752e9d4f0400e2b08a2141104e8b356e49e3d2d0b969b05b117337a917d4e1e46ce787aff0f
data/.gitignore CHANGED
@@ -3,6 +3,7 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
+ .idea/
6
7
  Gemfile.lock
7
8
  InstalledFiles
8
9
  _yardoc
data/README.md CHANGED
@@ -147,6 +147,10 @@ ie.formatted # => "254.062.407"
147
147
  ie.valid? # => true
148
148
  ```
149
149
 
150
+ ## How to add contributors
151
+
152
+ gem owner --add leandrolourenci@gmail.com br_documents
153
+
150
154
  ## Contributing
151
155
 
152
156
  1. Fork it
@@ -1,8 +1,8 @@
1
1
  class IeValidator < ActiveModel::EachValidator
2
2
  def validate_each(record, attribute, value)
3
3
  if ie_present?(value)
4
- attribute_uf_was_configured_at_validator?(record, attribute) and
5
- can_read_uf_at_record?(options, record, attribute) and
4
+ attribute_uf_was_configured_at_validator?(record) and
5
+ can_read_uf_at_record?(options, record) and
6
6
  ie_valid?(record, attribute, value)
7
7
  end
8
8
  end
@@ -12,13 +12,13 @@ class IeValidator < ActiveModel::EachValidator
12
12
  value.present?
13
13
  end
14
14
 
15
- def attribute_uf_was_configured_at_validator?(record, attribute)
15
+ def attribute_uf_was_configured_at_validator?(record)
16
16
  record.errors.add(:base,
17
17
  I18n.t("validator.ie.uf.no_configured")) unless options[:uf].present?
18
18
  record.errors.messages.empty?
19
19
  end
20
20
 
21
- def can_read_uf_at_record?(options, record, attribute)
21
+ def can_read_uf_at_record?(options, record)
22
22
  begin
23
23
  read_uf(record)
24
24
  rescue NoMethodError
@@ -1,3 +1,3 @@
1
1
  module BrDocuments
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: br_documents
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - ASSEINFO - Sistemas de Informação
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-29 00:00:00.000000000 Z
11
+ date: 2018-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
235
  version: '0'
236
236
  requirements: []
237
237
  rubyforge_project:
238
- rubygems_version: 2.6.8
238
+ rubygems_version: 2.6.13
239
239
  signing_key:
240
240
  specification_version: 4
241
241
  summary: Validates brazilian documents like CPF, CNPJ and IE. It can be used with