SOCM was developed at Wentworth Institute of Technology by:
under the guidance of Professor James G. O'Brien. SOCM serves as a two fold service, both as a comprehensive source of galactic rotation measurements, but is also used as the service layer API for RoCM rotationcurve.herokuapp.com.
A running version of SOCM can be found at socm.herokuapp.com.
- Ruby 2.0.0
- Ruby 2.0.0
- Rails 4.1.1
bundle install
- PostgreSQL must be installed on the machine you want to run SOCM on
- Use configurations in /db/database.yml file to create databases and database users via rake db:create when running SQLite3.
- SQLite3: useful to use for development. Uncomment the section in database.yml and comment out the Postgres section to use it.
- PostgreSQL: use commandline or Admin tool to create users and databases.
- PostgreSQL in Dev: to use Postgres in development, copy the line gem 'pg' in Gemfile out of :production and the into :development section.
.
1. Choose database. If **SQLite3**, move to #2. If **Postgres**, see **Database creation** section of this readme.
.
2. rake db:create
.
3. rake db:migrate
bundle exec rspec spec
- Running the command above runs all unit tests and will also generate a code coverage report.
- /coverage/index.html is the main coverage page. Open with a browser to view the current test coverage for SOCM.
.
-
Create all Galaxies and their velocities
rake db:seed
.
-
Create all Citations
rake citation_importer:import_citations
.
-
Create relationships between Galaxies and their Citations
rake citation_importer:give_galaxies_citations
- After setting up the DB and running migrations, create a Super User:
.
rails c
a = Admin.new
a.email = "admins_email@some_address.com"
a.password = "some_password_123"
a.approved = true
a.super_user = true
a.save!
- This Super User can approve and destroy other admin accounts
- Without a Super User, you cannot approve any other admins that sign up