Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tmp/
.DS_Store
*.swp
.redcar
bin/
1 change: 0 additions & 1 deletion .rvmrc

This file was deleted.

24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Thanks for helping! #

## Questions ##

If you're asking a question about Hackety Hack itself, check out the [Hackety
Hack repository][hh].
Otherwise, go ahead and open an [issue][issues] and let us know!

## Bugs ##

If you notice a bug in Hackety-Hack.com, this is the place to let us know.
Please tell us:

- Which url the bug occurred at
- What steps we can take to reproduce this bug
- If the bug is visual, including a screenshot is really helpful.

## Pull Requests ##

We :heart: pull requests; We :heart::blue_heart::green_heart: Pull Requests with tests. In fact, we don't want to accept pull requests without relevant tests. If you're not sure if the feature you want is welcome and you want to check with us, feel free to create [an issue][issues] or if you're just totally driven to make it happen, spike it out and open a pull request, but we'll ask you to add tests before it's merged.


[hh]: https://github.com/hacketyhack/hacketyhack
[issues]: https://github.com/hacketyhack/hackety-hack.com/issues
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
source 'http://rubygems.org'

#ruby=1.9.3-p392
#ruby-gemset=hackety-hack.com

ruby '1.9.3'

gem 'rails', '3.1.11'
gem 'json'

Expand Down
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,24 @@ If you have any experience writing Rails apps, feel free to help out, we're open
+ **Test your code**, we really can't stress this enough, ideally you should be practicing [TDD][tdd] and writing tests before you even write your code. If you don't test your code, we have no way of knowing if it works properly so please do test.
+ **If it's a major feature, file an issue**, if you file an issue we can discuss certain aspects of the new feature with you and ensure it's a good fit for hackety-hack.com.

Additionally, if you're _not_ a developer and you have a feature you'd really like to see on the site, file an issue and we'll be sure to look into it on your behalf.
## Getting Started ##

Once you've cloned this repository, running `script/bootstrap` should tell you everything you need to know.

Dependencies for the curious:

- Ruby: 1.9.3 is preferred.
- MongoDB: 2.2.x or 2.4.x

As long as you have those things, the script will handle the rest as best it can, including installing the gem dependencies with Bundler.

If the tests aren't passing when you clone, open [an issue][issues] or drop into
[#hacketyhack on freenode][irc].

Additionally, if you're _not_ a developer and you have a feature you'd really like to see on the site, file [an issue][issues] and we'll be sure to look into it on your behalf.

[hh.com]: http://hackety-hack.com/
[hh]: https://github.com/hacketyhack/hacketyhack
[tdd]: http://en.wikipedia.org/wiki/Test-driven_development
[irc]: http://webchat.freenode.net/#hacketyhack
[issues]: https://github.com/hacketyhack/hackety-hack.com/issues
[tdd]: http://en.wikipedia.org/wiki/Test-driven_development
58 changes: 58 additions & 0 deletions script/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/dash

go_go_gadget_bootstrap() {
check_ruby
check_mongo
check_bundler
bail_unless_chill
good_luck_have_fun
}

check_mongo() {
which mongo > /dev/null 2>&1
if [ $? -ne 0 ]; then
NOMONGO="Hey, in order to remember stuff I need MongoDB"
fi
}

check_bundler() {
if [ -z "$NORUBY" ]; then
which bundle > /dev/null 2>&1
if [ $? -ne 0 ]; then
gem install bundler || exit 2
fi
fi
}

good_luck_have_fun() {
bundle install --path .bundle --binstubs bin
bin/rake spec cucumber
}

check_ruby() {
which ruby > /dev/null 2>&1
if [ $? -ne 0 ]; then
NORUBY="Whoa there, looks like you're missing Ruby!"
else
ruby -v | grep '^ruby 1.9.3' > /dev/null 2>&1
if [ $? -ne 0 ]; then
NORUBY="Hrmm, your Ruby version isn't Ruby 1.9.3, that's really what I prefer."
fi
fi
}

bail_unless_chill() {
if [ "$NORUBY" -a "$NOMONGO" ]; then
echo "$NORUBY"
echo "$NOMONGO"
exit 1
elif [ "$NORUBY" ]; then
echo "$NORUBY"
exit 1
elif [ "$NOMONGO" ]; then
echo "$NOMONGO"
exit 1
fi
}

go_go_gadget_bootstrap