caboose-cms 0.6.17 → 0.6.18
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWYxMmMxNTU3NzZjZTAwZDNmZTg2NjNiMjE2ZWY0MWFkNmNmMDM3NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDQ1ZjZjOTAyZTY5MWIwNTQxNzFhZTVjYzU0ZGE1YTMzNGRiMTU3Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmI2YjRjOTk3M2Q1OGZhMTVkNDliMTY0ZWI2MTA0YzJhZjI3Yjc2YjJmNDAx
|
10
|
+
M2NlNmYyYjE5NWViZmVmNjdhNjk5ZmVjYzA2ZmQ1ZGUyMDc0NTNjOWIwMGRh
|
11
|
+
MGEyMzQ0NWNkYjc4MmRjMzMxNTQ5YTQzNTg1YjhlMzBjZWYxMDg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2ZkMmZkY2QxNGE2OGIwM2M3YzliZTIyZjY4YmEyMjQ4YzUyMWU0NDhkNGZi
|
14
|
+
YzRlZGJlZDBhNTM4MzhiMTZjZmQ1NzI0NzNmZDExODE1NDBmMGU2ZjA3ODNj
|
15
|
+
ZjMzN2U3OGYzY2E1N2I2MzQ0ZjZhYzMyZjlmMzE0NDMxNDY0NDk=
|
@@ -6,9 +6,15 @@ module Caboose
|
|
6
6
|
# GET /google-spreadsheets/:spreadsheet_id/csv
|
7
7
|
def csv_data
|
8
8
|
spreadsheet_id = params[:spreadsheet_id]
|
9
|
-
url = "https://docs.google.com/spreadsheets/d/#{spreadsheet_id}/export?format=csv&id=#{spreadsheet_id}&gid=0"
|
9
|
+
#url = "https://docs.google.com/spreadsheets/d/#{spreadsheet_id}/export?format=csv&id=#{spreadsheet_id}&gid=0"
|
10
|
+
url = "https://docs.google.com/spreadsheets/d/#{spreadsheet_id}/pub?output=csv&single=true&gid=0"
|
10
11
|
resp = HTTParty.get(url)
|
11
|
-
arr =
|
12
|
+
arr = nil
|
13
|
+
begin
|
14
|
+
arr = CSV.parse(resp.body)
|
15
|
+
rescue
|
16
|
+
Caboose.log("Error parsing CSV in spreadsheet #{spreadsheet_id}:\n\n#{resp.body}")
|
17
|
+
end
|
12
18
|
render :json => arr
|
13
19
|
end
|
14
20
|
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|