google_spreadsheet_fetcher 2.1.0 → 2.3.0
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,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f63a88c06d2ac00593f4a2d29587aad4282ffb39d6bdd31ab0d2dcf0eb33dbe1
|
|
4
|
+
data.tar.gz: 312a5d0a6ebf076378f0f08f24ada4ab06dfd9f58a4661671b4f56e4ca7ac755
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c859deb606bd6cb7cc8cd88a2415130f7e37e0f6d1141a6de6d538f7255926591d05310d27fe56a9233bdddcb1a3e3727c5aaef9025d51510f9b095fbfe78c81
|
|
7
|
+
data.tar.gz: 214e5fd9a634ead70ebaa337f5174dfa0650eb712aa82977a1c8116800cf49adfb7cf6476b0820bc4ca5c99283de375c6826512013f12256100494dfb4d9b454
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
require 'active_support/configurable'
|
|
2
|
-
|
|
3
1
|
module GoogleSpreadsheetFetcher
|
|
4
2
|
class Config
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
config_accessor :authorizer
|
|
3
|
+
class_attribute :authorizer
|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
class_attribute :client_secrets_file
|
|
6
|
+
class_attribute :credential_store_file # required if token_store not set
|
|
7
|
+
class_attribute :token_store # required if credential_store_file not set
|
|
8
|
+
class_attribute :scopes
|
|
9
|
+
class_attribute :user_id
|
|
14
10
|
|
|
15
11
|
def self.default_config
|
|
16
12
|
new.tap do |config|
|
metadata
CHANGED
|
@@ -1,18 +1,46 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google_spreadsheet_fetcher
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Takahiro Ooishi
|
|
8
8
|
- Yuya Yokosuka
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2025-10-28 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rack
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
requirements:
|
|
18
|
+
- - "~>"
|
|
19
|
+
- !ruby/object:Gem::Version
|
|
20
|
+
version: '3'
|
|
21
|
+
type: :runtime
|
|
22
|
+
prerelease: false
|
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
24
|
+
requirements:
|
|
25
|
+
- - "~>"
|
|
26
|
+
- !ruby/object:Gem::Version
|
|
27
|
+
version: '3'
|
|
28
|
+
- !ruby/object:Gem::Dependency
|
|
29
|
+
name: rackup
|
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
|
31
|
+
requirements:
|
|
32
|
+
- - ">="
|
|
33
|
+
- !ruby/object:Gem::Version
|
|
34
|
+
version: '0'
|
|
35
|
+
type: :runtime
|
|
36
|
+
prerelease: false
|
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
38
|
+
requirements:
|
|
39
|
+
- - ">="
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: '0'
|
|
42
|
+
- !ruby/object:Gem::Dependency
|
|
43
|
+
name: rack-session
|
|
16
44
|
requirement: !ruby/object:Gem::Requirement
|
|
17
45
|
requirements:
|
|
18
46
|
- - ">="
|
|
@@ -117,8 +145,6 @@ executables: []
|
|
|
117
145
|
extensions: []
|
|
118
146
|
extra_rdoc_files: []
|
|
119
147
|
files:
|
|
120
|
-
- LICENSE
|
|
121
|
-
- README.md
|
|
122
148
|
- lib/google_spreadsheet_fetcher.rb
|
|
123
149
|
- lib/google_spreadsheet_fetcher/authorizer/interface.rb
|
|
124
150
|
- lib/google_spreadsheet_fetcher/authorizer/oauth2/authorizer.rb
|
|
@@ -135,8 +161,10 @@ files:
|
|
|
135
161
|
homepage: https://github.com/taka0125/google_spreadsheet_fetcher
|
|
136
162
|
licenses:
|
|
137
163
|
- MIT
|
|
138
|
-
metadata:
|
|
139
|
-
|
|
164
|
+
metadata:
|
|
165
|
+
homepage_uri: https://github.com/taka0125/google_spreadsheet_fetcher
|
|
166
|
+
source_code_uri: https://github.com/taka0125/google_spreadsheet_fetcher
|
|
167
|
+
post_install_message:
|
|
140
168
|
rdoc_options: []
|
|
141
169
|
require_paths:
|
|
142
170
|
- lib
|
|
@@ -152,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
152
180
|
version: '0'
|
|
153
181
|
requirements: []
|
|
154
182
|
rubygems_version: 3.4.19
|
|
155
|
-
signing_key:
|
|
183
|
+
signing_key:
|
|
156
184
|
specification_version: 4
|
|
157
185
|
summary: Google Spreadsheet fetcher
|
|
158
186
|
test_files: []
|
data/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Takahiro Ooishi
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
data/README.md
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# GoogleSpreadsheetFetcher
|
|
2
|
-
|
|
3
|
-
Provides access to Google spreadsheets
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
Add this line to your application's Gemfile:
|
|
8
|
-
|
|
9
|
-
```ruby
|
|
10
|
-
gem 'google_spreadsheet_fetcher'
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
And then execute:
|
|
14
|
-
|
|
15
|
-
$ bundle
|
|
16
|
-
|
|
17
|
-
Or install it yourself as:
|
|
18
|
-
|
|
19
|
-
$ gem install google_spreadsheet_fetcher
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
22
|
-
|
|
23
|
-
```ruby
|
|
24
|
-
sheet_key = 'example_sheet_id'
|
|
25
|
-
|
|
26
|
-
GoogleSpreadsheetFetcher.configure do |config|
|
|
27
|
-
...
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
user_id = 'sample'
|
|
31
|
-
|
|
32
|
-
fetcher = GoogleSpreadsheetFetcher::Fetcher.new(sheet_key, user_id)
|
|
33
|
-
|
|
34
|
-
fetcher.fetch_all_rows_by!(index: 0)
|
|
35
|
-
fetcher.fetch_all_rows_by!(title: 'sheet_title')
|
|
36
|
-
fetcher.fetch_all_rows_by!(sheet_id: 1234567890)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
# or, you can do a bulk fetching. In this case, you only need to access the API once,
|
|
40
|
-
# but it will take a little longer on first fetch.
|
|
41
|
-
fetcher = GoogleSpreadsheetFetcher::BulkFetcher.new(sheet_key, user_id)
|
|
42
|
-
fetcher.fetch
|
|
43
|
-
|
|
44
|
-
fetcher.all_rows_by!(index: 0)
|
|
45
|
-
fetcher.all_rows_by!(title: 'sheet_title')
|
|
46
|
-
fetcher.all_rows_by!(sheet_id: 1234567890)
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### Use Service Account
|
|
50
|
-
|
|
51
|
-
https://github.com/taka0125/google_spreadsheet_fetcher/wiki/Use-Service-Account
|
|
52
|
-
|
|
53
|
-
### Use OAuth2
|
|
54
|
-
|
|
55
|
-
https://github.com/taka0125/google_spreadsheet_fetcher/wiki/Use-OAuth2
|
|
56
|
-
|
|
57
|
-
## Development
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
$ make setup
|
|
61
|
-
$ make ruby/rspec
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Contributing
|
|
65
|
-
|
|
66
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/taka0125/google_spreadsheet_fetcher.
|
|
67
|
-
|