rpi_marca 0.0.1 → 0.0.2

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: 26fc80df7a7e54eb33df1bbdc9567611a5f738eb
4
- data.tar.gz: ddbb56e2a55a1c4455bb710599dd62647dcc3851
3
+ metadata.gz: 89b8ff9d5799be6df203aee821a3e21fa4b2d8d8
4
+ data.tar.gz: 2a4b0797e93655983a54446ebcdd2bb0509b2c43
5
5
  SHA512:
6
- metadata.gz: 015f9db40e214356909c4ceec4dc914a241836e778985e43073a32e5543875656077a6b652b302f50299cacf02184059b6799b904124732d9abb7467bf81348f
7
- data.tar.gz: b7048d383d51e848de7fbd907b61f93d01bbb960ccd42288f0e9792e26891147d9780dace932be798035aa40f59380ae2c02044a5c22f21dc5b0152045dbe8fb
6
+ metadata.gz: 2d052f834c85b89730d1c6491d90e0f660ff069c31e07767022edbe6bf9b7ca1a0a41c168f63d0e1e68f55984e5f639704b52be04b8748ce56bb4e0f28ca6a2e
7
+ data.tar.gz: dbf9817596a3716f5ba97cd1beaedb984471cb0c2d3575b425d86772b025d32063e710bd3f24c1824f135f9403648c714fe2b79e6b92230724d7cf62e5767da2
@@ -14,6 +14,16 @@ module RpiMarca
14
14
  @goods_services = goods_services
15
15
  end
16
16
 
17
+ def to_s
18
+ subclasses = [
19
+ @subclass1,
20
+ @subclass2,
21
+ @subclass3
22
+ ].compact.join('.')
23
+
24
+ "#{@number}/#{subclasses}"
25
+ end
26
+
17
27
  def self.parse(el)
18
28
  return unless el
19
29
 
@@ -1,3 +1,3 @@
1
1
  module RpiMarca
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -13,6 +13,16 @@ module RpiMarca
13
13
  @subclass5 = subclass5
14
14
  end
15
15
 
16
+ def to_s
17
+ [
18
+ @subclass1,
19
+ @subclass2,
20
+ @subclass3,
21
+ @subclass4,
22
+ @subclass5
23
+ ].compact.join(' / ')
24
+ end
25
+
16
26
  def self.parse(el)
17
27
  return unless el
18
28
 
@@ -555,6 +555,11 @@ describe RpiMarca::Publication do
555
555
  expect(publication.national_class.goods_services).to eq 'Teste'
556
556
  end
557
557
 
558
+ it 'retorna a classificação nacional formatada' do
559
+ publication = RpiMarca::Publication.new(PUBLICACAO_COM_CLASSE_NACIONAL)
560
+ expect(publication.national_class.to_s).to eq '25/10.20'
561
+ end
562
+
558
563
  it 'classificação nacional não pode ter mais de 3 subclasses' do
559
564
  expect { RpiMarca::Publication.new(CLASSE_NACIONAL_MAIS_DE_3_SUBCLASSES) }
560
565
  .to raise_error(RpiMarca::ParseError)
@@ -572,6 +577,11 @@ describe RpiMarca::Publication do
572
577
  expect(publication.vienna_class.subclass5).to be_nil
573
578
  end
574
579
 
580
+ it 'retorna a classificação de logotipo formatada' do
581
+ publication = RpiMarca::Publication.new(DEPOSITO)
582
+ expect(publication.vienna_class.to_s).to eq '27.5.1 / 27.7.1'
583
+ end
584
+
575
585
  it 'classificação de logotipo não pode ter mais de 5 classes' do
576
586
  expect { RpiMarca::Publication.new(CLASSE_LOGOTIPO_MAIS_DE_5_SUBCLASSES) }
577
587
  .to raise_error(RpiMarca::ParseError)
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.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luiz Damim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-17 00:00:00.000000000 Z
11
+ date: 2015-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler