• Stars
    star
    1
  • Language
    Ruby
  • Created almost 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Global Game Jam 2021

Ar battle royale

系統需求

  • Ruby 2.6.6
  • PostgreSQL 9.6+
  • Node.js 8.0 (以上)

環境設定

以下的設定皆以 macOS 為主。

Homebrew

在 macOS 需要有 Homebrew 來輔助安裝環境。

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

執行完畢後可以透過 brew doctor 確認是否可用。

Ruby

為了配合多個版本的環境,建議使用 rbenv 或者 rvm 來管理 Ruby 環境。

# 選用 rbenv
brew install rbenv

# 選用 rvm
brew install rvm

完成後請參考終端機顯示的訊息設定 .bashrc 或者其他 Shell 設定檔。

# 選用 rbenv
rbenv install 2.6.6

# 選用 rvm
rvm install 2.6.6

完成後需要先將 Bundler 安裝到新安裝的 Ruby 環境中(rvm 可能會先預裝完畢)

# 先確認是否在正確的 Ruby 版本執行
ruby -v
# => ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin17]

gem install bundler

PostgreSQL

請注意不要直接輸入 postgresql 否則會安裝到最新版的 PostgreSQL

# 安裝
brew install [email protected]

# 啟動伺服器
brew services start [email protected]

Node.js

Rails 需要 JavaScript Runtime 一般會使用 Node.js。

brew install node

Webpacker 使用 Yarn 管理安裝的 JavaScript 套件,我們還需要將 Yarn 安裝進來。

brew install yarn

Rails

請先透過 git 將專案下載到本地端。

# 切換到專案目錄
cd ar_battle_royale

# 安裝 Rails 所需套件
bundle install

# 設定 git hook
bundle exec overcommit --install

Overcommit 會做以下檢查:

  1. commit 前:使用 rubocop 檢查語法
  2. push 前:使用 brakeman 檢查安全性問題
# 設定資料庫
bundle exec rake db:create

# 更新資料庫到最新版
bundle exec rake db:migrate

執行專案

Rails 伺服器

# 這是 rails server 的縮寫
rails s

開啟後預設可以透過 http://localhost:3000 看到網站

PendingMigration 錯誤

這是因為最新版本的資料庫已經被更改,但是本機的資料庫還沒有被更新。

bundle exec rake db:migrate

執行 db:migrate 指令更新資料庫即可。

運行測試

這個專案使用 RSpec 進行測試,可以透過執行以下指令運行

bundle exec rspec

Ruby 語法檢查

這個功能會在 commit 前自動執行,必要時可以手動進行

bundle exec rubocop

Ruby 安全性檢查

這個功能會在 push 前自動執行,必要時可以手動進行

bundle exec brakeman

建立 .env 檔案

建立 .env 檔案,並依據 local 開發環境需求修改設定內容。

cp .env.example .env

部署

這個專案使用 Capistrano 進行部署,請先確定有權限透過 deployer 帳號 SSH 到伺服器上。

cap [ENV] deploy

假設要部署到測試(Staging)環境,請使用以下指令

cap staging deploy

如果是正式環境,則使用以下指令

cap production deploy

過程中會詢問要使用的 Git Branch,預設為 master branch,如果需要測試某個 Git Branch 請先將他上傳到 GitHub 上,並且和團隊成員確認後手動輸入 branch 再進行部署跟測試。

More Repositories

1

rails-letsencrypt

The Let's Encrypt certificate manager for rails
Ruby
126
star
2

boxing

The zero-configuration Dockerfile generator for Ruby.
Ruby
61
star
3

mwc

The tool to compile mruby on WebAssembly
Ruby
18
star
4

ruby-gitlab-ci

The GitLab CI templates for Ruby project
12
star
5

go-plurk-robot

登入國軍 Online 為了安撫寂寞的網友(才沒有)所製作的機器人
Go
11
star
6

heroku-buildpacks-php-with-phalcon

Heroku Buikdpack PHP with PhalconPHP and Composer
Shell
11
star
7

mruby-go

The pure go mruby virtual machine implementation.
Go
11
star
8

doll

The Chatbot Framework written in Ruby
Ruby
10
star
9

mruby.wasm

mruby WebAssembly using WebIDL
HTML
9
star
10

openbox

The zero-configuration Ruby container entry-point.
Ruby
9
star
11

terraform-provider-lambdalabs

The Lambdalabs provider for Terraform
Go
8
star
12

liveness

The Rack middleware to provide health check endpoints.
Ruby
8
star
13

replicate-pastel-mix

The pastel-mix model implementation on replicate
Python
8
star
14

laravel-guestbook-example

A simple guestbook create via Laravel Framework
PHP
8
star
15

mcoin

The cryptocurrency market monitor tool
Ruby
7
star
16

FiveFood

五食,每個上班族必備的午餐決策系統。
Ruby
7
star
17

hiro

The game framework based on mruby.
C
6
star
18

middleman-webpacked

Ruby
6
star
19

magica

A tool to build C++ project
Ruby
5
star
20

tide.ex

Communicate with Ruby via Erlport
Elixir
5
star
21

terraform-proxmox-kubernetes

The terraform module for create Kuberentes cluster on ProxmoxVE
HCL
5
star
22

30minGuestBook

PHP
5
star
23

administrate-notus_theme

The Administrate Notus Theme designed by Creative Tim
CSS
5
star
24

mitake

The ruby gem for Mitake SMS
Ruby
4
star
25

blog-ai.aotoki.me

The RAG API for blog.aotoki.me
TypeScript
4
star
26

hanami-lambda

Hanami Lambda is a gem that provides a way to run hanami application on AWS Lambda.
Ruby
4
star
27

gitlab-sonar-scanner

The sonar runner for gitlab-ci
Shell
4
star
28

pagoda-wp-zh_TW

WordPress zh_TW on PagodaBox
PHP
4
star
29

ai-gacha

Generate a mobile game-like card from AI
TypeScript
4
star
30

GlobalGameJam2023

Global Game Jam 2023 @ Taipei, Taiwan
TypeScript
4
star
31

202102-tdd-refactor-budget

The budget query practice of TDD & Refactor class
Ruby
3
star
32

5compiler

The compiler example written in Ruby
Ruby
3
star
33

book-craft-your-mruby-virtual-machine

The sample code of my book - craft-your-mruby-virtual-machine
C
3
star
34

warden-line

The warden strategies for LINE ID Token
Ruby
3
star
35

mask-map

2020 年最流行的口罩地圖
Vue
3
star
36

lita-gitlab-ci

Lita Gitlab handler for send message about build status.
Ruby
3
star
37

packer-rails

Using Packer.io to builds Ruby on Rails image.
Shell
3
star
38

flowhook

Convert flowdock straming into webhook
Ruby
3
star
39

nginx-pagespeed

A docker image include nginx with pagespeed.
Shell
2
star
40

elct9620.github.com

My personal website.
HTML
2
star
41

MRubyShader

Using OpenFrameworks and mruby to build a simple shader playground.
C++
2
star
42

iv-plurk

The Plurk API client
Ruby
2
star
43

newebpay-ruby

The offsite payments implement for Newebpay
Ruby
2
star
44

MCUCourseAPI

A Ming Chuan University Course API service, using phalcon on heroku.
PHP
2
star
45

mcu-course-query-demo

A simple mcu course query demo.
JavaScript
2
star
46

plurk-salary

JavaScript
2
star
47

wvs

The "Walrus vs Slime" rewritten in DDD style
Go
2
star
48

Aotoki-Backbone.js

My Backbone.js Practice
2
star
49

mruby-shader-generator

The Ruby DSL GLSL shader code
Ruby
2
star
50

.cat

The loading cat generator
Ruby
2
star
51

cybersource

The ruby gem for Visa CyberSource API
Ruby
2
star
52

dcha

An blockchain test live in LAN using Multicast
Ruby
1
star
53

hahamut

The Bahamut Forum's chatbot ruby client implement
Ruby
1
star
54

hubot-plurk

HuBot 的 Plurk Adapter
1
star
55

ddd-in-unity3d-demo

A toy project to verify DDD can works in Unity3D
ShaderLab
1
star
56

try_git

1
star
57

coscup-2020-cdktf

Demo project for COSCUP 2020 LT
TypeScript
1
star
58

turn-based-game-model-prototype

The turn-based game model prototype for @BasalticStudio NewEra
Ruby
1
star
59

RichBike

The web game prototype built in 5xRuby's Vue x uBike workshop
Ruby
1
star
60

do-kubernetes-challenge-2021

The DigitalOcean Kubernetes Challenge at 2021
Ruby
1
star
61

go-steam

Steam Web API implements in Go
Go
1
star
62

elct9620

My Profile README
1
star
63

open-story

The experimental open world story bot
Ruby
1
star
64

FlashSocketIO

FlashSocketIO implement, via AS3Websocket
ActionScript
1
star
65

gh-category

Firefox OS App Days @ Taiwan Project - Github Category
JavaScript
1
star
66

coscup-chat

A simple socket.io/express chat create at COSCUP 2012.
JavaScript
1
star
67

ac-nh-turnip-prices

Ruby
1
star
68

go-chatter

A practice using golang write a simple chatroom.
CSS
1
star
69

build-game-with-react-prototype

Inspired by https://steina.vercel.app
JavaScript
1
star
70

granblue.api

The API Endpoint for Granblue Fantasy Database
Go
1
star
71

fireplurk

A simple plurk public timeline webapp.
JavaScript
1
star
72

cucumber-playwright-example

Use cucumber and playwright together for E2E testing
TypeScript
1
star
73

elct9620-vim

My personal vimrc version.
Vim Script
1
star
74

phpconf2014-sample

My PHPConf 2014 (Taiwan) talk's sample code.
PHP
1
star
75

elixir-mud

Elixir TCP Server practice
Elixir
1
star
76

MCUCourseCLI

Ming Chuan University Course command line tools for developer.
PHP
1
star
77

pio-mrubyc

Provide mruby/c support for PlatformIO
Python
1
star
78

concourse-example-rails

T 客邦 2017 年鐵人賽 - Concourse 的 Deploy 範例專案
Ruby
1
star
79

reactive-pixi-poc

Domain-Driven Design with React + RxJS + PIXI.js (PoC)
TypeScript
1
star
80

setup-mruby

An action to compile mruby
TypeScript
1
star
81

nix-aura

The nix-based universal development environment
Nix
1
star
82

snake-online

A simple snake game online version
JavaScript
1
star
83

mini-cinema-bot

The LINE bot for query cinema information
Ruby
1
star