Skip to content

Northwestern University Core Facility Management Software (NUCore)

License

Notifications You must be signed in to change notification settings

ecovillage/nucore-open

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NUcore Open

Open source version of Northwestern University Core Facility Management Software

Quickstart

Welcome to NUcore! This guide will help you get a development environment up and running. It makes a few assumptions:

  1. You write code on a Mac.
  2. You have a running Oracle or MySQL instance with two brand new databases. (Oracle setup instructions here.)
  3. You have the following installed:

Spin it up

  1. Download the project code from Github

    git clone [email protected]:tablexi/nucore-open.git nucore
    
  2. Install dependencies

    cd nucore
    bundle install
    
  3. Configure your databases

    cp config/database.yml.mysql.template config/database.yml
    

    Edit the adapter, database, username, and password settings for both the development and test DBs to match your database instance

  4. Configure your secrets

cp config/secrets.yml.template config/secrets.yml
rake secret
  • Paste the output from rake secret into config/secrets.yml for both development/secret_key_base and test/secret_key_base
  1. Set up databases

    rake db:setup
    
  2. Seed your development database

    rake demo:seed
    
  3. Configure your file storage

    By default, files are stored on the local filesystem. If you wish to use Amazon's S3 instead, create a local settings override file such as config/settings/development.local.yml or config/settings/production.local.yml and include the following, substituting your AWS settings:

    paperclip:
      storage: fog
      fog_credentials:
        provider: AWS
        aws_access_key_id: YOUR_S3_KEY_GOES_HERE
        aws_secret_access_key: YOUR_S3_SECRET_KEY_GOES_HERE
      fog_directory: YOUR_S3_BUCKET_NAME_GOES_HERE
      fog_public: false
      path: ":class/:attachment/:id_partition/:style/:safe_filename"
    
  4. Start your server

    bin/rails s
    
  5. Log in

    Visit http://localhost:3000

    demo:seed creates several users with various permissions. All users have the default password of password

    Email/username Role
    [email protected] Admin
    [email protected] PI
    [email protected] Normal User
    [email protected] Facility Staff
    [email protected] Facility Director
  6. Play around! You're running NUcore!

  7. Run delayed_job to support in-browser email previews.

    Run delayed jobs indefinitely in the background:

    ./script/delayed_job start
    

    Or run delayed jobs once for one-off jobs:

    ./script/delayed_job run
    

Test it

NUcore uses Rspec to run tests. Try any of the following from NUcore's root directory.

  • To run all tests (this will take awhile!) rake spec

  • To run just the model tests rake spec:models

  • To run just the controller tests rake spec:controllers

Optional Modules

The following modules are provided as optional features via Rails engines. These are enabled by adding the appropriate engine to your Gemfile (all are on by default). They exist in the vendor/engines directory.

Engine-specific migrations should live in the engine's db/migrate directory and use an engine initializer to add that path to the list of paths Rails checks. If you need to disable an engine, you can undo all of the engine's migrations with the rake engines:db:migrate_down[ENGINE_NAME] task.

Learn more

There are valuable resources in the NUcore's doc directory.

About

Northwestern University Core Facility Management Software (NUCore)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 84.4%
  • HTML 10.4%
  • CoffeeScript 2.5%
  • JavaScript 1.7%
  • Other 1.0%