Skip to content

Commit

Permalink
Release version 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Nov 9, 2009
1 parent 65451c8 commit d3156b8
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 36 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**/*/log/*
**/*/tmp/*
*~
coverage/*
*.sqlite3
rdoc/*
simple_form.gemspec
pkg
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* Version 0.4

* Added support to template

# Version 0.3

* Added support to symbols on :sender, :subject and :recipients
Expand Down
59 changes: 25 additions & 34 deletions README → README.rdoc
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
Simple Form
License: MIT
Version: 0.3.1

You can also read this README in pretty html at the GitHub project Wiki page:

http://wiki.github.com/josevalim/simple_form/

Description
-----------
== Simple Form

Simple Form is a ready to go contact form. Just the following lines are needed
to have a contact form (including the e-mail):
Expand Down Expand Up @@ -39,20 +30,18 @@ in the contact mail.

It's tested and compatible with Rails 2.2.x and Rails 2.3.x.

Installation
------------
== Installation

Install Simple Form is very easy. It is stored in GitHub, so just run the following:
Install Simple Form is very easy. It is stored in Gemcutter, so just run the following:

gem sources -a http://gems.github.com
sudo gem install josevalim-simple_form
gem sources -a http://gemcutter.org
sudo gem install simple_form

If you want it as plugin, just do:

script/plugin install git://github.com/josevalim/simple_form.git

Request
-------
== Request

SimpleForm makes easy to append user information to the contact mail. You just
have to do:
Expand All @@ -70,10 +59,9 @@ And the remote ip, user agent and session will be sent in the e-mail in a
request information session. You can give to append any method that the
request object responds to.

API Overview
------------
== API Overview

== attributes(*attributes)
==== attributes(*attributes)

Declare your form attributes. All attributes declared here will be appended
to the e-mail, except the ones :captcha is true.
Expand Down Expand Up @@ -121,7 +109,7 @@ Examples:
# save is an alias to deliver to allow it to work with InheritedResources
c.save #=> true

== subject(string_or_symbol_or_block)
==== subject(string_or_symbol_or_block)

Declares the subject of the contact email. It can be a string or a proc or a symbol.

Expand All @@ -132,7 +120,7 @@ to the class human name.
subject "My Contact Form"
subject { |c| "Contacted by #{c.name}" }

== sender(string_or_symbol_or_block)
==== sender(string_or_symbol_or_block)

Declares contact email sender. It can be a string or a proc or a symbol.

Expand All @@ -143,7 +131,7 @@ name as the symbol. As a proc, it receives a simple form instance. By default is

This requires that your SimpleForm object have an email attribute.

== recipients(string_or_array_or_symbol_or_block)
==== recipients(string_or_array_or_symbol_or_block)

Who will receive the e-mail. Can be a string or array or a symbol or a proc.

Expand All @@ -152,12 +140,16 @@ name as the symbol. As a proc, it receives a simple form instance.

Both the proc and the symbol must return a string or an array. By default is nil.

== headers(hash)
==== template(string_or_symbol_or_proc)

Allow you to set the template that is going to rendered. This allows you to have
several simple_form instances, using different templates.

==== headers(hash)

Additional headers to your e-mail.

I18n
----
== I18n

All models, attributes and messages in SimpleForm can be used with localized.
Below is an I18n example file:
Expand All @@ -178,16 +170,15 @@ Below is an I18n example file:
remote_ip: "IP Address"
user_agent: "Browser"

Contributors
------------
== Contributors

* "Andrew Timberlake":http://github.com/andrewtimberlake
* José Valim - http://github.com/josevalim
* Carlos Antonio - http://github.com/carlosantoniodasilva
* Andrew Timberlake - http://github.com/andrewtimberlake

Bugs and Feedback
-----------------
== Bugs and Feedback

If you discover any bugs, please send an e-mail to jose.valim@gmail.com
If you discover any bugs, please send an e-mail to contact@plataformatec.com.be
If you just want to give some positive feedback or drop a line, that's fine too!

Copyright (c) 2009 José Valim
http://josevalim.blogspot.com/
Copyright (c) 2009 Plataforma Tec http://blog.plataformatec.com.br/
23 changes: 21 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require File.join(File.dirname(__FILE__), "lib", "simple_form", "version")

desc 'Run tests for InheritedResources.'
desc 'Run tests for SimpleForm.'
Rake::TestTask.new(:test) do |t|
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end

desc 'Generate documentation for InheritedResources.'
desc 'Generate documentation for SimpleForm.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'SimpleForm'
Expand All @@ -17,3 +18,21 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_files.include('MIT-LICENSE')
rdoc.rdoc_files.include('lib/**/*.rb')
end

begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "simple_form"
s.version = SimpleForm::VERSION
s.summary = "Simple easy contact form for Rails with I18n, validations, attachments and request information."
s.email = "contact@plataformatec.com.br"
s.homepage = "http://github.com/josevalim/simple_form"
s.description = "Simple easy contact form for Rails with I18n, validations, attachments and request information."
s.authors = ['José Valim', 'Carlos Antônio']
s.files = FileList["[A-Z]*", "{lib}/**/*"]
end

Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install jeweler"
end
3 changes: 3 additions & 0 deletions lib/simple_form/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module SimpleForm
VERSION = "0.4.0".freeze
end

0 comments on commit d3156b8

Please sign in to comment.