Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sachinm/coderwall
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: coderwall/coderwall-legacy
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Jun 26, 2014

  1. replacing unicorn with puma, making it depend on .env config

    removing duplicate gems from testing
    
    rebasing
    
    only use puma worker killer in prod
    dvito committed Jun 26, 2014
    Copy the full SHA
    ea5b794 View commit details
  2. Removed improper caching from networks/_alphabetized_list partials.

    Also adjusted the width of the header for aesthetics on networks
    list pages
    Mileshosky committed Jun 26, 2014
    Copy the full SHA
    9254bd9 View commit details
  3. Merge pull request coderwall#24 from Mileshosky/join-networks-39

    Fixed joining networks from networks list pages
    just3ws committed Jun 26, 2014
    Copy the full SHA
    8458d57 View commit details
  4. remove rails_stdout_logging gem as rails_12factor was made to include…

    … both 12factor gems which we already have included
    sao committed Jun 26, 2014
    Copy the full SHA
    1c9bf9f View commit details
  5. Copy the full SHA
    1ca2309 View commit details
  6. Merge pull request coderwall#27 from assemblymade/revert-21-revert-10…

    …-location-fix
    
    Revert "Revert "Fix job location updates""
    just3ws committed Jun 26, 2014
    Copy the full SHA
    039aae1 View commit details
  7. Merge pull request coderwall#26 from sao/master

    Remove rails_stdout_logging in Gemfile
    just3ws committed Jun 26, 2014
    Copy the full SHA
    54cb3d4 View commit details
  8. Revert "Merge pull request coderwall#27 from assemblymade/revert-21-r…

    …evert-10-location-fix"
    
    This reverts commit 039aae1, reversing
    changes made to 8458d57.
    just3ws committed Jun 26, 2014
    Copy the full SHA
    702497e View commit details
  9. Copy the full SHA
    4774849 View commit details

Commits on Jun 27, 2014

  1. Copy the full SHA
    9b9918b View commit details

Commits on Jun 28, 2014

  1. Copy the full SHA
    454dd00 View commit details
  2. Copy the full SHA
    b48629e View commit details
  3. exposes a function that lets use, show, hide, and remove dom objects …

    …based on current users username
    
    cleaning up some whitespace changes
    
    adding newline to end of applition.html.haml
    
    adding newline to end of _current_user_js.html.haml
    dvito committed Jun 28, 2014
    Copy the full SHA
    21ea9f3 View commit details
  4. Copy the full SHA
    7b9458c View commit details

Commits on Jun 29, 2014

  1. Merge pull request coderwall#25 from sachinm/master

    DOC updates [skip ci]
    just3ws committed Jun 29, 2014
    Copy the full SHA
    54fb6c1 View commit details
  2. Merge pull request coderwall#28 from RexMorgan/upgrade-sass

    Minor version bump to sass to get it working with windows.
    just3ws committed Jun 29, 2014
    Copy the full SHA
    e30bd2b View commit details
  3. Merge pull request coderwall#30 from RexMorgan/organize-jobs

    Organize jobs
    just3ws committed Jun 29, 2014
    Copy the full SHA
    00fa61c View commit details
  4. Add rakismet gem for Akismet integration coderwall#84

    Nícolas Iensen committed Jun 29, 2014
    Copy the full SHA
    47d608a View commit details
  5. Add akismet support for comments, create a job to analyze spams in ba…

    …ckground, create polymorphic table spam_reports coderwall#84
    Nícolas Iensen committed Jun 29, 2014
    Copy the full SHA
    2e06984 View commit details
  6. Add akismet support for protips

    Nícolas Iensen committed Jun 29, 2014
    Copy the full SHA
    3e9f62a View commit details

Commits on Jun 30, 2014

  1. Fix conflict coderwall#84

    Nícolas Iensen committed Jun 30, 2014
    Copy the full SHA
    5a9a6c8 View commit details
  2. Merge pull request coderwall#33 from akosednar/custom_vagrant_settings

    Added the ability to override vagrant settings [skip ci]
    just3ws committed Jun 30, 2014
    Copy the full SHA
    a86f5ce View commit details
  3. Fix location changing

    wesleylancel committed Jun 30, 2014
    Copy the full SHA
    f263b60 View commit details
  4. Copy the full SHA
    44bbcc1 View commit details
  5. Copy the full SHA
    b835ce4 View commit details
  6. Copy the full SHA
    b56392d View commit details
  7. Copy the full SHA
    1eb203e View commit details
  8. Copy the full SHA
    584ce90 View commit details
  9. Merge pull request coderwall#32 from dvito/wip_62_edit_delete_comment

    Moves hiding/showing the edit/delete/reply links to javascript function thats reusable across the application
    just3ws committed Jun 30, 2014
    Copy the full SHA
    02ef19d View commit details
  10. Copy the full SHA
    7dceaf9 View commit details
  11. Lowered the defaults for the VBox and allow for only setting one or t…

    …he other VM configuration values
    just3ws committed Jun 30, 2014
    Copy the full SHA
    a4724fc View commit details
  12. Merge pull request coderwall#36 from wesleylancel/protip-network-fix

    Fix network buttons on protips
    just3ws committed Jun 30, 2014
    Copy the full SHA
    456dc80 View commit details
  13. Copy the full SHA
    d81b50d View commit details
  14. Merge branch 'dvito-puma'

    just3ws committed Jun 30, 2014
    Copy the full SHA
    62b46cb View commit details
  15. Converting to Puma

    just3ws committed Jun 30, 2014
    Copy the full SHA
    505fbb2 View commit details

Commits on Jul 1, 2014

  1. Move analyse_spam to jobs/medium coderwall#84

    Nícolas Iensen committed Jul 1, 2014
    Copy the full SHA
    fc743f6 View commit details
  2. Fix conflict coderwall#84

    Nícolas Iensen committed Jul 1, 2014
    Copy the full SHA
    335a2a9 View commit details
  3. Removed autoscale as it wasn't referenced anywhere else in the codeba…

    …se nor are there any autoscale addons
    just3ws committed Jul 1, 2014
    Copy the full SHA
    fc0189a View commit details
  4. Enable pg_stat_statements

    just3ws committed Jul 1, 2014
    Copy the full SHA
    2f11d8f View commit details
  5. Copy the full SHA
    113a588 View commit details
  6. Copy the full SHA
    5c134e8 View commit details
  7. Fix schema.rb conflict.

    Mileshosky committed Jul 1, 2014
    Copy the full SHA
    585cc35 View commit details
  8. Copy the full SHA
    c335aa0 View commit details
  9. Merge branch 'ghost-banning-87' of github.com:Mileshosky/coderwall in…

    …to Mileshosky-ghost-banning-87
    just3ws committed Jul 1, 2014
    Copy the full SHA
    ffbdb1d View commit details
  10. Copy the full SHA
    5bec365 View commit details
  11. Changed sequence for bootstraping the dev/test database to run schema…

    …:load->migrate->test:prepare
    just3ws committed Jul 1, 2014
    Copy the full SHA
    0894241 View commit details
  12. Copy the full SHA
    b0c0a60 View commit details
  13. Fer the love of pete this configuration separates every Rake command …

    …to a separate exec on Travis
    just3ws committed Jul 1, 2014
    Copy the full SHA
    06b9236 View commit details
  14. Copy the full SHA
    c45266c View commit details
  15. Copy the full SHA
    991f8ae View commit details
Showing 1,453 changed files with 42,731 additions and 66,612 deletions.
60 changes: 41 additions & 19 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,44 +1,66 @@
######### Application Settings #########

LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8

# Hawt Service
PRIVATE_ADMIN_PATH=private_admin_path
PRIVATE_URL=http://development:development@localhost:3000

DISCOUNT_TOKEN=discount_token

REVIEWERS="['Administrator']"
NOTIFIER_ADMIN_EMAILS="['notifier_admin@example.com']"
SUPPORT_EMAIL=support@example.com
SESSION_SECRET=session_secret

######### Development Settings #########

TRUSTED_IP=127.0.0.1

# VCR record mode should only be touched if your adding to or updating api backed tests.
# VCR_RECORD_MODE=none #Modes: [new, once, all]

############### API KEYS ###############

# GitHub User
GITHUB_ADMIN_USER=github_admin_user
GITHUB_ADMIN_USER_PASSWORD=github_admin_user_password
GITHUB_CLIENT_ID=github_client_id

# GitHub Application: https://github.com/settings/applications/new
GITHUB_REDIRECT_URL=http://localhost:3000/auth/github/callback
GITHUB_CLIENT_ID=github_client_id
GITHUB_SECRET=github_secret

LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8

# LinkedIn
LINKEDIN_KEY=linkedin_key
LINKEDIN_SECRET=linkedin_secret

# Mailgun
MAILGUN_API_KEY=key-mailgun_api_key
MAILGUN_DOMAIN=localhost
MAILGUN_SIGNATURE=mailgun_signature
MAILGUN_TOKEN=mailgun_token

# Mixpanel
MIXPANEL_API_SECRET=mixpanel_api_secret
MIXPANEL_TOKEN=mixpanel_token

NOTIFIER_ADMIN_EMAILS="['notifier_admin@example.com']"

PRIVATE_ADMIN_PATH=private_admin_path
PRIVATE_URL=http://development:development@localhost:3000

REDIS_URL=redis://localhost:6379

REVIEWERS="['Administrator']"

STRIPE_PUBLISHABLE_KEY=pk_test_stripe_publishable_key
STRIPE_SECRET_KEY=sk_test_BQokikJOvBiI2HlWgH4olfQ2

SUPPORT_EMAIL=support@example.com

# Twitter
TWITTER_ACCOUNT_ID=111111111
TWITTER_CONSUMER_KEY=twitter_consumer_key
TWITTER_CONSUMER_SECRET=twitter_consumer_secret
TWITTER_OAUTH_SECRET=twitter_oauth_secret
TWITTER_OAUTH_TOKEN=twitter_oauth_token
TWITTER_REDIRECT_URL=http://localhost:3000/auth/twitter/callback

SESSION_SECRET=session_secret
# Stripe
STRIPE_PUBLISHABLE_KEY=pk_test_stripe_publishable_key
STRIPE_SECRET_KEY=sk_test_stripe_secret_key

# Akismet
AKISMET_KEY=your_akismet_key
AKISMET_URL=http://localhost:3000/

# Code Climate
CODECLIMATE_REPO_TOKEN=unsecure
18 changes: 14 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -11,15 +11,17 @@
.idea
.sass-cache
.vagrant
.rspec-local
.yardoc
/.bundle
/config/application.yml
config/application.yml
config/database.yml
/db/*.sqlite3
/db/*.sqlite3-journal
/log/*.log
/tmp
InstalledFiles
Procfile.bashir
Procfile.dev
Procfile.test
TODO
_yardoc
@@ -47,7 +49,15 @@ tmp
vagrant/cache
vagrant/coderwall-box/output-virtualbox-iso/
vagrant/coderwall-box/packer_cache/
vagrant/coderwall-box/packer_virtualbox-iso_virtualbox.box
vagrant/coderwall-box/*.box
vagrant/dotfiles
vcr_cassettes
erd.pdf
vagrant.yml
git_stats
*.iml
dump
BACKUP
Guardfile
verification.log
npm-debug.log
dump.rdb
1 change: 0 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
--require spec_helper
--format Fuubar
--color
--profile
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.1.0
2.2.2
22 changes: 14 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
language: ruby
rvm:
- 2.1.0
bundler_args: "--without development production autotest"
- 2.2.2
cache: bundler
sudo: false
bundler_args: "--without development production"
addons:
postgresql: "9.3"
services:
- memcached
- mongodb
- redis-server
- elasticsearch
before_install:
- wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.5.deb
- sudo dpkg -i elasticsearch-0.20.5.deb
- sudo service elasticsearch start
- gem update --system
- travis_retry gem install bundler --pre
before_script:
- cp -f config/database.travis.yml config/database.yml
- cp -f .env.example .env
- bin/rake db:create db:schema:load RAILS_ENV=test
- bundle exec rake db:create:all
- bundle exec rake db:schema:load
- bundle exec rake db:migrate
- bundle exec rake db:test:prepare
env:
global:
secure: X7TELzrdZJg8lph9n392igWcUfzWpNUb0wrYvKRIOj1Uz+vT9xrAdv8txJgA/HWwby7gNR3IOcoa3CamxyGCstBnrzKu/xKxk9BYpp5BSfSTLeKrTZf7X45kWc2w70VpgrYUgCmfT1xQxuC7WIgUeqiF7zn7XWogpv8jy6JrFC0=
135 changes: 82 additions & 53 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,26 @@
## **Protip for Contributors**

When committing a Pull Request for non-application/test code please add [`[skip ci]`](http://docs.travis-ci.com/user/how-to-skip-a-build/) to your commit message.

# Contributing

Here are the steps for getting setup & started with contributing to CoderWall :
Here are the steps for getting setup & started with contributing to Coderwall :

1. Go to [https://assemblymade.com/coderwall](https://assemblymade.com/coderwall) and sign up.
2. Link your GitHub account to your Assembly account in your profile settings.
3. [Fork the code](https://github.com/assemblymade/coderwall).
4. Create a new WIP at [https://assemblymade.com/coderwall/wips](https://assemblymade.com/coderwall/wips).
5. Get vagrant running
6. Run the test suite
3. [Fork assemblymade/coderwall](https://github.com/assemblymade/coderwall).
4. Install Virtualbox and Vagrant
5. Prepare your vagrant.yml and .env files
6. Execute `run.sh` (or `run.bat` on Windows)
7. If you have any issues, jump into chat, introduce yourself and ask or leave a message if no one is around.
8. Find an [interesting bounty](https://assemblymade.com/coderwall/wips) on Assembly or suggest a new one.
9. Fork and then issue a PR when you are done referencing the Bounty. (Note: Only PRs from those with valid Assembly account will be merged).

You're on your way to having a stake in CoderWall.

## External Dependencies
9. Issue a PR with your work when it is ready for review. (Note: Only PRs from those with valid Assembly account will be merged).

### Stripe configuration
You're on your way to having a stake in Coderwall.

You'll need to set up a test account with Stripe for local development until this dependency is refactored out of development/test.
# How to set up the environment

## Github configuration
We have videos and text instructions on how to get up and running to develop on Coderwall.

You will need a Github application configured for local development until this dependency is refactored out of development/test.
## Check out our video tutorials on how to get started with developing on Coderwall

https://github.com/settings/applications/new

## How to run Coderwall locally.

We use Vagrant to isolate all of our dependencies without polluting your normal working environment.

You're free to not use Vagrant but by the time you're done setting up you'll probably already have given up and installed Vagrant.
[![Coderwall New Developer Guides](http://img.youtube.com/vi/OWqTkhbcXUM/0.jpg)](http://www.youtube.com/playlist?list=PLhlPwpqjsgvXK4n8FJBbj7KkvuOw8h3FO)

### How to work on Coderwall using Vagrant on VirtualBox

@@ -44,65 +30,74 @@ To save time and headaches we use Vagrant. Vagrant is a automation tool for Virt

Here's everything you need to get started working on Coderwall with Vagrant TODAY!

*At the time of writing this document we were using VirtualBox 4.3.10 and Vagrant 1.6.2.*
*At the time of writing this document we were using VirtualBox 4.3.20 and Vagrant 1.6.5.*

**WE ARE USING VIRTUALBOX 4.3.20 DUE TO COMPATABILITY ISSUES WITH VBOX GUEST ADDITIONS.**

#### Vagrant! I already know what to do.

__If you're an experienced Vagrant user then you can fetch the base box and register it yourself.__

There's only a VirtualBox basebox right now.

vagrant box add coderwall https://s3.amazonaws.com/coderwall-assets-0/vagrant/coderwall.box
vagrant box add coderwall_v3 https://s3.amazonaws.com/coderwall-assets-0/vagrant/coderwall_v3.box

#### Vagrant? VirtualBox? Let's take this one step at a time.

If you're running Windows, [here's a guide written by one of our members on how to get set up.](https://github.com/assemblymade/coderwall/docs/getting_started_on_windows.md)
If you're running Windows, [here's a guide written by one of our members on how to get set up.](https://github.com/assemblymade/coderwall/blob/master/docs/getting_started_on_windows.md)

1. **Install VirtualBox**

Grab the VirtualBox installer from **[here](https://www.virtualbox.org/wiki/Downloads)**.

_At the time of writing this documentation the current version is VirtualBox 4.3.10._
[![Download the Vbox installer and extensions from here](https://cloud.githubusercontent.com/assets/987305/5224101/af7ed37c-7689-11e4-949b-5116138f49f7.png)](https://www.virtualbox.org/wiki/Downloads)

You don't have to install the VirtualBox 4.3.10 Oracle VM VirtualBox Extension Pack but I recommend installing it for the extra drivers.
The _required_ version is **VirtualBox 4.3.20.**

I recommend installing VirtualBox 4.3.20 Oracle VM VirtualBox Extension Pack for the extra drivers.

2. **Install Vagrant**

[Vagrant](http://vagrantup.com) is the recommended way to run CoderWall on your own machine. You need to download and install.
Grab the Vagrant installer from **[here](http://www.vagrantup.com/downloads.html)**.
_At the time of writing this documentation the current version is Vagrant 1.6.2._
[Vagrant](http://vagrantup.com) is the recommended way to run Coderwall on your own machine. You need to download and install.
Grab the Vagrant installer from **[here](http://www.vagrantup.com/downloads.html)**.
_At the time of writing this documentation the current version is Vagrant 1.6.5._

Follow the installation instructions for your platform on the Vagrant download page.

After installing Vagrant we need to add a couple plugins.

If you're on a OS X/Linux system you can install the plugins by running:

vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-cachier

The vagrant-vbguest plugin will each help with keeping the VirtualBox Guest Additions up-to-date.

3. **Git assemblymade/coderwall**

mkdir -p ~/assemblymade
cd ~/assemblymade

depending on your choice of protocols : _(this will take a while to run so you may want to grab some coffee)_
* git clone https://github.com/assemblymade/coderwall.git coderwall
* git clone git@github.com:assemblymade/coderwall.git coderwall

[Fork the code](https://github.com/assemblymade/coderwall) if you haven't already done so.

mkdir -p ~/assemblymade
cd ~/assemblymade

Depending on your choice of protocols: _(this will take a while to run so you may want to grab some coffee)_
* git clone https://github.com/your_username/coderwall.git coderwall
* git clone git@github.com:your_username/coderwall.git coderwall

Add upstream:
* git remote add upstream https://github.com/assemblymade/coderwall.git
* git remote add upstream git@github.com:assemblymade/coderwall.git

I am going to assume that the project is cloned into your home directory in and into a directory structure like `~/assemblymade/coderwall`.

4. **Fire it up! Fire it up! Fire it up!**

Now that you've got VirtualBox and Vagrant installed with the source code cloned in `~/assemblymade/coderwall` we can start up the Vagrant instance.

cd ~/assemblymade/coderwall
vagrant up

You will likely be prompted for your `sudo` password to allow VirtualBox to mount the shared folder using NFS.
./run.sh # or run.bat if you're on Windows

Since this is probably the first time you're running this command it's going to take a VERY long time (bandwidth willing) to run. This is because Vagrant needs to fetch the Coderwall base box from the Internet and it's about 1GB. Fortunately that really only has to be done once (unless the base box get's updated but that's another story).
Since this is probably the first time you're running this command it's going to take a VERY long time (bandwidth willing) to run. This is because Vagrant needs to fetch the Coderwall base box from the Internet and it's about 1.4GB. Fortunately that really only has to be done once (unless the base box get's updated but that's another story).

Once Vagrant reports that you're booted up and ready to go then you'll be able to SSH into the local vm similiar to any other remote box.

@@ -117,16 +112,16 @@ If you're running Windows, [here's a guide written by one of our members on how
Now that you're SSH'ed into the Vagrant VM it's time to run the app.

# we're still SSH'ed into Vbox
cd ~/assemblymade
rvm current # should be ruby-2.1.0@coderwall
bundle check # should be a response that everything's good
bundle exec rails server
cd ~/web
rvm current # should be ruby-2.1.2@coderwall
bundle check # should be 'The Gemfile's dependencies are satisfied'
rails s

If all went well the Rails server should start up on PORT 3000.

Now go open your favorite web browser on you host machine and navigate to [http://localhost:3000](http://localhost:3000).

If all goes well (and if it doesn't then check if another app is running on port 3000 and if there's any logging output being displayed in the window you were running Vagrant in) then you're going to be looking at the CoderWall homepage.
If all goes well (and if it doesn't then check if another app is running on port 3000 and if there's any logging output being displayed in the window you were running Vagrant in) then you're going to be looking at the Coderwall homepage.

Congratulations! NOW GET TO WORK! Enough dilly-dallying with your DEV env.

@@ -158,17 +153,51 @@ If you're running Windows, [here's a guide written by one of our members on how

7. Gems Installation and Database Migration

Remember that you are using Vagrant, so if you run ```bundle install``` or ```rake db:migrate``` directly in your terminal it will not affect the virtual machine where CoderWall is running.
Remember that you are using Vagrant, so if you run ```bundle install``` or ```rake db:migrate``` directly in your terminal it will not affect the virtual machine where Coderwall is running.

In order to run these commands, in the virtual machine, all you have to do is to run ```vagrant provision```.

8. Environment Variables

If you need to change any environment variable you have to edit ```.env``` file properly and restart Rails server running:

vagrant ssh -c "sudo restart coderwall"
vagrant reload ; ./run.sh


9. **Thanks**

I hope you enjoy working with Vagrant as much as we do and feel free to ask questions if you get stuck or have a problem. You're probably not alone and even if you're the first to encounter a rough patch you won't be the last.
I hope you enjoy working with Vagrant as much as we do and feel free to ask questions if you get stuck or have a problem. You're probably not alone and even if you're the first to encounter a rough patch you won't be the last.

## External Dependencies

### Stripe configuration

You'll need to set up a test account with Stripe for local development until this dependency is refactored out of development/test.

See [docs/configuration.md](https://github.com/assemblymade/coderwall/blob/master/docs/configuration.md#stripe) for more.

## Github configuration

You will need a Github application configured for local development until this dependency is refactored out of development/test.

- Create a new GitHub application at [https://github.com/settings/applications/new](https://github.com/settings/applications/new).
- Copy the the ENV variables that you'll need from GitHub.

![The .env will need these values](https://www.evernote.com/shard/s13/sh/3f74a2f7-82d1-46a0-af9c-28f983ad22af/6adc72742c10ddd4ff3c1b711b8d0e27/deep/0/OAuth-Application-Settings.png)

## How to run Coderwall locally.

We use Vagrant to isolate all of our dependencies without polluting your normal working environment.

You're free to not use Vagrant but by the time you're done setting up you'll probably already have given up and installed Vagrant.

## **Protip for Contributors**

When committing a Pull Request for non-application/test code please add [`[skip ci]`](http://docs.travis-ci.com/user/how-to-skip-a-build/) to your commit message.

# Code Conventions and Style Guide

Please refer to the community Ruby & Rails Style Guides created by [bbatsov](https://github.com/bbatsov), author of [Rubocop](https://github.com/bbatsov/rubocop).

[Ruby Style Guide](https://github.com/bbatsov/ruby-style-guide/blob/master/README.md)
[Rails Style Guide](https://github.com/bbatsov/rails-style-guide/blob/master/README.md)
Loading