Code Monkey home page Code Monkey logo

hr-til's Introduction

HR-TIL

til

TIL is an open-source project by the team at Hashrocket that catalogues the sharing & accumulation of knowledge as it happens day-to-day. Posts have a 200-word limit, and posting is open to any Rocketeer as well as select friends of the team. We hope you enjoy learning along with us.

This site was open-sourced as a window into our development process, as well as to allow people to experiment with the site on their own and contribute to the project.

Today I Learned was ported to Elixir/Phoenix in 2017 (source code), and the Rails application is no longer in production or actively maintained by Hashrocket. Thanks to all of our contributors!

Install

If you are creating your own version of the site, fork the repository.

Then, follow these setup steps:

$ git clone https://github.com/hashrocket/hr-til
$ cd hr-til
$ gem install bundler
$ bundle install
$ cp config/application.yml{.example,}
$ rake db:create db:migrate db:seed
$ rails s

In development, db:seed will load sample data for channels, developers, and posts. Omit this command to opt-out of this step, or create your own sample data in db/seeds/development.rb.

Authentication is managed by Omniauth and Google. See the omniauth-google-oauth2 README and Google Oauth 2 docs for setup instructions. To allow users from a domain, multiple domains, or a specific email to log in, set those configurations in your environmental variables:

# config/application.yml

permitted_domains: 'hashrocket.com|hshrckt.com'
permitted_emails: '[email protected]'

Ensure you have set the google client id and google client secret via Oauth instructions.

Once set, visit '/admin' and log in with a permitted email address or domain.

Testing

Run all tests with:

$ rake

Or, run all the test in parallel with flatware:

$ flatware fan rake db:test:prepare
$ flatware rspec && flatware cucumber

Dependencies

  • The gem selenium-webdriver depends on the Firefox browser.
  • The gems flatware-rspec and flatware-cucumber require ZeroMQ. Learn more here.

Environmental Variables

basic_auth_credentials both toggles and defines basic authentication:

# config/application.yml

basic_auth_credentials: username:password

slack_post_endpoint allows the app to post to Slack:

# config/application.yml

slack_post_endpoint: /services/some/hashes

Contributing

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

Bug reports and pull requests are welcome on GitHub at https://github.com/hashrocket/hr-til. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Usage

We love seeing forks of Today I Learned in production! Please consult our usage guide for guidelines on appropriate styling and attribution.

License

TIL is released under the MIT License.


About

Hashrocket logo

TIL is supported by the team at Hashrocket, a multidisciplinary design and development consultancy. If you'd like to work with us or join our team, don't hesitate to get in touch.

hr-til's People

Contributors

camerond avatar chriserin avatar greis avatar hashrocketeer avatar jbranchaud avatar jwworth avatar latentflip avatar michaeldimmitt avatar murjax avatar ryenotbread avatar tmock12 avatar vnegrisolo avatar

Watchers

 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.