google_drive 0.3.9 → 0.3.10

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: cc0e2d33b8fcdc782842b3bc6799c8dde4c1f5f1
4
- data.tar.gz: 53f5be85e460802eacaf145fbe9f7b95d224b042
3
+ metadata.gz: 2cbce1c15c9be6473d3104131f7e1a1d71703b21
4
+ data.tar.gz: d3701c6aec63e20cd545ae60baac165811215bfa
5
5
  SHA512:
6
- metadata.gz: 941b66e85b5482414839ded28e11eafdf38dd8116268b3ded4015176ee2dce84199b848d8817ba7de9d2e70d1f6e404eb4f64e02731330e0127a77856e64ff3b
7
- data.tar.gz: 323a27213b1770e72443a551a6698f2396cf59ff722b974a2b8e4ca3307b40b50d8a531931f9a8784d582202387a364dadaef93403c067a3f82c554d49b57d51
6
+ metadata.gz: 1db4c6c2ba9e9d09e700d643e880aa6c88c3a51fd8652f941deae668213282e91840e43a13fe90bede4ed235290138f3f78fd6cd19754ca4afe4b35f8e6ce921
7
+ data.tar.gz: 486dfdb9add97e068ce257e9d614edaa8368015c1cefcb870b5e1e22dfaf127e49a2c5567a8e24e0984d646645949c456eb49c3c45c68b0984941ae0a097a352
@@ -126,9 +126,14 @@ module GoogleDrive
126
126
  # exported.
127
127
  def export_as_string(format, worksheet_index = nil)
128
128
  gid_param = worksheet_index ? "&gid=#{worksheet_index}" : ""
129
- url =
129
+ format_string = "&format=#{format}"
130
+ if self.human_url.match("edit")
131
+ url = self.human_url.gsub(/edit/, "export") + gid_param + format_string
132
+ else
133
+ url =
130
134
  "https://spreadsheets.google.com/feeds/download/spreadsheets/Export" +
131
135
  "?key=#{key}&exportFormat=#{format}#{gid_param}"
136
+ end
132
137
  return @session.request(:get, url, :response_type => :raw)
133
138
  end
134
139
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: 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
  - Hiroshi Ichikawa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-23 00:00:00.000000000 Z
11
+ date: 2014-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri