<commit_before># ImageViewerRails

This project rocks and uses MIT-LICENSE.

A rails engine to serve imageviewer js files easily and ubiquitiously

## Installation

Since this mostly just serves up commonly used js files for internal use all you need to do is add the following lines to your `Gemfile`

```ruby
gem "image_viewer_rails", "~> 0.0.1"
```

In your `app/assets/javascripts/application.js` (manifest file) add the following:

```
//= require image_viewer_rails
```

In your `app/assets/stylesheets/application.css.scss` (manifest file) add the following:

```
//= require image_viewer_rails
```

Doing so will tell rails to laod the following files

- image_viewer.js
- [jquery.rotate.js](https://code.google.com/p/jquery-rotate/)
- [keymaster.js](https://github.com/madrobby/keymaster)
- keymaster_filter.js
- jquery-rails (if it isn't already loaded)

## Contributing

Thanks for your interest in contributing to image_viewer_rails.  ImageViewerRails is tested using jasmine and jasminerice.  Since it's a rails engine there are some interesting testing patterns that we must use to get everything working as we expect.  Our tests are located in `spec/dummy/spec/javascripts` directory.  They've been loosely separated by their function.  

### Testing 

[jasminerice](https://github.com/bradphelan/jasminerice) is also a rails engine that mounts to `/jasmine`.  To fire up the test suite run `rails s` inside the `spec/dummy` directory.

[guard-jasmine](https://github.com/netzpirat/guard-jasmine) allows us to leverage phantom.js (headless browser) and create a better environment.  

- Install Phantom Js
  - Best way on a mac is `brew install phantom`
- `cd spec/dummy`
- guard<commit_msg>Clarified contribution section.<commit_after># ImageViewerRails

This project rocks and uses MIT-LICENSE.

A rails engine to serve imageviewer js files easily and ubiquitiously

## Installation

Since this mostly just serves up commonly used js files for internal use all you need to do is add the following lines to your `Gemfile`

```ruby
gem "image_viewer_rails", "~> 0.0.1"
```

In your `app/assets/javascripts/application.js` (manifest file) add the following:

```
//= require image_viewer_rails
```

In your `app/assets/stylesheets/application.css.scss` (manifest file) add the following:

```
//= require image_viewer_rails
```

Doing so will tell rails to laod the following files

- image_viewer.js
- [jquery.rotate.js](https://code.google.com/p/jquery-rotate/)
- [keymaster.js](https://github.com/madrobby/keymaster)
- keymaster_filter.js
- jquery-rails (if it isn't already loaded)

## Contributing

Thanks for your interest in contributing to image_viewer_rails.  ImageViewerRails is tested using jasmine and jasminerice.  Since it's a rails engine there are some interesting testing patterns that we must use to get everything working as we expect.  We have a dummy app that lives inside the `spec` directory.  This enables us to run our tests in the context of an actual rails application.  To that end, our tests are located in `spec/dummy/spec/javascripts` directory.  They've been loosely separated by their function so jumping in shouldn't be too hard.

### Testing 

[jasminerice](https://github.com/bradphelan/jasminerice) is also a rails engine that mounts to our dummy app at `/jasmine`.  To fire up the test suite run `rails s` inside the `spec/dummy` directory and head over to `http://localhost:3000/jasmine`.

[guard-jasmine](https://github.com/netzpirat/guard-jasmine) allows us to leverage phantom.js (headless browser) and create a better environment.  

- Install Phantom Js
  - Best way on a mac is `brew install phantom`
- `cd spec/dummy`
- guard
{'fraction_non_alphanumeric': 0.09118046132971507, 'fraction_numerical': 0.0027137042062415195, 'mean_word_length': 4.404692082111437, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '846585', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1076, 'n_words': 434}