br_danfe 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +2 -2
- data/README.md +4 -3
- data/br_danfe.gemspec +1 -1
- data/lib/br_danfe/danfe_lib/document.rb +1 -1
- data/lib/br_danfe/uf.rb +12 -10
- data/lib/br_danfe/version.rb +1 -1
- data/spec/lib/uf_spec.rb +6 -6
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: be0d6e9558d5b847f53c00cade4b70ddb70ad4a0
|
4
|
+
data.tar.gz: d8bc73c774cc349271de9ea30a0dce444da770de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbe1f22e327d37ca9407ef1694cfb9bfce6ff7975cc06e74ad8cc97c39689dafd7937fe5dbe9386738f7b66e2ed85b3e3a8ea1ddb297b397603d41b090795069
|
7
|
+
data.tar.gz: ba71d07555ab5cc042d9e1e47593ac824d03cdfc21a2f61e74b142ded20e10ed2261682b4c572b82048ee8bb7ecdffd026b7955749c47eca0960e76f079550f8
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -186,13 +186,14 @@ IE | 964.508.990.089
|
|
186
186
|
|
187
187
|
You can generate new data using [4devs generators](http://www.4devs.com.br).
|
188
188
|
|
189
|
-
##
|
189
|
+
## Deploy
|
190
190
|
|
191
|
-
|
191
|
+
$ bundle exec rake release # Create tag vX.X.X, build and push br_danfe-X.X.X.gem to Rubygems
|
192
|
+
|
193
|
+
You can build or install using one of the above tasks
|
192
194
|
|
193
195
|
$ bundle exec rake build # Build br_danfe-X.X.X.gem into the pkg directory
|
194
196
|
$ bundle exec rake install # Build and install br_danfe-X.X.X.gem into system gems
|
195
|
-
$ bundle exec rake release # Create tag vX.X.X, build and push br_danfe-X.X.X.gem to Rubygems
|
196
197
|
|
197
198
|
## Contributing
|
198
199
|
|
data/br_danfe.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.required_ruby_version = '>= 2.1'
|
20
20
|
|
21
21
|
spec.add_dependency 'barby', '0.5.1'
|
22
|
-
spec.add_dependency 'br_documents', '0.0.15'
|
22
|
+
spec.add_dependency 'br_documents', '>= 0.0.15'
|
23
23
|
spec.add_dependency 'i18n', '0.8.6'
|
24
24
|
spec.add_dependency 'nokogiri', '1.8.3'
|
25
25
|
spec.add_dependency 'prawn', '2.1.0'
|
data/lib/br_danfe/uf.rb
CHANGED
@@ -1,13 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module BrDanfe
|
2
|
+
class Uf
|
3
|
+
def self.include?(uf)
|
4
|
+
uf.present? ? all.include?(uf.to_sym) : false
|
5
|
+
end
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
def self.all
|
8
|
+
%i[
|
9
|
+
AC AL AP AM BA CE DF ES GO MA MT MS MG PA PB PR PE PI RJ RN RS RO RR SC
|
10
|
+
SP SE TO
|
11
|
+
]
|
12
|
+
end
|
13
|
+
private_class_method :all
|
11
14
|
end
|
12
|
-
private_class_method :all
|
13
15
|
end
|
data/lib/br_danfe/version.rb
CHANGED
data/spec/lib/uf_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Uf do
|
3
|
+
describe BrDanfe::Uf do
|
4
4
|
describe '#include?' do
|
5
5
|
ufs =
|
6
6
|
[
|
@@ -11,7 +11,7 @@ describe Uf do
|
|
11
11
|
context 'when uf is symbol' do
|
12
12
|
ufs.each do |uf|
|
13
13
|
it "returns true for uf #{uf}" do
|
14
|
-
expect(Uf.include? uf.to_sym).to be true
|
14
|
+
expect(BrDanfe::Uf.include? uf.to_sym).to be true
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -19,26 +19,26 @@ describe Uf do
|
|
19
19
|
context 'when uf is string' do
|
20
20
|
ufs.each do |uf|
|
21
21
|
it "returns true for uf #{uf}" do
|
22
|
-
expect(Uf.include? uf).to be true
|
22
|
+
expect(BrDanfe::Uf.include? uf).to be true
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
context 'when uf is not from Brazil' do
|
28
28
|
it "returns false" do
|
29
|
-
expect(Uf.include? 'EX').to be false
|
29
|
+
expect(BrDanfe::Uf.include? 'EX').to be false
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
33
|
context 'when uf is blank' do
|
34
34
|
it "returns false" do
|
35
|
-
expect(Uf.include? '').to be false
|
35
|
+
expect(BrDanfe::Uf.include? '').to be false
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
39
|
context 'when uf is nil' do
|
40
40
|
it "returns false" do
|
41
|
-
expect(Uf.include? nil).to be false
|
41
|
+
expect(BrDanfe::Uf.include? nil).to be false
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: br_danfe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ASSEINFO
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: br_documents
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.0.15
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.0.15
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -368,7 +368,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
368
368
|
version: '0'
|
369
369
|
requirements: []
|
370
370
|
rubyforge_project:
|
371
|
-
rubygems_version: 2.
|
371
|
+
rubygems_version: 2.4.5.4
|
372
372
|
signing_key:
|
373
373
|
specification_version: 4
|
374
374
|
summary: DANFE pdf generator for Brazilian invoices.
|