remote_table 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,6 @@
1
1
  if ::RUBY_VERSION >= '1.9'
2
2
  require 'ensure/encoding'
3
3
  else
4
- $KCODE = 'U'
5
4
  require 'iconv'
6
5
  end
7
6
 
@@ -7,7 +7,7 @@ class RemoteTable
7
7
  # eventually this will support a different way of specifying a transformer
8
8
  def transform(row)
9
9
  if legacy_transformer
10
- legacy_transformer.apply row
10
+ ::Array.wrap legacy_transformer.apply(row)
11
11
  else
12
12
  [row]
13
13
  end
@@ -1,3 +1,3 @@
1
1
  class RemoteTable
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
@@ -87,9 +87,14 @@ class TestRemoteTable < Test::Unit::TestCase
87
87
  end
88
88
 
89
89
  should %{not die when it reads Åland Islands} do
90
- t = RemoteTable.new :url => 'http://www.iso.org/iso/list-en1-semic-3.txt', :skip => 2, :headers => false, :delimiter => ';'
90
+ t = RemoteTable.new 'http://www.iso.org/iso/list-en1-semic-3.txt', :skip => 2, :headers => false, :delimiter => ';'
91
91
  assert_nothing_raised do
92
92
  t[1][0]
93
93
  end
94
94
  end
95
+
96
+ should %{parse a big CSV that is not UTF-8} do
97
+ t = RemoteTable.new 'https://openflights.svn.sourceforge.net/svnroot/openflights/openflights/data/airports.dat', :headers => false
98
+ assert_equal 'Goroka', t[0][1]
99
+ end
95
100
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_table
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 1
10
- version: 1.2.1
9
+ - 2
10
+ version: 1.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Seamus Abshere