email_form_generator 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,5 @@
1
+ == 1.0.2 / 2009-02-13
2
+ * minor changes to the config file that originally was included
1
3
  == 1.0.1 / 2008-05-21
2
4
  * renamed config.yml to email.yml
3
5
  * renamed config.rb to email_config.rb
@@ -47,6 +47,7 @@ Also generates a configuration file and an initializer to make configuring email
47
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
+ web_host: http://localhost:3000
50
51
  email:
51
52
  delivery_method: smtp
52
53
  server: smtp.yourdomain.com
@@ -57,12 +58,12 @@ When the generator runs, it creates a configuration file called email.yml. You
57
58
  password:
58
59
  contact_recipient: admin@yourdomain.com
59
60
  production:
61
+ web_host: http://localhost:3000
60
62
  email:
61
63
  delivery_method: sendmail
62
64
  contact_recipient: admin@yourdomain.com
63
65
  test:
64
- fms_host: localhost:3000
65
- disable_google_ads: false
66
+ web_host: http://localhost:3000
66
67
  email:
67
68
  delivery_method: test
68
69
  contact_recipient: admin@yourdomain.com
@@ -102,7 +103,7 @@ This concept was inspired by Rick Olson
102
103
 
103
104
  (The MIT License)
104
105
 
105
- Copyright (c) 2008 Brian Hogan with code from http://dev.rubyonrails.org/
106
+ Copyright (c) 2008-2009 Brian Hogan with code from http://dev.rubyonrails.org/
106
107
 
107
108
  Permission is hereby granted, free of charge, to any person obtaining
108
109
  a copy of this software and associated documentation files (the
@@ -21,7 +21,6 @@ class EmailFormGenerator < Rails::Generator::NamedBase
21
21
  ARGV[0] = ARGV[0].underscore + "_form"
22
22
  end
23
23
  super
24
- # @name = @name + "_form"
25
24
 
26
25
  @controller_name = @name.pluralize
27
26
 
@@ -69,6 +68,10 @@ class EmailFormGenerator < Rails::Generator::NamedBase
69
68
  'controller.rb', File.join('app/controllers', controller_class_path, "#{controller_file_name}_controller.rb")
70
69
  )
71
70
 
71
+
72
+ m.template(
73
+ 'tableless.rb', File.join('app/models', "tableless.rb"), :collision => :skip
74
+ )
72
75
  m.template('config.yml', File.join('config', 'email.yml'), :collision => :skip)
73
76
  m.template('config.rb', File.join('config/initializers', 'email_config.rb'), :collision => :skip)
74
77
 
@@ -80,10 +83,7 @@ class EmailFormGenerator < Rails::Generator::NamedBase
80
83
  'mailer.rb', File.join('app/models', "#{file_name}_mailer.rb")
81
84
  )
82
85
 
83
- m.template(
84
- 'tableless.rb', File.join('app/models', "tableless.rb"), :collision => :skip
85
- )
86
-
86
+
87
87
  m.template('functional_test.rb', File.join('test/functional', controller_class_path, "#{controller_file_name}_controller_test.rb"))
88
88
  m.template('mailer_test.rb', File.join('test/unit', "#{file_name}_mailer_test.rb"))
89
89
 
@@ -105,6 +105,11 @@ class EmailFormGenerator < Rails::Generator::NamedBase
105
105
  end
106
106
 
107
107
  protected
108
+
109
+ def ran_before?
110
+ options[:rspec] || (File.exist?('app/models/tableless.rb')
111
+ end
112
+
108
113
  # Override with your own usage banner.
109
114
  def banner
110
115
  "Usage: #{$0} email_form Contact [field:type, field:type]"
data/templates/config.rb CHANGED
@@ -21,5 +21,5 @@ else
21
21
  }
22
22
 
23
23
  end
24
-
24
+ WEB_HOST = c[RAILS_ENV]['email']['web_host']
25
25
  CONTACT_RECIPIENT = c[RAILS_ENV]['email']['contact_recipient']
data/templates/config.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  development:
2
+ web_host: http://localhost:3000
2
3
  email:
3
4
  delivery_method: smtp
4
5
  server: smtp.yourdomain.com
@@ -9,12 +10,12 @@ development:
9
10
  password:
10
11
  contact_recipient: admin@yourdomain.com
11
12
  production:
13
+ web_host: http://localhost:3000
12
14
  email:
13
15
  delivery_method: sendmail
14
16
  contact_recipient: admin@yourdomain.com
15
17
  test:
16
- fms_host: localhost:3000
17
- disable_google_ads: false
18
+ web_host: http://localhost:3000
18
19
  email:
19
20
  delivery_method: test
20
21
  contact_recipient: admin@yourdomain.com
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.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Hogan
@@ -9,10 +9,19 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-21 00:00:00 -05:00
12
+ date: 2009-05-20 00:00:00 -05:00
13
13
  default_executable:
14
- dependencies: []
15
-
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hoe
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.12.2
24
+ version:
16
25
  description: Generates a feedback form with model, controller, and views to make it dead simple for your users to send messages to you.
17
26
  email: info@napcs.com
18
27
  executables: []
@@ -20,10 +29,10 @@ executables: []
20
29
  extensions: []
21
30
 
22
31
  extra_rdoc_files:
23
- - README.txt
24
32
  - History.txt
33
+ - README.rdoc
25
34
  files:
26
- - README.txt
35
+ - README.rdoc
27
36
  - History.txt
28
37
  - email_form_generator.rb
29
38
  - lib/rails_commands.rb
@@ -45,7 +54,7 @@ homepage: This generator creates a working contact form with validations and del
45
54
  post_install_message:
46
55
  rdoc_options:
47
56
  - --main
48
- - README.txt
57
+ - README.rdoc
49
58
  require_paths:
50
59
  - lib
51
60
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -63,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
72
  requirements: []
64
73
 
65
74
  rubyforge_project: emailform
66
- rubygems_version: 1.0.1
75
+ rubygems_version: 1.3.1
67
76
  signing_key:
68
77
  specification_version: 2
69
78
  summary: Email form generation with model, controller, tests, and mailer.