diff options
| -rw-r--r-- | .byebug_history | 10 | ||||
| -rw-r--r-- | Gemfile | 5 | ||||
| -rw-r--r-- | Gemfile.lock | 2 | ||||
| -rw-r--r-- | app/assets/stylesheets/application.css | 0 | ||||
| -rw-r--r-- | app/assets/stylesheets/application.tailwind.css | 50 | ||||
| -rw-r--r-- | app/controllers/api/v1/games_controller.rb | 18 | ||||
| -rw-r--r-- | app/controllers/api/v1/users_controller.rb | 4 | ||||
| -rw-r--r-- | app/helpers/api/v1/games_helper.rb | 2 | ||||
| -rw-r--r-- | app/javascript/components/Button.jsx | 15 | ||||
| -rw-r--r-- | app/javascript/components/Home.jsx | 42 | ||||
| -rw-r--r-- | app/javascript/components/Layout.jsx | 39 | ||||
| -rw-r--r-- | app/models/game.rb | 8 | ||||
| -rw-r--r-- | app/models/user.rb | 1 | ||||
| -rw-r--r-- | app/views/layouts/application.html.erb | 12 | ||||
| -rw-r--r-- | config/routes.rb | 9 | ||||
| -rw-r--r-- | config/tailwind.config.js | 43 | ||||
| -rw-r--r-- | db/migrate/20240509225147_create_games.rb | 12 | ||||
| -rw-r--r-- | db/schema.rb | 8 | ||||
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | public/img/star.png | bin | 0 -> 6001 bytes | |||
| -rw-r--r-- | public/img/star.svg | 117 | ||||
| -rw-r--r-- | test/controllers/api/v1/games_controller_test.rb | 7 | ||||
| -rw-r--r-- | test/fixtures/games.yml | 13 | ||||
| -rw-r--r-- | test/models/game_test.rb | 7 | ||||
| -rw-r--r-- | yarn.lock | 11 |
25 files changed, 388 insertions, 49 deletions
diff --git a/.byebug_history b/.byebug_history new file mode 100644 index 0000000..3bfc71a --- /dev/null +++ b/.byebug_history @@ -0,0 +1,10 @@ +continue +q +next +q +out +next +q +next +n +step @@ -44,6 +44,9 @@ gem "tzinfo-data", platforms: %i[ windows jruby ] # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", require: false +# Uploading files +#gem 'rack-cors' + # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] # gem "image_processing", "~> 1.2" @@ -56,6 +59,8 @@ group :development do # Use console on exceptions pages [https://github.com/rails/web-console] gem "web-console" + gem 'byebug', '~> 11.1', '>= 11.1.1' + # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] # gem "rack-mini-profiler" diff --git a/Gemfile.lock b/Gemfile.lock index e48bb45..1e1987f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,6 +83,7 @@ GEM bootsnap (1.18.3) msgpack (~> 1.2) builder (3.2.4) + byebug (11.1.3) capybara (3.40.0) addressable matrix @@ -265,6 +266,7 @@ PLATFORMS DEPENDENCIES bootsnap + byebug (~> 11.1, >= 11.1.1) capybara cssbundling-rails debug diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/assets/stylesheets/application.css diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index 8666d2f..c6f1a68 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -5,9 +5,53 @@ /* @layer components { - .btn-primary { - @apply py-2 px-4 bg-blue-200; +.btn-primary { +@apply py-2 px-4 bg-blue-200; +} +} + + */ + +@keyframes pan { + 0% { + background-position: 0% 0%; + } + 100% { + background-position: 200% -100%; + } +} + +#radial-wrap { + background: linear-gradient(90deg, rgba(251,191,36,1) 0%, rgba(251,191,36,0) 20%, rgba(251,191,36,0) 80%, rgba(251,191,36,1) 100%); +} + +@keyframes buttonSpin { + from { + transform: rotate(32deg); + } + to { + transform: rotate(calc(360deg + 32deg)); + filter: hue-rotate(360deg); } } -*/ +.contact { transition: opacity 1s ease; position: absolute;} +.contact + .contact, + a:hover .contact:first-child { opacity: 0; } + a:hover .contact:first-child + .contact { opacity: 1; } +.contact + .contact { pointer-events: none; } + +@layer utilities { + .star { + animation: pan 360s linear infinite; + } + .sawtooth-right { + clip-path: polygon(0% -1%, -1% 100.0%, 101% 98.0%, -1% 96.0%, 101% 94.0%, -1% 92.0%, 101% 90.0%, -1% 88.0%, 101% 86.0%, -1% 84.0%, 101% 82.0%, -1% 80.0%, 101% 78.0%, -1% 76.0%, 101% 74.0%, -1% 72.0%, 101% 70.0%, -1% 68.0%, 101% 66.0%, -1% 64.0%, 101% 62.0%, -1% 60.0%, 101% 58.0%, -1% 56.0%, 101% 54.0%, -1% 52.0%, 101% 50.0%, -1% 48.0%, 101% 46.0%, -1% 44.0%, 101% 42.0%, -1% 40.0%, 101% 38.0%, -1% 36.0%, 101% 34.0%, -1% 32.0%, 101% 30.0%, -1% 28.0%, 101% 26.0%, -1% 24.0%, 101% 22.0%, -1% 20.0%, 101% 18.0%, -1% 16.0%, 101% 14.0%, -1% 12.0%, 101% 10.0%, -1% 8.0%, 101% 6.0%, -1% 4.0%, 101% 2.0%); + } + .sawtooth-left { + clip-path: polygon(102% 0%, 102% 100.0%, 0% 98.0%, 100% 96.0%, 0% 94.0%, 100% 92.0%, 0% 90.0%, 100% 88.0%, 0% 86.0%, 100% 84.0%, 0% 82.0%, 100% 80.0%, 0% 78.0%, 100% 76.0%, 0% 74.0%, 100% 72.0%, 0% 70.0%, 100% 68.0%, 0% 66.0%, 100% 64.0%, 0% 62.0%, 100% 60.0%, 0% 58.0%, 100% 56.0%, 0% 54.0%, 100% 52.0%, 0% 50.0%, 100% 48.0%, 0% 46.0%, 100% 44.0%, 0% 42.0%, 100% 40.0%, 0% 38.0%, 100% 36.0%, 0% 34.0%, 100% 32.0%, 0% 30.0%, 100% 28.0%, 0% 26.0%, 100% 24.0%, 0% 22.0%, 100% 20.0%, 0% 18.0%, 100% 16.0%, 0% 14.0%, 100% 12.0%, 0% 10.0%, 100% 8.0%, 0% 6.0%, 100% 4.0%, 0% 2.0%); + } + .sawtooth-left-wrap { + filter: drop-shadow(-10px 5px 4px rgba(0, 0, 0, 0.8)); + } +} diff --git a/app/controllers/api/v1/games_controller.rb b/app/controllers/api/v1/games_controller.rb new file mode 100644 index 0000000..073eec9 --- /dev/null +++ b/app/controllers/api/v1/games_controller.rb @@ -0,0 +1,18 @@ +class Api::V1::GamesController < ApplicationController + skip_before_action :verify_authenticity_token + def create + puts request.methods.sort + @game = Game.new(games_params) + if @game.save + render json: @game, status: :created + else + render json: @game.errors, status: :unprocessable_entity + end + end + + private + + def games_params + params.require(:game).permit(:title, :game_file) + end +end diff --git a/app/controllers/api/v1/users_controller.rb b/app/controllers/api/v1/users_controller.rb index f367ae4..985ace9 100644 --- a/app/controllers/api/v1/users_controller.rb +++ b/app/controllers/api/v1/users_controller.rb @@ -5,6 +5,10 @@ class Api::V1::UsersController < ApplicationController render json: blog end + def get + + end + def create_or_update(user_params) # add new user, overwrite if exists end diff --git a/app/helpers/api/v1/games_helper.rb b/app/helpers/api/v1/games_helper.rb new file mode 100644 index 0000000..1b49744 --- /dev/null +++ b/app/helpers/api/v1/games_helper.rb @@ -0,0 +1,2 @@ +module Api::V1::GamesHelper +end diff --git a/app/javascript/components/Button.jsx b/app/javascript/components/Button.jsx new file mode 100644 index 0000000..f9505f8 --- /dev/null +++ b/app/javascript/components/Button.jsx @@ -0,0 +1,15 @@ +import React from "react"; +import { Link } from "react-router-dom"; + +export default function Button ({ link }) +{ + return ( + <> + <div className="animated_card w-36 h-16 relative grid rounded-[5px] cursor-pointer overflow-hidden place-items-center before:content-[''] before:absolute before:w-[15%] before:bg-amber-400 before:rotate-[32deg] before:h-[1%] before:transition-all before:duration-500 before:ease-linear before:animate-[buttonSpin_1.5s_linear_infinite] hover:before:h-[2800%] hover:before:transition-all hover:before:duration-0 hover:before:ease-linear after:absolute after:content-[''] after:bg-stone-800 after:rounded-[5px] after:inset-0 after:transition-all after:duration-200 after:ease-in-out hover:after:inset-[5px] hover:after:transition-all hover:after:duration-200 hover:after:ease-in-out"> + <div className="z-[3]"> + { link } + </div> + </div> + </> + ) +}; diff --git a/app/javascript/components/Home.jsx b/app/javascript/components/Home.jsx index efe3cd5..6ead779 100644 --- a/app/javascript/components/Home.jsx +++ b/app/javascript/components/Home.jsx @@ -1,8 +1,27 @@ -import React from "react"; +import React, { } from "react"; import { Link } from "react-router-dom"; -export default () => ( - <div className="vh-100 primary-color d-flex align-items-center justify-content-center"> +//export default () => ( +export default function Home () { + var handleSubmit = (e) => { + e.preventDefault() //stops submit from happening + + const formData = new FormData() + formData.append('game[title]', e.target.title.value) + formData.append('game[game_file]', e.target.game_file.files[0], e.target.game_file.value) + +for (var pair of formData.entries()) { + console.log(pair[0] + ', ' + pair[1]) +}; + + fetch('http://127.0.0.1:3000/api/v1/games', { + method: 'post', + body: formData, + }); + } + return( + <> + <div className="vw-100 vh-100 primary-color d-flex align-items-center justify-content-center"> <div className="jumbotron jumbotron-fluid bg-transparent"> <div className="container secondary-color"> <h1 className="display-4">Games!</h1> @@ -17,14 +36,17 @@ export default () => ( > View Games </Link> - <Link - to="/blogs" - className="btn btn-lg custom-button" - role="button" - > - View Blogs - </Link> </div> + <form onSubmit={handleSubmit} action="/upload" method="post"> + <label>Title</label> + <input type="text" name="title" /> + <label>File</label> + <input type="file" name="game_file" /> + + <button type="submit">submit</button> + </form> </div> </div> + </> ); +}; diff --git a/app/javascript/components/Layout.jsx b/app/javascript/components/Layout.jsx index 6bf698a..0c5d5b6 100644 --- a/app/javascript/components/Layout.jsx +++ b/app/javascript/components/Layout.jsx @@ -1,15 +1,42 @@ import React from "react"; import { Outlet, Link } from "react-router-dom"; - +import Button from "./Button"; export default function Layout ({userData}) { console.log(userData); //const [userData, setUserData] = useState({ name: "" }); return ( <> - <div className="flex flex-row h-screen bg-slate-800 text-slate-100"> - <nav className="flex flex-row h-full w-64 p-4 gap-4 items-center"> - <div className="h-full flex flex-col"> + <div id="page" className="star flex flex-row min-h-screen bg-amber-400 text-stone-950 bg-star bg-repeat bg-[length:170px_170px]"> + <div id="sidebar" className="flex flex-row h-screen fixed w-64 items-center bg-stone-800"> + <nav id="sidebar-content" className=" text-stone-50 p-6 w-full h-screen"> + { userData.name ? <div> Logged in as: {userData.name} </div> : <a href="https://github.com/login/oauth/authorize?client_id=74468ad0847e527262d9"> Login with Github </a> } + <div className="text-4xl py-12">Adam Malczewski</div> + <div className="flex flex-col items-center gap-1 w-full"> + <Button link={ <Link to="/" className="text-stone-50 bg-transparent" role="button">Home</Link> }/> + <Button link={ <Link to="/blogs" className="text-stone-50 bg-transparent" role="button">Blog</Link> }/> + <Button link={ <Link to="/games" className="text-stone-50 bg-transparent" role="button">Games</Link> }/> + <Button link={ <div className="text-stone-50 bg-transparent w-36 h-16 flex justify-center items-center"> + <a id="contact" href="mailto:[email protected]" className="w-36 h-16 relative text-center whitespace-nowrap flex p-4"> + <span className="contact pt-1 pl-[27px]">Contact</span> + <span className="contact pt-[7px] left-0 pl-3 text-sm">[email protected]</span> + </a> + </div> }/> + </div> + </nav> + <div id="sawtooth-wrap" className="sawtooth-left-wrap h-full"> + <div id="sawtooth" className="sawtooth-left w-4 h-full bg-amber-400"></div> + </div> + </div> + <div id="fake-sidebar" className="w-64 invisible"></div> + <div id="radial-wrap" className="flex-grow"> + <div id="content" className=""></div> + </div> + </div> + + <div style={{display: 'none'}} className=""> + <nav className=""> + <div className="h-full flex flex-col bg-stone-900 text-stone-50"> { userData.name ? <div> Logged in as: {userData.name} </div> : <a href="https://github.com/login/oauth/authorize?client_id=74468ad0847e527262d9"> Login with Github </a> } <div className="text-4xl py-12">Adam Malczewski</div> <div className="flex flex-row justify-center w-full block grow"> @@ -46,11 +73,11 @@ export default function Layout ({userData}) </div> </div> </div> - <div className="h-3/4 w-0.5 bg-slate-500 block rounded-full"> + <div className="sawtooth-right w-6 h-full block bg-zinc-800"> </div> </nav> <Outlet /> </div> -</> + </> ) }; diff --git a/app/models/game.rb b/app/models/game.rb new file mode 100644 index 0000000..fbdc561 --- /dev/null +++ b/app/models/game.rb @@ -0,0 +1,8 @@ +class Game < ApplicationRecord + #enum status: { + # draft: 0, + # published: 1 + #} + #belongs_to :user + has_one_attached :game_file +end diff --git a/app/models/user.rb b/app/models/user.rb index 39c7822..0317c47 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,4 +1,5 @@ class User < ApplicationRecord validates :identifier, presence: true + has_many :games end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7ed5167..e7e2040 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -10,10 +10,22 @@ <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %> + <link rel="preconnect" href="https://fonts.googleapis.com"> + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> + <link href="https://fonts.googleapis.com/css2?family=Quicksand:[email protected]&display=swap" rel="stylesheet"> + <script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script> <!-- Google fonts--> <!--link href="https://fonts.googleapis.com/css?family=Saira+Extra+Condensed:500,700" rel="stylesheet" type="text/css" /--> <!--link href="https://fonts.googleapis.com/css?family=Muli:400,400i,800,800i" rel="stylesheet" type="text/css" /--> +<style> +* { + font-family: "Quicksand", sans-serif; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; +} +</style> </head> <body if="page-top"> diff --git a/config/routes.rb b/config/routes.rb index 786c21d..7d8a766 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,15 +1,24 @@ Rails.application.routes.draw do namespace :api do namespace :v1 do + resources :games + + # USERS get 'users/index', to: 'users#index' #get 'users/new' #get 'users/create' #get 'users/delete' + + # GAMES + + + # BLOGS get 'blogs/index', to: 'blog#index' post 'blogs/create', to: 'blog#create' get '/show/:id', to: 'blog#show' delete '/destroy/:id', to: 'blog#destroy' + # AUTH get 'auth/callback', to: 'auth#callback' get 'auth/data', to: 'auth#data' end diff --git a/config/tailwind.config.js b/config/tailwind.config.js index a5ba70b..ddc2e3e 100644 --- a/config/tailwind.config.js +++ b/config/tailwind.config.js @@ -1,24 +1,27 @@ const defaultTheme = require('tailwindcss/defaultTheme') module.exports = { - content: [ - './public/*.html', - './app/helpers/**/*.rb', - './app/javascript/**/*.js', - './app/javascript/**/*.jsx', - './app/views/**/*.{erb,haml,html,slim}' - ], - theme: { - extend: { - fontFamily: { - sans: ['Inter var', ...defaultTheme.fontFamily.sans], - }, - }, - }, - plugins: [ - require('@tailwindcss/forms'), - require('@tailwindcss/aspect-ratio'), - require('@tailwindcss/typography'), - require('@tailwindcss/container-queries'), - ] + content: [ + './public/*.html', + './app/helpers/**/*.rb', + './app/javascript/**/*.js', + './app/javascript/**/*.jsx', + './app/views/**/*.{erb,haml,html,slim}' + ], + theme: { + extend: { + backgroundImage: { + 'star': "url('/img/star.png')", + }, + fontFamily: { + sans: ['Inter var', ...defaultTheme.fontFamily.sans], + }, + }, + }, + plugins: [ + require('@tailwindcss/forms'), + require('@tailwindcss/aspect-ratio'), + require('@tailwindcss/typography'), + require('@tailwindcss/container-queries'), + ] } diff --git a/db/migrate/20240509225147_create_games.rb b/db/migrate/20240509225147_create_games.rb new file mode 100644 index 0000000..af8f77b --- /dev/null +++ b/db/migrate/20240509225147_create_games.rb @@ -0,0 +1,12 @@ +class CreateGames < ActiveRecord::Migration[7.1] + def change + create_table :games do |t| + t.string :title + #t.text :body + #t.integer :status, default: 0 + #t.references :user, null: false, foreign_key: true + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 69731f6..3131a91 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_05_03_001922) do +ActiveRecord::Schema[7.1].define(version: 2024_05_09_225147) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -53,6 +53,12 @@ ActiveRecord::Schema[7.1].define(version: 2024_05_03_001922) do t.datetime "updated_at", null: false end + create_table "games", force: :cascade do |t| + t.string "title" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "users", force: :cascade do |t| t.string "identifier" t.string "access_token_digest" diff --git a/package.json b/package.json index 5d91cff..e648d5c 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "scripts": { "build": "esbuild app/javascript/*.* --bundle --sourcemap --format=esm --outdir=app/assets/builds --public-path=/assets", - "build:css:compile": "sass ./app/assets/builds/application.css --no-source-map --load-path=node_modules", + "build:css:compile": "sass ./app/assets/stylesheets/application.css:./app/assets/builds/application.css --no-source-map --load-path=node_modules", "build:css:prefix": "postcss ./app/assets/builds/application.css --use=autoprefixer --output=./app/assets/builds/application.css", "build:css": "yarn build:css:compile && yarn build:css:prefix", "watch:css": "nodemon --watch ./app/assets/stylesheets/ --ext scss --exec \"yarn build:css\"" diff --git a/public/img/star.png b/public/img/star.png Binary files differnew file mode 100644 index 0000000..2fed1e3 --- /dev/null +++ b/public/img/star.png diff --git a/public/img/star.svg b/public/img/star.svg new file mode 100644 index 0000000..50f56e2 --- /dev/null +++ b/public/img/star.svg @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="250" + height="250" + viewBox="0 0 66.145832 66.145833" + version="1.1" + id="svg1" + inkscape:export-filename="star.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96" + inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)" + sodipodi:docname="star.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <sodipodi:namedview + id="namedview1" + pagecolor="#505050" + bordercolor="#eeeeee" + borderopacity="1" + inkscape:showpageshadow="0" + inkscape:pageopacity="0" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#505050" + inkscape:document-units="mm" + inkscape:zoom="1.0544998" + inkscape:cx="171.17121" + inkscape:cy="155.99813" + inkscape:window-width="1144" + inkscape:window-height="1031" + inkscape:window-x="1409" + inkscape:window-y="42" + inkscape:window-maximized="1" + inkscape:current-layer="layer1" /> + <defs + id="defs1" /> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + sodipodi:type="star" + style="fill:#fde68a;stroke:#fcd34d;stroke-width:1.2;stroke-dasharray:none;fill-opacity:0.30000001;stroke-opacity:0.30000001" + id="path8" + inkscape:flatsided="false" + sodipodi:sides="5" + sodipodi:cx="20.51049" + sodipodi:cy="23.935427" + sodipodi:r1="10.884153" + sodipodi:r2="6.1412907" + sodipodi:arg1="0.79530287" + sodipodi:arg2="1.4236214" + inkscape:rounded="0.16146116" + inkscape:randomized="0" + d="m 28.130144,31.707536 c -0.799011,0.783337 -5.612222,-1.861297 -6.719069,-1.69721 -1.106847,0.164086 -4.945792,4.091375 -5.937697,3.573535 -0.991906,-0.517839 0.03593,-5.912712 -0.462164,-6.91468 -0.49809,-1.001969 -5.4194625,-3.439423 -5.2334836,-4.542803 0.1859789,-1.103379 5.6344256,-1.79296 6.4334356,-2.576298 0.79901,-0.783337 1.59638,-6.217055 2.703227,-6.381141 1.106846,-0.164087 3.44634,4.804601 4.438245,5.322441 0.991906,0.517839 6.40608,-0.402929 6.90417,0.59904 0.49809,1.001968 -3.50447,4.762368 -3.690449,5.865747 -0.185979,1.103379 2.362795,5.968032 1.563785,6.751369 z" + inkscape:transform-center-x="0.37791562" + inkscape:transform-center-y="0.24703701" + transform="matrix(0.5882789,-0.15762886,0.15762886,0.5882789,17.661547,-10.847661)" /> + <path + sodipodi:type="star" + style="fill:#fde68a;stroke:#fcd34d;stroke-width:1.2;stroke-dasharray:none;fill-opacity:0.30000001;stroke-opacity:0.30000001" + id="path9" + inkscape:flatsided="false" + sodipodi:sides="5" + sodipodi:cx="20.51049" + sodipodi:cy="23.935427" + sodipodi:r1="10.884153" + sodipodi:r2="6.1412907" + sodipodi:arg1="0.79530287" + sodipodi:arg2="1.4236214" + inkscape:rounded="0.16146116" + inkscape:randomized="0" + d="m 28.130144,31.707536 c -0.799011,0.783337 -5.612222,-1.861297 -6.719069,-1.69721 -1.106847,0.164086 -4.945792,4.091375 -5.937697,3.573535 -0.991906,-0.517839 0.03593,-5.912712 -0.462164,-6.91468 -0.49809,-1.001969 -5.4194625,-3.439423 -5.2334836,-4.542803 0.1859789,-1.103379 5.6344256,-1.79296 6.4334356,-2.576298 0.79901,-0.783337 1.59638,-6.217055 2.703227,-6.381141 1.106846,-0.164087 3.44634,4.804601 4.438245,5.322441 0.991906,0.517839 6.40608,-0.402929 6.90417,0.59904 0.49809,1.001968 -3.50447,4.762368 -3.690449,5.865747 -0.185979,1.103379 2.362795,5.968032 1.563785,6.751369 z" + inkscape:transform-center-x="0.37791562" + inkscape:transform-center-y="0.24703701" + transform="matrix(0.5882789,-0.15762886,0.15762886,0.5882789,50.734464,22.039105)" /> + <path + sodipodi:type="star" + style="fill:#fde68a;stroke:#fcd34d;stroke-width:1.2;stroke-dasharray:none;fill-opacity:0.30000001;stroke-opacity:0.30000001" + id="path10" + inkscape:flatsided="false" + sodipodi:sides="5" + sodipodi:cx="20.51049" + sodipodi:cy="23.935427" + sodipodi:r1="10.884153" + sodipodi:r2="6.1412907" + sodipodi:arg1="0.79530287" + sodipodi:arg2="1.4236214" + inkscape:rounded="0.16146116" + inkscape:randomized="0" + d="m 28.130144,31.707536 c -0.799011,0.783337 -5.612222,-1.861297 -6.719069,-1.69721 -1.106847,0.164086 -4.945792,4.091375 -5.937697,3.573535 -0.991906,-0.517839 0.03593,-5.912712 -0.462164,-6.91468 -0.49809,-1.001969 -5.4194625,-3.439423 -5.2334836,-4.542803 0.1859789,-1.103379 5.6344256,-1.79296 6.4334356,-2.576298 0.79901,-0.783337 1.59638,-6.217055 2.703227,-6.381141 1.106846,-0.164087 3.44634,4.804601 4.438245,5.322441 0.991906,0.517839 6.40608,-0.402929 6.90417,0.59904 0.49809,1.001968 -3.50447,4.762368 -3.690449,5.865747 -0.185979,1.103379 2.362795,5.968032 1.563785,6.751369 z" + inkscape:transform-center-x="0.37791562" + inkscape:transform-center-y="0.24703701" + transform="matrix(0.5882789,-0.15762886,0.15762886,0.5882789,-15.411369,22.039105)" /> + <path + sodipodi:type="star" + style="fill:#fde68a;stroke:#fcd34d;stroke-width:1.2;stroke-dasharray:none;fill-opacity:0.30000001;stroke-opacity:0.30000001" + id="path11" + inkscape:flatsided="false" + sodipodi:sides="5" + sodipodi:cx="20.51049" + sodipodi:cy="23.935427" + sodipodi:r1="10.884153" + sodipodi:r2="6.1412907" + sodipodi:arg1="0.79530287" + sodipodi:arg2="1.4236214" + inkscape:rounded="0.16146116" + inkscape:randomized="0" + d="m 28.130144,31.707536 c -0.799011,0.783337 -5.612222,-1.861297 -6.719069,-1.69721 -1.106847,0.164086 -4.945792,4.091375 -5.937697,3.573535 -0.991906,-0.517839 0.03593,-5.912712 -0.462164,-6.91468 -0.49809,-1.001969 -5.4194625,-3.439423 -5.2334836,-4.542803 0.1859789,-1.103379 5.6344256,-1.79296 6.4334356,-2.576298 0.79901,-0.783337 1.59638,-6.217055 2.703227,-6.381141 1.106846,-0.164087 3.44634,4.804601 4.438245,5.322441 0.991906,0.517839 6.40608,-0.402929 6.90417,0.59904 0.49809,1.001968 -3.50447,4.762368 -3.690449,5.865747 -0.185979,1.103379 2.362795,5.968032 1.563785,6.751369 z" + inkscape:transform-center-x="0.37791562" + inkscape:transform-center-y="0.24703701" + transform="matrix(0.5882789,-0.15762886,0.15762886,0.5882789,17.661547,54.925871)" /> + </g> +</svg> diff --git a/test/controllers/api/v1/games_controller_test.rb b/test/controllers/api/v1/games_controller_test.rb new file mode 100644 index 0000000..0052dbb --- /dev/null +++ b/test/controllers/api/v1/games_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class Api::V1::GamesControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/test/fixtures/games.yml b/test/fixtures/games.yml new file mode 100644 index 0000000..ba6c0d7 --- /dev/null +++ b/test/fixtures/games.yml @@ -0,0 +1,13 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + title: MyString + body: MyText + status: 1 + user: one + +two: + title: MyString + body: MyText + status: 1 + user: two diff --git a/test/models/game_test.rb b/test/models/game_test.rb new file mode 100644 index 0000000..6628fae --- /dev/null +++ b/test/models/game_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class GameTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end @@ -297,11 +297,6 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bootstrap-icons@^1.11.3: - version "1.11.3" - resolved "https://registry.yarnpkg.com/bootstrap-icons/-/bootstrap-icons-1.11.3.tgz#03f9cb754ec005c52f9ee616e2e84a82cab3084b" - integrity sha512-+3lpHrCw/it2/7lBL15VR0HEumaBss0+f/Lb6ZvHISn1mlK83jjFpooTLsMWbIjJMDjDjOExMsTxnXSIT4k4ww== - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -340,9 +335,9 @@ camelcase-css@^2.0.1: integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599: - version "1.0.30001612" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001612.tgz#d34248b4ec1f117b70b24ad9ee04c90e0b8a14ae" - integrity sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g== + version "1.0.30001618" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001618.tgz" + integrity sha512-p407+D1tIkDvsEAPS22lJxLQQaG8OTBEqo0KhzfABGk0TU4juBNDSfH0hyAp/HRyx+M8L17z/ltyhxh27FTfQg== "chokidar@>=3.0.0 <4.0.0", chokidar@^3.3.0, chokidar@^3.5.2, chokidar@^3.5.3: version "3.6.0" |
