caboose-cms 0.6.17 → 0.6.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2JhZWYzY2JiNzdlZmMxOGM4YzlmM2Y3MDUzMWFjZTg2ODM5YzNkMg==
4
+ MWYxMmMxNTU3NzZjZTAwZDNmZTg2NjNiMjE2ZWY0MWFkNmNmMDM3NA==
5
5
  data.tar.gz: !binary |-
6
- OWU4M2RlOTk1ZTUzZjRhOTI2NjgzYzU0NjhmMGRlYTMzZjNiZjIwZg==
6
+ MDQ1ZjZjOTAyZTY5MWIwNTQxNzFhZTVjYzU0ZGE1YTMzNGRiMTU3Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjIzMjFjYmNjNTA4MzBhNDI2MTA5OGZjM2I3MmVjMWU1NjA3ZGI0Mzk2YjEz
10
- MzQ4MmRkNGFiOGY1NjQwNzhlNmIyMTEzNWI3OGI3MzQwMGIyMDE0YjhjOGQ5
11
- ODk2MzIyMTllNzA5Y2RiYjE5Y2YxYTgyODJjZjE1Zjg0YzM4ZWQ=
9
+ NmI2YjRjOTk3M2Q1OGZhMTVkNDliMTY0ZWI2MTA0YzJhZjI3Yjc2YjJmNDAx
10
+ M2NlNmYyYjE5NWViZmVmNjdhNjk5ZmVjYzA2ZmQ1ZGUyMDc0NTNjOWIwMGRh
11
+ MGEyMzQ0NWNkYjc4MmRjMzMxNTQ5YTQzNTg1YjhlMzBjZWYxMDg=
12
12
  data.tar.gz: !binary |-
13
- NjdiZmYxZTg0YTFiYjcwODMyNWFhOTRlMDBlNjI3ZjQyYWI1OWUwY2JlODgy
14
- NGNjMGRhOWYzYjgzZjc5ODU2NDQyZWQ5YjZjNjg2ODcyM2U3MGYzYWExZTJj
15
- NzI3OTk2MzY4OTczMmI3OWZkYTNjMDkwOGM5NGZkMTM1YWFkMWY=
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 = CSV.parse(resp.body)
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
 
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.6.17'
2
+ VERSION = '0.6.18'
3
3
  end
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.17
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-07-29 00:00:00.000000000 Z
11
+ date: 2015-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg