email_form_generator 1.0.0 → 1.0.1

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/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.0.1 / 2008-05-21
2
+ * renamed config.yml to email.yml
3
+ * renamed config.rb to email_config.rb
4
+ * updated docs
1
5
  == 1.0.0 / 2008-05-21
2
6
  * Birthday!
3
7
 
data/README.txt CHANGED
@@ -16,7 +16,7 @@ This generator creates a working contact form with validations and delivery, and
16
16
  The command generates the following output:
17
17
 
18
18
  Your form is ready for use in your application.
19
- Before you start the server, fill in the right details into config/config.yml.
19
+ Before you start the server, fill in the right details into config/email.yml.
20
20
  exists app/models/
21
21
  exists app/controllers/
22
22
  exists app/helpers/
@@ -29,8 +29,8 @@ The command generates the following output:
29
29
  create app/views/contact_forms/new.html.erb
30
30
  create app/views/contact_form_mailer/form.html.erb
31
31
  create app/controllers/contact_forms_controller.rb
32
- create config/config.yml
33
- create config/initializers/config.rb
32
+ create config/email.yml
33
+ create config/initializers/email_config.rb
34
34
  create app/models/contact_form.rb
35
35
  create app/models/contact_form_mailer.rb
36
36
  create app/models/tableless.rb
@@ -44,7 +44,7 @@ Also generates a configuration file and an initializer to make configuring email
44
44
 
45
45
 
46
46
  === Configuration
47
- When the generator runs, it creates a configuration file called config.yml. You need to modify this file so that it reflects your settings for your email server.
47
+ When the generator runs, it creates a configuration file called email.yml. You need to modify this file so that it reflects your settings for your email server.
48
48
 
49
49
  development:
50
50
  email:
@@ -67,7 +67,7 @@ When the generator runs, it creates a configuration file called config.yml. You
67
67
  delivery_method: test
68
68
  contact_recipient: admin@yourdomain.com
69
69
 
70
- This file is read by config/initializers/config.rb, where it configures ActionMailer's settings. It should work fine out of the box for most environments.
70
+ This file is read by config/initializers/email_config.rb, where it configures ActionMailer's settings. It should work fine out of the box for most environments.
71
71
 
72
72
  == Tableless Model
73
73
  The Tableless model inherits from ActiveRecord::Base and then removes the
@@ -77,7 +77,7 @@ database functionality from the model.
77
77
 
78
78
  class Foo < Tableless
79
79
  column :bar, :string
80
- validates_presense_of :bar
80
+ validates_presence_of :bar
81
81
  end
82
82
 
83
83
  @foo = Foo.new
@@ -91,7 +91,7 @@ This concept was inspired by Rick Olson
91
91
  == REQUIREMENTS:
92
92
 
93
93
  * The Mocha gem is required because I use it for testing. Change the tests if you want to use something else.
94
- * Rails with ActiveRecord
94
+ * Rails 2.x with ActiveRecord
95
95
 
96
96
  == INSTALL:
97
97
 
@@ -69,8 +69,8 @@ class EmailFormGenerator < Rails::Generator::NamedBase
69
69
  'controller.rb', File.join('app/controllers', controller_class_path, "#{controller_file_name}_controller.rb")
70
70
  )
71
71
 
72
- m.template('config.yml', File.join('config', 'config.yml'))
73
- m.template('config.rb', File.join('config/initializers', 'config.rb'))
72
+ m.template('config.yml', File.join('config', 'email.yml'), :collision => :skip)
73
+ m.template('config.rb', File.join('config/initializers', 'email_config.rb'), :collision => :skip)
74
74
 
75
75
  m.template(
76
76
  'model.rb', File.join('app/models', "#{file_name}.rb")
data/templates/config.rb CHANGED
@@ -1,4 +1,4 @@
1
- c = YAML::load(File.open("#{RAILS_ROOT}/config/config.yml"))
1
+ c = YAML::load(File.open("#{RAILS_ROOT}/config/email.yml"))
2
2
 
3
3
  if c[RAILS_ENV]['email']['delivery_method'] == "sendmail"
4
4
  ActionMailer::Base.delivery_method = :sendmail
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: email_form_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Hogan