Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🗓 the main codebar site

License

NotificationsYou must be signed in to change notification settings

codebar/planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CICoverage Status

A tool to help managecodebar.io members and events.

If you are considering making a PR, please take a look at theGitHub issues to see if there are any new feature requirements or bugs that you maybe able to help resolve.

Need help?We're on Slack!

Getting Started

The following steps walk through getting the application running. Before you start, please check out ourcontributing guidelines.

  1. Clone the project
  2. Enable GitHub Authentication
  3. Install and set up the environment using docker
  4. Start the app
  5. Run the tests

1. Clone the project

  1. Navigate to your project's chosen parent directory, e.g.cd ~/Documents/codebar
  2. Clone the project, e.g.git clone git@github.com:codebar/planner.git
  3. Navigate into the project directory:cd planner

2. Enable GitHub Authentication

The application uses GitHub OAuth for user authentication. You'll need to create a new OAuth application on your GitHub account, then add the key and secret to your project's environment variables.

Create a new Github OAuth application

Visithttps://github.com/settings/applications/new and fill out the form to create a new application. Use these field values:

FieldValue
Application nameSomething memorable, like 'codebar planner'
Homepage URLhttp://localhost:3000
Application descriptionSomething memorable, like 'Local codebar app authentication'.
Authorization Callback URLhttp://localhost:3000/auth/github

Add your application details to your environment variables

Mac/Linux:
  1. Runtouch .env to create a file named.env in the root of the application folder.
  2. Open this .env file in a text editor, and add the GitHub key (Client ID) and secret (Client Secret) like so:
    GITHUB_KEY=YOUR_KEY    GITHUB_SECRET=YOUR_SECRET
Windows:

Windows doesn't like creating a file named.env, so run the followingfrom a command prompt in your project folder:

    echo GITHUB_KEY=YOUR_KEY >> .env    echo GITHUB_SECRET=YOUR_SECRET >> .env

Note: If when starting the application with Docker you get the errorUnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte this may be because you created the.env-file using PowerShell. This can be solved by deleting that file and creating a new one using a bash shell (for example Git Bash).

3. Install and set up the environment using docker

We recommend using Docker to install and run the application. However alternatively if you prefer,you can install directly to your system environment instead.

Before you start, you will need to have Docker installed and running. You candownload it from the Docker website. Once downloaded, install and start the Docker application.

Runbin/dup to build and create the docker container. This will also set up the Rails application within the container and start the container. You will only have to run this command once. After initial setup, usebin/dstart to start an existing container - usingbin/dup will recreate an existing container and reset the database.

4. Start the app

Runbin/dserver to start the Rails server.

*If you have previously stopped the container, you will have to first start the container usingbin/dstart.

This should run a process which starts a server in a Docker container on your computer. This process won't finish - you'll know the server is ready when it stops doing anything and displays a message like this:

Rails 4.2.11 application starting in development on http://localhost:3000

(Optional) Note that to be able to use the page as an admin, you must first give yourself admin privileges. Make sure you have started your app and signed up as an user on your locally running app. Then run the scriptbin/dadmin <your email>.

You can now view the app athttp://localhost:3000

You can stop the server when you're finished by typingCtrl + C.

5. Run the tests

Runbin/drspec to run all the tests.

This command passes any additional arguments intorspec in the docker container, so you can run individual tests withbin/drspec PATH_TO_TEST and run a single test case in a file withbin/drspec PATH_TO_TEST:LINE_NUMBER

Running JavaScript enabled feature tests with a visible browser

There are a small number of feature tests marked withjs: true which useheadless Chrome. These can be hard to work with without being able to see what isactually happening in the browser. To spin up a visible browser, passCHROME_HEADLESS=false as part of the test command, for example:

CHROME_HEADLESS=false bundleexec rspec

Running JavaScript enabled tests with a visible browser currently doesn't work with Docker.

Available Docker commands

  • bin/dup:docker-compose up --build -d --wait && rake db:drop db:create db:migrate db:seed db:test:prepare. Rebuilds and boots up a new container, and then initialize the Rails database.
  • bin/dstart:docker-compose start. Starts the existing container.
  • bin/dserver:docker-compose exec web make serve. Runs the Rails server. Use this instead ofbin/drails server to make it bind to the correct IP addresses to allow the server to be viewable outside the container.
  • drails:docker-compose exec web rails $@. Runs rails within the container.
  • drspec:docker-compose exec web rspec $@. Runs rspec within the container.
  • drake:docker-compose exec web rake $@. Runs rake inside the container.
  • dexec:docker-compose exec web bash. Runs a bash shell inside the container.
  • dadmin: Gives the the last user (or the one with a given email) the admin role
  • bin/dstop:docker-compose stop. Stops container but does not remove it
  • bin/ddown:docker-compose down. Stops and destroy a container.

Front-end framework

We use Bootstrap 5, you can find the documentation here:https://getbootstrap.com/docs/5.2/getting-started/introduction/

Finding something to work on

You can pick one of the openissues, fix a bug, improve the interface, refactor the code or improve test coverage!

If there is something else that you would like to work on, open an issue first so we can discuss it. We are always open to new ideas and ways of improving planner!

Guidelines on contributing to planner

About

🗓 the main codebar site

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

    Packages

    No packages published

    Contributors131


    [8]ページ先頭

    ©2009-2025 Movatter.jp