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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: f1b92d1cedbb5fcb47932116f49a73c2b6183870badaf03ea99774247cc63ed9
4
- data.tar.gz: 8e7c107b2c9c028a17a069fa954400f81c152d47219c1dd53b2b8cfebc5c4e19
2
+ SHA1:
3
+ metadata.gz: be0d6e9558d5b847f53c00cade4b70ddb70ad4a0
4
+ data.tar.gz: d8bc73c774cc349271de9ea30a0dce444da770de
5
5
  SHA512:
6
- metadata.gz: fd8fc831d3f76e99549669514ff36c0ebc3542bce6332f802f8fabad8c6b5a69ffb1534cf45b297452e770c22243e331fc7a1661c6d8e62223d044ab5be82c15
7
- data.tar.gz: 16a6b946593be866a6fa6d1bc23c17c4d66e9870bbf6da05b3e69390bf23a73f60d228055029ba03ec6139ac85a6a49a22b891cbc028cb956c01d8602cda1126
6
+ metadata.gz: cbe1f22e327d37ca9407ef1694cfb9bfce6ff7975cc06e74ad8cc97c39689dafd7937fe5dbe9386738f7b66e2ed85b3e3a8ea1ddb297b397603d41b090795069
7
+ data.tar.gz: ba71d07555ab5cc042d9e1e47593ac824d03cdfc21a2f61e74b142ded20e10ed2261682b4c572b82048ee8bb7ecdffd026b7955749c47eca0960e76f079550f8
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- br_danfe (0.7.4)
4
+ br_danfe (0.7.5)
5
5
  barby (= 0.5.1)
6
- br_documents (= 0.0.15)
6
+ br_documents (>= 0.0.15)
7
7
  i18n (= 0.8.6)
8
8
  nokogiri (= 1.8.3)
9
9
  prawn (= 2.1.0)
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
- ## Building and publishing
189
+ ## Deploy
190
190
 
191
- You can build using one of the above tasks
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'
@@ -68,7 +68,7 @@ module BrDanfe
68
68
  i18n = xpath_ie.gsub("/", ".");
69
69
 
70
70
  data = ""
71
- if Uf.include?(xml[xpath_uf])
71
+ if BrDanfe::Uf.include?(xml[xpath_uf])
72
72
  ie = BrDocuments::IE::Factory.create(xml[xpath_uf], xml[xpath_ie])
73
73
  data = ie.formatted if ie.valid?
74
74
  end
data/lib/br_danfe/uf.rb CHANGED
@@ -1,13 +1,15 @@
1
- class Uf
2
- def self.include?(uf)
3
- uf.present? ? all.include?(uf.to_sym) : false
4
- end
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
- def self.all
7
- %i[
8
- AC AL AP AM BA CE DF ES GO MA MT MS MG PA PB PR PE PI RJ RN RS RO RR SC
9
- SP SE TO
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
@@ -1,3 +1,3 @@
1
1
  module BrDanfe
2
- VERSION = '0.7.4'.freeze
2
+ VERSION = '0.7.5'.freeze
3
3
  end
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
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.7.6
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.