-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1825 from NREL/fix/bundler_dependency_version
Fix gem dependencies for CI
- Loading branch information
Showing
4 changed files
with
6 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,53 +201,6 @@ def standard_directory_name_from_template(template) | |
return directory_name | ||
end | ||
|
||
# checks whether your authorization credentials are set up to access the spreadsheets | ||
# @return [Boolean] returns true if api is working, false if not | ||
def check_google_drive_configuration | ||
require 'google_drive' | ||
client_config_path = File.join(Dir.home, '.credentials', "client_secret.json") | ||
unless File.exist? client_config_path | ||
puts "Unable to locate client_secret.json file at #{client_config_path}." | ||
return false | ||
end | ||
puts 'attempting to access spreadsheets...' | ||
puts 'if you get an SSL error, disconnect from the VPN and try again' | ||
session = GoogleDrive::Session.from_config(client_config_path) | ||
|
||
# Gets list of remote files | ||
session.files.each do |file| | ||
puts file.title if file.title.include? 'OpenStudio' | ||
end | ||
|
||
puts 'Spreadsheets accessed successfully' | ||
return true | ||
end | ||
|
||
# Downloads the OpenStudio_Standards.xlsx from Google Drive | ||
# @note This requires you to have a client_secret.json file saved in your | ||
# username/.credentials folder. To get one of these files, please contact | ||
# [email protected] | ||
def download_google_spreadsheets(spreadsheet_titles) | ||
require 'google_drive' | ||
client_config_path = File.join(Dir.home, '.credentials', "client_secret.json") | ||
unless File.exist? client_config_path | ||
puts "Unable to locate client_secret.json file at #{client_config_path}." | ||
return false | ||
end | ||
|
||
session = GoogleDrive::Session.from_config(client_config_path) | ||
|
||
# Gets list of remote files | ||
session.files.each do |file| | ||
if spreadsheet_titles.include?(file.title) | ||
puts "Found #{file.title}" | ||
file.export_as_file("#{File.dirname(__FILE__)}/#{file.title}.xlsx") | ||
puts "Downloaded #{file.title} to #{File.dirname(__FILE__)}/#{file.title}.xlsx" | ||
end | ||
end | ||
return true | ||
end | ||
|
||
def exclusion_list | ||
file_path = "#{__dir__}/exclude_list.csv" | ||
csv_file = CSV.read(file_path, headers:true) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters