From feafd34bcdffddc185917b904e332f2c0524cd9b Mon Sep 17 00:00:00 2001 From: Betsy Haibel Date: Mon, 18 Dec 2017 17:40:55 +0000 Subject: [PATCH] Smooth out and document setup process (#43) - Write a basic SETUP.md - Add overcommit installation to bin/setup Tried to binstub overcommit but bundler appears to have a bug with flags supplied to binstubs -- `bin/overcommit --install` interprets the `--install` as a bundler flag, not as an overcommit flag. That's why overcommit is referenced un-binstubbed in bin/setup. --- CONTRIBUTING.md | 8 +++++--- SETUP.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ bin/setup | 3 +++ 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 SETUP.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b50e6b0..3bf4d50 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,5 @@ ## Contributing to Nourish.Party -There are four main ways to contribute to Nourish.Party, and we are grateful for each and every contribution you choose to make. +There are four main ways to contribute to Nourish.Party, and we are grateful for each and every contribution you choose to make. 1. Promoting and improving adoption of Nourish.Party. 1. Setting up or supporting a Nourish.Party instance. @@ -19,12 +19,12 @@ We intend to make setting up a Nourish.Party instance as painless as possible, h Our goal is for Nourish.Party to plug directly into your existing distribution channels, from amazon stores to etsy to Discord to Slack. As you can imagine, that's quite a feat! If you'd like to get involved building an extension, we'd love for you to start building on our OAuth, REST, GraphQL, and Webhook APIs. (Which aren't designed, docuemnted, or built yet... BUT SOON). ### Improving the core Nourish.Party application -Right now, there are four ways to contribute +Right now, there are four ways to contribute #### Providing Feedback to Nourish.Party Maintainers Nourish.Party is open-source, community built software. While we intend to place the user first, we sometimes fail to do so. One of the most valuable thing you can do to improve the Nourish.Party is to provide us with specific, actionable and detailed feedback. We're especially interested in hearing about: -* How Nourish.Party is (or is not!) helping you achieve your goals for financial independence as an independent creative or a small group of creatives. +* How Nourish.Party is (or is not!) helping you achieve your goals for financial independence as an independent creative or a small group of creatives. * Wins or bugs you experienced using Nourish as a supporter. * Gaps in our documentation, either as a Nourish.Party site host, add-on developer, or contributor to the core nourish.party platform. * Vulnerabilities or risks. Please report these to [security@nourish.party](mailto: security@nourish.party). @@ -43,3 +43,5 @@ Patches are very much welcome! From documentation improvements to bug fixes to f * The patch *must* be approved by a core maintainer, as we are the ones on the hook for maintaining it far into the future. We strive to provide both automated feedback and human-written specific, actionable and kind feedback to contributors. That said, we are an all volunteer organization, which means we may not be as responsive or available as you would like. We ask that you are patient with us. + +To get a local development instance running, please refer to the [setup instructions](./SETUP.md) diff --git a/SETUP.md b/SETUP.md new file mode 100644 index 0000000..48df8ff --- /dev/null +++ b/SETUP.md @@ -0,0 +1,46 @@ +# Setup + +## Run Nourish for realsies, out on the internet + +<< coming soon >> + +## Run Nourish on your laptop, as a developer + +### Get the code + +1. Use GitHub to fork the project. + +1. Clone your fork to your own computer. + + ``` + cd /where/you/keep/your/code + git clone git@github.com:yourusername/nourish.party.git + ``` + +### Install dependencies + +#### On a Mac + +1. Install [Homebrew](https://brew.sh). + +1. Install PostgreSQL using Homebrew, and start it. + +``` +brew install postgresql +brew services start postgresql +``` + +1. Install Ruby using a Ruby version manager of your choice. If you're new to + Ruby and don't have opinions about version managers yet, we suggest + [RVM](https://rvm.io) -- it's stable and well-documented. + +1. Run the setup script: + + ``` + cd /path/to/nourish.party + bin/setup + ``` + + If you get a Ruby version error, try installing the specified version of Ruby + using your favorite Ruby version manager. For RVM, this will be + `rvm install 2.4.1`. Then try running `bin/setup` again. \ No newline at end of file diff --git a/bin/setup b/bin/setup index 7e21840..4df4406 100755 --- a/bin/setup +++ b/bin/setup @@ -32,6 +32,9 @@ chdir APP_ROOT do puts "\n== Removing old logs and tempfiles ==" system! "bin/rails log:clear tmp:clear" + puts "\n== Installing git hooks ==" + system! "overcommit --install" + puts "\n== Restarting application server ==" system! "bin/rails restart" end