Giter VIP home page Giter VIP logo

fixin.me's Introduction

README

Quantified self

Software requirements

  • Server side:
    • Ruby version: developed on Ruby 3.x
    • database with recursive Common Table Expressions (CTE) support, e.g. MySQL >= 8.0, MariaDB >= 10.2.2
    • for testing: browser as specified in Client side requirements
  • Client side:

Installation

git clone https://gitea.michalczyk.pro/fixin.me/fixin.me.git
bundle config set --local path '.gem'
bundle install

Configuration

cp -a config/application.rb.dist config/application.rb

Modify configuration settings below SETUP comment appropriately.

Database

Grant database user and privileges:

> mysql -p
mysql> create user fixinme@localhost identified by '<some password>';
mysql> grant all privileges on fixinme.* to fixinme@localhost;
mysql> flush privileges;

Copy config template and update database configuration:

cp -a config/database.yml.dist config/database.yml

Run database creation and migration tasks:

RAILS_ENV="production" bundle exec rake db:create db:migrate db:seed

Running

Standalone Rails server + Apache proxy

Copy Puma config template:

cp -a config/puma.rb.dist config/puma.rb

and specify server IP/port, either with port or bind, e.g.:

bind 'tcp://0.0.0.0:3000'

Run server

bundle exec rails s -e production

Apache mod_passenger

TODO: add sample configuration

Contributing

Database

Grant database user privileges for development and test environments, possibly with different Ruby versions:

> mysql -p
mysql> create user `fixinme-dev`@localhost identified by '<some password>';
mysql> grant all privileges on `fixinme-%`.* to `fixinme-dev`@localhost;
mysql> flush privileges;

Development environment

Starting application server in development environment:

bundle exec rails s -e development

For running rake tasks, prepend command with environment:

RAILS_ENV="development" bundle exec rake ...

Running tests

Tests need to be run from within toplevel application directory:

  • all system tests:

      bundle exec rails test:system
    
  • system test(s) with seed/test name specified:

      bundle exec rails test:system --seed 64690 --name test_add_unit
    
  • all tests from one file, with optional seed:

      bundle exec rails test test/system/users_test.rb --seed 1234
    

fixin.me's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.