Skip to content

Instantly share code, notes, and snippets.

@tobiashm
Last active August 29, 2015 14:06
Show Gist options
  • Save tobiashm/b754570c752db258017e to your computer and use it in GitHub Desktop.
Save tobiashm/b754570c752db258017e to your computer and use it in GitHub Desktop.
Rails project setup basics
# http://EditorConfig.org
root = true
[*]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
{
"requireCurlyBraces": [
"else",
"for",
"while",
"do",
"try",
"catch"
],
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
"catch"
],
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowMultipleVarDecl": true,
"disallowEmptyBlocks": true,
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"requireSpacesInsideObjectBrackets": "all",
"disallowDanglingUnderscores": true,
"disallowSpaceAfterObjectKeys": true,
"requireCommaBeforeLineBreak": true,
"requireOperatorBeforeLineBreak": [
"?",
"+",
"-",
"/",
"*",
"=",
"==",
"===",
"!=",
"!==",
">",
">=",
"<",
"<="
],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"requireSpaceBeforeBinaryOperators": [
"?",
"+",
"-",
"/",
"*",
":",
"=",
"==",
"===",
"!=",
"!==",
">",
">=",
"<",
"<="
],
"disallowSpaceBeforeBinaryOperators": [
","
],
"requireSpaceAfterBinaryOperators": [
"?",
"+",
"-",
"/",
"*",
":",
"=",
"==",
"===",
"!=",
"!==",
">",
">=",
"<",
"<=",
","
],
"disallowImplicitTypeConversion": ["numeric", "boolean", "binary", "string"],
"disallowKeywords": ["with"],
"disallowMultipleLineBreaks": true,
"validateQuoteMarks": "'",
"validateIndentation": 2,
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"disallowKeywordsOnNewLine": ["else"],
"requireCapitalizedConstructors": true
}
{
"indent": 2,
"newcap": true,
"nonew": true,
"undef": true,
"browser": true,
"jquery": true,
"nonstandard": true,
"sub": true,
"globals": {
"Handlebars": false,
"HandlebarsTemplates": false,
"I18n": false,
"PDFJS": false,
"Promise": false,
"Routes": false,
"URI": false,
"__DUMMY__": false
}
}
# RuboCop 0.26.1
# inherit_from: .rubocop_todo.yml
AllCops:
Include:
- Capfile
- Rakefile
- config.ru
Exclude:
- bin/**/*
- config/**/*
- node_modules/**/*
RunRailsCops: true
StringLiterals:
Enabled: false
EnforcedStyle: double_quotes
install npm
install phantomjs
#!/bin/bash
function check {
which $1 > /dev/null || echo "missing '$1'"
}
check "curl" # needed for installing brew and rvm
check "git"
check "gcc" # Apple XCode command line tools
check "brew"
check "rvm"
check "ruby"
check "bundle"
check "npm"
### Apple XCode command line tools
# xcode-select --install
### Install Homebrew
# ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
# brew update
# brew bundle
# brew services list | awk '{ system("brew services restart " $1) }'
### Install Ruby
# curl -sSL https://get.rvm.io | bash -s stable
# rvm get latest
# rvm install ruby
# rvm use --default ruby
### Install project dependencies
bundle install
npm install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment