Ruby HTML CSS Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci
app
bin
config
db
lib
log
public
spec
vendor/assets
.env-sample
.gitignore
.rspec
.rubocop.yml
.ruby-version
Brewfile
CNAME
Gemfile
Gemfile.lock
Guardfile
LICENSE.txt
Procfile
README.md
Rakefile
app.json
config.ru

README.md

Panlexicon

Circle CI Coverage Status Dependency Status Code Climate Panlexicon Inline docs

Developing

Start Server Test / Watch
$ bin/rails s $ bin/guard

Installation and Setup

Dependencies:

  • Ruby 2.5.1
  • bundler gem ($ gem install bundler)
  • postgres (on OSX, use Postgres.app)
  • System dependencies, assuming you are using Homebrew on OSX: brew bundle

Setup:

  1. Run $ bin/setup
  2. Start the server: $ bin/rails s
  3. Visit it in your web browser: http://localhost:3000

Running Tests

  • All tests can be run with bin/rspec
  • File watching can be started with bin/guard
  • Individual tests can be isolated by adding :focus to declaration, e.g. it 'runs a test', :focus do
  • Within feature specs, the page can be inspected by adding save_and_open_page

Interesting Searches

  • eggshell, fleet: 1 group
  • eggshell, van: 2 groups

Updating setup database process

Creating a new Database dump

  1. Download the production database locally $ heroku pg:pull DATABASE_URL panlexicon_production --app panlexicon
  2. Dump the thesaurus table data:
pg_dump --data-only --no-acl --no-owner \
  -h localhost -U $(whoami) -d panlexicon_production \
  --table words \
  --table groups \
  --table groupings \
  --table parts_of_speech\
  --format tar --file=data.sql.tar
  1. Upload the data file to the Github-hosted release
  2. If the downloadable url/filename changed, update the bin/setup file

Manually Importing Thesaurus Data

This application uses the public domain Moby Thesaurus to provide words and relations. If you choose not to use the database dump described in the Installation and Setup section, you can manually import it (it takes an hour or two):

  1. Download the Moby Thesaurus textfile: http://www.gutenberg.org/ebooks/3202
  2. Import it: $ rake moby:import_thesaurus[mthesaur.txt] (assuming the unzipped thesaurus file is sitting in your rails root named mthesaur.txt)