podpisy 0.1.1 → 0.1.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: c0b3a5068a10184bdbfcc51b076fd7697c880512
4
- data.tar.gz: a7bd5ec1d4416e9d22b7e8face8dc3a5219ff2c8
3
+ metadata.gz: c184812cff66a2ca7bb7a6555eccb36f32299d77
4
+ data.tar.gz: 3458f0b85162539be525001634b70dc166f18a7f
5
5
  SHA512:
6
- metadata.gz: 0de8a284f34da77ab492d9c0aa181f06cb88e939f10e077c08bc86fc9b911c3c619cea7967a63558c45b82670beff9c05f12dbb9d7f71805b716d3b243a5f964
7
- data.tar.gz: 5098fb38470ca0970eca6df3b8226f5721e131cdab0eb4ae8dab01f3a1b1814b1f868ff7fd4ea7460e39ecb6e26ae0e550032f8f81e3716baa14d688cbd94908
6
+ metadata.gz: 5d04156facc7a595ff09597666fb5185b0161312e80becc446765c426fe752998251b29b5970644e8f4a7bb67c715770a7ffcc5073480a111e8b415126d5bfc2
7
+ data.tar.gz: e86a94885ea4b07da065d7234db982a0d3578ad2ef59834b79e6a73067ea2591cb4877b4145e6c8096c886314fa9ec7de22ad18fcfef0cd8c506c202b6b45827
@@ -4,8 +4,12 @@ module Podpisy
4
4
  class Signatures
5
5
  def initialize(fn, **opts)
6
6
  @fn = fn
7
- @kody = Postcodes.new
8
7
  @resolve_areas = opts[:areas] or false
8
+ if @resolve_areas
9
+ @kody = Postcodes.new
10
+ else
11
+ @kody = nil
12
+ end
9
13
  @area_types = [:m, :p, :w]
10
14
  end
11
15
 
@@ -51,7 +55,11 @@ module Podpisy
51
55
  def to_tex(o = STDOUT)
52
56
  i = 1
53
57
  CSV.foreach(@fn, headers: true, col_sep: ',') do |row|
54
- city= @kody.unambiguous(row['postcode'], :m, :p, :w)
58
+ if @resolve_areas
59
+ city = @kody.unambiguous(row['postcode'], :m, :p, :w)
60
+ else
61
+ city = row['postcode']
62
+ end
55
63
  fn, ln = first_last_name(row)
56
64
  f = remove_special_chars(fn || '').capitalize
57
65
  l = remove_special_chars(fn || '').capitalize
@@ -1,3 +1,3 @@
1
1
  module Podpisy
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: podpisy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Koziej