contact_us 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/README.md +3 -2
  2. data/app/controllers/contact_us/contacts_controller.rb +7 -6
  3. data/app/models/contact_us/contact.rb +8 -5
  4. data/lib/contact_us/version.rb +1 -1
  5. data/spec/contact_us_spec.rb +24 -0
  6. data/spec/controllers/contact_us/contact_controller_spec.rb +33 -0
  7. data/spec/dummy/Gemfile +5 -0
  8. data/spec/dummy/Gemfile.lock +86 -0
  9. data/spec/dummy/Rakefile +7 -0
  10. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  11. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  12. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  13. data/spec/dummy/config/application.rb +43 -0
  14. data/spec/dummy/config/boot.rb +6 -0
  15. data/spec/dummy/config/database.yml +22 -0
  16. data/spec/dummy/config/environment.rb +5 -0
  17. data/spec/dummy/config/environments/development.rb +26 -0
  18. data/spec/dummy/config/environments/production.rb +49 -0
  19. data/spec/dummy/config/environments/test.rb +35 -0
  20. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  21. data/spec/dummy/config/initializers/inflections.rb +10 -0
  22. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  23. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  24. data/spec/dummy/config/initializers/session_store.rb +8 -0
  25. data/spec/dummy/config/locales/en.yml +5 -0
  26. data/spec/dummy/config/routes.rb +58 -0
  27. data/spec/dummy/config.ru +4 -0
  28. data/spec/dummy/db/development.sqlite3 +0 -0
  29. data/spec/dummy/db/test.sqlite3 +0 -0
  30. data/spec/dummy/log/development.log +9 -0
  31. data/spec/dummy/log/production.log +0 -0
  32. data/spec/dummy/log/server.log +0 -0
  33. data/spec/dummy/log/test.log +4984 -0
  34. data/spec/dummy/public/404.html +26 -0
  35. data/spec/dummy/public/422.html +26 -0
  36. data/spec/dummy/public/500.html +26 -0
  37. data/spec/dummy/public/favicon.ico +0 -0
  38. data/spec/dummy/public/javascripts/application.js +2 -0
  39. data/spec/dummy/public/javascripts/controls.js +965 -0
  40. data/spec/dummy/public/javascripts/dragdrop.js +974 -0
  41. data/spec/dummy/public/javascripts/effects.js +1123 -0
  42. data/spec/dummy/public/javascripts/prototype.js +6001 -0
  43. data/spec/dummy/public/javascripts/rails.js +191 -0
  44. data/spec/dummy/script/rails +6 -0
  45. data/spec/integration/navigation_spec.rb +74 -0
  46. data/spec/mailers/contact_us/contact_mailer_spec.rb +50 -0
  47. data/spec/models/contact_us/contact_spec.rb +63 -0
  48. data/spec/spec_helper.rb +44 -0
  49. metadata +140 -11
  50. data/.gitignore +0 -4
  51. data/contact_us.gemspec +0 -24
@@ -0,0 +1,191 @@
1
+ (function() {
2
+ // Technique from Juriy Zaytsev
3
+ // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
4
+ function isEventSupported(eventName) {
5
+ var el = document.createElement('div');
6
+ eventName = 'on' + eventName;
7
+ var isSupported = (eventName in el);
8
+ if (!isSupported) {
9
+ el.setAttribute(eventName, 'return;');
10
+ isSupported = typeof el[eventName] == 'function';
11
+ }
12
+ el = null;
13
+ return isSupported;
14
+ }
15
+
16
+ function isForm(element) {
17
+ return Object.isElement(element) && element.nodeName.toUpperCase() == 'FORM'
18
+ }
19
+
20
+ function isInput(element) {
21
+ if (Object.isElement(element)) {
22
+ var name = element.nodeName.toUpperCase()
23
+ return name == 'INPUT' || name == 'SELECT' || name == 'TEXTAREA'
24
+ }
25
+ else return false
26
+ }
27
+
28
+ var submitBubbles = isEventSupported('submit'),
29
+ changeBubbles = isEventSupported('change')
30
+
31
+ if (!submitBubbles || !changeBubbles) {
32
+ // augment the Event.Handler class to observe custom events when needed
33
+ Event.Handler.prototype.initialize = Event.Handler.prototype.initialize.wrap(
34
+ function(init, element, eventName, selector, callback) {
35
+ init(element, eventName, selector, callback)
36
+ // is the handler being attached to an element that doesn't support this event?
37
+ if ( (!submitBubbles && this.eventName == 'submit' && !isForm(this.element)) ||
38
+ (!changeBubbles && this.eventName == 'change' && !isInput(this.element)) ) {
39
+ // "submit" => "emulated:submit"
40
+ this.eventName = 'emulated:' + this.eventName
41
+ }
42
+ }
43
+ )
44
+ }
45
+
46
+ if (!submitBubbles) {
47
+ // discover forms on the page by observing focus events which always bubble
48
+ document.on('focusin', 'form', function(focusEvent, form) {
49
+ // special handler for the real "submit" event (one-time operation)
50
+ if (!form.retrieve('emulated:submit')) {
51
+ form.on('submit', function(submitEvent) {
52
+ var emulated = form.fire('emulated:submit', submitEvent, true)
53
+ // if custom event received preventDefault, cancel the real one too
54
+ if (emulated.returnValue === false) submitEvent.preventDefault()
55
+ })
56
+ form.store('emulated:submit', true)
57
+ }
58
+ })
59
+ }
60
+
61
+ if (!changeBubbles) {
62
+ // discover form inputs on the page
63
+ document.on('focusin', 'input, select, texarea', function(focusEvent, input) {
64
+ // special handler for real "change" events
65
+ if (!input.retrieve('emulated:change')) {
66
+ input.on('change', function(changeEvent) {
67
+ input.fire('emulated:change', changeEvent, true)
68
+ })
69
+ input.store('emulated:change', true)
70
+ }
71
+ })
72
+ }
73
+
74
+ function handleRemote(element) {
75
+ var method, url, params;
76
+
77
+ var event = element.fire("ajax:before");
78
+ if (event.stopped) return false;
79
+
80
+ if (element.tagName.toLowerCase() === 'form') {
81
+ method = element.readAttribute('method') || 'post';
82
+ url = element.readAttribute('action');
83
+ params = element.serialize();
84
+ } else {
85
+ method = element.readAttribute('data-method') || 'get';
86
+ url = element.readAttribute('href');
87
+ params = {};
88
+ }
89
+
90
+ new Ajax.Request(url, {
91
+ method: method,
92
+ parameters: params,
93
+ evalScripts: true,
94
+
95
+ onComplete: function(request) { element.fire("ajax:complete", request); },
96
+ onSuccess: function(request) { element.fire("ajax:success", request); },
97
+ onFailure: function(request) { element.fire("ajax:failure", request); }
98
+ });
99
+
100
+ element.fire("ajax:after");
101
+ }
102
+
103
+ function handleMethod(element) {
104
+ var method = element.readAttribute('data-method'),
105
+ url = element.readAttribute('href'),
106
+ csrf_param = $$('meta[name=csrf-param]')[0],
107
+ csrf_token = $$('meta[name=csrf-token]')[0];
108
+
109
+ var form = new Element('form', { method: "POST", action: url, style: "display: none;" });
110
+ element.parentNode.insert(form);
111
+
112
+ if (method !== 'post') {
113
+ var field = new Element('input', { type: 'hidden', name: '_method', value: method });
114
+ form.insert(field);
115
+ }
116
+
117
+ if (csrf_param) {
118
+ var param = csrf_param.readAttribute('content'),
119
+ token = csrf_token.readAttribute('content'),
120
+ field = new Element('input', { type: 'hidden', name: param, value: token });
121
+ form.insert(field);
122
+ }
123
+
124
+ form.submit();
125
+ }
126
+
127
+
128
+ document.on("click", "*[data-confirm]", function(event, element) {
129
+ var message = element.readAttribute('data-confirm');
130
+ if (!confirm(message)) event.stop();
131
+ });
132
+
133
+ document.on("click", "a[data-remote]", function(event, element) {
134
+ if (event.stopped) return;
135
+ handleRemote(element);
136
+ event.stop();
137
+ });
138
+
139
+ document.on("click", "a[data-method]", function(event, element) {
140
+ if (event.stopped) return;
141
+ handleMethod(element);
142
+ event.stop();
143
+ });
144
+
145
+ document.on("submit", function(event) {
146
+ var element = event.findElement(),
147
+ message = element.readAttribute('data-confirm');
148
+ if (message && !confirm(message)) {
149
+ event.stop();
150
+ return false;
151
+ }
152
+
153
+ var inputs = element.select("input[type=submit][data-disable-with]");
154
+ inputs.each(function(input) {
155
+ input.disabled = true;
156
+ input.writeAttribute('data-original-value', input.value);
157
+ input.value = input.readAttribute('data-disable-with');
158
+ });
159
+
160
+ var element = event.findElement("form[data-remote]");
161
+ if (element) {
162
+ handleRemote(element);
163
+ event.stop();
164
+ }
165
+ });
166
+
167
+ document.on("ajax:after", "form", function(event, element) {
168
+ var inputs = element.select("input[type=submit][disabled=true][data-disable-with]");
169
+ inputs.each(function(input) {
170
+ input.value = input.readAttribute('data-original-value');
171
+ input.removeAttribute('data-original-value');
172
+ input.disabled = false;
173
+ });
174
+ });
175
+
176
+ Ajax.Responders.register({
177
+ onCreate: function(request) {
178
+ var csrf_meta_tag = $$('meta[name=csrf-token]')[0];
179
+
180
+ if (csrf_meta_tag) {
181
+ var header = 'X-CSRF-Token',
182
+ token = csrf_meta_tag.readAttribute('content');
183
+
184
+ if (!request.options.requestHeaders) {
185
+ request.options.requestHeaders = {};
186
+ }
187
+ request.options.requestHeaders[header] = token;
188
+ }
189
+ }
190
+ });
191
+ })();
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,74 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Navigation" do
4
+ include Capybara
5
+
6
+ it "should be a valid app" do
7
+ ::Rails.application.should be_a(Dummy::Application)
8
+ end
9
+
10
+ describe "Sending a contact email" do
11
+ context "I'm on the contact page" do
12
+ before { visit new_contact_url }
13
+
14
+ it "I should see an input for email" do
15
+ page.should have_selector "input#contact_us_contact_email"
16
+ end
17
+
18
+ it "I should see a textarea for message" do
19
+ page.should have_selector "textarea#contact_us_contact_message"
20
+ end
21
+
22
+ it "I should see a submit button" do
23
+ page.should have_selector "input#contact_us_contact_submit"
24
+ end
25
+
26
+ context "Submitting a form" do
27
+ after { ActionMailer::Base.deliveries = [] }
28
+
29
+ context "Submitting a valid form" do
30
+ before do
31
+ fill_in 'Email', :with => 'test@example.com'
32
+ fill_in 'Message', :with => 'howdy'
33
+ click_button 'Submit'
34
+ end
35
+
36
+ it "I should be redirected to the homepage" do
37
+ current_path.should == "/"
38
+ end
39
+
40
+ it "An email should have been sent" do
41
+ ActionMailer::Base.deliveries.size.should == 1
42
+ end
43
+
44
+ it "The email should have the correct attributes" do
45
+ mail = ActionMailer::Base.deliveries.last
46
+ mail.to.should == [ContactUs.mailer_to]
47
+ mail.from.should == ['test@example.com']
48
+ mail.body.should match 'howdy'
49
+ end
50
+ end
51
+
52
+ context "Submitting an invalid form" do
53
+ context "Email and message are invalid" do
54
+ before do
55
+ fill_in 'Email', :with => 'a'
56
+ fill_in 'Message', :with => ''
57
+ click_button 'Submit'
58
+ end
59
+
60
+ it "I should see two error messages" do
61
+ page.should have_content 'is invalid'
62
+ page.should have_content "can't be blank"
63
+ end
64
+
65
+ it "An email should not have been sent" do
66
+ ActionMailer::Base.deliveries.size.should == 0
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+
74
+ end
@@ -0,0 +1,50 @@
1
+ require 'spec_helper'
2
+
3
+ describe ContactUs::ContactMailer do
4
+
5
+ describe "#contact_email" do
6
+
7
+ before(:each) do
8
+ ContactUs.mailer_to = "contact@please-change-me.com"
9
+ @contact = ContactUs::Contact.new(:email => 'test@email.com', :message => 'Thanks!')
10
+ end
11
+
12
+ it "should render successfully" do
13
+ lambda { ContactUs::ContactMailer.contact_email(@contact) }.should_not raise_error
14
+ end
15
+
16
+ describe "rendered without error" do
17
+
18
+ before(:each) do
19
+ @mailer = ContactUs::ContactMailer.contact_email(@contact)
20
+ end
21
+
22
+ it "should have the initializers to address" do
23
+ @mailer.to.should eql([ContactUs.mailer_to])
24
+ end
25
+
26
+ it "should have users email in the from field" do
27
+ @mailer.from.should eql([@contact.email])
28
+ end
29
+
30
+ it "should have the message in the body" do
31
+ @mailer.body.should match("<p>Thanks!<p>")
32
+ end
33
+
34
+ it "should deliver successfully" do
35
+ lambda { ContactUs::ContactMailer.contact_email(@contact).deliver }.should_not raise_error
36
+ end
37
+
38
+ describe "and delivered" do
39
+
40
+ it "should be added to the delivery queue" do
41
+ lambda { ContactUs::ContactMailer.contact_email(@contact).deliver }.should change(ActionMailer::Base.deliveries,:size).by(1)
42
+ end
43
+
44
+ end
45
+
46
+ end
47
+
48
+ end
49
+
50
+ end
@@ -0,0 +1,63 @@
1
+ require 'spec_helper'
2
+
3
+ describe ContactUs::Contact do
4
+
5
+ describe "Validations" do
6
+
7
+ it 'should validate email presence' do
8
+ contact = ContactUs::Contact.new(:email => "", :message => "Test")
9
+ contact.valid?.should eql(false)
10
+ contact = ContactUs::Contact.new(:email => "Valid@Email.com", :message => "Test")
11
+ contact.valid?.should eql(true)
12
+ end
13
+
14
+ it 'should validate email format' do
15
+ contact = ContactUs::Contact.new(:email => "Invalid", :message => "Test")
16
+ contact.valid?.should eql(false)
17
+ contact = ContactUs::Contact.new(:email => "Valid@Email.com", :message => "Test")
18
+ contact.valid?.should eql(true)
19
+ end
20
+
21
+ it 'should validate message presence' do
22
+ contact = ContactUs::Contact.new(:email => "Valid@Email.com", :message => "")
23
+ contact.valid?.should eql(false)
24
+ contact = ContactUs::Contact.new(:email => "Valid@Email.com", :message => "Test")
25
+ contact.valid?.should eql(true)
26
+ end
27
+
28
+ end
29
+
30
+ describe 'Methods' do
31
+
32
+ describe '#read_attribute_for_validation' do
33
+ it 'should return attributes set during initialization' do
34
+ contact = ContactUs::Contact.new(:email => "Valid@Email.com", :message => "Test")
35
+ contact.read_attribute_for_validation(:email).should eql("Valid@Email.com")
36
+ contact.read_attribute_for_validation(:message).should eql("Test")
37
+ end
38
+ end
39
+
40
+ describe '#save' do
41
+
42
+ it 'should return false if records invalid' do
43
+ contact = ContactUs::Contact.new(:email => "Valid@Email.com", :message => "")
44
+ contact.save.should eql(false)
45
+ end
46
+
47
+ it 'should send email and return true if records valid' do
48
+ mail = Mail.new(:from=>"Valid@Email.com", :to => "test@test.com")
49
+ mail.stub(:deliver).and_return(true)
50
+ contact = ContactUs::Contact.new(:email => "Valid@Email.com", :message => "Test")
51
+ ContactUs::ContactMailer.should_receive(:contact_email).with(contact).and_return(mail)
52
+ contact.save.should eql(true)
53
+ end
54
+
55
+ end
56
+
57
+ describe '#to_key' do
58
+ it { subject.should respond_to(:to_key) }
59
+ end
60
+
61
+ end
62
+
63
+ end
@@ -0,0 +1,44 @@
1
+ # Configure Rails Envinronment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require 'simplecov'
5
+ SimpleCov.start do
6
+ add_filter '/config/'
7
+ add_group 'Controllers', 'app/controllers'
8
+ add_group 'Mailers', 'app/mailers'
9
+ add_group 'Models', 'app/models'
10
+ add_group 'Helpers', 'app/helpers'
11
+ add_group 'Libraries', 'lib'
12
+ add_group 'Specs', 'spec'
13
+ end
14
+
15
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
16
+ require "rails/test_help"
17
+ require "rspec/rails"
18
+
19
+ ActionMailer::Base.delivery_method = :test
20
+ ActionMailer::Base.perform_deliveries = true
21
+ ActionMailer::Base.default_url_options[:host] = "test.com"
22
+
23
+ Rails.backtrace_cleaner.remove_silencers!
24
+
25
+ # Configure capybara for integration testing
26
+ require "capybara/rails"
27
+ Capybara.default_driver = :rack_test
28
+ Capybara.default_selector = :css
29
+
30
+ # Run any available migration
31
+ ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
32
+
33
+ # Load support files
34
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
35
+
36
+ RSpec.configure do |config|
37
+ # Remove this line if you don't want RSpec's should and should_not
38
+ # methods or matchers
39
+ require 'rspec/expectations'
40
+ config.include RSpec::Matchers
41
+
42
+ # == Mock Framework
43
+ config.mock_with :rspec
44
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: contact_us
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.7
5
+ version: 0.0.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jeff Dutil
@@ -10,31 +10,75 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-09 00:00:00 -04:00
13
+ date: 2011-07-17 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: formtastic
17
+ name: capybara
18
18
  prerelease: false
19
19
  requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: 0.4.0
25
+ type: :development
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec-rails
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ~>
34
+ - !ruby/object:Gem::Version
35
+ version: "2.6"
36
+ type: :development
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: simplecov
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: 0.4.2
47
+ type: :development
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: sqlite3
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ~>
56
+ - !ruby/object:Gem::Version
57
+ version: 1.3.3
58
+ type: :development
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: formtastic
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
20
64
  none: false
21
65
  requirements:
22
66
  - - ">="
23
67
  - !ruby/object:Gem::Version
24
68
  version: 1.2.0
25
69
  type: :runtime
26
- version_requirements: *id001
70
+ version_requirements: *id005
27
71
  - !ruby/object:Gem::Dependency
28
72
  name: rails
29
73
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
74
+ requirement: &id006 !ruby/object:Gem::Requirement
31
75
  none: false
32
76
  requirements:
33
77
  - - ">="
34
78
  - !ruby/object:Gem::Version
35
79
  version: 3.0.0
36
80
  type: :runtime
37
- version_requirements: *id002
81
+ version_requirements: *id006
38
82
  description: A Rails 3 Engine providing a basic contact form. I used Formtastic to keep things simple, and to hook into your apps custom Formtastic stylesheets.
39
83
  email:
40
84
  - JDutil@BurlingtonWebApps.com
@@ -45,7 +89,6 @@ extensions: []
45
89
  extra_rdoc_files: []
46
90
 
47
91
  files:
48
- - .gitignore
49
92
  - Gemfile
50
93
  - MIT-LICENSE
51
94
  - README.md
@@ -59,12 +102,55 @@ files:
59
102
  - app/views/contact_us/contacts/new.html.erb
60
103
  - config/locales/contact_us.en.yml
61
104
  - config/routes.rb
62
- - contact_us.gemspec
63
- - lib/contact_us.rb
64
105
  - lib/contact_us/engine.rb
65
106
  - lib/contact_us/version.rb
107
+ - lib/contact_us.rb
66
108
  - lib/tasks/install.rake
67
109
  - lib/templates/contact_us.rb
110
+ - spec/contact_us_spec.rb
111
+ - spec/controllers/contact_us/contact_controller_spec.rb
112
+ - spec/dummy/app/controllers/application_controller.rb
113
+ - spec/dummy/app/helpers/application_helper.rb
114
+ - spec/dummy/app/views/layouts/application.html.erb
115
+ - spec/dummy/config/application.rb
116
+ - spec/dummy/config/boot.rb
117
+ - spec/dummy/config/database.yml
118
+ - spec/dummy/config/environment.rb
119
+ - spec/dummy/config/environments/development.rb
120
+ - spec/dummy/config/environments/production.rb
121
+ - spec/dummy/config/environments/test.rb
122
+ - spec/dummy/config/initializers/backtrace_silencers.rb
123
+ - spec/dummy/config/initializers/inflections.rb
124
+ - spec/dummy/config/initializers/mime_types.rb
125
+ - spec/dummy/config/initializers/secret_token.rb
126
+ - spec/dummy/config/initializers/session_store.rb
127
+ - spec/dummy/config/locales/en.yml
128
+ - spec/dummy/config/routes.rb
129
+ - spec/dummy/config.ru
130
+ - spec/dummy/db/development.sqlite3
131
+ - spec/dummy/db/test.sqlite3
132
+ - spec/dummy/Gemfile
133
+ - spec/dummy/Gemfile.lock
134
+ - spec/dummy/log/development.log
135
+ - spec/dummy/log/production.log
136
+ - spec/dummy/log/server.log
137
+ - spec/dummy/log/test.log
138
+ - spec/dummy/public/404.html
139
+ - spec/dummy/public/422.html
140
+ - spec/dummy/public/500.html
141
+ - spec/dummy/public/favicon.ico
142
+ - spec/dummy/public/javascripts/application.js
143
+ - spec/dummy/public/javascripts/controls.js
144
+ - spec/dummy/public/javascripts/dragdrop.js
145
+ - spec/dummy/public/javascripts/effects.js
146
+ - spec/dummy/public/javascripts/prototype.js
147
+ - spec/dummy/public/javascripts/rails.js
148
+ - spec/dummy/Rakefile
149
+ - spec/dummy/script/rails
150
+ - spec/integration/navigation_spec.rb
151
+ - spec/mailers/contact_us/contact_mailer_spec.rb
152
+ - spec/models/contact_us/contact_spec.rb
153
+ - spec/spec_helper.rb
68
154
  has_rdoc: true
69
155
  homepage: https://github.com/jdutil/contact_us
70
156
  licenses: []
@@ -93,5 +179,48 @@ rubygems_version: 1.5.2
93
179
  signing_key:
94
180
  specification_version: 3
95
181
  summary: Gem providing simple Contact Us functionality with a Rails 3 Engine.
96
- test_files: []
97
-
182
+ test_files:
183
+ - spec/contact_us_spec.rb
184
+ - spec/controllers/contact_us/contact_controller_spec.rb
185
+ - spec/dummy/app/controllers/application_controller.rb
186
+ - spec/dummy/app/helpers/application_helper.rb
187
+ - spec/dummy/app/views/layouts/application.html.erb
188
+ - spec/dummy/config/application.rb
189
+ - spec/dummy/config/boot.rb
190
+ - spec/dummy/config/database.yml
191
+ - spec/dummy/config/environment.rb
192
+ - spec/dummy/config/environments/development.rb
193
+ - spec/dummy/config/environments/production.rb
194
+ - spec/dummy/config/environments/test.rb
195
+ - spec/dummy/config/initializers/backtrace_silencers.rb
196
+ - spec/dummy/config/initializers/inflections.rb
197
+ - spec/dummy/config/initializers/mime_types.rb
198
+ - spec/dummy/config/initializers/secret_token.rb
199
+ - spec/dummy/config/initializers/session_store.rb
200
+ - spec/dummy/config/locales/en.yml
201
+ - spec/dummy/config/routes.rb
202
+ - spec/dummy/config.ru
203
+ - spec/dummy/db/development.sqlite3
204
+ - spec/dummy/db/test.sqlite3
205
+ - spec/dummy/Gemfile
206
+ - spec/dummy/Gemfile.lock
207
+ - spec/dummy/log/development.log
208
+ - spec/dummy/log/production.log
209
+ - spec/dummy/log/server.log
210
+ - spec/dummy/log/test.log
211
+ - spec/dummy/public/404.html
212
+ - spec/dummy/public/422.html
213
+ - spec/dummy/public/500.html
214
+ - spec/dummy/public/favicon.ico
215
+ - spec/dummy/public/javascripts/application.js
216
+ - spec/dummy/public/javascripts/controls.js
217
+ - spec/dummy/public/javascripts/dragdrop.js
218
+ - spec/dummy/public/javascripts/effects.js
219
+ - spec/dummy/public/javascripts/prototype.js
220
+ - spec/dummy/public/javascripts/rails.js
221
+ - spec/dummy/Rakefile
222
+ - spec/dummy/script/rails
223
+ - spec/integration/navigation_spec.rb
224
+ - spec/mailers/contact_us/contact_mailer_spec.rb
225
+ - spec/models/contact_us/contact_spec.rb
226
+ - spec/spec_helper.rb
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- *.gem
2
- .bundle
3
- Gemfile.lock
4
- pkg/*
data/contact_us.gemspec DELETED
@@ -1,24 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "contact_us/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "contact_us"
7
- s.version = ContactUs::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["Jeff Dutil"]
10
- s.email = ["JDutil@BurlingtonWebApps.com"]
11
- s.homepage = "https://github.com/jdutil/contact_us"
12
- s.summary = %q{Gem providing simple Contact Us functionality with a Rails 3 Engine.}
13
- s.description = %q{A Rails 3 Engine providing a basic contact form. I used Formtastic to keep things simple, and to hook into your apps custom Formtastic stylesheets.}
14
-
15
- s.rubyforge_project = "contact_us"
16
-
17
- s.files = `git ls-files`.split("\n")
18
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
- s.require_paths = ["lib"]
21
-
22
- s.add_runtime_dependency("formtastic", ">= 1.2.0")
23
- s.add_runtime_dependency("rails", ">= 3.0.0")
24
- end