google_drive 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0c0a003ba4da0e1d167511f39c06535363dcbb4d
4
+ data.tar.gz: ac9177e9c140450d315c490af0d181445cb86df4
5
+ SHA512:
6
+ metadata.gz: 98d1ce8a5029cad9aea862b0398dceafcc799329eeecc72a8ced9bcb1a11f8a8965b7d5ef369c8ebd09003006accea3c4098da25cb68d7eb54bb97ade6e966b9
7
+ data.tar.gz: 9db7733d8d0e2edbb9916a5d6b14947413afeec206c3bff2660fcca7f664e44f7ffe71de74e08b6447abb4e75ffffa9873831e191226fa4708a951293665e0e8
@@ -184,10 +184,14 @@ module GoogleDrive
184
184
  def spreadsheet_by_url(url)
185
185
  # Tries to parse it as URL of human-readable spreadsheet.
186
186
  uri = URI.parse(url)
187
- if ["spreadsheets.google.com", "docs.google.com"].include?(uri.host) &&
188
- uri.path =~ /\/ccc$/
189
- if (uri.query || "").split(/&/).find(){ |s| s=~ /^key=(.*)$/ }
190
- return spreadsheet_by_key($1)
187
+ if ["spreadsheets.google.com", "docs.google.com"].include?(uri.host)
188
+ case uri.path
189
+ when /\/d\/([^\/]+)/
190
+ return spreadsheet_by_key($1)
191
+ when /\/ccc$/
192
+ if (uri.query || "").split(/&/).find(){ |s| s=~ /^key=(.*)$/ }
193
+ return spreadsheet_by_key($1)
194
+ end
191
195
  end
192
196
  end
193
197
  # Assumes the URL is worksheets feed URL.
@@ -246,7 +246,7 @@ module GoogleDrive
246
246
  row = cell["row"].to_i()
247
247
  col = cell["col"].to_i()
248
248
  @cells[[row, col]] = cell.inner_text
249
- @input_values[[row, col]] = cell["inputValue"]
249
+ @input_values[[row, col]] = cell["inputValue"] || cell.inner_text
250
250
  numeric_value = cell["numericValue"]
251
251
  @numeric_values[[row, col]] = numeric_value ? numeric_value.to_f() : nil
252
252
  end
@@ -274,7 +274,9 @@ module GoogleDrive
274
274
  </entry>
275
275
  EOS
276
276
 
277
- @session.request(:put, edit_url, :data => xml)
277
+ @session.request(
278
+ :put, edit_url, :data => xml,
279
+ :header => {"Content-Type" => "application/atom+xml", "If-Match" => "*"})
278
280
 
279
281
  @meta_modified = false
280
282
  sent = true
@@ -330,7 +332,7 @@ module GoogleDrive
330
332
  EOS
331
333
 
332
334
  batch_url = concat_url(@cells_feed_url, "/batch")
333
- result = @session.request(:post, batch_url, :data => xml)
335
+ result = @session.request(:post, batch_url, :data => xml, :header => {"If-Match" => "*"})
334
336
  for entry in result.css("atom|entry")
335
337
  interrupted = entry.css("batch|interrupted")[0]
336
338
  if interrupted
metadata CHANGED
@@ -1,90 +1,81 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_drive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
5
- prerelease:
4
+ version: 0.3.8
6
5
  platform: ruby
7
6
  authors:
8
7
  - Hiroshi Ichikawa
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-02-15 00:00:00.000000000 Z
11
+ date: 2014-04-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: nokogiri
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.4.4
22
- - - ! '!='
20
+ - - "!="
23
21
  - !ruby/object:Gem::Version
24
22
  version: 1.5.1
25
- - - ! '!='
23
+ - - "!="
26
24
  - !ruby/object:Gem::Version
27
25
  version: 1.5.2
28
26
  type: :runtime
29
27
  prerelease: false
30
28
  version_requirements: !ruby/object:Gem::Requirement
31
- none: false
32
29
  requirements:
33
- - - ! '>='
30
+ - - ">="
34
31
  - !ruby/object:Gem::Version
35
32
  version: 1.4.4
36
- - - ! '!='
33
+ - - "!="
37
34
  - !ruby/object:Gem::Version
38
35
  version: 1.5.1
39
- - - ! '!='
36
+ - - "!="
40
37
  - !ruby/object:Gem::Version
41
38
  version: 1.5.2
42
39
  - !ruby/object:Gem::Dependency
43
40
  name: oauth
44
41
  requirement: !ruby/object:Gem::Requirement
45
- none: false
46
42
  requirements:
47
- - - ! '>='
43
+ - - ">="
48
44
  - !ruby/object:Gem::Version
49
45
  version: 0.3.6
50
46
  type: :runtime
51
47
  prerelease: false
52
48
  version_requirements: !ruby/object:Gem::Requirement
53
- none: false
54
49
  requirements:
55
- - - ! '>='
50
+ - - ">="
56
51
  - !ruby/object:Gem::Version
57
52
  version: 0.3.6
58
53
  - !ruby/object:Gem::Dependency
59
54
  name: oauth2
60
55
  requirement: !ruby/object:Gem::Requirement
61
- none: false
62
56
  requirements:
63
- - - ! '>='
57
+ - - ">="
64
58
  - !ruby/object:Gem::Version
65
59
  version: 0.5.0
66
60
  type: :runtime
67
61
  prerelease: false
68
62
  version_requirements: !ruby/object:Gem::Requirement
69
- none: false
70
63
  requirements:
71
- - - ! '>='
64
+ - - ">="
72
65
  - !ruby/object:Gem::Version
73
66
  version: 0.5.0
74
67
  - !ruby/object:Gem::Dependency
75
68
  name: rake
76
69
  requirement: !ruby/object:Gem::Requirement
77
- none: false
78
70
  requirements:
79
- - - ! '>='
71
+ - - ">="
80
72
  - !ruby/object:Gem::Version
81
73
  version: 0.8.0
82
74
  type: :development
83
75
  prerelease: false
84
76
  version_requirements: !ruby/object:Gem::Requirement
85
- none: false
86
77
  requirements:
87
- - - ! '>='
78
+ - - ">="
88
79
  - !ruby/object:Gem::Version
89
80
  version: 0.8.0
90
81
  description: A library to read/write files/spreadsheets in Google Drive/Docs.
@@ -98,52 +89,51 @@ extra_rdoc_files:
98
89
  - doc_src/google_drive/acl_entry.rb
99
90
  files:
100
91
  - README.rdoc
92
+ - doc_src/google_drive/acl.rb
93
+ - doc_src/google_drive/acl_entry.rb
101
94
  - lib/google_drive.rb
102
- - lib/google_drive/spreadsheet.rb
103
- - lib/google_drive/oauth2_fetcher.rb
104
- - lib/google_drive/table.rb
105
- - lib/google_drive/list_row.rb
106
- - lib/google_drive/worksheet.rb
107
- - lib/google_drive/file.rb
108
- - lib/google_drive/error.rb
109
- - lib/google_drive/collection.rb
110
95
  - lib/google_drive/acl.rb
111
- - lib/google_drive/client_login_fetcher.rb
112
- - lib/google_drive/session.rb
113
- - lib/google_drive/oauth1_fetcher.rb
114
96
  - lib/google_drive/acl_entry.rb
115
97
  - lib/google_drive/authentication_error.rb
116
- - lib/google_drive/util.rb
117
- - lib/google_drive/list.rb
118
98
  - lib/google_drive/basic_fetcher.rb
99
+ - lib/google_drive/client_login_fetcher.rb
100
+ - lib/google_drive/collection.rb
101
+ - lib/google_drive/error.rb
102
+ - lib/google_drive/file.rb
103
+ - lib/google_drive/list.rb
104
+ - lib/google_drive/list_row.rb
105
+ - lib/google_drive/oauth1_fetcher.rb
106
+ - lib/google_drive/oauth2_fetcher.rb
119
107
  - lib/google_drive/record.rb
120
- - doc_src/google_drive/acl.rb
121
- - doc_src/google_drive/acl_entry.rb
108
+ - lib/google_drive/session.rb
109
+ - lib/google_drive/spreadsheet.rb
110
+ - lib/google_drive/table.rb
111
+ - lib/google_drive/util.rb
112
+ - lib/google_drive/worksheet.rb
122
113
  homepage: https://github.com/gimite/google-drive-ruby
123
114
  licenses:
124
115
  - New BSD
116
+ metadata: {}
125
117
  post_install_message:
126
118
  rdoc_options:
127
- - --main
119
+ - "--main"
128
120
  - README.rdoc
129
121
  require_paths:
130
122
  - lib
131
123
  required_ruby_version: !ruby/object:Gem::Requirement
132
- none: false
133
124
  requirements:
134
- - - ! '>='
125
+ - - ">="
135
126
  - !ruby/object:Gem::Version
136
127
  version: '0'
137
128
  required_rubygems_version: !ruby/object:Gem::Requirement
138
- none: false
139
129
  requirements:
140
- - - ! '>='
130
+ - - ">="
141
131
  - !ruby/object:Gem::Version
142
132
  version: '0'
143
133
  requirements: []
144
134
  rubyforge_project:
145
- rubygems_version: 1.8.23
135
+ rubygems_version: 2.2.2
146
136
  signing_key:
147
- specification_version: 3
137
+ specification_version: 4
148
138
  summary: A library to read/write files/spreadsheets in Google Drive/Docs.
149
139
  test_files: []