spud_inquiries 1.0.0.rc1.1 → 1.0.0.rc2
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.
- checksums.yaml +4 -4
- data/app/controllers/contacts_controller.rb +9 -2
- data/app/controllers/spud/admin/inquiry_forms_controller.rb +1 -1
- data/app/models/spud_inquiry_form_field.rb +1 -0
- data/app/views/spud/admin/inquiry_forms/_spud_inquiry_form_field_fields.html.erb +12 -0
- data/db/migrate/20140422015208_add_validation_to_inquiry_form_fields.rb +6 -0
- data/lib/spud_inquiries/version.rb +1 -1
- data/spec/controllers/contacts_controller_spec.rb +1 -1
- data/spec/controllers/spud/admin/inquiry_forms_controller_spec.rb +1 -1
- data/spec/controllers/spud/inquiries/sitemaps_controller_spec.rb +3 -2
- data/spec/dummy/db/schema.rb +17 -15
- data/spec/dummy/log/development.log +136 -62
- data/spec/dummy/log/test.log +648 -24171
- metadata +29 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a50ac666e7853d2cab6f959dd96f74a0e3770f2e
|
4
|
+
data.tar.gz: e71d5eac07fa2e0a5f81752956e4c48f735525a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07c20f45a28a8b070736f28b302fa5252629852210b09218fa0bee3fa3c2273646b731cb01a5845223e9bf866d2359e3dec0cc1a32a8cefac1a3757ddcc61add
|
7
|
+
data.tar.gz: f6be57e9c972ba19ee6f21b5771350572a286e12b60a82d21bee6844eb5529da38a240a84131dc554fc307b3d4a1b06ba052a0fed8f52f42c0c4cde84bfbf0d4
|
@@ -6,7 +6,7 @@ class ContactsController < ApplicationController
|
|
6
6
|
url_name = !params[:id].blank? ? params[:id] : Spud::Inquiries.default_contact_form
|
7
7
|
@inquiry_form = SpudInquiryForm.where(:url_name => url_name).includes(:spud_inquiry_form_fields).first
|
8
8
|
|
9
|
-
if @
|
9
|
+
if @inquiry_form.blank?
|
10
10
|
flash[:error] = "Contact Inquiry Form not found!"
|
11
11
|
redirect_to "/" and return
|
12
12
|
end
|
@@ -32,12 +32,19 @@ class ContactsController < ApplicationController
|
|
32
32
|
@spud_inquiry.recipients = @inquiry_form.recipients
|
33
33
|
@spud_inquiry.subject = @inquiry_form.subject
|
34
34
|
|
35
|
-
@inquiry_form.spud_inquiry_form_fields.order(:field_order).
|
35
|
+
@inquiry_form.spud_inquiry_form_fields.order(:field_order).each do |field|
|
36
36
|
val = params[:spud_inquiry][field.field_name]
|
37
37
|
if field.required && val.blank?
|
38
38
|
flash[:error] = "Not all required fields were entered"
|
39
39
|
@spud_inquiry.errors.add field.field_name,"is a required field"
|
40
40
|
end
|
41
|
+
|
42
|
+
if field.validation_rule
|
43
|
+
if Regexp.new(field.validation_rule).match(val) == nil
|
44
|
+
flash[:error] = "Not all fields were valid"
|
45
|
+
@spud_inquiry.errors.add field.field_name, field.validation_error_message
|
46
|
+
end
|
47
|
+
end
|
41
48
|
@spud_inquiry.spud_inquiry_fields.new(:name => field.name, :field_name => field.field_name,:value => val)
|
42
49
|
end
|
43
50
|
|
@@ -54,6 +54,6 @@ private
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def inquiry_form_params
|
57
|
-
params.require(:spud_inquiry_form).permit(:name,:url_name,:recipients,:content,:subject,{:spud_inquiry_form_fields_attributes => [:id,:name,:options,:default_value,:field_type,:spud_inquiry_form_id,:field_order,:required, :placeholder, :class_name
|
57
|
+
params.require(:spud_inquiry_form).permit(:name,:url_name,:recipients,:content,:subject,{:spud_inquiry_form_fields_attributes => [:id,:name,:options,:default_value,:field_type,:spud_inquiry_form_id,:field_order,:required, :placeholder, :class_name, :validation_rule, :validation_error_message, :_destroy]}, :created_at, :updated_at, :thank_you_content, :submit_title)
|
58
58
|
end
|
59
59
|
end
|
@@ -2,6 +2,7 @@ class SpudInquiryFormField < ActiveRecord::Base
|
|
2
2
|
belongs_to :spud_inquiry_form, :touch => true
|
3
3
|
validates :name,:presence => true
|
4
4
|
validates :field_type,:presence => true
|
5
|
+
|
5
6
|
# validates :spud_inquiry_form_id, :presence => true
|
6
7
|
# attr_accessible :name,:options,:default_value,:field_type,:spud_inquiry_form_id,:field_order,:required, :placeholder, :class_name
|
7
8
|
|
@@ -44,6 +44,18 @@
|
|
44
44
|
<%=f.text_field :field_order%>
|
45
45
|
</div>
|
46
46
|
</div>
|
47
|
+
<div class="control-group">
|
48
|
+
<%=f.label :validation_rule,:class => "control-label"%>
|
49
|
+
<div class="controls">
|
50
|
+
<%=f.text_field :validation_rule%>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
<div class="control-group">
|
54
|
+
<%=f.label :validation_error_message,:class => "control-label"%>
|
55
|
+
<div class="controls">
|
56
|
+
<%=f.text_field :validation_error_message%>
|
57
|
+
</div>
|
58
|
+
</div>
|
47
59
|
<div class="control-group">
|
48
60
|
<%=f.label :required,:class => "control-label"%>
|
49
61
|
<div class="controls">
|
@@ -14,7 +14,7 @@ describe ContactsController do
|
|
14
14
|
form = FactoryGirl.create(:spud_inquiry_form)
|
15
15
|
get :show, :id => form.url_name
|
16
16
|
assigns(:inquiry_form).should == form
|
17
|
-
assigns(:
|
17
|
+
assigns(:spud_inquiry).should_not be_blank
|
18
18
|
end
|
19
19
|
|
20
20
|
it "should redirect to root if inquiry not found" do
|
@@ -72,7 +72,7 @@ describe Spud::Admin::InquiryFormsController do
|
|
72
72
|
|
73
73
|
it "should redirect to the admin forms after a successful update" do
|
74
74
|
form = FactoryGirl.create(:spud_inquiry_form)
|
75
|
-
put :update,:id => form.id,:
|
75
|
+
put :update,:id => form.id,:spud_inquiry_form => form.attributes.merge!(:name => "MyForm2").reject{|k,v| k == 'site_id' || k == 'id'}
|
76
76
|
response.should redirect_to(spud_admin_inquiry_forms_url)
|
77
77
|
end
|
78
78
|
end
|
@@ -16,8 +16,9 @@ describe Spud::Inquiries::SitemapsController do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should only respond to an XML format" do
|
19
|
-
|
20
|
-
|
19
|
+
expect {
|
20
|
+
get :show
|
21
|
+
}.to raise_exception(ActionController::UnknownFormat)
|
21
22
|
end
|
22
23
|
end
|
23
24
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,21 +11,21 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20140422015208) do
|
15
15
|
|
16
16
|
create_table "spud_admin_permissions", force: true do |t|
|
17
17
|
t.integer "user_id"
|
18
18
|
t.string "name"
|
19
19
|
t.boolean "access"
|
20
|
-
t.datetime "created_at"
|
21
|
-
t.datetime "updated_at"
|
20
|
+
t.datetime "created_at"
|
21
|
+
t.datetime "updated_at"
|
22
22
|
t.string "scope"
|
23
23
|
end
|
24
24
|
|
25
25
|
create_table "spud_inquiries", force: true do |t|
|
26
26
|
t.string "email"
|
27
|
-
t.datetime "created_at"
|
28
|
-
t.datetime "updated_at"
|
27
|
+
t.datetime "created_at"
|
28
|
+
t.datetime "updated_at"
|
29
29
|
t.integer "spud_inquiry_form_id"
|
30
30
|
t.text "recipients"
|
31
31
|
t.string "subject"
|
@@ -39,8 +39,8 @@ ActiveRecord::Schema.define(version: 20131204163221) do
|
|
39
39
|
t.string "name"
|
40
40
|
t.text "value"
|
41
41
|
t.integer "spud_inquiry_id"
|
42
|
-
t.datetime "created_at"
|
43
|
-
t.datetime "updated_at"
|
42
|
+
t.datetime "created_at"
|
43
|
+
t.datetime "updated_at"
|
44
44
|
t.string "field_name"
|
45
45
|
end
|
46
46
|
|
@@ -52,13 +52,15 @@ ActiveRecord::Schema.define(version: 20131204163221) do
|
|
52
52
|
t.string "name"
|
53
53
|
t.text "options"
|
54
54
|
t.string "default_value"
|
55
|
-
t.datetime "created_at"
|
56
|
-
t.datetime "updated_at"
|
55
|
+
t.datetime "created_at"
|
56
|
+
t.datetime "updated_at"
|
57
57
|
t.integer "field_order"
|
58
58
|
t.boolean "required"
|
59
59
|
t.string "placeholder"
|
60
60
|
t.string "field_name"
|
61
61
|
t.string "class_name"
|
62
|
+
t.string "validation_rule"
|
63
|
+
t.string "validation_error_message"
|
62
64
|
end
|
63
65
|
|
64
66
|
add_index "spud_inquiry_form_fields", ["field_order"], name: "form_field_order", using: :btree
|
@@ -66,8 +68,8 @@ ActiveRecord::Schema.define(version: 20131204163221) do
|
|
66
68
|
create_table "spud_inquiry_forms", force: true do |t|
|
67
69
|
t.string "name"
|
68
70
|
t.text "content"
|
69
|
-
t.datetime "created_at"
|
70
|
-
t.datetime "updated_at"
|
71
|
+
t.datetime "created_at"
|
72
|
+
t.datetime "updated_at"
|
71
73
|
t.text "recipients"
|
72
74
|
t.string "subject"
|
73
75
|
t.string "url_name"
|
@@ -81,8 +83,8 @@ ActiveRecord::Schema.define(version: 20131204163221) do
|
|
81
83
|
t.integer "spud_user_id"
|
82
84
|
t.string "key"
|
83
85
|
t.string "value"
|
84
|
-
t.datetime "created_at"
|
85
|
-
t.datetime "updated_at"
|
86
|
+
t.datetime "created_at"
|
87
|
+
t.datetime "updated_at"
|
86
88
|
end
|
87
89
|
|
88
90
|
create_table "spud_users", force: true do |t|
|
@@ -103,8 +105,8 @@ ActiveRecord::Schema.define(version: 20131204163221) do
|
|
103
105
|
t.datetime "last_login_at"
|
104
106
|
t.string "current_login_ip"
|
105
107
|
t.string "last_login_ip"
|
106
|
-
t.datetime "created_at"
|
107
|
-
t.datetime "updated_at"
|
108
|
+
t.datetime "created_at"
|
109
|
+
t.datetime "updated_at"
|
108
110
|
t.string "time_zone"
|
109
111
|
end
|
110
112
|
|
@@ -1,88 +1,162 @@
|
|
1
|
-
|
2
|
-
[1m[
|
1
|
+
[1m[36m (9.6ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
2
|
+
[1m[35m (12.6ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
3
4
|
Migrating to CreateSpudInquiries (20120117133405)
|
5
|
+
[1m[35m (7.6ms)[0m CREATE TABLE `spud_inquiries` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `email` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
|
6
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
7
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120117133405')
|
8
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
4
9
|
Migrating to CreateSpudInquiryFields (20120117133412)
|
10
|
+
[1m[35m (7.8ms)[0m CREATE TABLE `spud_inquiry_fields` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `value` text, `spud_inquiry_id` int(11), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
|
11
|
+
[1m[36m (9.4ms)[0m [1mCREATE INDEX `inquiry_field_parent_id` ON `spud_inquiry_fields` (`spud_inquiry_id`) [0m
|
12
|
+
[1m[35m (0.1ms)[0m BEGIN
|
13
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120117133412')[0m
|
14
|
+
[1m[35m (0.2ms)[0m COMMIT
|
5
15
|
Migrating to CreateSpudInquiryForms (20120121194439)
|
16
|
+
[1m[36m (6.8ms)[0m [1mCREATE TABLE `spud_inquiry_forms` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `content` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
17
|
+
[1m[35m (0.1ms)[0m BEGIN
|
18
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120121194439')[0m
|
19
|
+
[1m[35m (0.2ms)[0m COMMIT
|
6
20
|
Migrating to CreateSpudInquiryFormFields (20120121194447)
|
21
|
+
[1m[36m (7.4ms)[0m [1mCREATE TABLE `spud_inquiry_form_fields` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_inquiry_form_id` int(11), `field_type` varchar(255), `name` varchar(255), `options` varchar(255), `default_value` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
22
|
+
[1m[35m (0.1ms)[0m BEGIN
|
23
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120121194447')[0m
|
24
|
+
[1m[35m (0.2ms)[0m COMMIT
|
7
25
|
Migrating to AddFieldOrderToSpudInquiryFormFields (20120122173829)
|
26
|
+
[1m[36m (10.6ms)[0m [1mALTER TABLE `spud_inquiry_form_fields` ADD `field_order` int(11)[0m
|
27
|
+
[1m[35m (12.1ms)[0m ALTER TABLE `spud_inquiry_form_fields` ADD `required` tinyint(1)
|
28
|
+
[1m[36m (8.7ms)[0m [1mCREATE INDEX `form_field_order` ON `spud_inquiry_form_fields` (`field_order`) [0m
|
29
|
+
[1m[35m (0.1ms)[0m BEGIN
|
30
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120122173829')[0m
|
31
|
+
[1m[35m (0.2ms)[0m COMMIT
|
8
32
|
Migrating to AddSpudInquiryFormIdToSpudInquiries (20120126132407)
|
33
|
+
[1m[36m (10.4ms)[0m [1mALTER TABLE `spud_inquiries` ADD `spud_inquiry_form_id` int(11)[0m
|
34
|
+
[1m[35m (10.8ms)[0m ALTER TABLE `spud_inquiries` ADD `recipients` text
|
35
|
+
[1m[36m (10.6ms)[0m [1mALTER TABLE `spud_inquiries` ADD `subject` varchar(255)[0m
|
36
|
+
[1m[35m (11.1ms)[0m ALTER TABLE `spud_inquiries` ADD `marked_as_read` tinyint(1) DEFAULT 0
|
37
|
+
[1m[36m (8.1ms)[0m [1mCREATE INDEX `idx_inquiry_read` ON `spud_inquiries` (`marked_as_read`) [0m
|
38
|
+
[1m[35m (9.4ms)[0m CREATE INDEX `idx_inquiry_form` ON `spud_inquiries` (`spud_inquiry_form_id`)
|
39
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
40
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120126132407')
|
41
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
9
42
|
Migrating to AddRecipientsToSpudInquiryForms (20120126132522)
|
43
|
+
[1m[35m (11.2ms)[0m ALTER TABLE `spud_inquiry_forms` ADD `recipients` text
|
44
|
+
[1m[36m (10.6ms)[0m [1mALTER TABLE `spud_inquiry_forms` ADD `subject` varchar(255)[0m
|
45
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120126132522')[0m
|
47
|
+
[1m[35m (0.2ms)[0m COMMIT
|
10
48
|
Migrating to AddUrlNameToSpudInquiryForms (20120127023335)
|
49
|
+
[1m[36m (11.0ms)[0m [1mALTER TABLE `spud_inquiry_forms` ADD `url_name` varchar(255)[0m
|
50
|
+
[1m[35m (8.2ms)[0m CREATE INDEX `idx_form_url_name` ON `spud_inquiry_forms` (`url_name`)
|
51
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
52
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120127023335')
|
53
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
11
54
|
Migrating to ChangeInquiryFormFieldsColumn (20120413124900)
|
55
|
+
[1m[35m (10.9ms)[0m ALTER TABLE `spud_inquiry_form_fields` CHANGE `options` `options` text DEFAULT NULL
|
56
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
57
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120413124900')
|
58
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
12
59
|
Migrating to CreateSpudAdminPermissions (20120610131537)
|
60
|
+
[1m[35m (6.5ms)[0m CREATE TABLE `spud_admin_permissions` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `name` varchar(255), `access` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
|
61
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
62
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120610131537')
|
63
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
13
64
|
Migrating to CreateSpudUsers (20120610131538)
|
65
|
+
[1m[35m (6.7ms)[0m CREATE TABLE `spud_users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `first_name` varchar(255), `last_name` varchar(255), `super_admin` tinyint(1), `login` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `crypted_password` varchar(255) NOT NULL, `password_salt` varchar(255) NOT NULL, `persistence_token` varchar(255) NOT NULL, `single_access_token` varchar(255) NOT NULL, `perishable_token` varchar(255) NOT NULL, `login_count` int(11) DEFAULT 0 NOT NULL, `failed_login_count` int(11) DEFAULT 0 NOT NULL, `last_request_at` datetime, `current_login_at` datetime, `last_login_at` datetime, `current_login_ip` varchar(255), `last_login_ip` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
|
66
|
+
[1m[36m (7.1ms)[0m [1mCREATE INDEX `index_spud_users_on_login` ON `spud_users` (`login`) [0m
|
67
|
+
[1m[35m (8.3ms)[0m CREATE INDEX `index_spud_users_on_email` ON `spud_users` (`email`)
|
68
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
69
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120610131538')
|
70
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
14
71
|
Migrating to AddTimeZoneToSpudUser (20120610131539)
|
72
|
+
[1m[35m (12.7ms)[0m ALTER TABLE `spud_users` ADD `time_zone` varchar(255)
|
73
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
74
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120610131539')
|
75
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
15
76
|
Migrating to AddScopeToSpudAdminPermissions (20120610131540)
|
77
|
+
[1m[35m (9.5ms)[0m ALTER TABLE `spud_admin_permissions` ADD `scope` varchar(255)
|
78
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
79
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120610131540')
|
80
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
16
81
|
Migrating to CreateSpudUserSettings (20120610131541)
|
82
|
+
[1m[35m (6.7ms)[0m CREATE TABLE `spud_user_settings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_user_id` int(11), `key` varchar(255), `value` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
|
83
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
84
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120610131541')
|
85
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
17
86
|
Migrating to AddThankYouContentToSpudInquiryForm (20121228145215)
|
18
|
-
[1m[35m (
|
19
|
-
[1m[36m (0.
|
20
|
-
[1m[
|
21
|
-
|
22
|
-
Connecting to database specified by database.yml
|
23
|
-
[1m[36mActiveRecord::SchemaMigration Load (2.1ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
87
|
+
[1m[35m (11.5ms)[0m ALTER TABLE `spud_inquiry_forms` ADD `thank_you_content` text
|
88
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
89
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20121228145215')
|
90
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
24
91
|
Migrating to AddPlaceholderToSpudInquiryFormFields (20130627121030)
|
25
|
-
[1m[35m (
|
92
|
+
[1m[35m (11.7ms)[0m ALTER TABLE `spud_inquiry_form_fields` ADD `placeholder` varchar(255)
|
26
93
|
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
27
|
-
[1m[35mSQL (0.
|
28
|
-
[1m[36m (0.
|
94
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20130627121030')
|
95
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
29
96
|
Migrating to AddSubmitTitleToSpudInquiryForm (20131111143656)
|
30
|
-
[1m[35m (
|
97
|
+
[1m[35m (11.0ms)[0m ALTER TABLE `spud_inquiry_forms` ADD `submit_title` varchar(255)
|
31
98
|
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
32
|
-
[1m[35mSQL (0.
|
33
|
-
[1m[36m (0.
|
99
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20131111143656')
|
100
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
34
101
|
Migrating to AddFieldNameToSpudInquiryFormFields (20131111143945)
|
35
|
-
[1m[35m (
|
102
|
+
[1m[35m (11.2ms)[0m ALTER TABLE `spud_inquiry_form_fields` ADD `field_name` varchar(255)
|
36
103
|
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
37
|
-
[1m[35mSQL (0.
|
38
|
-
[1m[36m (0.
|
104
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20131111143945')
|
105
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
39
106
|
Migrating to AddClassNameToSpudInquiryFormFields (20131111144731)
|
40
|
-
[1m[35m (
|
107
|
+
[1m[35m (11.3ms)[0m ALTER TABLE `spud_inquiry_form_fields` ADD `class_name` varchar(255)
|
41
108
|
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
42
|
-
[1m[35mSQL (0.
|
43
|
-
[1m[36m (0.
|
109
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20131111144731')
|
110
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
44
111
|
Migrating to AddFieldNameToSpudInquiryFields (20131204163221)
|
45
|
-
[1m[35m (
|
112
|
+
[1m[35m (11.8ms)[0m ALTER TABLE `spud_inquiry_fields` ADD `field_name` varchar(255)
|
46
113
|
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
47
|
-
[1m[35mSQL (0.
|
48
|
-
[1m[36m (0.
|
49
|
-
|
50
|
-
[1m[
|
114
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20131204163221')
|
115
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
116
|
+
Migrating to AddValidationToInquiryFormFields (20140422015208)
|
117
|
+
[1m[35m (12.2ms)[0m ALTER TABLE `spud_inquiry_form_fields` ADD `validation_rule` varchar(255)
|
118
|
+
[1m[36m (11.8ms)[0m [1mALTER TABLE `spud_inquiry_form_fields` ADD `validation_error_message` varchar(255)[0m
|
119
|
+
[1m[35m (0.1ms)[0m BEGIN
|
120
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20140422015208')[0m
|
121
|
+
[1m[35m (0.2ms)[0m COMMIT
|
122
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
123
|
+
[1m[36m (0.4ms)[0m [1mDROP DATABASE IF EXISTS `spud_inquiries_test`[0m
|
51
124
|
[1m[35m (0.4ms)[0m CREATE DATABASE `spud_inquiries_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
|
52
|
-
[1m[36m (
|
53
|
-
[1m[35m (8.
|
54
|
-
[1m[36m (
|
55
|
-
[1m[35m (
|
56
|
-
[1m[36m (
|
57
|
-
[1m[35m (
|
58
|
-
[1m[36m (
|
59
|
-
[1m[35m (
|
60
|
-
[1m[36m (
|
61
|
-
[1m[35m (
|
62
|
-
[1m[36m (7.8ms)[0m [1mCREATE TABLE `spud_user_settings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_user_id` int(11), `key` varchar(255), `value` varchar(255), `created_at` datetime
|
63
|
-
[1m[35m (7.
|
64
|
-
[1m[36m (8.
|
65
|
-
[1m[35m (
|
66
|
-
[1m[36m (
|
67
|
-
[1m[35m (
|
68
|
-
[1m[36m (0.
|
69
|
-
[1m[35m (0.
|
70
|
-
[1m[36m (0.
|
71
|
-
[1m[35m (0.
|
72
|
-
[1m[36m (0.
|
73
|
-
[1m[35m (0.
|
74
|
-
[1m[36m (0.
|
75
|
-
[1m[35m (0.
|
76
|
-
[1m[36m (0.
|
77
|
-
[1m[35m (0.
|
78
|
-
[1m[36m (0.
|
79
|
-
[1m[35m (0.
|
80
|
-
[1m[36m (0.
|
81
|
-
[1m[35m (0.
|
82
|
-
[1m[36m (0.
|
83
|
-
[1m[35m (0.
|
84
|
-
[1m[36m (0.
|
85
|
-
[1m[35m (0.
|
86
|
-
[1m[36m (0.
|
87
|
-
[1m[35m (0.
|
88
|
-
[1m[36m (0.
|
125
|
+
[1m[36m (7.1ms)[0m [1mCREATE TABLE `spud_admin_permissions` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `name` varchar(255), `access` tinyint(1), `created_at` datetime, `updated_at` datetime, `scope` varchar(255)) ENGINE=InnoDB[0m
|
126
|
+
[1m[35m (8.2ms)[0m CREATE TABLE `spud_inquiries` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `email` varchar(255), `created_at` datetime, `updated_at` datetime, `spud_inquiry_form_id` int(11), `recipients` text, `subject` varchar(255), `marked_as_read` tinyint(1) DEFAULT 0) ENGINE=InnoDB
|
127
|
+
[1m[36m (8.9ms)[0m [1mCREATE INDEX `idx_inquiry_read` USING btree ON `spud_inquiries` (`marked_as_read`) [0m
|
128
|
+
[1m[35m (7.8ms)[0m CREATE INDEX `idx_inquiry_form` USING btree ON `spud_inquiries` (`spud_inquiry_form_id`)
|
129
|
+
[1m[36m (7.1ms)[0m [1mCREATE TABLE `spud_inquiry_fields` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `value` text, `spud_inquiry_id` int(11), `created_at` datetime, `updated_at` datetime, `field_name` varchar(255)) ENGINE=InnoDB[0m
|
130
|
+
[1m[35m (11.8ms)[0m CREATE INDEX `inquiry_field_parent_id` USING btree ON `spud_inquiry_fields` (`spud_inquiry_id`)
|
131
|
+
[1m[36m (7.1ms)[0m [1mCREATE TABLE `spud_inquiry_form_fields` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_inquiry_form_id` int(11), `field_type` varchar(255), `name` varchar(255), `options` text, `default_value` varchar(255), `created_at` datetime, `updated_at` datetime, `field_order` int(11), `required` tinyint(1), `placeholder` varchar(255), `field_name` varchar(255), `class_name` varchar(255), `validation_rule` varchar(255), `validation_error_message` varchar(255)) ENGINE=InnoDB[0m
|
132
|
+
[1m[35m (7.9ms)[0m CREATE INDEX `form_field_order` USING btree ON `spud_inquiry_form_fields` (`field_order`)
|
133
|
+
[1m[36m (7.4ms)[0m [1mCREATE TABLE `spud_inquiry_forms` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `content` text, `created_at` datetime, `updated_at` datetime, `recipients` text, `subject` varchar(255), `url_name` varchar(255), `thank_you_content` text, `submit_title` varchar(255)) ENGINE=InnoDB[0m
|
134
|
+
[1m[35m (9.0ms)[0m CREATE INDEX `idx_form_url_name` USING btree ON `spud_inquiry_forms` (`url_name`)
|
135
|
+
[1m[36m (7.8ms)[0m [1mCREATE TABLE `spud_user_settings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_user_id` int(11), `key` varchar(255), `value` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
136
|
+
[1m[35m (7.3ms)[0m CREATE TABLE `spud_users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `first_name` varchar(255), `last_name` varchar(255), `super_admin` tinyint(1), `login` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `crypted_password` varchar(255) NOT NULL, `password_salt` varchar(255) NOT NULL, `persistence_token` varchar(255) NOT NULL, `single_access_token` varchar(255) NOT NULL, `perishable_token` varchar(255) NOT NULL, `login_count` int(11) DEFAULT 0 NOT NULL, `failed_login_count` int(11) DEFAULT 0 NOT NULL, `last_request_at` datetime, `current_login_at` datetime, `last_login_at` datetime, `current_login_ip` varchar(255), `last_login_ip` varchar(255), `created_at` datetime, `updated_at` datetime, `time_zone` varchar(255)) ENGINE=InnoDB
|
137
|
+
[1m[36m (8.2ms)[0m [1mCREATE INDEX `index_spud_users_on_email` USING btree ON `spud_users` (`email`) [0m
|
138
|
+
[1m[35m (8.7ms)[0m CREATE INDEX `index_spud_users_on_login` USING btree ON `spud_users` (`login`)
|
139
|
+
[1m[36m (8.6ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
140
|
+
[1m[35m (11.6ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
141
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM `schema_migrations`[0m
|
142
|
+
[1m[35m (0.3ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20140422015208')
|
143
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120610131537')[0m
|
144
|
+
[1m[35m (0.2ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120610131538')
|
145
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120610131539')[0m
|
146
|
+
[1m[35m (0.2ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120610131540')
|
147
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120610131541')[0m
|
148
|
+
[1m[35m (0.2ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120117133405')
|
149
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120117133412')[0m
|
150
|
+
[1m[35m (0.2ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120121194439')
|
151
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120121194447')[0m
|
152
|
+
[1m[35m (0.1ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120122173829')
|
153
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120126132407')[0m
|
154
|
+
[1m[35m (0.3ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120126132522')
|
155
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120127023335')[0m
|
156
|
+
[1m[35m (0.3ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120413124900')
|
157
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20121228145215')[0m
|
158
|
+
[1m[35m (0.2ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20130627121030')
|
159
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20131111143656')[0m
|
160
|
+
[1m[35m (0.1ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20131111143945')
|
161
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20131111144731')[0m
|
162
|
+
[1m[35m (0.2ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20131204163221')
|