Merge branch 'master' into setup/pagination

This commit is contained in:
2020-04-28 09:41:20 +02:00
committed by GitHub
80 changed files with 564 additions and 236 deletions

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# ActiveSupport::Reloader.to_prepare do

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
Rails.configuration.to_prepare do
ActiveStorage::Attachment.send(:has_secure_token)
end

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Define an application-wide content security policy

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
GOOGLE_DEMO_FORM = Form.find_by(id: ENV['GOOGLE_DEMO_FORM_ID'])
AIRTABLE_DEMO_FORM = Form.find_by(id: ENV['AIRTABLE_DEMO_FORM_ID'])
AIRTABLE_DEMO_EMBED_URL = ENV['AIRTABLE_DEMO_EMBED_URL']

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.

View File

@@ -1,13 +1,15 @@
# frozen_string_literal: true
require 'google/api_client/client_secrets'
require 'google/apis'
secrets_options = {
"client_id" => ENV['GOOGLE_CLIENT_ID'],
"project_id" => ENV['GOOGLE_PROJECT_ID'],
"client_secret" => ENV['GOOGLE_CLIENT_SECRET'],
"auth_uri" => "https://accounts.google.com/o/oauth2/auth",
"token_uri" => "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url" => "https://www.googleapis.com/oauth2/v1/certs"
'client_id' => ENV['GOOGLE_CLIENT_ID'],
'project_id' => ENV['GOOGLE_PROJECT_ID'],
'client_secret' => ENV['GOOGLE_CLIENT_SECRET'],
'auth_uri' => 'https://accounts.google.com/o/oauth2/auth',
'token_uri' => 'https://oauth2.googleapis.com/token',
'auth_provider_x509_cert_url' => 'https://www.googleapis.com/oauth2/v1/certs'
}
CLIENT_SECRETS = Google::APIClient::ClientSecrets.new("web" => secrets_options)
CLIENT_SECRETS = Google::APIClient::ClientSecrets.new('web' => secrets_options)
Google::Apis.logger = ::Rails.logger

View File

@@ -1 +1,3 @@
# frozen_string_literal: true
DEFAULT_HOST = ENV['DEFAULT_HOST'] || 'localhost:3000'

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections

View File

@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:

View File

@@ -1,10 +1,12 @@
# frozen_string_literal: true
# The first thing you need to configure is which modules you need in your app.
# The default is nothing which will include only core features (password encryption, login/logout).
#
# Available submodules are: :user_activation, :http_basic_auth, :remember_me,
# :reset_password, :session_timeout, :brute_force_protection, :activity_logging,
# :magic_login, :external
Rails.application.config.sorcery.submodules = [:reset_password, :external, :magic_login]
Rails.application.config.sorcery.submodules = %i[reset_password external magic_login]
# Here you can configure each submodule's features.
Rails.application.config.sorcery.configure do |config|
@@ -152,9 +154,9 @@ Rails.application.config.sorcery.configure do |config|
#
config.google.key = ENV['GOOGLE_CLIENT_ID']
config.google.secret = ENV['GOOGLE_CLIENT_SECRET']
config.google.callback_url = (ENV['GOOGLE_AUTH_CALLBACK_URL'] || "http://localhost:3000/oauth/callback?provider=google")
config.google.user_info_mapping = {:email => "email", :name => "name", :google_id => "id"}
config.google.scope = "https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/spreadsheets"
config.google.callback_url = (ENV['GOOGLE_AUTH_CALLBACK_URL'] || 'http://localhost:3000/oauth/callback?provider=google')
config.google.user_info_mapping = { email: 'email', name: 'name', google_id: 'id' }
config.google.scope = 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/spreadsheets'
config.google.auth_url = '/o/oauth2/auth?access_type=offline&include_granted_scopes=true'
#
# For Microsoft Graph, the key will be your App ID, and the secret will be your app password/public key.
@@ -407,7 +409,7 @@ Rails.application.config.sorcery.configure do |config|
#
# user.magic_login_token_expires_at_attribute_name =
# When was magic login email sent — used for hammering protection.
# When was magic login email sent - for hammering protection.
# Default: `:magic_login_email_sent_at`
#
# user.magic_login_email_sent_at_attribute_name =
@@ -528,5 +530,5 @@ Rails.application.config.sorcery.configure do |config|
# This line must come after the 'user config' block.
# Define which model authenticates with sorcery.
config.user_class = "User"
config.user_class = 'User'
end

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which