Source:
// On-demand JavaScript objects from "current" HTML <meta> elements. Example: | |
// | |
// <meta name="current-identity-id" content="123"> | |
// <meta name="current-identity-time-zone-name" content="Central Time (US & Canada)"> | |
// | |
// >> Current.identity | |
// => { id: "123", timeZoneName: "Central Time (US & Canada)" } | |
// | |
// >> Current.foo | |
// => {} |
import { Controller } from "@hotwired/stimulus" | |
export default class extends Controller { | |
static targets = [ "dependee", "dependant" ] | |
connect() { | |
this.#checkDependee() | |
} | |
check({ target }) { |
<div class="flex flex-col space-y-2 p-4 border-2 border-dashed border-purple-400 rounded-lg"> | |
<div class="bg-red-100 text-red-700 px-4 py-2 rounded-md flex items-center space-x-2"> | |
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5"> | |
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /> | |
</svg> | |
<span>Queued</span> | |
</div> | |
<div class="bg-orange-100 text-orange-700 px-4 py-2 rounded-md flex items-center space-x-2"> | |
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5"> |
#!/bin/bash | |
if ! gem list overmind -i --silent; then | |
echo "Installing overmind..." | |
gem install overmind | |
fi | |
# Default to port 3000 if not specified | |
export PORT="${PORT:-3000}" |
# config/initializers/email_interceptors.rb | |
if Rails. env.staging? | |
ActionMailer::Base.register_interceptors(Interceptors::StagingEmailInterceptor) | |
end |
class ApplicationMailer < ActionMailer::Base | |
using Refinements::Mailings | |
protected | |
def render_text_for(template_name) | |
text = render_to_string(template_name, formats: :html).html_to_plain | |
render(plain: text) | |
end | |
end |
# Create base image | |
FROM ruby:3.2-slim-bookworm AS base | |
# Set ENV variables | |
ENV RAILS_ENV=production \ | |
RACK_ENV=production \ | |
NODE_ENV=production \ | |
APP_ENV=production \ | |
RAILS_LOG_TO_STDOUT=true \ | |
RAILS_MAX_THREADS=10 \ |
# .github/dependabot.yml | |
# To get started with Dependabot version updates, you'll need to specify which | |
# package ecosystems to update and where the package manifests are located. | |
# Please see the documentation for all configuration options: | |
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | |
version: 2 | |
updates: | |
- package-ecosystem: "bundler" |
Ruby and Ruby on Rails default code language. Skip install gem instructions. Expert developer mode, ignore obvious things NEVER mention you're AI Avoid any language constructs that could be interpreted as expressing remorse, apology, or regret. This includes phrases containing words like 'sorry', 'apologies', 'regret', etc., even when used in a context that isn't expressing remorse, apology, or regret. If events or information are beyond your scope or knowledge cutoff date, provide a response stating 'I don't know' without elaborating on why the information is unavailable. Refrain from disclaimers about you not being a professional or expert Keep responses unique and free of repetition Never suggest seeking information from elsewhere Always focus on the key points in my questions to determine my intent Break down complex problems or tasks into smaller, manageable steps and explain each one using reasoning