All Projects → eliotsykes → Real World Rails

eliotsykes / Real World Rails

Licence: mit
Real World Rails applications and their open source codebases for developers to learn from

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Real World Rails

Execution time
How fast is your code? See it directly in Rails console.
Stars: ✭ 67 (-93.18%)
Mutual labels:  rails-application, ruby-on-rails
rails-app-best-practice
Rails app structure example
Stars: ✭ 37 (-96.23%)
Mutual labels:  rails-application, ruby-on-rails
Websiteone
A website for Agile Ventures
Stars: ✭ 132 (-86.56%)
Mutual labels:  rails-application, ruby-on-rails
LocalSupport
A directory of local support services and volunteer opportunities
Stars: ✭ 60 (-93.89%)
Mutual labels:  rails-application, ruby-on-rails
Rspec Rails Examples
RSpec cheatsheet & Rails app: Learn how to expertly test Rails apps from a model codebase
Stars: ✭ 2,089 (+112.73%)
Mutual labels:  rails-application, ruby-on-rails
Open Build Service
Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
Stars: ✭ 599 (-39%)
Mutual labels:  rails-application, ruby-on-rails
Falko Api
📈 Falko API: Plataform for agile projects management 📊
Stars: ✭ 13 (-98.68%)
Mutual labels:  ruby-on-rails
Activeadmin froala editor
Froala WYSIWYG editor for ActiveAdmin
Stars: ✭ 30 (-96.95%)
Mutual labels:  ruby-on-rails
Hack2save
Project Hack2Save
Stars: ✭ 12 (-98.78%)
Mutual labels:  ruby-on-rails
Introduction
Code examples and additional documentation for using Calimero
Stars: ✭ 10 (-98.98%)
Mutual labels:  examples
Bluepilldemo
A collection of small example projects tailored for the Blue Pill board created in STM32CubeIDE
Stars: ✭ 36 (-96.33%)
Mutual labels:  examples
Examples
OBSOLETE. This repo was for Caddy v1. For v2 and newer, see our forum's wiki category.
Stars: ✭ 963 (-1.93%)
Mutual labels:  examples
Workcation
How to use Inertia.js to build a Vue.js frontend within a Ruby on Rails application
Stars: ✭ 28 (-97.15%)
Mutual labels:  ruby-on-rails
Elements Examples
Stripe Elements examples.
Stars: ✭ 874 (-11%)
Mutual labels:  examples
Plz
Say the magic word 😸
Stars: ✭ 31 (-96.84%)
Mutual labels:  examples
Handyhaskell
💙 Code from the HandyHaskell twitter page
Stars: ✭ 13 (-98.68%)
Mutual labels:  examples
Purescript Halogen Storybook
A library to assemble examples or develop components separately.
Stars: ✭ 33 (-96.64%)
Mutual labels:  examples
Jaxws Samples
Small example projects using JAX-WS technologies.
Stars: ✭ 11 (-98.88%)
Mutual labels:  examples
Tldr
📚 Collaborative cheatsheets for console commands
Stars: ✭ 36,408 (+3607.54%)
Mutual labels:  examples
Git To Solr
Index git history into a Solr repository
Stars: ✭ 31 (-96.84%)
Mutual labels:  examples

Real World Rails

Real World Rails applications and their open source codebases for developers to learn from

This project brings 100+ (and growing) active, open source Rails apps and engines together in one repository, making it easier for developers to download the collected codebases and learn from Rails apps written by experienced developers. Reading open source code can be an invaluable learning aid. You’ll find the source code in the apps/ and engines/ subdirectories.

Real World Rails was begun to help teach newer developers and to research and write about Rails development practices:

  • Find example usage of a method you’re unsure of
  • Learn how other developers use a gem you’d like to use
  • Discover how to write tests
  • See how Rails engines are built
  • …and much, much more.

If you've got an idea for something that'd be interesting or fun to find out about these Real World Rails apps, contribute your idea on the issue trackerEliot Sykes

How to install on your computer

# Clone this git repo:
git clone [email protected]:eliotsykes/real-world-rails.git

cd real-world-rails/

# The Rails apps are linked to as git submodules.
# This will take some time...(see comment below for possible speedup)
git submodule update --init

# OR If you've got git 2.9+ installed try to run updates in parallel:
# git submodule update --init --jobs 4

# To run the `bin/rwr` inspectors, install gems:
bundle install

echo "All done! Why not run some inspections? Run bin/rwr"

Other Real World Codebase Collections

How you can analyze Real World Rails apps

Find job subclasses

This will find most, but not all job subclasses (requires ag):

# Outputs jobs source in terminal
ag --ruby '< [A-Za-z]+Job\b'

# Open each job in your editor (e.g. atom)
ag --ruby -l '< [A-Za-z]+Job\b' | xargs atom

(used to research Real World Rails Background Jobs)

List models from every Real World Rails application

Interested in seeing how your fellow developers name their models? Run:

bin/rwr models | sort -f | uniq -c | sort -k 1nr -k 2f

Show constants of every Real World Rails app

bin/rwr constants

(this helped when researching Magic Numbers in Ruby & How You Make Them Disappear)

Show view specs

See the file path and source of every view spec in every app:

bin/rwr view-specs

(this will show 250+ view specs, see them in The Big List of View Specs)

Show model methods

See just the model method names and file paths:

bin/rwr model-method-names

See the model method source and file paths:

bin/rwr model-methods

Find projects using gem

find apps/ -name Gemfile.lock | xargs grep GEM_NAME_GOES_HERE

# e.g. Find all projects using doorkeeper gem
find apps/ -name Gemfile.lock | xargs grep doorkeeper

Analyze view naming practices

bin/rwr shared-view-dirs
bin/rwr view-naming

Find ideas on how to configure your foreman processes

# Outputs contents from all Procfiles
find apps/ -name 'Procfile*' | xargs cat

Settings

Analyzing directories outside of apps/

Prefix the bin/rwr command with the FILES_PATTERN environment variable:

FILES_PATTERN=~/dev/my-rails-app/**/*.rb bin/rwr

Change source output format to markdown

Prefix bin/rwr with the SOURCE_OUTPUT_FORMAT environment variable:

SOURCE_OUTPUT_FORMAT=markdown bin/rwr view-specs

Information for Contributors

How to add a Real World Rails app

Given a GitHub repo for a Rails app githubuser/foo:

# Inside real-world-rails root:
git submodule add -b master [email protected]:githubuser/foo.git apps/foo

Regenerate repos.md:

# Requires valid GITHUB_ACCESS_TOKEN
bin/get_project_data > repos.md

# OR, if GitHub GraphQL API v4 schema has changed, update cached copy of schema:
FETCH_LATEST_SCHEMA=true bin/get_project_data > repos.md

Updating the Rails apps submodules to latest

The Rails apps in apps/ are git submodules. Git submodules are locked to a revision and don't stay in sync with the latest revision.

To update the revisions, run:

# This will take some time:
git submodule foreach git pull

How to remove a git submodule

Only use this if a previously public repo has been removed:

# Remove the submodule from .git/config
git submodule deinit -f path/to/submodule

# Remove the submodule from .git/modules
rm -rf .git/modules/path/to/submodule

# Remove from .gitmodules and remove the submodule directory
git rm -f path/to/submodule

Writing an Inspector? Some docs to help understand AST, Parser…

The inspectors are responsible for the analysis of the Rails apps.

Review the existing inspectors if you're looking for some info on how to write a new one, and see these API docs:


Contributors

  • Eliot Sykes https://eliotsykes.com/
  • Contributions are welcome, fork the GitHub repo, make your changes, then submit your pull request! Reach out if you'd like some help.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].