Skip to content

Commit

Permalink
7.0 not very tested
Browse files Browse the repository at this point in the history
  • Loading branch information
bkettle committed Jul 25, 2022
1 parent 778680d commit e7237de
Show file tree
Hide file tree
Showing 18 changed files with 270 additions and 94 deletions.
11 changes: 7 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ gem 'js-routes'
gem 'kaminari'
gem 'less-rails', '~> 2.7.0'
gem 'message_bus'
gem 'mimemagic', github: 'mimemagicrb/mimemagic', ref: 'd5ebc0cd846dcc68142622c76ad71d021768b7c2' # this is v0.3.3
gem 'mysql2'
gem 'neat', '~> 1.7.1'
gem 'nokogiri'
gem 'paperclip', '~> 5.2'
# gem 'paperclip', '~> 5.2'
gem 'kt-paperclip', '~> 7.0.0'
gem 'paranoia'
gem 'pg', '~> 0.15'
gem 'pg', '~> 1.4.1'
gem 'puma'
gem 'rake', '< 13.0'
gem 'rack-attack'
gem 'rack-mini-profiler'
gem 'rails', '6.0.5.1'
gem 'rails', '6.1.6.1'
gem 'record_tag_helper', '~> 1.0'
gem 'react-rails', '~> 2.3.0'
gem 'recap', '~> 1.0.0'
Expand All @@ -63,6 +63,7 @@ gem 'uglifier', '>= 1.3.0'
# gem 'weather-icons-rails'
gem 'webpacker'
gem 'whenever'
gem 'mimemagic', '~> 0.3.10'

# Following are the rails-assets.org gems
gem 'rails-assets-axios', source: 'https://rails-assets.org'
Expand Down Expand Up @@ -93,3 +94,5 @@ end
group :production do
gem 'rails_12factor'
end

gem "aws-sdk-s3", "~> 1.103"
130 changes: 67 additions & 63 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,65 @@ GEM
remote: https://rubygems.org/
remote: https://rails-assets.org/
specs:
actioncable (6.0.5.1)
actionpack (= 6.0.5.1)
actioncable (6.1.6.1)
actionpack (= 6.1.6.1)
activesupport (= 6.1.6.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.5.1)
actionpack (= 6.0.5.1)
activejob (= 6.0.5.1)
activerecord (= 6.0.5.1)
activestorage (= 6.0.5.1)
activesupport (= 6.0.5.1)
actionmailbox (6.1.6.1)
actionpack (= 6.1.6.1)
activejob (= 6.1.6.1)
activerecord (= 6.1.6.1)
activestorage (= 6.1.6.1)
activesupport (= 6.1.6.1)
mail (>= 2.7.1)
actionmailer (6.0.5.1)
actionpack (= 6.0.5.1)
actionview (= 6.0.5.1)
activejob (= 6.0.5.1)
actionmailer (6.1.6.1)
actionpack (= 6.1.6.1)
actionview (= 6.1.6.1)
activejob (= 6.1.6.1)
activesupport (= 6.1.6.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.5.1)
actionview (= 6.0.5.1)
activesupport (= 6.0.5.1)
rack (~> 2.0, >= 2.0.8)
actionpack (6.1.6.1)
actionview (= 6.1.6.1)
activesupport (= 6.1.6.1)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.5.1)
actionpack (= 6.0.5.1)
activerecord (= 6.0.5.1)
activestorage (= 6.0.5.1)
activesupport (= 6.0.5.1)
actiontext (6.1.6.1)
actionpack (= 6.1.6.1)
activerecord (= 6.1.6.1)
activestorage (= 6.1.6.1)
activesupport (= 6.1.6.1)
nokogiri (>= 1.8.5)
actionview (6.0.5.1)
activesupport (= 6.0.5.1)
actionview (6.1.6.1)
activesupport (= 6.1.6.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.5.1)
activesupport (= 6.0.5.1)
activejob (6.1.6.1)
activesupport (= 6.1.6.1)
globalid (>= 0.3.6)
activemodel (6.0.5.1)
activesupport (= 6.0.5.1)
activerecord (6.0.5.1)
activemodel (= 6.0.5.1)
activesupport (= 6.0.5.1)
activestorage (6.0.5.1)
actionpack (= 6.0.5.1)
activejob (= 6.0.5.1)
activerecord (= 6.0.5.1)
activemodel (6.1.6.1)
activesupport (= 6.1.6.1)
activerecord (6.1.6.1)
activemodel (= 6.1.6.1)
activesupport (= 6.1.6.1)
activestorage (6.1.6.1)
actionpack (= 6.1.6.1)
activejob (= 6.1.6.1)
activerecord (= 6.1.6.1)
activesupport (= 6.1.6.1)
marcel (~> 1.0)
activesupport (6.0.5.1)
mini_mime (>= 1.1.0)
activesupport (6.1.6.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
acts-as-taggable-on (7.0.0)
activerecord (>= 5.0, < 6.2)
addressable (2.8.0)
Expand Down Expand Up @@ -304,7 +308,7 @@ GEM
orm_adapter (0.5.0)
paranoia (2.6.0)
activerecord (>= 5.1, < 7.1)
pg (0.21.0)
pg (1.4.1)
poltergeist (1.18.1)
capybara (>= 2.1, < 4)
cliver (~> 0.3.1)
Expand All @@ -325,20 +329,20 @@ GEM
rack
rack-test (2.0.2)
rack (>= 1.3)
rails (6.0.5.1)
actioncable (= 6.0.5.1)
actionmailbox (= 6.0.5.1)
actionmailer (= 6.0.5.1)
actionpack (= 6.0.5.1)
actiontext (= 6.0.5.1)
actionview (= 6.0.5.1)
activejob (= 6.0.5.1)
activemodel (= 6.0.5.1)
activerecord (= 6.0.5.1)
activestorage (= 6.0.5.1)
activesupport (= 6.0.5.1)
bundler (>= 1.3.0)
railties (= 6.0.5.1)
rails (6.1.6.1)
actioncable (= 6.1.6.1)
actionmailbox (= 6.1.6.1)
actionmailer (= 6.1.6.1)
actionpack (= 6.1.6.1)
actiontext (= 6.1.6.1)
actionview (= 6.1.6.1)
activejob (= 6.1.6.1)
activemodel (= 6.1.6.1)
activerecord (= 6.1.6.1)
activestorage (= 6.1.6.1)
activesupport (= 6.1.6.1)
bundler (>= 1.15.0)
railties (= 6.1.6.1)
sprockets-rails (>= 2.0.0)
rails-assets-axios (0.27.2)
rails-assets-bootstrap-tagsinput (0.8.0)
Expand All @@ -365,12 +369,12 @@ GEM
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (6.0.5.1)
actionpack (= 6.0.5.1)
activesupport (= 6.0.5.1)
railties (6.1.6.1)
actionpack (= 6.1.6.1)
activesupport (= 6.1.6.1)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (>= 12.2)
thor (~> 1.0)
rake (12.3.3)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
Expand Down Expand Up @@ -478,8 +482,8 @@ GEM
execjs (>= 2.2.2, >= 2.2)
less-rails (>= 2.5.0)
railties (>= 3.1)
tzinfo (1.2.10)
thread_safe (~> 0.1)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
virtus (2.0.0)
Expand Down Expand Up @@ -547,13 +551,13 @@ DEPENDENCIES
neat (~> 1.7.1)
nokogiri
paranoia
pg (~> 0.15)
pg (~> 1.4.1)
poltergeist
pry
puma
rack-attack
rack-mini-profiler
rails (= 6.0.5.1)
rails (= 6.1.6.1)
rails-assets-axios!
rails-assets-bootstrap-tagsinput!
rails-assets-jquery-timeago!
Expand Down
4 changes: 2 additions & 2 deletions bin/rails
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
require_relative "../config/boot"
require "rails/commands"
4 changes: 2 additions & 2 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
require_relative "../config/boot"
require "rake"
Rake.application.run
8 changes: 4 additions & 4 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
require 'fileutils'
require "fileutils"

# path to your application root.
APP_ROOT = File.expand_path('..', __dir__)
Expand All @@ -9,16 +9,16 @@ def system!(*args)
end

FileUtils.chdir APP_ROOT do
# This script is a way to setup or update your development environment automatically.
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
# This script is a way to set up or update your development environment automatically.
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
# Add necessary setup steps to this file.

puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')

# Install JavaScript dependencies
# system('bin/yarn')
system! 'bin/yarn'

# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
Expand Down
12 changes: 9 additions & 3 deletions bin/yarn
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/usr/bin/env ruby
APP_ROOT = File.expand_path('..', __dir__)
Dir.chdir(APP_ROOT) do
begin
exec "yarnpkg", *ARGV
rescue Errno::ENOENT
yarn = ENV["PATH"].split(File::PATH_SEPARATOR).
select { |dir| File.expand_path(dir) != __dir__ }.
product(["yarn", "yarn.cmd", "yarn.ps1"]).
map { |dir, file| File.expand_path(file, dir) }.
find { |file| File.executable?(file) }

if yarn
exec yarn, *ARGV
else
$stderr.puts "Yarn executable was not detected in the system."
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
exit 1
Expand Down
4 changes: 3 additions & 1 deletion config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)
require_relative "config/environment"

run Rails.application
Rails.application.load_server
4 changes: 2 additions & 2 deletions config/boot.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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.
require "bundler/setup" # Set up gems listed in the Gemfile.
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
20 changes: 17 additions & 3 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
require "active_support/core_ext/integer/time"

Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.

# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# In the development environment your application's code is reloaded any time
# it changes. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false

Expand Down Expand Up @@ -39,6 +41,12 @@
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log

# Raise exceptions for disallowed deprecations.
config.active_support.disallowed_deprecation = :raise

# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []

# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load

Expand All @@ -54,7 +62,10 @@
config.assets.quiet = true

# Raises error for missing translations.
# config.action_view.raise_on_missing_translations = true
# config.i18n.raise_on_missing_translations = true

# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true

# Devise
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
Expand All @@ -68,4 +79,7 @@
config.generators do |g|
g.test_framework :rspec, fixture: false
end

# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true
end
13 changes: 12 additions & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require "active_support/core_ext/integer/time"

# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
Expand Down Expand Up @@ -43,6 +45,15 @@
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr

# Raise exceptions for disallowed deprecations.
config.active_support.disallowed_deprecation = :raise

# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []

# Raises error for missing translations.
# config.action_view.raise_on_missing_translations = true
# config.i18n.raise_on_missing_translations = true

# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
end
7 changes: 4 additions & 3 deletions config/initializers/backtrace_silencers.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# 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.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }

# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]
4 changes: 3 additions & 1 deletion config/initializers/filter_parameter_logging.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Be sure to restart your server when you modify this file.

# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password]
Rails.application.config.filter_parameters += [
:password, :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
]
Loading

0 comments on commit e7237de

Please sign in to comment.