<commit_before>require 'google/api_client'
require 'google_drive'

module ReqresRspec
  module Uploaders
    class GoogleDrive
      def initialize
        @path     = ReqresRspec.configuration.output_path
        @logger   = ReqresRspec.logger

        client = Google::APIClient.new
        auth = client.authorization
        auth.client_id = ENV['GOOGLE_CLIENT_ID']
        auth.client_secret = ENV['GOOGLE_CLIENT_SECRET']
        auth.scope = [
            'https://www.googleapis.com/auth/drive',
            'https://spreadsheets.google.com/feeds/'
        ]
        auth.redirect_uri = 'urn:ietf:wg:oauth:2.0:oob'
        puts("\n\n1. Open this page:\n%s\n\n" % auth.authorization_uri)
        puts('2. Enter the authorization code shown in the page: ')
        auth.code = $stdin.gets.chomp
        auth.fetch_access_token!<commit_msg>Link for detailed information<commit_after>require 'google/api_client'
require 'google_drive'

module ReqresRspec
  module Uploader
    # You can find more detailed information here https://github.com/gimite/google-drive-ruby
    class GoogleDrive
      def initialize
        @path     = ReqresRspec.configuration.output_path
        @logger   = ReqresRspec.logger

        client = Google::APIClient.new
        auth = client.authorization
        auth.client_id = ENV['GOOGLE_CLIENT_ID']
        auth.client_secret = ENV['GOOGLE_CLIENT_SECRET']
        auth.scope = [
            'https://www.googleapis.com/auth/drive',
            'https://spreadsheets.google.com/feeds/'
        ]
        auth.redirect_uri = 'urn:ietf:wg:oauth:2.0:oob'
        puts("\n\n1. Open this page:\n%s\n\n" % auth.authorization_uri)
        puts('2. Enter the authorization code shown in the page: ')
        auth.code = $stdin.gets.chomp
        auth.fetch_access_token!
{'fraction_non_alphanumeric': 0.10851419031719532, 'fraction_numerical': 0.004451864218141347, 'mean_word_length': 2.5533596837944663, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4030854', 'n_tokens_mistral': 582, 'n_tokens_neox': 576, 'n_words': 102}