• This repository has been archived on 05/Dec/2018
  • Stars
    star
    341
  • Rank 123,998 (Top 3 %)
  • Language
    Ruby
  • Created over 9 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Today I Learned in Ruby

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.

More Repositories

1

decent_exposure

A helper for creating declarative interfaces in controllers
Ruby
1,799
star
2

gatling

Deployment tool for Phoenix apps
Elixir
498
star
3

tilex

Today I Learned
Elixir
495
star
4

ws

websocket command line tool
Go
425
star
5

websocket-shootout

A comparison of websocket servers in multiple languages and frameworks
JavaScript
417
star
6

dotmatrix

Hashrocket Dot Files
Vim Script
363
star
7

slurper

Gem for slurping plain text stories into Pivotal Tracker
Ruby
127
star
8

view_specify

Auto-generate RSpec view specs by interrogating your existing views.
Ruby
55
star
9

unencumbered

Just enough Cucumber in RSpec.
Ruby
53
star
10

capybara-webmock

Mock external requests for Capybara JavaScript drivers
Ruby
48
star
11

mousetrap

CheddarGetter API Client in Ruby
Ruby
34
star
12

namecheap

ruby namecheap API wrapper
Ruby
32
star
13

coming-soon

App to register emails addresses. Intended as a coming soon, pre-launch, splash page.
JavaScript
27
star
14

acts_as_featured

Ruby
25
star
15

design_patterns_in_ruby

Wherein we reimplement the design patterns from the _Design Patterns in Ruby_ book, by Russ Olsen.
Ruby
25
star
16

vim-hashrocket

Mappings we find useful
Vim Script
23
star
17

localpolitics.in

Hashrocket's Martin Luther King Jr. Memorial 2009 Hack Day Apps for America Celebrity Rabies Awareness Pro-Am Fun Run Race For The Cure
JavaScript
18
star
18

terraformation

Generators with a Hashrocket twist
Ruby
15
star
19

vim-macdown

write markdown in Vim with live-reloads in MacDown
Vim Script
14
star
20

hashrocket-rails

Rails engine & generators for bootstrapping a Hashrocket project
Ruby
12
star
21

slack-command-api

A Sinatra API for processing custom Slack commands
Ruby
12
star
22

boot_devcards_example

Example of using devcards with boot
Clojure
10
star
23

graphql_way_rails

This is a Proof of Concept Rails project using GraphQL
Ruby
6
star
24

wowza

Ruby wrapper around the Wowza REST API
Ruby
5
star
25

hr_hotels

Example database for hotels.
Ruby
5
star
26

hr

Hashrocket Sub
Ruby
5
star
27

ecto_pg_extras

A collection of custom functions for PostgreSQL features in Ecto
Elixir
4
star
28

my_emma

Ruby wrapper for the MyEmma Remote Signup API
Ruby
4
star
29

university-bookstore

Hashrocket Training Project for Pre-RailsConf 2010 Workshop
Ruby
4
star
30

hashrocket-vr-example

JavaScript
3
star
31

dibs-ios

An iOS client for the Dibs "Online classifieds without the strangers" web application.
Objective-C
3
star
32

OffBot

πŸ”Œ πŸ€– Timely slack notifications for scheduled holidays and vacations
Ruby
3
star
33

learn_to_program

Curriculums and Programs for Teaching people how to build web applications
Ruby
2
star
34

concepts

A gallery for our side projects
JavaScript
2
star
35

wowza-webhooks

Java
2
star
36

vim-hr-psql

Open psql formatted table definitions from Vim Postgres
Vim Script
2
star
37

chime

Chimes in the Chicago office when someone comes in the front door
Arduino
1
star
38

hacktive

Github activity tracker
Ruby
1
star
39

homebrew-formulas

Hashrocket homebrew formulas
Ruby
1
star
40

spices

Ruby
1
star
41

metro_relic

Easily track custom newrelic metrics with a config file
Ruby
1
star
42

vostok

The Hashrocket middleman template
CSS
1
star
43

trybool

The value parsing tool to return a boolean that you never knew you needed!
Ruby
1
star
44

homebrew-fdw

FDW formulas for Homebrew package manager
Ruby
1
star
45

scored

Simple iPhone app
Objective-C
1
star
46

hashshake

Hashrocket shakes hands 🀝
Ruby
1
star