Bring back original README

next
Marcin Kulik 7 years ago
parent 6d15e61860
commit 7345df6260

@ -1,140 +1,116 @@
# asciinema # asciinema.org
FIXME: description [![Build Status](https://travis-ci.org/asciinema/asciinema.org.svg?branch=master)](https://travis-ci.org/asciinema/asciinema.org)
[![Code Climate](https://codeclimate.com/github/asciinema/asciinema.org/badges/gpa.svg)](https://codeclimate.com/github/asciinema/asciinema.org)
[![Coverage Status](https://coveralls.io/repos/asciinema/asciinema.org/badge.svg)](https://coveralls.io/r/asciinema/asciinema.org)
## Developing Record and share your terminal sessions, the right way.
### Setup asciinema is a free and open source solution for recording terminal sessions
and sharing them on the web.
When you first clone this repository, run: This is the source code of asciinema.org website. You can find asciinema's
terminal recorder at
[asciinema/asciinema](https://github.com/asciinema/asciinema) and asciinema
player at
[asciinema/asciinema-player](https://github.com/asciinema/asciinema-player).
```sh ## Setup instructions
lein setup
```
This will create files for local configuration, and prep your system
for the project.
### Environment Below you'll find setup instructions in case you want to contribute, play with
it on your local machine, or setup your own instance for private use or for
your organization.
To begin developing, start with a REPL. ### Quickstart Using Docker Compose
```sh
lein repl
```
Then load the development environment.
```clojure
user=> (dev)
:loaded
```
Run `go` to initiate and start the system. Required:
- [Docker](https://docs.docker.com/engine/getstarted/step_one/#step-1-get-docker)
- [docker-compose 1.5+](https://docs.docker.com/compose/install/)
```bash
$ wget https://raw.githubusercontent.com/asciinema/asciinema.org/master/docker-compose.yml
$ docker-compose up -d asciinema
$ docker-compose run --rm db_init
```clojure
dev=> (go)
:started
``` ```
By default this creates a web server at <http://localhost:3000>. You can override the address/port that is sent in email with login token by passing HOST="host:port" environment variable when starting the web server.
When you make changes to your source files, use `reset` to reload any Assuming you are running Docker Toolbox and VirtualBox: go to http://192.168.99.100:3000/ and enjoy.
modified files and reset the server.
```clojure ### Manual setup
dev=> (reset)
:reloading (...)
:resumed
```
### Testing #### 1. Install dependencies
Testing is fastest through the REPL, as you avoid environment startup asciinema.org site is a Ruby on Rails application. You need to have following
time. dependencies installed:
```clojure * Ruby 2.0+ (Ruby 2.1 is recommended)
dev=> (test)
...
```
But you can also run tests through Leiningen. * bundler gem
`gem install bundler`
```sh * PostgreSQL 8+ with libpq development headers
lein test `sudo apt-get install postgresql libpq-dev` on Debian/Ubuntu
```
### Migrations * asciinema's libtsm fork (`asciinema` branch)
See [here](https://github.com/asciinema/libtsm/blob/asciinema/README) for installation instructions.
If you don't install it now the setup script (point 4 below) will try to
install it for you anyway.
Migrations are handled by [ragtime][]. Migration files are stored in * phantomjs 2.0+
the `resources/migrations` directory, and are applied in alphanumeric `sudo add-apt-repository ppa:tanguy-patte/phantomjs && sudo apt-get update && sudo apt-get install phantomjs`
order.
To update the database to the latest migration, open the REPL and run: #### 2. Get the source code
```clojure Clone git repository:
dev=> (migrate)
Applying 20150815144312-create-users
Applying 20150815145033-create-posts
```
To rollback the last migration, run: ```bash
$ git clone git://github.com/asciinema/asciinema.org.git
```clojure $ cd asciinema.org
dev=> (rollback)
Rolling back 20150815145033-create-posts
``` ```
Note that the system needs to be setup with `(init)` or `(go)` before #### 3. Prepare database config file
migrations can be applied.
[ragtime]: https://github.com/weavejester/ragtime Copy *config/database.yml.example* to *config/database.yml*. Then set
database/user/password to whatever you prefer.
### Generators If database specified in database.yml doesn't exist then the following setup
task will create it (make sure database user is allowed to create new
databases).
This project has several generator functions to help you create files. #### 4. Setup the app
To create a new endpoint: Following script will install gem dependencies and setup database:
```clojure ```bash
dev=> (gen/endpoint "bar") $ ./script/setup
Creating file src/foo/endpoint/bar.clj
Creating file test/foo/endpoint/bar_test.clj
Creating directory resources/foo/endpoint/bar
nil
``` ```
To create a new component: #### 5. Run Rails server
```clojure ```bash
dev=> (gen/component "baz") $ bundle exec rails server
Creating file src/foo/component/baz.clj
Creating file test/foo/component/baz_test.clj
nil
``` ```
To create a new boundary: #### 6. Run the background job processor
The background job processor is needed for asciicast pre-processing and
thumbnail generation.
```clojure ```bash
dev=> (gen/boundary "quz" foo.component.baz.Baz) $ bundle exec sidekiq
Creating file src/foo/boundary/quz.clj
Creating file test/foo/boundary/quz_test.clj
nil
``` ```
To create a new SQL migration: ## Contributing
```clojure If you want to contribute to this project check out
dev=> (gen/sql-migration "create-users") [Contributing](http://asciinema.org/contributing) page.
Creating file resources/foo/migrations/20160519143643-create-users.up.sql
Creating file resources/foo/migrations/20160519143643-create-users.down.sql
nil
```
## Deploying ## Authors
FIXME: steps to deploy Developed with passion by [Marcin Kulik](http://ku1ik.com) and great open
source [contributors](https://github.com/asciinema/asciinema.org/contributors)
## Legal ## Copyright
Copyright © 2017 FIXME Copyright &copy; 2011-2016 Marcin Kulik. See LICENSE.txt for details.

Loading…
Cancel
Save