data_list_converter 0.3.3 → 0.3.4

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: 57ef43477b818568a4b417b7dc080fa9ff34f2b6
4
- data.tar.gz: efefefbd9ec732ef479c619c538ef3588d7c7cb0
3
+ metadata.gz: 1f782ed47348f5746c2b97038cf5b4daea0f5426
4
+ data.tar.gz: 1c6e0f668c0b941a78e48eb3778e8f462d00e82b
5
5
  SHA512:
6
- metadata.gz: 3b840c8d7e3f6b49286168c72e3a6e9a449bcde332a9cfff0b85305d60477d0e0496f074a3acc34f44d3da6514e2542b665eb61f153dfbd292e817f411c45b7c
7
- data.tar.gz: bb541e9b0c0f7ed0edde220df745c3fbc9515966a8534e23b90466e15b8dfc100204740f1a91c850d107c458eaf3ba7c5fbe458dff5b72cb23e8164bf295aa17
6
+ metadata.gz: b98a5eb4d9bfcaf6aa51f88b564d18d248290d9fe7faa05df0623cc7a3769c0d2641b7eedcd1ec644d9850e9edcb29c888eae2475252e538e5e74ecf04d1413a
7
+ data.tar.gz: 667a130512fc88672d4d89097ac5febbcb7e124a9ed81c947b7dd4d471d07ccab8760dc1aeebd7a3568ed1e66318586e54e10d29104c291f0a3b351f7e5661d8
data/Rakefile CHANGED
@@ -25,9 +25,9 @@ end
25
25
 
26
26
  task :build do
27
27
  sh 'rm -f *.gem'
28
- sh 'bundle exec gem build data_list_converter.gemspec'
28
+ sh 'gem build data_list_converter.gemspec'
29
29
  end
30
30
 
31
31
  task :upload do
32
- sh 'bundle exec gem push *.gem'
32
+ sh 'gem push *.gem'
33
33
  end
@@ -8,7 +8,9 @@ class DataListConverter
8
8
  book = RubyXL::Parser.parse(input[:filename])
9
9
  sheet = book.worksheets[input[:sheet] || 0]
10
10
  sheet.each do |row|
11
- block.call(row.cells.map(&:value))
11
+ next unless row
12
+ row_data = row.cells.map{|i| i.try(:value)}
13
+ block.call(row_data)
12
14
  end
13
15
  }
14
16
  end
@@ -64,7 +66,8 @@ class DataListConverter
64
66
  iterator = lambda { |&block|
65
67
  sheet.each do |row|
66
68
  next unless row
67
- block.call(row.cells.map(&:value))
69
+ row_data = row.cells.map{|i| i.try(:value)}
70
+ block.call(row_data)
68
71
  end
69
72
  }
70
73
  [sheet.sheet_name.to_sym, iterator]
@@ -1,3 +1,3 @@
1
1
  class DataListConverter
2
- VERSION = "0.3.3".freeze
2
+ VERSION = "0.3.4".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_list_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - linjunhalida
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-26 00:00:00.000000000 Z
11
+ date: 2016-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake