$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add [email protected] jquery popper.jsdiff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add [email protected] jquery popper.jsdiff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644Estimated time: 10 minutes
| require 'pathname' | |
| require 'open3' | |
| require 'mini_magick' | |
| SRC_DIR = '/path/to/src/dir/'.freeze | |
| TMP_DIR = '/path/to/tmp/dir/'.freeze | |
| class TextReader | |
| def initialize(input_path, output_path) | |
| @input_path = input_path |
| # https://github.com/onnx/models/tree/master/vision/body_analysis/emotion_ferplus | |
| require "onnxruntime" | |
| require "mini_magick" | |
| img = MiniMagick::Image.open("ranger.jpg") | |
| img.crop "100x100+60+20", "-gravity", "center" | |
| img.resize "64x64^", "-gravity", "center", "-extent", "64x64" | |
| img.colorspace "Gray" | |
| img.write("resized.jpg") |
| app/views/youtubes/_thumbnail.html.erb | |
| <div> | |
| <%= image_tag youtube.thumbnail_url, style: "max-width:400px" %> | |
| </div> |
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
| # Build the whole docker images. | |
| # - we first copy all the variables from the figaro yml file to a .env file | |
| # - then we build the docker images | |
| # - we start the images | |
| # - we create the database | |
| # Call this with: | |
| # - make build | |
| build: | |
| @ruby docker/env_vars.rb | |
| @docker compose build |
| # frozen_string_literal: true | |
| require "rails_helper" | |
| # Automatically smoke-test all mailer previews | |
| describe "/rails/mailers" do | |
| subject { response } | |
| ActionMailer::Preview.all.each do |preview| | |
| next if preview.emails.empty? |