middleman-google_drive 0.3.9 → 0.3.10

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: 762d4e6987fd79abd821897dc9eb7d422c343e54
4
- data.tar.gz: a12ba9eda0b4e308e3eb9ee06c85078b35c30fa1
3
+ metadata.gz: 210d0a32f405752ec435f03512409b3da3497c4e
4
+ data.tar.gz: 2b39ff3f1f5b3dca71a78cef6bb2cea5a9a30207
5
5
  SHA512:
6
- metadata.gz: a9d7cd10fa54aa4f6c9ad6ed99b8f89a9b698e5217f573fe9dc07ea85dcc88c3b1e341ca3bb1135042033e7708f1611c8fd6fc28838eba675dc8fb58cc578389
7
- data.tar.gz: 2c0fb77e377aee3716610bd3ca44844f5fdd1efff9ebb05a625fee92c5b487ede865f63329b0b564ce05bf4b3282f6bd1dc030dcdf32b7f34487a275d7c8e0d6
6
+ metadata.gz: 06732016e778d11a4be353609b7bbcfa0e78e3be9c1308e428d86ad3e156d8ff7aac62f0bbaf78482ba9d89c5aa415855a0f5f707c7d17d7cdb77cbab1eb5540
7
+ data.tar.gz: 1487b0e756a0aa36bdbf91fe252061dd94e7945c3dbd30403501d508a47ad9f20450acf2a8e9a415f15a8ffcea9d82df4432b08e11bf7e6cfcdf2ac41d92c842
data/lib/google_drive.rb CHANGED
@@ -181,6 +181,7 @@ class GoogleDrive
181
181
  else
182
182
  # otherwise parse the sheet into a hash
183
183
  data[title] = load_table(sheet.extract_data)
184
+ puts "Rows in #{title}: #{data[title].length}"
184
185
  end
185
186
  end
186
187
  return data
@@ -221,6 +222,8 @@ class GoogleDrive
221
222
  def load_table(table)
222
223
  return [] if table.length < 2
223
224
  header = table.shift # Get the header row
225
+ # remove blank rows
226
+ table.reject! { |row| row.map { |r| r.to_s }.reduce(:+).strip.empty? }
224
227
  table.map do |row|
225
228
  # zip headers with current row, convert it to a hash
226
229
  header.zip(row).to_h unless row.nil?
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module GoogleDrive
3
- VERSION = '0.3.9'
3
+ VERSION = '0.3.10'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-google_drive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Mark
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-23 00:00:00.000000000 Z
12
+ date: 2015-04-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: middleman-core