GitXplorerGitXplorer
j

rails-caddy

public
11 stars
4 forks
0 issues

Commits

List of commits on branch master.
Unverified
a7a0f9a4dfa1e5830a798c86edc4299d36b1d3d7

Update the sanitize_email dependency to 0.1.1, which has been released to rubyforge.

jjtrupiano committed 16 years ago
Unverified
02a1bd5c14d4e4a31cc310fe6fe795eca8f718a5

Fix RailsCaddy.isExtended equality comparison.

jjtrupiano committed 16 years ago
Unverified
52036efa988bc1bd41981fdf0a291169e264e5f6

Release to RubyForge required update of Rakefile and gemspec. README updated with reference to the RDOC and a few other minor edits.

jjtrupiano committed 16 years ago
Unverified
68efdb63db2d4bd387662c23c49d14ceb2c21492

Regenerated gemspec for version 0.0.8

jjtrupiano committed 16 years ago
Unverified
71b438c6eb262842584da33c453879a257a27ef4

Version bump to 0.0.8

jjtrupiano committed 16 years ago
Unverified
d2e6085bbe73a17c91039ed218a58274cc85ac9e

Remember open/closed state of the caddy for a cookie.

jjtrupiano committed 16 years ago

README

The README file for this repository.

= rails-caddy

A developer's QA "caddy" that aids in QA'ing, debugging, and otherwise navigating your application during development and/or QA.

== Rails Compatibility

Tests cover rails 2.1.2, 2.2.2, and 2.3.2 specifically. Previous releases on each minor version have not been explicitly tested, but I suspect they should all function equally well.

== Installing

The gem is hosted on RubyForge.

sudo gem install rails-caddy

== Usage

RULE #1: DO NOT DEPLOY THIS TO PRODUCTION. I WILL HAVE NO EMPATHY WHATSOEVER IF YOU DO NOT HEED MY WARNING. THIS IS A VERY DANGEROUS GEM THAT WILL DEFINITELY SCREW YOU OVER IF YOU DEPLOY IT TO PRODUCTION.

This process is not currently scripted, but following these steps will get you off and running.

  • edit application.rb

    if Object.const_defined?(:RailsCaddy) helper RailsCaddyHelper around_filter :handle_sanitize_email around_filter :handle_timecop_offset, :except => [:timecop_update, :timecop_reset] end

  • edit config/environments/development.rb -- DO NOT MAKE THIS AVAILABLE TO PRODUCTION!!!

    config.gem "rails-caddy"

    config.after_initialize do require 'rails-caddy' require_dependency 'application_controller' # 'application' if pre rails 2.3 RailsCaddy.init!

    ActionMailer::Base.sanitized_recipients = "nobody@smartlogicsolutions.com"
    

    end

  • add just before you close your body tag in your layout (it's actually unimportant where you place it, as long as it's in the body):

    <%= rails_caddy if Object.const_defined?(:RailsCaddy) %>

  • add to the top of config/routes.rb

    RailsCaddy.define_routes!(map) if Object.const_defined?(:RailsCaddy)

== RDoc

== Dependencies

rails-caddy is dependent on the {sanitize_email gem}[http://github.com/jtrupiano/sanitize_email/tree/master]. Unfortunately, for the time being you'll need to build and install that locally. Why? Because the dependency is on +sanitize_email+ and NOT jtrupiano-sanitize_email, the latter of which can be installed remotely. Hopefully this will change soon.

== Building/Testing

In order to run the tests, you'll want to build the gem. Why? Because rake test:rails_compatibility tests all supported versions of rails (see Rails Compatibility, above). It does this by creating mini-Rails apps for each version and config-gem'ing rails-caddy (config.gem 'rails-caddy'). If you don't build the gem and try to run the tests, you'll get an error telling you to run rake gems:install.

The easiest way to build the gem is to install {technicalpickle's}[http://technicalpickles.com/] {jeweler gem}[http://github.com/technicalpickles/jeweler/tree/master]: sudo gem install jeweler.

After jeweler is installed, you can build and install with some handy rake tasks:

rake build
rake install

n.b. rake install uses +sudo+

(Problems? See Dependencies, above.)

Now you can run your tests:

rake test:all                  # Run all test suites.
rake test:rails_compatibility  # Test all supported versions of rails.

== Copyright

Copyright (c) 2009 John Trupiano. See LICENSE for details.