google_drive_maintained 3.0.8

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.
@@ -0,0 +1,53 @@
1
+ require 'forwardable'
2
+
3
+ module GoogleDrive
4
+
5
+ class Cell
6
+ attr_reader :row, :col, :value
7
+
8
+ def initialize(worksheet, row, col, value)
9
+ @worksheet = worksheet
10
+ @row = row
11
+ @col = col
12
+ @value = value
13
+ end
14
+
15
+ #
16
+ # === 等価性
17
+ #
18
+ def ==(other)
19
+ case other
20
+ when GoogleDrive::Cell
21
+ @value == other.value
22
+ else
23
+ @value == other
24
+ end
25
+ end
26
+
27
+ def to_s
28
+ value.to_s
29
+ end
30
+
31
+ def encoding
32
+ value.respond_to?(:encoding) ? value.encoding : nil
33
+ end
34
+
35
+ def background_color=(color)
36
+ @worksheet.set_background_color(@row, @col, 1, 1, color)
37
+ end
38
+
39
+ end
40
+
41
+ module WorksheetFormatting
42
+
43
+ def set_background_color_at(row, col, color)
44
+ set_background_color(row, col, 1, 1, color)
45
+ end
46
+
47
+ def set_bold(row, col, enable = true)
48
+ # 太字設定
49
+ end
50
+
51
+ # ... 他にも text_color, font_size など拡張しやすい
52
+ end
53
+ end
@@ -0,0 +1,35 @@
1
+ # Author: Hiroshi Ichikawa <http://gimite.net/>
2
+ # The license of this source is "New BSD Licence"
3
+
4
+ require 'json'
5
+ require 'googleauth'
6
+
7
+ require 'google_drive/session'
8
+
9
+ module GoogleDrive
10
+ # Equivalent of either GoogleDrive::Session.from_credentials or
11
+ # GoogleDrive::Session.from_access_token.
12
+ def self.login_with_oauth(client_or_access_token, proxy = nil)
13
+ Session.new(client_or_access_token, proxy)
14
+ end
15
+
16
+ # Alias of GoogleDrive::Session.from_config.
17
+ def self.saved_session(
18
+ config = ENV['HOME'] + '/.ruby_google_drive.token',
19
+ proxy = nil,
20
+ client_id = nil,
21
+ client_secret = nil
22
+ )
23
+ if proxy
24
+ raise(
25
+ ArgumentError,
26
+ 'Specifying a proxy object is no longer supported. ' \
27
+ 'Set ENV["http_proxy"] instead.'
28
+ )
29
+ end
30
+
31
+ Session.from_config(
32
+ config, client_id: client_id, client_secret: client_secret
33
+ )
34
+ end
35
+ end
metadata ADDED
@@ -0,0 +1,205 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google_drive_maintained
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.8
5
+ platform: ruby
6
+ authors:
7
+ - Hiroshi Ichikawa
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2025-07-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: nokogiri
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 1.5.3
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 2.0.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 1.5.3
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 2.0.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: google-apis-drive_v3
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.5'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 0.5.0
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '0.5'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 0.5.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: google-apis-sheets_v4
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '0.4'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 0.4.0
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0.4'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 0.4.0
73
+ - !ruby/object:Gem::Dependency
74
+ name: googleauth
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '0.5'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 0.5.0
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.5'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 0.5.0
93
+ - !ruby/object:Gem::Dependency
94
+ name: test-unit
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 3.0.0
100
+ - - "<"
101
+ - !ruby/object:Gem::Version
102
+ version: 4.0.0
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: 3.0.0
110
+ - - "<"
111
+ - !ruby/object:Gem::Version
112
+ version: 4.0.0
113
+ - !ruby/object:Gem::Dependency
114
+ name: rake
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '0.8'
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 0.8.0
123
+ type: :development
124
+ prerelease: false
125
+ version_requirements: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '0.8'
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 0.8.0
133
+ - !ruby/object:Gem::Dependency
134
+ name: rspec-mocks
135
+ requirement: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: 3.4.0
140
+ - - "<"
141
+ - !ruby/object:Gem::Version
142
+ version: 4.0.0
143
+ type: :development
144
+ prerelease: false
145
+ version_requirements: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: 3.4.0
150
+ - - "<"
151
+ - !ruby/object:Gem::Version
152
+ version: 4.0.0
153
+ description: This Ruby library provides a convenient interface for reading and writing
154
+ files and spreadsheets stored in Google Drive and Google Docs. It supports authentication,
155
+ worksheet manipulation, and now includes background color styling and Cell object
156
+ access.
157
+ email:
158
+ - gimite+github@gmail.com
159
+ executables: []
160
+ extensions: []
161
+ extra_rdoc_files: []
162
+ files:
163
+ - README.md
164
+ - lib/google_drive.rb
165
+ - lib/google_drive/access_token_credentials.rb
166
+ - lib/google_drive/acl.rb
167
+ - lib/google_drive/acl_entry.rb
168
+ - lib/google_drive/api_client_fetcher.rb
169
+ - lib/google_drive/authentication_error.rb
170
+ - lib/google_drive/collection.rb
171
+ - lib/google_drive/config.rb
172
+ - lib/google_drive/error.rb
173
+ - lib/google_drive/file.rb
174
+ - lib/google_drive/list.rb
175
+ - lib/google_drive/list_row.rb
176
+ - lib/google_drive/response_code_error.rb
177
+ - lib/google_drive/session.rb
178
+ - lib/google_drive/spreadsheet.rb
179
+ - lib/google_drive/util.rb
180
+ - lib/google_drive/worksheet.rb
181
+ - lib/google_drive/worksheet_formatting.rb
182
+ homepage: https://github.com/y-bonfire/google-drive-ruby-maintained
183
+ licenses:
184
+ - BSD-3-Clause
185
+ metadata: {}
186
+ post_install_message:
187
+ rdoc_options: []
188
+ require_paths:
189
+ - lib
190
+ required_ruby_version: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: 3.0.0
195
+ required_rubygems_version: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - ">="
198
+ - !ruby/object:Gem::Version
199
+ version: '0'
200
+ requirements: []
201
+ rubygems_version: 3.5.3
202
+ signing_key:
203
+ specification_version: 4
204
+ summary: Access and manipulate spreadsheets and files in Google Drive easily.
205
+ test_files: []