Skip to content

Commit

Permalink
revert app:update
Browse files Browse the repository at this point in the history
  • Loading branch information
Florence-Njeri committed Feb 7, 2023
1 parent e8ba186 commit 1afe391
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 44 deletions.
89 changes: 64 additions & 25 deletions config/application.rb
Original file line number Diff line number Diff line change
@@ -1,34 +1,73 @@
require_relative "boot"

require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
# require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
# require "action_mailbox/engine"
# require "action_text/engine"
require "action_view/railtie"
# require "action_cable/engine"
require "rails/test_unit/railtie"
# frozen_string_literal: true

require_relative 'boot'
require 'rails'

%w(
active_record/railtie
action_controller/railtie
action_view/railtie
action_mailer/railtie
active_job/railtie
rails/test_unit/railtie
sprockets/railtie
).each do |railtie|
require railtie
rescue LoadError
end

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
Bundler.require(:default, Rails.env)

module WebsiteOne
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.0

# Configuration for the application, engines, and railties goes here.
#
# These settings can be overridden in specific environments using the files
# in config/environments, which are processed later.
#
# config.time_zone = "Central Time (US & Canada)"
# config.eager_load_paths << Rails.root.join("extras")
config.load_defaults 6.1
# necessary to make Settings available
Config::Integrations::Rails::Railtie.preload
# config.load_defaults 5.0
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.exceptions_app = routes

config.action_mailer.delivery_method = Settings.mailer.delivery_method.to_sym
config.action_mailer.smtp_settings = Settings.mailer.smtp_settings.to_hash
config.action_mailer.default_url_options = { host: 'www.agileventures.org' }

# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
ENV['TZ'] = 'UTC'

# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
I18n.enforce_available_locales = false

config.assets.enabled = true

# Precompile additional assets.
# application.js, application.css.scss, and all non-JS/CSS in app/assets folder are already added.
config.assets.precompile += %w(
mercury_init.js 404.js projects.js events.js google-analytics.js
disqus.js event_instances.js scrums.js moment-timezone-with-data-2012-2022.js
)

# ensure svg assets are compiled in production
config.assets.precompile += %w(jobs.svg lady-dev.svg real-projects.svg runners.svg standups.svg)

# config.assets.css_compressor = :sass

config.autoload_paths += Dir[Rails.root.join('app', '**/')]
config.autoload_paths += Dir[Rails.root.join('lib')]

# config.middleware.insert_before 0, Rack::Cors do
# allow do
# origins 'https://www.react.agileventures.org'
# resource '*', headers: :any, methods: [:get]
# end
# end
end
end
8 changes: 5 additions & 3 deletions config/boot.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
# frozen_string_literal: true

require "bundler/setup" # Set up gems listed in the Gemfile.
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)

require 'bundler/setup' # Set up gems listed in the Gemfile.
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
20 changes: 9 additions & 11 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Be sure to restart your server when you modify this file.
# frozen_string_literal: true

# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = "1.0"

# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
Rails.application.configure do
# ensure svg assets are compiled in production
config.assets.precompile += %w(jquery-1.7.js subscriptions.css lolex.js jasmine-jquery.js .svg
hangout_play_on_hover.js)
config.assets.paths << Rails.root.join('node_modules')
# Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.0'
end
6 changes: 3 additions & 3 deletions config/initializers/filter_parameter_logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# Configure parameters to be filtered from the log file. Use this to limit dissemination of
# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
# notations and behaviors.
Rails.application.config.filter_parameters += [
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
]
Rails.application.config.filter_parameters += %i(
passw secret token _key crypt salt certificate otp ssn
)
5 changes: 4 additions & 1 deletion config/initializers/inflections.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.

# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.plural /^(ox)$/i, "\\1en"
# inflect.singular /^(ox)en/i, "\\1"
# inflect.irregular "person", "people"
Expand All @@ -12,5 +16,4 @@

# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym "RESTful"
# end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[6.1].define(version: 2022_12_15_193425) do
ActiveRecord::Schema.define(version: 2022_12_15_193425) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down

0 comments on commit 1afe391

Please sign in to comment.