formprocessor 0.0.1 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/formprocessor.rb +1 -18
- metadata +18 -7
data/lib/formprocessor.rb
CHANGED
@@ -1,24 +1,7 @@
|
|
1
1
|
require 'net/smtp'
|
2
2
|
require_relative 'required'
|
3
3
|
require_relative 'mailer'
|
4
|
-
# Process web forms based on the
|
5
|
-
# = Example Usage
|
6
|
-
# #!/usr/bin/ruby
|
7
|
-
# require 'cgi'
|
8
|
-
# require 'formprocessor'
|
9
|
-
# cgi = CGI.new
|
10
|
-
# puts cgi.header
|
11
|
-
# puts FormProcessor::Main(cgi.params).result
|
12
|
-
# = Keywords
|
13
|
-
# * _required_
|
14
|
-
# A CSV string. Check for the existence of these form fields.
|
15
|
-
# * _mailto_
|
16
|
-
# If successful submission, mail results to this address. A valid SMTP server running on localhost is required.
|
17
|
-
# * _redirect_
|
18
|
-
# Redirect to this URL upon successful submission.
|
19
|
-
# = Return Values & Templating
|
20
|
-
# It is possible to template the results of the form submission by omitting the redirection key/value pair in the values Hash.
|
21
|
-
# If there are no errors, result will return nil. If there are errors, result will return a String containing those errors.
|
4
|
+
# Process web forms and email the results based on the _values_ Hash (typically cgi.params).
|
22
5
|
module FormProcessor
|
23
6
|
# The gem's logic handler.
|
24
7
|
class Main
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formprocessor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,13 +9,21 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-28 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'Author: Kenton Small
|
15
15
|
|
16
|
-
Purpose: Process web forms. See docs for usage.
|
17
16
|
|
18
|
-
|
17
|
+
Website: http://www.kentonsmall.com
|
18
|
+
|
19
|
+
|
20
|
+
This gem processes web forms and emails the results to a specified user.
|
21
|
+
|
22
|
+
|
23
|
+
See the USAGE file for an example.
|
24
|
+
|
25
|
+
|
26
|
+
Provided under the MIT license (in the LICENSE file).'
|
19
27
|
email: kentonthegreat@gmail.com
|
20
28
|
executables: []
|
21
29
|
extensions: []
|
@@ -25,8 +33,10 @@ files:
|
|
25
33
|
- lib/required.rb
|
26
34
|
- lib/mailer.rb
|
27
35
|
homepage: http://www.kentonsmall.com
|
28
|
-
licenses:
|
29
|
-
|
36
|
+
licenses:
|
37
|
+
- MIT
|
38
|
+
post_install_message: Thanks for installing! If you have any questions please feel
|
39
|
+
free to contact me. http://www.kentonsmall.com
|
30
40
|
rdoc_options: []
|
31
41
|
require_paths:
|
32
42
|
- lib
|
@@ -43,10 +53,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
43
53
|
- !ruby/object:Gem::Version
|
44
54
|
version: '0'
|
45
55
|
requirements:
|
46
|
-
- An SMTP server on localhost
|
56
|
+
- An SMTP server running on localhost
|
47
57
|
rubyforge_project:
|
48
58
|
rubygems_version: 1.8.11
|
49
59
|
signing_key:
|
50
60
|
specification_version: 3
|
51
61
|
summary: Process web forms and have the results emailed to you.
|
52
62
|
test_files: []
|
63
|
+
has_rdoc:
|