Coder Social home page Coder Social logo

seraphroy / anacapa-github-prototype Goto Github PK

View Code? Open in Web Editor NEW

This project forked from project-anacapa/anacapa-github-prototype

0.0 2.0 0.0 400 KB

Spike, see: https://www.pivotaltracker.com/n/projects/1519297

License: MIT License

Ruby 76.83% JavaScript 0.66% CSS 4.08% HTML 16.27% CoffeeScript 2.16%

anacapa-github-prototype's Introduction

anacapa-github-prototype

Spike, see: https://www.pivotaltracker.com/n/projects/1519297

To run this web server:

  1. Fork and/or clone this repo
  2. Ensure you have postgresql installed and running on localhost
  3. Execute bundle install
  • If you have a problem installing pg, try running
    • sudo env ARCHFLAGS='-arch x86_64' gem install pg
  1. Create a file called .env in the project root,
  • You can run cp .env.example .env
  • Populate the GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET with your own Github App configurations
  • Instructions on how to do this here
  • Look at an example configuration below
  1. If you are running this for the first time, run rake db:create
  2. Execute rake db:migrate
  3. Execute rails s
  4. The rails server should now be running on http://localhost:3000

To set initial admin:

  1. First, sign into your application at http://localhost:3000
  2. On the command line in your project root, you can run rake super_admin:help to show all super_admin instructions
169-231-82-184:anacapa-github-prototype johndoe$ rake super_admin:help
 to list all users           rake super_admin:list_users   
 to list all admins          rake super_admin:list_admins   
 to list all non-admins      rake super_admin:list_non_admins   
 to make a user an admin     rake super_admin:grant_admin_permission[< user's id >]   
 to revoke admin privleges   rake super_admin:revoke_admin_permission[< user's id >] 
  1. To make yourself an admin, first find yourself by running rake super_admin:list_users
169-231-82-184:anacapa-github-prototype johndoe$ rake super_admin:list_users
+---------------------+----------+----+----------+
| email               | name     | id | is_admin |
+---------------------+----------+----+----------+
| [email protected] | John Doe | 1  | false    |
+---------------------+----------+----+----------+
1 row in set
For syntax of how to grant or revoke admin privs, type rake super_admin:help
  1. Find the id corresponding to your user and run rake super_admin:grant_admin_permission[<what you found>]
169-231-82-184:anacapa-github-prototype johndoe$ rake super_admin:grant_admin_permission[1]
+---------------------+----------+----+----------+
| email               | name     | id | is_admin |
+---------------------+----------+----+----------+
| [email protected] | John Doe | 1  | true     |
+---------------------+----------+----+----------+
1 row in set
169-231-82-184:anacapa-github-prototype johndoe$
  1. You should now see a link to "Admin Panel" when you sign in to your website.

Example OAuth Config Example

OAuth Config Example

anacapa-github-prototype's People

Contributors

ncbrown1 avatar pconrad avatar seraphroy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.