googlesheets 0.2.1 → 0.2.2
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 +4 -4
- data/.ruby-version +1 -1
- data/googlesheets.gemspec +1 -1
- data/lib/googlesheets.rb +18 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d0fb6e33bdfbb0e0e82efa3be32d26166be4bf4199d894e0dd555b0c568a4f5
|
4
|
+
data.tar.gz: fb113fecb311579662e9b2aa0d5cea4443c20218b0cb129741a757de242d1241
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d30a91e91a3eaa552c0a84eb5f77e885d1da7fcdf6ee750f030e1b3b494a8f43a01cbc1838b8f9c4154558375b57ae985f531b37bfd4c0c1744598d7b3362c28
|
7
|
+
data.tar.gz: c7143744964858819f57fc6105fb0dccd9b680b3f1c485264c3162931fd8a4455b5a0e3fc098eaa036a9ff5aff690bc3df023c40c8503cdb3d1300054046aab6
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6
|
1
|
+
2.6.5
|
data/googlesheets.gemspec
CHANGED
data/lib/googlesheets.rb
CHANGED
@@ -8,6 +8,8 @@ module Enumerable
|
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
|
+
# https://googleapis.dev/ruby/google-api-client/latest/Google/Apis/SheetsV4/Request.html
|
12
|
+
|
11
13
|
class GoogleSheets
|
12
14
|
attr_accessor :api
|
13
15
|
|
@@ -132,6 +134,22 @@ class GoogleSheets
|
|
132
134
|
end
|
133
135
|
end
|
134
136
|
|
137
|
+
def sheet_rename(pick, name=nil)
|
138
|
+
shid = sheet_id(pick)
|
139
|
+
name ||= yield(sheet_name(shid)) if block_given?
|
140
|
+
|
141
|
+
reqs = []
|
142
|
+
reqs.push(update_sheet_properties: {
|
143
|
+
properties: {
|
144
|
+
sheet_id: shid,
|
145
|
+
title: name,
|
146
|
+
},
|
147
|
+
fields: 'title',
|
148
|
+
})
|
149
|
+
resp = api.batch_update_spreadsheet(@ssid, { requests: reqs }, {})
|
150
|
+
true
|
151
|
+
end
|
152
|
+
|
135
153
|
def sheet_color(pick, color=nil) # NOTE: ignores alpha
|
136
154
|
reqs = []
|
137
155
|
reqs.push(update_sheet_properties: {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: googlesheets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Shreeve
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This gem allows easy access to Google Sheets API V4.
|
14
14
|
email: steve.shreeve@gmail.com
|
@@ -41,7 +41,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
requirements: []
|
44
|
-
rubygems_version: 3.
|
44
|
+
rubygems_version: 3.2.16
|
45
45
|
signing_key:
|
46
46
|
specification_version: 4
|
47
47
|
summary: Ruby gem for Google Sheets
|