rpi_marca 0.0.2 → 0.0.3
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 +4 -4
- data/.travis.yml +4 -0
- data/Gemfile.lock +30 -19
- data/README.md +3 -0
- data/lib/rpi_marca/receipt.rb +2 -2
- data/lib/rpi_marca/rule.rb +2 -4
- data/lib/rpi_marca/version.rb +1 -1
- data/spec/lib/rpi_marca/publication_spec.rb +17 -5
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c150b5c095d2395ce166361ef7d9d5f7dd3d5f2
|
4
|
+
data.tar.gz: e0272de61c74489e0a9868113d4e1361ed4bb27a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7d0eb8d1809f4e3810db0a15a7ef9307080eaa6125e3cf3573acede6e2770b9ac9b31c5626b8a238c9d1868aac46f24a109141cfd5b45b09fca5986c3660c2b
|
7
|
+
data.tar.gz: 1e4c298775fcc66a027e16c6c92adb41d388aebca1e813f9076915328e2081a9b2f35d47bdb4ab27f595c278f1b95cfde52c9a73b0ab95eeb75061bfc821832b
|
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rpi_marca (0.0.
|
4
|
+
rpi_marca (0.0.3)
|
5
5
|
nokogiri (~> 1.6)
|
6
6
|
|
7
7
|
GEM
|
@@ -14,46 +14,57 @@ GEM
|
|
14
14
|
docile (1.1.5)
|
15
15
|
ffi (1.9.6)
|
16
16
|
formatador (0.2.5)
|
17
|
-
guard (2.
|
17
|
+
guard (2.11.1)
|
18
18
|
formatador (>= 0.2.4)
|
19
19
|
listen (~> 2.7)
|
20
20
|
lumberjack (~> 1.0)
|
21
|
+
nenv (~> 0.1)
|
22
|
+
notiffany (~> 0.0)
|
21
23
|
pry (>= 0.9.12)
|
24
|
+
shellany (~> 0.0)
|
22
25
|
thor (>= 0.18.1)
|
23
|
-
guard-
|
26
|
+
guard-compat (1.2.1)
|
27
|
+
guard-rspec (4.5.0)
|
24
28
|
guard (~> 2.1)
|
25
|
-
|
29
|
+
guard-compat (~> 1.1)
|
30
|
+
rspec (>= 2.99.0, < 4.0)
|
26
31
|
hitimes (1.2.2)
|
27
|
-
listen (2.
|
32
|
+
listen (2.8.5)
|
28
33
|
celluloid (>= 0.15.2)
|
29
34
|
rb-fsevent (>= 0.9.3)
|
30
35
|
rb-inotify (>= 0.9)
|
31
36
|
lumberjack (1.0.9)
|
32
37
|
method_source (0.8.2)
|
33
|
-
mini_portile (0.6.
|
38
|
+
mini_portile (0.6.2)
|
34
39
|
multi_json (1.10.1)
|
35
|
-
|
40
|
+
nenv (0.2.0)
|
41
|
+
nokogiri (1.6.6.2)
|
36
42
|
mini_portile (~> 0.6.0)
|
43
|
+
notiffany (0.0.4)
|
44
|
+
nenv (~> 0.1)
|
45
|
+
shellany (~> 0.0)
|
37
46
|
pry (0.10.1)
|
38
47
|
coderay (~> 1.1.0)
|
39
48
|
method_source (~> 0.8.1)
|
40
49
|
slop (~> 3.4)
|
41
|
-
rake (10.
|
50
|
+
rake (10.4.2)
|
42
51
|
rb-fsevent (0.9.4)
|
43
52
|
rb-inotify (0.9.5)
|
44
53
|
ffi (>= 0.5.0)
|
45
|
-
rspec (3.
|
46
|
-
rspec-core (~> 3.
|
47
|
-
rspec-expectations (~> 3.
|
48
|
-
rspec-mocks (~> 3.
|
49
|
-
rspec-core (3.
|
50
|
-
rspec-support (~> 3.
|
51
|
-
rspec-expectations (3.
|
54
|
+
rspec (3.2.0)
|
55
|
+
rspec-core (~> 3.2.0)
|
56
|
+
rspec-expectations (~> 3.2.0)
|
57
|
+
rspec-mocks (~> 3.2.0)
|
58
|
+
rspec-core (3.2.0)
|
59
|
+
rspec-support (~> 3.2.0)
|
60
|
+
rspec-expectations (3.2.0)
|
52
61
|
diff-lcs (>= 1.2.0, < 2.0)
|
53
|
-
rspec-support (~> 3.
|
54
|
-
rspec-mocks (3.
|
55
|
-
|
56
|
-
|
62
|
+
rspec-support (~> 3.2.0)
|
63
|
+
rspec-mocks (3.2.0)
|
64
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
+
rspec-support (~> 3.2.0)
|
66
|
+
rspec-support (3.2.1)
|
67
|
+
shellany (0.0.1)
|
57
68
|
simplecov (0.9.1)
|
58
69
|
docile (~> 1.1.0)
|
59
70
|
multi_json (~> 1.0)
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# RpiMarca
|
2
2
|
|
3
|
+
[](https://travis-ci.org/automatto/rpi_marca)
|
4
|
+
[](http://badge.fury.io/rb/rpi_marca)
|
5
|
+
|
3
6
|
Leitura da RPI de Marcas do INPI em formato XML.
|
4
7
|
|
5
8
|
## Installation
|
data/lib/rpi_marca/receipt.rb
CHANGED
@@ -20,8 +20,8 @@ module RpiMarca
|
|
20
20
|
@assignee = assignee
|
21
21
|
end
|
22
22
|
|
23
|
-
def self.parse(el
|
24
|
-
return if el.nil?
|
23
|
+
def self.parse(el)
|
24
|
+
return if el.nil?
|
25
25
|
|
26
26
|
number = Helpers.get_attribute_value(el, 'numero') or
|
27
27
|
fail ParseError, 'Receipt number is required'
|
data/lib/rpi_marca/rule.rb
CHANGED
@@ -23,12 +23,10 @@ module RpiMarca
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.parse(el)
|
26
|
-
ipas = Helpers.get_attribute_value(el, 'codigo')
|
27
|
-
|
28
26
|
new(
|
29
|
-
ipas:
|
27
|
+
ipas: Helpers.get_attribute_value(el, 'codigo'),
|
30
28
|
description: Helpers.get_attribute_value(el, 'nome'),
|
31
|
-
receipt: Receipt.parse(el.at_xpath('protocolo')
|
29
|
+
receipt: Receipt.parse(el.at_xpath('protocolo')),
|
32
30
|
complement: Helpers.get_element_value(
|
33
31
|
el.at_xpath('texto-complementar')
|
34
32
|
)
|
data/lib/rpi_marca/version.rb
CHANGED
@@ -409,13 +409,13 @@ describe RpiMarca::Publication do
|
|
409
409
|
end
|
410
410
|
|
411
411
|
context 'protocolo' do
|
412
|
-
it 'deve ter
|
412
|
+
it 'deve ter número de protocolo' do
|
413
413
|
# rubocop:disable Metrics/LineLength
|
414
414
|
xml = <<-XML
|
415
415
|
<processo numero="905653858">
|
416
416
|
<despachos>
|
417
417
|
<despacho codigo="IPAS270" nome="Notificação de oposição para manifestação">
|
418
|
-
<
|
418
|
+
<protocolo data="01/07/2013"/>
|
419
419
|
</despacho>
|
420
420
|
</despachos>
|
421
421
|
</processo>
|
@@ -426,9 +426,21 @@ describe RpiMarca::Publication do
|
|
426
426
|
.to raise_error(RpiMarca::ParseError)
|
427
427
|
end
|
428
428
|
|
429
|
-
it '
|
430
|
-
|
431
|
-
|
429
|
+
it 'deve ter data de protocolo' do
|
430
|
+
# rubocop:disable Metrics/LineLength
|
431
|
+
xml = <<-XML
|
432
|
+
<processo numero="905653858">
|
433
|
+
<despachos>
|
434
|
+
<despacho codigo="IPAS270" nome="Notificação de oposição para manifestação">
|
435
|
+
<protocolo numero="99999999999"/>
|
436
|
+
</despacho>
|
437
|
+
</despachos>
|
438
|
+
</processo>
|
439
|
+
XML
|
440
|
+
# rubocop:enable Metrics/LineLength
|
441
|
+
|
442
|
+
expect { RpiMarca::Publication.new(xml) }
|
443
|
+
.to raise_error(RpiMarca::ParseError)
|
432
444
|
end
|
433
445
|
|
434
446
|
it 'protocolo tem dados corretos' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rpi_marca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luiz Damim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,6 +108,7 @@ files:
|
|
108
108
|
- ".rubocop.yml"
|
109
109
|
- ".rubocop_todo.yml"
|
110
110
|
- ".ruby-version"
|
111
|
+
- ".travis.yml"
|
111
112
|
- Gemfile
|
112
113
|
- Gemfile.lock
|
113
114
|
- Guardfile
|