site

Website's source files.
git clone git://git.ryanmj.xyz/site.git
Log | Files | Refs | LICENSE

commit 22532c740abe0d6939a3458d06f5071515669165
parent abeeeff0b5c8493cfe44f69e90c6ee1f491436f8
Author: Ryan Jeffrey <ryan@ryanmj.xyz>
Date:   Thu, 17 Feb 2022 22:04:10 -0800

Org-ruby, basic views, error and 404, etc

Diffstat:
MGemfile | 6++++++
MGemfile.lock | 8++++++++
Dapp/assets/images/.keep | 0
Mapp/assets/stylesheets/application.css | 274++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
Mapp/controllers/application_controller.rb | 9+++++++++
Aapp/controllers/error_controller.rb | 17+++++++++++++++++
Aapp/controllers/posts_controller.rb | 15+++++++++++++++
Aapp/helpers/error_helper.rb | 2++
Aapp/helpers/posts_helper.rb | 2++
Aapp/models/post.rb | 3+++
Mapp/views/layouts/application.html.erb | 77++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
Aapp/views/posts/blog_index.html.erb | 2++
Aapp/views/posts/esoteric.html.erb | 2++
Aapp/views/posts/index.html.erb | 10++++++++++
Aapp/views/posts/show.html.erb | 11+++++++++++
Mconfig/application.rb | 5++++-
Mconfig/routes.rb | 10+++++++---
Adb/migrate/20220217192914_create_posts.rb | 8++++++++
Adb/migrate/20220217225631_create_active_storage_tables.active_storage.rb | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adb/schema.rb | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Dpublic/404.html | 67-------------------------------------------------------------------
Dpublic/500.html | 66------------------------------------------------------------------
Atest/controllers/error_controller_test.rb | 7+++++++
Atest/controllers/posts_controller_test.rb | 7+++++++
Atest/fixtures/posts.yml | 5+++++
Atest/models/post_test.rb | 7+++++++
26 files changed, 567 insertions(+), 159 deletions(-)

diff --git a/Gemfile b/Gemfile @@ -28,6 +28,12 @@ gem "stimulus-rails" gem "jbuilder" gem "rdoc" + +gem "tilt" + +gem "org-ruby" + +gem "pandoc-ruby" # Use Redis adapter to run Action Cable in production # gem "redis", "~> 4.0" diff --git a/Gemfile.lock b/Gemfile.lock @@ -132,6 +132,9 @@ GEM nio4r (2.5.8) nokogiri (1.13.1-x86_64-linux) racc (~> 1.4) + org-ruby (0.9.12) + rubypants (~> 0.2) + pandoc-ruby (2.1.6) psych (4.0.3) stringio public_suffix (4.0.6) @@ -174,6 +177,7 @@ GEM reline (0.3.1) io-console (~> 0.5) rexml (3.2.5) + rubypants (0.7.1) rubyzip (2.3.2) selenium-webdriver (4.1.0) childprocess (>= 0.5, < 5.0) @@ -192,6 +196,7 @@ GEM stringio (3.0.1) strscan (3.0.1) thor (1.2.1) + tilt (2.0.10) timeout (0.2.0) turbo-rails (1.0.1) actionpack (>= 6.0.0) @@ -223,6 +228,8 @@ DEPENDENCIES debug importmap-rails jbuilder + org-ruby + pandoc-ruby puma (~> 5.0) rails (~> 7.0.2, >= 7.0.2.2) rdoc @@ -230,6 +237,7 @@ DEPENDENCIES sprockets-rails sqlite3 (~> 1.4) stimulus-rails + tilt turbo-rails tzinfo-data web-console diff --git a/app/assets/images/.keep b/app/assets/images/.keep diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css @@ -1,15 +1,259 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's - * vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - */ + +:root { + --dodger_blue4:#104e8b; + --dark_orchid2:#b23aee; + --green2:#00ee00; + --white:#ffffff; + --bisque4:#8b7d6b; + --blue:#0000ff; + --spring_green:#00ff7f; + --gray:#bebebe; + --yellow:#ffff00; + --genwidth: 800px; +} + +/* TODO fix nav bar width not jiving with window width. */ +main { + margin: auto; + width: 75%; +} + +/* unvisited link */ +a:link { + color: var(--dodger_blue4); + text-shadow: 0 0 4px var(--dodger_blue4); +} + +/* visited link */ +a:visited { + color: var(--dark_orchid2); + text-shadow: 0 0 4px var(--dark_orchid2); +} + +/* mouse over link */ +a:hover { + color: var(--green2); + text-shadow: 0 0 4px var(--green2); +} + +/* selected link */ +a:active { + color: var(--dodger_blue4); + text-shadow: 0 0 4px var(--dodger_blue4); +} + +#main-page-title { + margin: 0 auto; + padding: 0; + white-space: pre-wrap; + color: var(--white); + text-shadow: 0 0 4px var(--white); +} + + +h4 { + padding: 0; + margin: 0; + margin-top: 0; + color: white; + font-color: white; + font-family: Sans-Serif; + font-size: 0.8em; +} + +h3 { + margin: 0 auto; + padding: 0; + color: var(--white); + text-shadow: 0 0 4px var(--white); + font-family: monospace; +} + +nav { + text-align: center; + clear: both; + margin: auto; + max-width: 75%; + background-color: rgba(41,44,45,0.9); + border: 0.1em solid white; +} + +nav:hover { + box-shadow: 0 0 0.2em 0.2em #0ff; +} + +nav li { + display: inline-block; + list-style: none; + max-width: 7em; + padding: 0.5em; + transition: transform 0.3s; +} + +nav li:hover { + transform: scale(1.5); +} + +nav ul { + padding: 0; + margin: 0.5em; +} + +nav img { + max-width: 4em; +} + + +@media (min-width: 1200px) { + nav { + float: left; + width: 10%; + position: fixed; + text-align: left; + font-size: large; + } + nav::before { + content: "Links"; + text-align: center; + display: block; + font-size: large; + color: violet; + text-decoration: underline; + margin: 0.5em; + } + nav li { + display: block; + text-align: center; + margin: 0.5em auto; + } + nav img { + max-width: 60%; + } +} + + +.twin { + border: 1.5em solid transparent; + border-image: url(../res/2008.png) 19 12 round; + padding: 0; + /* positioning */ + margin: 0 auto; + width: 100%; + background-color: rgba(0, 0, 0, 0.85); + +} + +.tcontent { + margin: 0 auto; + padding: 0; +} + + +.twin p, span { + margin: 0 auto; + padding: 0; + color: var(--white); + text-shadow: 0 0 4px var(--white); +} + +p.ls { + white-space: pre-wrap; +} + +.cat p { + white-space: normal; + margin-bottom: 1.5em; +} + +.prompt1 { + color: var(--bisque4); + text-shadow: 0 0 4px var(--bisque4); +} + +.prompt-break { + content: '-'; + background-position: center; + background-color: transparent; + background-repeat: repeat-x; + border: none; + border-top: 3px double #333; + color: #333; + overflow: visible; + text-align: center; + height: 0.2em; +} + +.prompt2 { + color: var(--blue); + text-shadow: 0 0 4px var(--blue); +} + +.prompt3 { + color: var(--yellow); + text-shadow: 0 0 4px var(--yellow); +} + +.prompt4 { + font-weight: bold; + text-shadow: 0 0 4px var(--white); +} + +h2 { + color: var(--spring_green); + font-size: 26pt; +} + +body { + background-color: #2d6189; + /*background-image: url('../res/back.jpg');*/ + background-repeat: no-repeat; /* Do not repeat the image */ + background-size: cover; /* Resize the background image to cover the entire container */ + background-size: cover; + background-repeat: no-repeat; + font-family: monospace; + font-size: 1.1em; + -webkit-font-smoothing : none; + -moz-font-smoothing: never; +} + +.fttr { + margin-top: auto; + margin: auto; + margin-top: 75px; + width: 75%; +} + +/* Table stuff. */ + +table { + width: 100%; +} + +table, th, td { + border: 0.1em solid var(--gray); + +} + +td { + text-align: left; +} + +tr:first-child td { + vertical-align: center; +} + +li { + color: var(--white); + text-shadow: 0 0 4px var(--white); +} + +th, td { + margin: 0 auto; + padding: 0; + color: var(--white); + text-shadow: 0 0 4px var(--white); +} + +th { + color: var(--spring_green); +} diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb @@ -1,2 +1,11 @@ class ApplicationController < ActionController::Base + def not_found + raise ActionController::RoutingError.new('Not Found') + rescue + render_404 + end + + def render_404 + render file: "#{Rails.root}/public/404", status: :not_found + end end diff --git a/app/controllers/error_controller.rb b/app/controllers/error_controller.rb @@ -0,0 +1,17 @@ +class ErrorController < ApplicationController + def not_found + render status: 404 + end + + def internal_error + render status: 500 + end + + def unprocessable + render status: 422 + end + + def unacceptable + render status: 406 + end +end diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb @@ -0,0 +1,15 @@ + +class PostsController < ApplicationController + def index + end + + def blog_index + end + + def esoteric + end + + def show + @post = Post.find(params[:id]) rescue not_found + end +end diff --git a/app/helpers/error_helper.rb b/app/helpers/error_helper.rb @@ -0,0 +1,2 @@ +module ErrorHelper +end diff --git a/app/helpers/posts_helper.rb b/app/helpers/posts_helper.rb @@ -0,0 +1,2 @@ +module PostsHelper +end diff --git a/app/models/post.rb b/app/models/post.rb @@ -0,0 +1,3 @@ +class Post < ApplicationRecord + has_one_attached :content +end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb @@ -1,16 +1,79 @@ -<!DOCTYPE html> -<html> +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> - <title>Site</title> - <meta name="viewport" content="width=device-width,initial-scale=1"> + <!-- 2021-04-22 Thu 02:37 --> + <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <title>Ryan's Homepage</title> + <%= csrf_meta_tags %> <%= csp_meta_tag %> <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> - <%= javascript_importmap_tags %> + <meta name="author" content="Ryan Jeffrey" /> + <link rel="shortcut icon" type="image/x-icon" href="favicon32x32.ico"> </head> - <body> - <%= yield %> + <nav> + <ul> + <li> + <a href="/"><%= image_tag '/res/user-home.webp', alt: 'Homepage' %></a> + <h4>Home</h4> + </li> + + <li> + <a href="/posts/"><%= image_tag '/res/folder-documents.webp', alt: 'Blog' %></a> + <h4>Blog</h4> + </li> + + <li> + <a href="/files/"><%= image_tag '/res/ktorrent.webp', alt: 'Files' %></a> + <h4>Files</h4> + </li> + + <li> + <a href="https://git.ryanmj.xyz"><%= image_tag '/res/folder-git.webp', alt: 'git' %></a> + <h4>Git Server</h4> + </li> + + <li> + <a href="mailto:ryan@ryanmj.xyz"><%= image_tag '/res/kopete.webp', alt: 'Email Me' %></a> + <h4>Contact Me</h4> + </li> + </ul> + </nav> + <main> + <%= yield %> + </main> + <div class="fttr"> + <a href="https://www.gnu.org/software/emacs/"> + <%= image_tag '/res/stickies/emacs.webp', alt: 'POWERED BY EMACS' %> + </a> + <a href="https://www.gnu.org/licenses/gpl-3.0.en.html"> + <%= image_tag '/res/stickies/gplv3.webp', alt: 'GPLv3' %> + </a> + <a href="https://www.sxemacs.org/"> + <%= image_tag '/res/stickies/sxe.webp', alt: 'POWERED BY SXEMACS' %> + </a> + <a href="https://www.xemacs.org/"> + <%= image_tag '/res/stickies/xe.webp', alt: 'POWERED BY XEMACS' %> + </a> + + <a href='https://ipv6-test.com/validate.php?url=referer'> + <%= image_tag '/res/stickies/button-ipv6-big.webp', alt:'ipv6 ready', title: 'ipv6 ready' %> + </a> + + <a href="https://jigsaw.w3.org/css-validator/check/referer"> + <%= image_tag '/res/stickies/vcss.gif', alt: 'Valid CSS!' %> + </a> + + <a href="https://www.gimp.org/"> + <%= image_tag '/res/stickies/gimp.webp', alt: 'Valid CSS!' %> + </a> + + <%= image_tag '/res/stickies/chrmevil.webp', alt: 'Chrome is evil!' %> + </div> </body> </html> diff --git a/app/views/posts/blog_index.html.erb b/app/views/posts/blog_index.html.erb @@ -0,0 +1,2 @@ +<h1>Posts#blog_index</h1> +<p>Find me in app/views/posts/blog_index.html.erb</p> diff --git a/app/views/posts/esoteric.html.erb b/app/views/posts/esoteric.html.erb @@ -0,0 +1,2 @@ +<h1>Posts#esoteric</h1> +<p>Find me in app/views/posts/esoteric.html.erb</p> diff --git a/app/views/posts/index.html.erb b/app/views/posts/index.html.erb @@ -0,0 +1,10 @@ +<div class="twin"> + <div style="tcontent"> + </div> + <div id="content"> + <hr class="prompt-break"> + <span class="prompt1">ryan</span><span class="prompt2">@</span><span class="prompt3">themainframe</span><span class="prompt4"></span> <span>cat </span> + <div class="cat"> + </div> + </div> +</div> diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb @@ -0,0 +1,11 @@ +<div class="twin"> + <div style="tcontent"> + </div> + <div id="content"> + <hr class="prompt-break"> + <span class="prompt1">ryan</span><span class="prompt2">@</span><span class="prompt3">themainframe</span><span class="prompt4"></span> <span>cat {{args}}</span> + <div class="cat"> + <%= @post.content.download { |line| puts Orgmode::Parser.new(line).to_html } %> + </div> + </div> +</div> diff --git a/config/application.rb b/config/application.rb @@ -1,7 +1,6 @@ require_relative "boot" require "rails/all" - # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) @@ -18,5 +17,9 @@ module Site # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") + + # Handle 404's by myself + config.exceptions_app = self.routes + config.public_file_server.enabled = true end end diff --git a/config/routes.rb b/config/routes.rb @@ -1,6 +1,10 @@ Rails.application.routes.draw do - # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html + root 'posts#index' - # Defines the root path route ("/") - # root "articles#index" + get '/posts', to: 'posts#blog_index' + get '/esoteric', to: 'posts#esoteric' + get '/posts/:id', to: 'posts#show' + get '/404', to: 'errors#not_found' + get '/500', to: 'errors#not_found' + get '/422', to: 'errors#not_found' end diff --git a/db/migrate/20220217192914_create_posts.rb b/db/migrate/20220217192914_create_posts.rb @@ -0,0 +1,8 @@ +class CreatePosts < ActiveRecord::Migration[7.0] + def change + create_table :posts do |t| + + t.timestamps + end + end +end diff --git a/db/migrate/20220217225631_create_active_storage_tables.active_storage.rb b/db/migrate/20220217225631_create_active_storage_tables.active_storage.rb @@ -0,0 +1,57 @@ +# This migration comes from active_storage (originally 20170806125915) +class CreateActiveStorageTables < ActiveRecord::Migration[5.2] + def change + # Use Active Record's configured type for primary and foreign keys + primary_key_type, foreign_key_type = primary_and_foreign_key_types + + create_table :active_storage_blobs, id: primary_key_type do |t| + t.string :key, null: false + t.string :filename, null: false + t.string :content_type + t.text :metadata + t.string :service_name, null: false + t.bigint :byte_size, null: false + t.string :checksum + + if connection.supports_datetime_with_precision? + t.datetime :created_at, precision: 6, null: false + else + t.datetime :created_at, null: false + end + + t.index [ :key ], unique: true + end + + create_table :active_storage_attachments, id: primary_key_type do |t| + t.string :name, null: false + t.references :record, null: false, polymorphic: true, index: false, type: foreign_key_type + t.references :blob, null: false, type: foreign_key_type + + if connection.supports_datetime_with_precision? + t.datetime :created_at, precision: 6, null: false + else + t.datetime :created_at, null: false + end + + t.index [ :record_type, :record_id, :name, :blob_id ], name: :index_active_storage_attachments_uniqueness, unique: true + t.foreign_key :active_storage_blobs, column: :blob_id + end + + create_table :active_storage_variant_records, id: primary_key_type do |t| + t.belongs_to :blob, null: false, index: false, type: foreign_key_type + t.string :variation_digest, null: false + + t.index [ :blob_id, :variation_digest ], name: :index_active_storage_variant_records_uniqueness, unique: true + t.foreign_key :active_storage_blobs, column: :blob_id + end + end + + private + def primary_and_foreign_key_types + config = Rails.configuration.generators + setting = config.options[config.orm][:primary_key_type] + primary_key_type = setting || :primary_key + foreign_key_type = setting || :bigint + [primary_key_type, foreign_key_type] + end +end diff --git a/db/schema.rb b/db/schema.rb @@ -0,0 +1,49 @@ +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# This file is the source Rails uses to define your schema when running `bin/rails +# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to +# be faster and is potentially less error prone than running all of your +# migrations from scratch. Old migrations may fail to apply correctly if those +# migrations use external dependencies or application code. +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema[7.0].define(version: 2022_02_17_225631) do + create_table "active_storage_attachments", force: :cascade do |t| + t.string "name", null: false + t.string "record_type", null: false + t.bigint "record_id", null: false + t.bigint "blob_id", null: false + t.datetime "created_at", null: false + t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" + t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true + end + + create_table "active_storage_blobs", force: :cascade do |t| + t.string "key", null: false + t.string "filename", null: false + t.string "content_type" + t.text "metadata" + t.string "service_name", null: false + t.bigint "byte_size", null: false + t.string "checksum" + t.datetime "created_at", null: false + t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true + end + + create_table "active_storage_variant_records", force: :cascade do |t| + t.bigint "blob_id", null: false + t.string "variation_digest", null: false + t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true + end + + create_table "posts", force: :cascade do |t| + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" + add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" +end diff --git a/public/404.html b/public/404.html @@ -1,67 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>The page you were looking for doesn't exist (404)</title> - <meta name="viewport" content="width=device-width,initial-scale=1"> - <style> - .rails-default-error-page { - background-color: #EFEFEF; - color: #2E2F30; - text-align: center; - font-family: arial, sans-serif; - margin: 0; - } - - .rails-default-error-page div.dialog { - width: 95%; - max-width: 33em; - margin: 4em auto 0; - } - - .rails-default-error-page div.dialog > div { - border: 1px solid #CCC; - border-right-color: #999; - border-left-color: #999; - border-bottom-color: #BBB; - border-top: #B00100 solid 4px; - border-top-left-radius: 9px; - border-top-right-radius: 9px; - background-color: white; - padding: 7px 12% 0; - box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); - } - - .rails-default-error-page h1 { - font-size: 100%; - color: #730E15; - line-height: 1.5em; - } - - .rails-default-error-page div.dialog > p { - margin: 0 0 1em; - padding: 1em; - background-color: #F7F7F7; - border: 1px solid #CCC; - border-right-color: #999; - border-left-color: #999; - border-bottom-color: #999; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-top-color: #DADADA; - color: #666; - box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); - } - </style> -</head> - -<body class="rails-default-error-page"> - <!-- This file lives in public/404.html --> - <div class="dialog"> - <div> - <h1>The page you were looking for doesn't exist.</h1> - <p>You may have mistyped the address or the page may have moved.</p> - </div> - <p>If you are the application owner check the logs for more information.</p> - </div> -</body> -</html> diff --git a/public/500.html b/public/500.html @@ -1,66 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>We're sorry, but something went wrong (500)</title> - <meta name="viewport" content="width=device-width,initial-scale=1"> - <style> - .rails-default-error-page { - background-color: #EFEFEF; - color: #2E2F30; - text-align: center; - font-family: arial, sans-serif; - margin: 0; - } - - .rails-default-error-page div.dialog { - width: 95%; - max-width: 33em; - margin: 4em auto 0; - } - - .rails-default-error-page div.dialog > div { - border: 1px solid #CCC; - border-right-color: #999; - border-left-color: #999; - border-bottom-color: #BBB; - border-top: #B00100 solid 4px; - border-top-left-radius: 9px; - border-top-right-radius: 9px; - background-color: white; - padding: 7px 12% 0; - box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); - } - - .rails-default-error-page h1 { - font-size: 100%; - color: #730E15; - line-height: 1.5em; - } - - .rails-default-error-page div.dialog > p { - margin: 0 0 1em; - padding: 1em; - background-color: #F7F7F7; - border: 1px solid #CCC; - border-right-color: #999; - border-left-color: #999; - border-bottom-color: #999; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-top-color: #DADADA; - color: #666; - box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); - } - </style> -</head> - -<body class="rails-default-error-page"> - <!-- This file lives in public/500.html --> - <div class="dialog"> - <div> - <h1>We're sorry, but something went wrong.</h1> - </div> - <p>If you are the application owner check the logs for more information.</p> - </div> -</body> -</html> diff --git a/test/controllers/error_controller_test.rb b/test/controllers/error_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class ErrorControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/test/controllers/posts_controller_test.rb b/test/controllers/posts_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class PostsControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/test/fixtures/posts.yml b/test/fixtures/posts.yml @@ -0,0 +1,5 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + +two: diff --git a/test/models/post_test.rb b/test/models/post_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class PostTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end