<commit_before>= TripwireNotifier

http://travis-ci.org/jeremyw/tripwire_notifier.png

Stop hurting your users!

Tripwire captures validation errors from your Ruby on Rails application to help you identify and fix user experience issues. The TripwireNotifier gem makes it easy to hook up your app to the Tripwire web service.

If you haven't already signed up for a Tripwire account, visit http://tripwireapp.com.


= Installation

=== Rails 3

* Add the following line to Gemfile:

    gem 'tripwire_notifier'

* Install the gem:

    bundle install

=== Rails 2.3

* Add the following line to config/environment.rb:

    config.gem 'tripwire_notifier'

* Install the gem:

    [sudo] rake gems:install GEM=tripwire_notifier

= Configuration

In your Rails app, create config/initializers/tripwire_notifier.rb and add the following line with the API key for your Tripwire project:

    TripwireNotifier.configure do |config|
      config.api_key = "<YOUR API KEY>"
    end

Validation errors will now be submitted to the Tripwire service on your create and update actions in production mode.

= Advanced Usage

=== Tracking custom actions

TripwireNotifier assumes your app is RESTful, so it only monitors the create and update actions by default. If you're creating or updating records in non-RESTful actions, you can use an after_filter to make sure any validation failures in those actions are caught as well:

    after_filter :log_validation_failures_to_tripwire, :only => [:create, :update, :my_custom_action]

=== Running in other environments

TripwireNotifier is only enabled in the production environment by default. If you want to enable it in additional environments, such as staging, you'll need to add the following line to your Tripwire initializer:

    TripwireNotifier.configure do |config|
      config.monitored_environments << 'staging'
    end

=== SSL

TripwireNotifier uses a secure connection over SSL by default, but you can easily disable it if you prefer:

    TripwireNotifier.configure do |config|
      config.secure = false
    end

=== Filtering params

TripwireNotifier records the parameters submitted in actions that cause validation errors. Because your app may handle sensitive data, like passwords, credit card numbers, and nuclear launch codes, TripwireNotifier respects the parameter filtering that you configure in Rails in config/application.rb (Rails 3) or ApplicationController (Rails 2.3). For example in Rails 3:

    config.filter_parameters += [:password, :secret, :cvv]

Per Rails convention, those params will show up as "[FILTERED]" in the data submitted to Tripwire.


== Contact information

* Twitter: @tripwireapp
* Email: <EMAIL>, <EMAIL>


== Note on Patches/Pull Requests
 
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
  future version unintentionally.
* Commit, do not mess with Rakefile, version, or history.
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2010 <NAME> and <NAME>. See LICENSE for details.

<commit_msg>add instructions for TRIPWIRE_API_KEY env var<commit_after>= TripwireNotifier

http://travis-ci.org/jeremyw/tripwire_notifier.png

Stop hurting your users!

Tripwire captures validation errors from your Ruby on Rails application to help you identify and fix user experience issues. The TripwireNotifier gem makes it easy to hook up your app to the Tripwire web service.

If you haven't already signed up for a Tripwire account, visit http://tripwireapp.com.


= Installation

=== Rails 3

* Add the following line to Gemfile:

    gem 'tripwire_notifier'

* Install the gem:

    bundle install

=== Rails 2.3

* Add the following line to config/environment.rb:

    config.gem 'tripwire_notifier'

* Install the gem:

    [sudo] rake gems:install GEM=tripwire_notifier

= Configuration

In your Rails app, create config/initializers/tripwire_notifier.rb and add the following line with the API key for your Tripwire project:

    TripwireNotifier.configure do |config|
      config.api_key = "<YOUR API KEY>"
    end

Or, if you prefer to keep API keys and the like out of your code, set the TRIPWIRE_API_KEY environment variable and TripwireNotifier will find it automatically.

Validation errors will now be submitted to the Tripwire service on your create and update actions in production mode.

= Advanced Usage

=== Tracking custom actions

TripwireNotifier assumes your app is RESTful, so it only monitors the create and update actions by default. If you're creating or updating records in non-RESTful actions, you can use an after_filter to make sure any validation failures in those actions are caught as well:

    after_filter :log_validation_failures_to_tripwire, :only => [:create, :update, :my_custom_action]

=== Running in other environments

TripwireNotifier is only enabled in the production environment by default. If you want to enable it in additional environments, such as staging, you'll need to add the following line to your Tripwire initializer:

    TripwireNotifier.configure do |config|
      config.monitored_environments << 'staging'
    end

=== SSL

TripwireNotifier uses a secure connection over SSL by default, but you can easily disable it if you prefer:

    TripwireNotifier.configure do |config|
      config.secure = false
    end

=== Filtering params

TripwireNotifier records the parameters submitted in actions that cause validation errors. Because your app may handle sensitive data, like passwords, credit card numbers, and nuclear launch codes, TripwireNotifier respects the parameter filtering that you configure in Rails in config/application.rb (Rails 3) or ApplicationController (Rails 2.3). For example in Rails 3:

    config.filter_parameters += [:password, :secret, :cvv]

Per Rails convention, those params will show up as "[FILTERED]" in the data submitted to Tripwire.


== Contact information

* Twitter: @tripwireapp
* Email: <EMAIL>, jeff<EMAIL>


== Note on Patches/Pull Requests
 
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
  future version unintentionally.
* Commit, do not mess with Rakefile, version, or history.
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2010 <NAME> and <NAME>. See LICENSE for details.


{'fraction_non_alphanumeric': 0.057715491259795054, 'fraction_numerical': 0.003315250150693189, 'mean_word_length': 4.284235668789809, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, 'https://': 0, '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': '3128245', 'n_tokens_mistral': 1873, 'n_tokens_neox': 1740, 'n_words': 875}