An open API service indexing awesome lists of open source software.

https://github.com/neo4j-examples/graphgist_portal

New GraphGist portal written in Rails and using GraphStarter
https://github.com/neo4j-examples/graphgist_portal

Last synced: 7 months ago
JSON representation

New GraphGist portal written in Rails and using GraphStarter

Awesome Lists containing this project

README

          

# Graphgist Portal

* [Technology](#markdown-header-technology)
* [Automated Setup (Recommended)](#markdown-header-automated-setup)
* [Manual Setup](#markdown-header-manual-setup)

## Technology

* Ruby 2.3.0
* Neo4j Community Edition
* [Semantic UI 2.1](https://semantic-ui.com/)

## Automated Setup

### Requirements

* Vagrant
* VirtualBox (in case you use v5.1 you may need to downgrade to v5.0)

### Setup

Start the virtual machine. The first time the machine is started it will be created and configured which may take a while.

```
vagrant up
```

SSH to the VM

```
vagrant ssh
```

CD to the code directory. This directory is synced with the directory on your computer.

```
cd /vagrant
```

Install the project requirements

```
bundle install
```

Set the environment (optional)

```
export GITHUB_KEY=''
export GITHUB_SECRET=''
```

Run migrations

```
rake neo4j:migrate
```

Start the rails server

```
rails s -b 192.168.99.13
```

Web Addresses:

* GraphGist Portal 192.168.99.13:3000
* Neo4j Database 192.168.99.13:7474

After some user(s) are created you can give a user admin privileges by running the following query in the neo4j database website linked above:

```
MATCH (u:User {name:''}) SET u.admin = true RETURN u
```

If you need to reboot the database, use:

```
sudo systemctl restart neo4j
```

## Manual Setup

### Requirements

* RVM

### Setup

Install ruby

```
rvm install 2.3.0
rvm use 2.3.0
gem install bundler
```

Install the project requirements

```
bundle install
```

Ensure the Neo4j database is running.

Set the environment (optional, only if you want to log in with github)

```
export GITHUB_KEY=''
export GITHUB_SECRET=''
```

Start the rails server

```
rails s
```

You can now visit the website in your browser at localhost:3000

### Testing

First it needs the S3 bucket name to be set to pass some tests:

```
export S3_BUCKET_NAME=graphgist_test
```

To run tests:

```
bundle exec rake
```

If you'd like to run single test file then:

```
rspec ./spec/controllers/query_controller_spec.rb
```