GithubHelp home page GithubHelp logo

g5-content-management-system's Introduction

G5 CMS

Build Status Code Climate

  • Seeds client from client uid
  • Seeds default website for each location
  • Gardens provide components that make up websites and web pages
  • Page builder allows for customization of web pages
  • Websites compile and deploy to Heroku
  • Read's configurator's feed and updates sibling applications

Setup

  1. Install all the required gems.

    $ bundle
  2. Customize client ENV variable or don't. Format is shown.

    $ export G5_CLIENT_UID=http://g5-hub.herokuapp.com/clients/:client-urn

    Default is spec/support/client.html and is set in config/initializers/env.rb.

    ProTip™: The client uid will be used to seed the database so it must to point to an html file that uses microformats to mark up a client and their locations.

  3. Set up your database.

    $ cp config/database.example.yml config/database.yml
    $ rake db:setup
  4. Customize garden ENV variables or don't. Defaults are shown.

    $ export LAYOUT_GARDEN_URL=https://g5-layout-garden.herokuapp.com
    $ export THEME_GARDEN_URL=https://g5-theme-garden.herokuapp.com
    $ export WIDGET_GARDEN_URL=https://g5-widget-garden.herokuapp.com

    Defaults are set in config/initializers/env.rb.

  5. Run the specs.

    $ rake db:test:prepare
    $ rspec
  6. Register your oAuth application

  7. Set oAuth Enviroment Variables

  8. Start the application.

    $ rails s

Client Location Deployment

  1. Create a new private key and add it to GitHub.

  2. Also add your private key to Heroku.

  3. Get your AWS S3 credentials ready — for the client's assets

  4. Set ENV variables. See .env.

  • if you have issues connecting to S3 (SocketError: getaddrinfo: nodename nor servname provided, or not known) make sure your region is correct
  1. Install redis and start it.

  2. Start the job queue.

    $ rake jobs:work

CSS Naming Conventions

Most CSS will go inside the modules folder. A module is simply a reusable chunk of CSS. To create a new module do the following:

  1. Create a new file inside the modules folder. It should start with an underscore and contain the module name. Example: _panel.css.scss
  2. The module name is the base class, which contains the basic styles for the module. Example: .panel
  3. If there are multiple words in the base class, use dashes. Example: .my-panel
  4. Any component, or part, of the module is a sub-module. The class should be the module name, a dash, and the sub-module. Example: .panel-title, .panel-footer
  5. For any alternate styles of the module the class should be module name, two dashes, and the alternate style name. Example: .panel--b, .panel--large

Client Location Sites

  • app/views/layouts/web_template.html.erb is the layout file
  • app/views/web_templates/show.html.erb is used to render each page
  • app/assets/stylesheets/web_template.scss is for preview mode only
  • app/assets/javascripts/web_template.js.coffee is for preview mode only
  • app/views/web_templates/stylesheets.scss is for preview & deployed mode
  • public/javascripts/ if for preview & deployed mode

Authors

Contributing

  1. Fork it
  2. Get it running
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Write your code and specs
  5. Commit your changes (git commit -am 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create new Pull Request

If you find bugs, have feature requests or questions, please file an issue.

Specs

Run once.

$ rspec

Deployment Specs

  1. Set deployment ENV variables in .env.test. Deploy to your personal Heroku account, not G5's.

    HEROKU_USERNAME=your-username
    HEROKU_API_KEY=your-api-key
    ID_RSA=your-private-key

    ProTip™: See this dotenv issue if you're having issues formatting your ID_RSA.

  2. By default deployment specs are not run, you have to specifically run them with rspec -t type:deployment

    ProTip™: If you're getting a 422 on the Heroku deploy, try verifying your Heroku account.

Model & Controller Diagrams

The railroady gem generates Rails model and controller UML diagrams as cross-platform .svg files, as well as in the DOT language.

$ brew install graphviz
$ rake diagram:all
$ open doc/*.svg

License

Copyright (c) 2013 G5

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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.