brand2csv 0.2.9 → 0.3.0

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
2
  SHA1:
3
- metadata.gz: 79c5cceaeee510aa57e7d16d32d0a62c9e798323
4
- data.tar.gz: 4bccd052055f56d4a98c977d23a8d7cc549a6428
3
+ metadata.gz: 7ac6466b50f94574643e0f2d44aad8df563415d3
4
+ data.tar.gz: 51f0797bc1a14d38bb7e3c58794c85412c2f9019
5
5
  SHA512:
6
- metadata.gz: b96eda0d62b2759adc591c655005c51ce58cc48a8520b20e94c2015a6f27e212740d8b8ac0229de04e93cf99caf8b7eb1efc4d817784686806d62254aa9eb44b
7
- data.tar.gz: 17c9fb6dc5a5cd3e63a89d22df8d89c4aaae075509717c07df8be8176da3d4b841224890b90993d0335ce4b615240ce1f6d017a15a7778f979772a7b9df4489a
6
+ metadata.gz: befd70c4323638bdfdfab9226ef9d0b5fb4a1a466f9d603f3961e54019a2177d3fc88ec57b07e50b7377bddeefea538da74e717ffb45a387e631c1fa97d13793
7
+ data.tar.gz: 7d67cd338cf64b7bf0b1f7af89fe5578493ba420e794812054f64cb89987590a36fcee38cb5535bd40badbab441eae5e97a8c78705b70818336bfb57e1a4f715
@@ -1,3 +1,8 @@
1
+ === 0.3.0 23.09.2013
2
+
3
+ * Fix errors under Ruby 1.8.7. Use Ja/Nein instead of false/true
4
+ * updated Manifest.txt
5
+
1
6
  === 0.2.9 23.09.2013
2
7
 
3
8
  * Remove some debugging output
@@ -313,7 +313,7 @@ module Brand2csv
313
313
  bezeichnung = nil
314
314
  inhaber = nil
315
315
  hinterlegungsdatum = nil
316
- hatVertreter = false
316
+ hatVertreter = 'Nein'
317
317
  doc.xpath("//html/body/form/div/div/fieldset/div/table/tbody/tr").each{
318
318
  |x|
319
319
  if x.children.first.text.eql?('Marke')
@@ -330,7 +330,7 @@ module Brand2csv
330
330
  end
331
331
 
332
332
  if x.children.first.text.eql?('Vertreter/in')
333
- hatVertreter = true if x.children[1].text.length > 0
333
+ hatVertreter = 'Ja' if x.children[1].text.length > 0
334
334
  end
335
335
  hinterlegungsdatum = x.children[1].text if x.children.first.text.eql?('Hinterlegungsdatum')
336
336
  number = x.children[1].text if x.children.first.text.eql?('Gesuch Nr.')
@@ -1,3 +1,3 @@
1
1
  module Brand2csv
2
- VERSION = "0.2.9"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -20,7 +20,7 @@ describe 'Csv' do
20
20
  Swissreg::emitCsv(results, file.path)
21
21
  inhalte = IO.readlines(file.path)
22
22
  inhalte[0].chomp.should == 'name;markennummer;inhaber;land;hatVertreter;hinterlegungsdatum;zeile_1;zeile_2;zeile_3;zeile_4;zeile_5;plz;ort'
23
- inhalte[1].chomp.should == 'https://www.swissreg.ch/srclient/images/loadImage?Action=LoadImg&ItemType=tm&ImageType=print&ImageHash=F431E13A9D8F363BD06604796634142A18A5BA7C.jpeg;00135/2013;Peter Löcker Bauart, Trollstrasse 20, 8400 Winterthur;Schweiz;false;13.03.2013;Peter Löcker Bauart;Trollstrasse 20;;;;8400;Winterthur'
23
+ inhalte[1].chomp.should == 'https://www.swissreg.ch/srclient/images/loadImage?Action=LoadImg&ItemType=tm&ImageType=print&ImageHash=F431E13A9D8F363BD06604796634142A18A5BA7C.jpeg;00135/2013;Peter Löcker Bauart, Trollstrasse 20, 8400 Winterthur;Schweiz;Nein;13.03.2013;Peter Löcker Bauart;Trollstrasse 20;;;;8400;Winterthur'
24
24
  inhalte[2].should == nil
25
25
  end
26
26
 
@@ -18,9 +18,9 @@ describe 'Get some simple example from swissreg' do
18
18
  results[0].ort.should == 'Zürich'
19
19
  csv = "#{timespan}.csv"
20
20
  csv_lines = IO.readlines(csv)
21
- csv_lines[1].split(';')[HasVertreterPos].should == "true"
22
- csv_lines[2].split(';')[HasVertreterPos].should == "true"
23
- csv_lines[3].split(';')[HasVertreterPos].should == "false"
21
+ csv_lines[1].split(';')[HasVertreterPos].should == "Ja"
22
+ csv_lines[2].split(';')[HasVertreterPos].should == "Ja"
23
+ csv_lines[3].split(';')[HasVertreterPos].should == "Nein"
24
24
  end
25
25
 
26
26
  it "should get correct results from swissreg when owner has two postal addresses" do
@@ -38,7 +38,7 @@ describe 'Get some simple example from swissreg' do
38
38
  csv = "#{timespan}.csv"
39
39
  csv_lines = IO.readlines(csv)
40
40
  csv_lines[1].split(';')[2].should == 'Philipp Arnold, Seestrasse 37a, 6454 Flüelen'
41
- csv_lines[1].split(';')[HasVertreterPos].should == "true"
41
+ csv_lines[1].split(';')[HasVertreterPos].should == "Ja"
42
42
  end
43
43
 
44
44
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brand2csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niklaus Giger, Yasuhiro Asaka, Zeno R.R. Davatz