Last active
August 29, 2015 14:06
-
-
Save tobiashm/b754570c752db258017e to your computer and use it in GitHub Desktop.
Rails project setup basics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://EditorConfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
indent_size = 2 | |
indent_style = space | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install npm | |
install phantomjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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