Skip to content

Commit da13414

Browse files
committed
Remove unused google drive gem and related logic
1 parent 7eb65dd commit da13414

11 files changed

Lines changed: 93 additions & 359 deletions

File tree

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ gem 'bootstrap', '~> 4.6' # Held back to 4.6
1313
gem 'cancancan', '~> 3.6', '>= 3.6.1'
1414
gem 'doorkeeper', '~> 5.7', '>= 5.7.1'
1515
gem 'doorkeeper-openid_connect', '~> 1.8', '>= 1.8.9'
16+
gem 'faraday', '~> 2.14'
1617
gem 'file_validators', '~> 3.0' # Used to validate organization logo
1718
gem 'font-awesome-rails', '~> 4.7', '>= 4.7.0.8'
18-
gem 'google_drive', '~> 3.0', '>= 3.0.7', require: false
1919
gem 'gravtastic', '~> 3.2', '>= 3.2.6' # Used to display user avatars
2020
gem 'image_processing', '~> 1.12', '>= 1.12.2' # Used by active_storage to make logo 100x100 on the fly
2121
gem 'logstasher', '~> 2.1', '>= 2.1.5'

Gemfile.lock

Lines changed: 10 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ GEM
130130
database_cleaner-core (~> 2.0.0)
131131
database_cleaner-core (2.0.1)
132132
date (3.3.4)
133-
declarative (0.0.20)
134133
diff-lcs (1.5.1)
135134
docile (1.4.1)
136135
domain_name (0.6.20240107)
@@ -148,29 +147,12 @@ GEM
148147
factory_bot_rails (6.4.3)
149148
factory_bot (~> 6.4)
150149
railties (>= 5.0.0)
151-
faraday (1.10.3)
152-
faraday-em_http (~> 1.0)
153-
faraday-em_synchrony (~> 1.0)
154-
faraday-excon (~> 1.1)
155-
faraday-httpclient (~> 1.0)
156-
faraday-multipart (~> 1.0)
157-
faraday-net_http (~> 1.0)
158-
faraday-net_http_persistent (~> 1.0)
159-
faraday-patron (~> 1.0)
160-
faraday-rack (~> 1.0)
161-
faraday-retry (~> 1.0)
162-
ruby2_keywords (>= 0.0.4)
163-
faraday-em_http (1.0.0)
164-
faraday-em_synchrony (1.0.0)
165-
faraday-excon (1.1.0)
166-
faraday-httpclient (1.0.1)
167-
faraday-multipart (1.0.4)
168-
multipart-post (~> 2)
169-
faraday-net_http (1.0.2)
170-
faraday-net_http_persistent (1.2.0)
171-
faraday-patron (1.0.0)
172-
faraday-rack (1.0.0)
173-
faraday-retry (1.0.3)
150+
faraday (2.14.0)
151+
faraday-net_http (>= 2.0, < 3.5)
152+
json
153+
logger
154+
faraday-net_http (3.4.2)
155+
net-http (~> 0.5)
174156
ffi (1.17.0)
175157
ffi-compiler (1.3.2)
176158
ffi (>= 1.15.5)
@@ -182,36 +164,11 @@ GEM
182164
railties (>= 3.2, < 8.0)
183165
globalid (1.2.1)
184166
activesupport (>= 6.1)
185-
google-apis-core (0.11.3)
186-
addressable (~> 2.5, >= 2.5.1)
187-
googleauth (>= 0.16.2, < 2.a)
188-
httpclient (>= 2.8.1, < 3.a)
189-
mini_mime (~> 1.0)
190-
representable (~> 3.0)
191-
retriable (>= 2.0, < 4.a)
192-
rexml
193-
google-apis-drive_v3 (0.46.0)
194-
google-apis-core (>= 0.11.0, < 2.a)
195-
google-apis-sheets_v4 (0.26.0)
196-
google-apis-core (>= 0.11.0, < 2.a)
197-
google_drive (3.0.7)
198-
google-apis-drive_v3 (>= 0.5.0, < 1.0.0)
199-
google-apis-sheets_v4 (>= 0.4.0, < 1.0.0)
200-
googleauth (>= 0.5.0, < 1.0.0)
201-
nokogiri (>= 1.5.3, < 2.0.0)
202-
googleauth (0.17.1)
203-
faraday (>= 0.17.3, < 2.0)
204-
jwt (>= 1.4, < 3.0)
205-
memoist (~> 0.16)
206-
multi_json (~> 1.11)
207-
os (>= 0.9, < 2.0)
208-
signet (~> 0.15)
209167
gravtastic (3.2.6)
210168
hiredis (0.6.3)
211169
http-accept (1.7.0)
212170
http-cookie (1.0.6)
213171
domain_name (~> 0.5)
214-
httpclient (2.8.3)
215172
i18n (1.14.5)
216173
concurrent-ruby (~> 1.0)
217174
image_processing (1.13.0)
@@ -250,7 +207,6 @@ GEM
250207
net-smtp
251208
marcel (1.0.4)
252209
matrix (0.4.2)
253-
memoist (0.16.2)
254210
method_source (1.1.0)
255211
mime-types (3.5.2)
256212
mime-types-data (~> 3.2015)
@@ -265,11 +221,12 @@ GEM
265221
mini_mime (1.1.5)
266222
minitest (5.24.1)
267223
multi_json (1.15.0)
268-
multipart-post (2.4.1)
269224
mustermann (3.0.0)
270225
ruby2_keywords (~> 0.0.1)
271226
mutex_m (0.2.0)
272227
natcmp (1.4.3)
228+
net-http (0.8.0)
229+
uri (>= 0.11.1)
273230
net-imap (0.4.14)
274231
date
275232
net-protocol
@@ -294,7 +251,6 @@ GEM
294251
racc (~> 1.4)
295252
nokogiri (1.16.7-x86_64-linux)
296253
racc (~> 1.4)
297-
os (1.1.4)
298254
parallel (1.25.1)
299255
parser (3.3.4.0)
300256
ast (~> 2.4.1)
@@ -386,10 +342,6 @@ GEM
386342
regexp_parser (2.9.2)
387343
reline (0.5.9)
388344
io-console (~> 0.5)
389-
representable (3.2.0)
390-
declarative (< 0.1.0)
391-
trailblazer-option (>= 0.1.1, < 0.2.0)
392-
uber (< 0.2.0)
393345
request_store (1.7.0)
394346
rack (>= 1.4)
395347
responders (3.1.1)
@@ -400,7 +352,6 @@ GEM
400352
http-cookie (>= 1.0.2, < 2.0)
401353
mime-types (>= 1.16, < 4.0)
402354
netrc (~> 0.8)
403-
retriable (3.1.2)
404355
rexml (3.3.2)
405356
strscan
406357
rspec (3.13.0)
@@ -478,11 +429,6 @@ GEM
478429
sprockets (> 3.0)
479430
sprockets-rails
480431
tilt
481-
signet (0.19.0)
482-
addressable (~> 2.8)
483-
faraday (>= 0.17.5, < 3.a)
484-
jwt (>= 1.5, < 3.0)
485-
multi_json (~> 1.10)
486432
simplecov (0.22.0)
487433
docile (~> 1.1)
488434
simplecov-html (~> 0.11)
@@ -511,13 +457,12 @@ GEM
511457
thor (1.3.1)
512458
tilt (2.4.0)
513459
timeout (0.4.1)
514-
trailblazer-option (0.1.2)
515460
tzinfo (2.0.6)
516461
concurrent-ruby (~> 1.0)
517-
uber (0.1.0)
518462
uglifier (4.2.0)
519463
execjs (>= 0.3.0, < 3)
520464
unicode-display_width (2.5.0)
465+
uri (1.1.1)
521466
webrick (1.8.1)
522467
websocket-driver (0.7.6)
523468
websocket-extensions (>= 0.1.0)
@@ -557,9 +502,9 @@ DEPENDENCIES
557502
doorkeeper (~> 5.7, >= 5.7.1)
558503
doorkeeper-openid_connect (~> 1.8, >= 1.8.9)
559504
factory_bot_rails (~> 6.4, >= 6.4.3)
505+
faraday (~> 2.14)
560506
file_validators (~> 3.0)
561507
font-awesome-rails (~> 4.7, >= 4.7.0.8)
562-
google_drive (~> 3.0, >= 3.0.7)
563508
gravtastic (~> 3.2, >= 3.2.6)
564509
hiredis (~> 0.6.3)
565510
image_processing (~> 1.12, >= 1.12.2)

app/helpers/points_helper.rb

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,6 @@ def github_repo_url_to_project_page_url(url)
99
end
1010
end
1111

12-
def gdocs_notifications(notifications)
13-
ret = "<span class='flash notice'><ul>"
14-
ret += notifications.map do |msg|
15-
if msg =~ /^error/ || msg =~ /^exception/
16-
"<span class='error'><li>#{msg}</li></span>"
17-
else
18-
"<li>#{msg}</li>"
19-
end
20-
end.join
21-
ret += '</ul></span>'
22-
ret
23-
end
24-
2512
def points_list(points)
2613
points.to_a.natsort.map { |pt| h(pt) }.join('&nbsp; ').html_safe
2714
end

app/models/course.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# frozen_string_literal: true
22

3-
require 'gdocs_export'
43
require 'system_commands'
54
require 'date_and_time_utils'
65

@@ -292,10 +291,6 @@ def gdocs_sheets(exercises = nil)
292291
exercises.map(&:gdocs_sheet).reject(&:nil?).uniq
293292
end
294293

295-
def refresh_gdocs_worksheet(sheetname)
296-
GDocsExport.refresh_course_worksheet_points self, sheetname
297-
end
298-
299294
def self.cache_root
300295
"#{FileStore.root}/course"
301296
end

app/views/points/refresh_gdocs.html.erb

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/views/points/show.html.erb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
<% else %>
1111
<%= link_to('Sort by default order', organization_course_point_path(@organization, @course, @sheetname, show_attempted: params[:show_attempted]), class: "btn btn-primary") %>
1212
<% end %>
13-
14-
<% if can? :refresh_gdocs_spreadsheet, @course %>
15-
<% link_to 'Refresh Google Docs worksheet', refresh_gdocs_organization_course_point_path(@organization, @course, @sheetname), class: "btn btn-primary" %>
16-
<% end %>
1713
</div>
1814
</div>
1915

config/initializers/gdocs_config.rb.example

Lines changed: 0 additions & 4 deletions
This file was deleted.

config/routes.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,6 @@
203203
post 'toggle_submission_result_visibility'
204204
end
205205

206-
resources :points, only: %i[index show] do
207-
member do
208-
get 'refresh_gdocs'
209-
end
210-
end
211-
212206
resources :exercises, only: [:index] do
213207
collection do
214208
post 'set_disabled_statuses'

0 commit comments

Comments
 (0)