cpa 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/bin/cpa +1 -1
  2. data/cpa.gemspec +1 -1
  3. data/test/cpa.rb +1 -0
  4. metadata +2 -2
data/bin/cpa CHANGED
@@ -59,7 +59,7 @@ def parse(line)
59
59
  if provincia == "C"
60
60
  localidad = "5001"
61
61
  else
62
- localidad = File.open("db/#{provincia}") do |io|
62
+ localidad = File.open(File.expand_path("../db/#{provincia}", File.dirname(__FILE__))) do |io|
63
63
  while line = io.gets
64
64
  id, name = line.split(" ", 2)
65
65
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpa"
3
- s.version = "0.0.2"
3
+ s.version = "0.0.3"
4
4
  s.summary = "A CLI tool to query Argentinean zip codes."
5
5
  s.authors = ["Damian Janowski"]
6
6
  s.email = ["djanowski@dimaion.com"]
@@ -13,6 +13,7 @@ test "Interior" do
13
13
  assert_equal `./bin/cpa 'Independencia 333, Sunchales, Santa Fe'`, "S2322AWD\n"
14
14
  assert_equal `./bin/cpa 'Av Independencia 333, Sunchales, Santa Fe'`, "S2322AWD\n"
15
15
  assert_equal `./bin/cpa 'Avenida Independencia 333, Sunchales, Santa Fe'`, "S2322AWD\n"
16
+ assert_equal `./bin/cpa 'Roma 659, Olivos, Buenos Aires'`, "S2322AWD\n"
16
17
  end
17
18
 
18
19
  test "stdin" do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: cpa
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Damian Janowski
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-11 00:00:00 -03:00
13
+ date: 2011-07-15 00:00:00 -03:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency