Skip to content

Commit

Permalink
Merge pull request #256 from connorshea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
AnthonySuper committed Oct 14, 2015
2 parents 251df97 + 2a8686d commit a7fd342
Show file tree
Hide file tree
Showing 84 changed files with 986 additions and 203 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ git_stats/
/coverage/

/spec/test_files/images/*

.fontcustom-manifest.json
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ end

group :development do
gem 'pry-rails'
gem 'rack-mini-profiler', require: false
gem 'binding_of_caller'
gem 'reek'
gem 'rails_best_practices'
Expand All @@ -156,6 +155,10 @@ group :development do
# Use Hanna Bootstrap theme for RDoc documentation
# https://github.com/ngs/hanna-bootstrap
gem 'hanna-bootstrap'

# FontCustom for generating the icon font.
# http://fontcustom.com/
gem 'fontcustom'
end

group :test do
Expand Down
29 changes: 22 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ GEM
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
bullet (4.14.7)
bullet (4.14.9)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.9.0)
celluloid (0.16.0)
timers (~> 4.0.0)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.7)
Expand Down Expand Up @@ -106,6 +108,11 @@ GEM
railties (>= 3.0.0)
faker (1.5.0)
i18n (~> 0.5)
ffi (1.9.10)
fontcustom (1.3.8)
json (~> 1.4)
listen (>= 1.0, < 3.0)
thor (~> 0.14)
friendly_id (5.1.0)
activerecord (>= 4.0.0)
globalid (0.3.6)
Expand All @@ -121,6 +128,7 @@ GEM
rake
sass
hashie (3.4.2)
hitimes (1.2.3)
i18n (0.7.0)
ice_nine (0.11.1)
jbuilder (2.3.2)
Expand All @@ -135,6 +143,10 @@ GEM
turbolinks
json (1.8.3)
kgio (2.10.0)
listen (2.10.1)
celluloid (~> 0.16.0)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
Expand Down Expand Up @@ -200,8 +212,6 @@ GEM
quiet_assets (1.1.0)
railties (>= 3.1, < 5.0)
rack (1.6.4)
rack-mini-profiler (0.9.7)
rack (>= 1.1.3)
rack-protection (1.5.3)
rack
rack-test (0.6.3)
Expand Down Expand Up @@ -247,7 +257,10 @@ GEM
rainbow (2.0.0)
raindrops (0.15.0)
rake (10.4.2)
react-rails (1.3.1)
rb-fsevent (0.9.6)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
react-rails (1.3.2)
babel-transpiler (>= 0.7.0)
coffee-script-source (~> 1.8)
connection_pool
Expand Down Expand Up @@ -281,7 +294,7 @@ GEM
rspec-support (~> 3.3.0)
rspec-support (3.3.0)
ruby-progressbar (1.7.5)
sass (3.4.18)
sass (3.4.19)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
Expand Down Expand Up @@ -315,14 +328,16 @@ GEM
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.10)
sqlite3 (1.3.11)
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1)
timers (4.0.4)
hitimes
train_track (0.3.0)
activesupport (>= 4.0.0)
turbolinks (2.5.3)
Expand Down Expand Up @@ -361,6 +376,7 @@ DEPENDENCIES
devise
factory_girl_rails
faker
fontcustom
friendly_id (~> 5.1.0)
hanna-bootstrap
jbuilder (~> 2.0)
Expand All @@ -377,7 +393,6 @@ DEPENDENCIES
pry-rails
pundit
quiet_assets
rack-mini-profiler
rails (= 4.2.4)
rails_12factor
rails_best_practices
Expand Down
79 changes: 65 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,68 @@ ImageHex [![Codeship Status for connorshea/ImageHex](https://codeship.com/projec

[View the Wiki for more information.](https://github.com/connorshea/ImageHex/wiki)

Some things to note:

1. You MUST install ImageMagick. Easily acomplished through the package manager
of most distros and Homebrew.
2. We use a loose form of TDD. Have tests to ensure that your code works, but,
if it makes sense to write code first and tests later, do that as well. Use
discretion. If you're working here you're smart.
3. Push all changes to a branch specifically for the task assigned to you.
Branch that off the "develop" branch. When it's ready to join the rest of
the codebase (when your task is done), merge back into develop.
When we're ready to push up to Heroku, Anthony or Connor will merge
develop back into master and push it up.
4. Set up the DB according to the config file.
5. Use `rake documentation` to generate the RDoc documentation.
**Notes:**

* You MUST install ImageMagick. Easily accomplished through the package manager
of most distros and Homebrew.
* We use a loose form of TDD. Have tests to ensure that your code works, but,
if it makes sense to write code first and tests later, do that as well. Use
discretion. If you're working here you're smart.
* Push all changes to a branch specifically for the task assigned to you.
The branch should be based off `develop`. When the feature is complete,
open a Pull Request to merge back into `develop`. When we're ready to
push up to Heroku, Anthony or Connor will merge `develop` back into `master`
and push it up.
* Set up the DB according to the config file.
* Use `rake documentation` to generate the RDoc documentation.


### Setting up your Development environment

This tutorial assumes you have some basic understanding of using the Terminal and Git/GitHub. You don't need to be able to hack the Pentagon, but you should know what `cd` and `ls` do, how to make a branch, and how to submit a pull request on GitHub.

If you don't, check out [Codecademy's Command Line course](https://www.codecademy.com/courses/learn-the-command-line) and GitHub's [Git tutorial](https://help.github.com/articles/set-up-git/) before getting started.

Before starting you'll want to set up Two Factor Authentication on your GitHub account, if you haven't already (you shouldn't have access to this repo if you haven't done that, so I have no idea how you're reading this). This is to protect our source code and other data that may be used to compromise user information.

#### OS X
1. Install the Xcode command-line tools with `xcode-select –install`. This'll be necessary to install Homebrew.
2. Install [Homebrew](http://brew.sh/) with the following command: `ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`.
3. Install [RVM](https://rvm.io/).
4. Use RVM to install Ruby 2.2.3 (`rvm install ruby-2.2.3`) and then switch to that version of Ruby with `rvm use ruby-2.2.3 --default`.
5. Install [Git](https://git-scm.com/) with `brew install git`, then either use Git from the terminal or [the GitHub Desktop app](https://desktop.github.com/) to pull down the ImageHex repository.
6. Install PostgreSQL 9.4 with `brew install postgresql`. We also recommend using [Postgres.app](http://postgresapp.com/) on OS X to get the Postgres server running after the initial setup.
7. Install [ImageMagick](http://www.imagemagick.org/script/index.php) with `brew install imagemagick`.
8. Install [Bundler](http://bundler.io/) with `gem install bundler`.
9. In the ImageHex directory (wherever you installed the Git repository), run `bundle install` to install all the relevant gems you'll need for developing ImageHex. This might take a bit of time, be patient!
10. Run `rake db:setup` to set up the Postgres development server.
11. If everything has gone right so far, you'll be able to start up a Rails server with `rails s`!
12. Get working!

You can update packages installed with Homebrew at any time with `brew update` and `brew upgrade`. You'll likely want to do this once a week, just in case there are security issues in anything you've installed. We recommend using Homebrew as much as possible to install development dependencies, as it makes uninstalling and updating things much easier!

#### Linux
Note: Replace `apt-get install` with your distro's equivalent package manager, this uses `apt-get` for simplicity's sake.

1. Install [RVM](https://rvm.io/).
2. Use RVM to install Ruby 2.2.3 (`rvm install ruby-2.2.3`) and then switch to that version of Ruby with `rvm use ruby-2.2.3 --default`.
3. Install [Git](https://git-scm.com/) if you need to, then use git from the terminal to pull down the ImageHex repository.
4. Install PostgreSQL 9.4 with `apt-get install postgresql`.
5. Install [ImageMagick](http://www.imagemagick.org/script/index.php) with `apt-get install imagemagick`.
6. Install [Bundler](http://bundler.io/) with `gem install bundler`.
7. In the ImageHex directory (wherever you installed the Git repository), run `bundle install` to install all the relevant gems you'll need for developing ImageHex. This might take a bit of time, be patient!
8. Run `rake db:setup` to set up the Postgres development server.
9. If everything has gone right so far, you'll be able to start up a Rails server with `rails s`!
10. Get working!


### How do I generate the icon font after adding a new icon?

Icon font auto-generation technique courtesy of Scott Nelson's post [here](http://thisbythem.com/blog/rails-custom-font-icons/).

1. Assuming you have Homebrew installed on OS X, run `brew install fontforge ttfautohint` from the terminal.
* If you want to install the prerequisites to FontCustom using other means, you can see the installation instructions in the [FontCustom README](https://github.com/FontCustom/fontcustom/#installation).
2. Add icons as `.svg` files to `app/assets/icons`.
3. From the terminal, in the base ImageHex directory, run `rake icons:compile`.
4. The new icon font should be generated and immediately useable, you can add the new icon to the site by using the auto-generated CSS classes. For example, if we take an SVG named `heart.svg`, the css class will be `icon-heart`.

Binary file added app/assets/fonts/imagehexicons.eot
Binary file not shown.
Loading

0 comments on commit a7fd342

Please sign in to comment.