spud_inquiries 0.8.3 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/README.markdown +19 -0
  2. data/Rakefile +2 -14
  3. data/app/controllers/contacts_controller.rb +11 -7
  4. data/app/controllers/spud/admin/inquiries_controller.rb +2 -2
  5. data/app/controllers/spud/admin/inquiry_forms_controller.rb +4 -3
  6. data/app/models/spud_inquiry.rb +9 -3
  7. data/app/observers/inquiry_observer.rb +43 -0
  8. data/app/observers/inquiry_sweeper.rb +44 -0
  9. data/app/views/contacts/_show.html.erb +34 -0
  10. data/app/views/contacts/show.html.erb +4 -9
  11. data/app/views/spud/admin/inquiries/index.html.erb +3 -3
  12. data/app/views/spud/inquiry_mailer/inquiry_notification.html.erb +2 -2
  13. data/app/views/spud/inquiry_mailer/inquiry_notification.text.erb +0 -1
  14. data/config/routes.rb +8 -3
  15. data/lib/spud_inquiries.rb +1 -0
  16. data/lib/spud_inquiries/configuration.rb +3 -2
  17. data/lib/spud_inquiries/engine.rb +7 -2
  18. data/lib/spud_inquiries/liquid_form.rb +42 -0
  19. data/lib/spud_inquiries/version.rb +1 -1
  20. data/{test → spec}/dummy/README.rdoc +0 -0
  21. data/{test → spec}/dummy/Rakefile +0 -0
  22. data/{test → spec}/dummy/app/assets/javascripts/application.js +0 -0
  23. data/{test → spec}/dummy/app/assets/stylesheets/application.css +0 -0
  24. data/{test → spec}/dummy/app/controllers/application_controller.rb +0 -0
  25. data/{test → spec}/dummy/app/helpers/application_helper.rb +0 -0
  26. data/{test → spec}/dummy/app/views/layouts/application.html.erb +0 -0
  27. data/{test → spec}/dummy/config.ru +0 -0
  28. data/{test → spec}/dummy/config/application.rb +0 -0
  29. data/{test → spec}/dummy/config/boot.rb +0 -0
  30. data/{test → spec}/dummy/config/database.yml +0 -0
  31. data/{test → spec}/dummy/config/environment.rb +0 -0
  32. data/{test → spec}/dummy/config/environments/development.rb +0 -0
  33. data/{test → spec}/dummy/config/environments/production.rb +0 -0
  34. data/{test → spec}/dummy/config/environments/test.rb +0 -0
  35. data/{test → spec}/dummy/config/initializers/backtrace_silencers.rb +0 -0
  36. data/{test → spec}/dummy/config/initializers/inflections.rb +0 -0
  37. data/{test → spec}/dummy/config/initializers/mime_types.rb +0 -0
  38. data/{test → spec}/dummy/config/initializers/secret_token.rb +0 -0
  39. data/{test → spec}/dummy/config/initializers/session_store.rb +0 -0
  40. data/{test → spec}/dummy/config/initializers/wrap_parameters.rb +0 -0
  41. data/{test → spec}/dummy/config/locales/en.yml +0 -0
  42. data/spec/dummy/config/routes.rb +3 -0
  43. data/spec/dummy/db/migrate/20120610131537_create_spud_admin_permissions.spud_core.rb +12 -0
  44. data/spec/dummy/db/migrate/20120610131538_create_spud_users.spud_core.rb +30 -0
  45. data/spec/dummy/db/migrate/20120610131539_add_time_zone_to_spud_user.spud_core.rb +7 -0
  46. data/spec/dummy/db/migrate/20120610131540_add_scope_to_spud_admin_permissions.spud_core.rb +7 -0
  47. data/spec/dummy/db/migrate/20120610131541_create_spud_user_settings.spud_core.rb +12 -0
  48. data/spec/dummy/db/schema.rb +108 -0
  49. data/spec/dummy/log/development.log +88 -0
  50. data/{test → spec}/dummy/public/404.html +0 -0
  51. data/{test → spec}/dummy/public/422.html +0 -0
  52. data/{test → spec}/dummy/public/500.html +0 -0
  53. data/{test → spec}/dummy/public/favicon.ico +0 -0
  54. data/{test → spec}/dummy/script/rails +0 -0
  55. data/spec/spec_helper.rb +40 -0
  56. data/spec/support/authlogic_helper.rb +2 -0
  57. metadata +195 -90
  58. data/test/dummy/config/routes.rb +0 -4
  59. data/test/test_helper.rb +0 -10
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Inquiries
3
- VERSION = "0.8.3"
3
+ VERSION = "0.9.0"
4
4
  end
5
5
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ Rails.application.routes.draw do
2
+
3
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from spud_core (originally 20111214161011)
2
+ class CreateSpudAdminPermissions < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_admin_permissions do |t|
5
+ t.integer :user_id
6
+ t.string :name
7
+ t.boolean :access
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,30 @@
1
+ # This migration comes from spud_core (originally 20111214161146)
2
+ class CreateSpudUsers < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_users do |t|
5
+
6
+ t.string :first_name
7
+ t.string :last_name
8
+ t.boolean :super_admin
9
+ t.string :login, :null => false # optional, you can use email instead, or both
10
+ t.string :email, :null => false # optional, you can use login instead, or both
11
+ t.string :crypted_password, :null => false # optional, see below
12
+ t.string :password_salt, :null => false # optional, but highly recommended
13
+ t.string :persistence_token, :null => false # required
14
+ t.string :single_access_token, :null => false # optional, see Authlogic::Session::Params
15
+ t.string :perishable_token, :null => false # optional, see Authlogic::Session::Perishability
16
+
17
+ # Magic columns, just like ActiveRecord's created_at and updated_at. These are automatically maintained by Authlogic if they are present.
18
+ t.integer :login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
19
+ t.integer :failed_login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
20
+ t.datetime :last_request_at # optional, see Authlogic::Session::MagicColumns
21
+ t.datetime :current_login_at # optional, see Authlogic::Session::MagicColumns
22
+ t.datetime :last_login_at # optional, see Authlogic::Session::MagicColumns
23
+ t.string :current_login_ip # optional, see Authlogic::Session::MagicColumns
24
+ t.string :last_login_ip # optional, see Authlogic::Session::MagicColumns
25
+ t.timestamps
26
+ end
27
+ add_index :spud_users,:login
28
+ add_index :spud_users,:email
29
+ end
30
+ end
@@ -0,0 +1,7 @@
1
+ # This migration comes from spud_core (originally 20120327124229)
2
+ class AddTimeZoneToSpudUser < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_users, :time_zone, :string
5
+
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # This migration comes from spud_core (originally 20120328235431)
2
+ class AddScopeToSpudAdminPermissions < ActiveRecord::Migration
3
+ def change
4
+ add_column :spud_admin_permissions, :scope, :string
5
+
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from spud_core (originally 20120329174000)
2
+ class CreateSpudUserSettings < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_user_settings do |t|
5
+ t.integer :spud_user_id
6
+ t.string :key
7
+ t.string :value
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,108 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20120610131541) do
15
+
16
+ create_table "spud_admin_permissions", :force => true do |t|
17
+ t.integer "user_id"
18
+ t.string "name"
19
+ t.boolean "access"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
22
+ t.string "scope"
23
+ end
24
+
25
+ create_table "spud_inquiries", :force => true do |t|
26
+ t.string "email"
27
+ t.datetime "created_at", :null => false
28
+ t.datetime "updated_at", :null => false
29
+ t.integer "spud_inquiry_form_id"
30
+ t.text "recipients"
31
+ t.string "subject"
32
+ t.boolean "marked_as_read", :default => false
33
+ end
34
+
35
+ add_index "spud_inquiries", ["marked_as_read"], :name => "index_spud_inquiries_on_marked_as_read"
36
+ add_index "spud_inquiries", ["spud_inquiry_form_id"], :name => "index_spud_inquiries_on_spud_inquiry_form_id"
37
+
38
+ create_table "spud_inquiry_fields", :force => true do |t|
39
+ t.string "name"
40
+ t.text "value"
41
+ t.integer "spud_inquiry_id"
42
+ t.datetime "created_at", :null => false
43
+ t.datetime "updated_at", :null => false
44
+ end
45
+
46
+ add_index "spud_inquiry_fields", ["spud_inquiry_id"], :name => "index_spud_inquiry_fields_on_spud_inquiry_id"
47
+
48
+ create_table "spud_inquiry_form_fields", :force => true do |t|
49
+ t.integer "spud_inquiry_form_id"
50
+ t.string "field_type"
51
+ t.string "name"
52
+ t.text "options"
53
+ t.string "default_value"
54
+ t.datetime "created_at", :null => false
55
+ t.datetime "updated_at", :null => false
56
+ t.integer "field_order"
57
+ t.boolean "required"
58
+ end
59
+
60
+ add_index "spud_inquiry_form_fields", ["field_order"], :name => "index_spud_inquiry_form_fields_on_field_order"
61
+
62
+ create_table "spud_inquiry_forms", :force => true do |t|
63
+ t.string "name"
64
+ t.text "content"
65
+ t.datetime "created_at", :null => false
66
+ t.datetime "updated_at", :null => false
67
+ t.text "recipients"
68
+ t.string "subject"
69
+ t.string "url_name"
70
+ end
71
+
72
+ add_index "spud_inquiry_forms", ["url_name"], :name => "index_spud_inquiry_forms_on_url_name"
73
+
74
+ create_table "spud_user_settings", :force => true do |t|
75
+ t.integer "spud_user_id"
76
+ t.string "key"
77
+ t.string "value"
78
+ t.datetime "created_at", :null => false
79
+ t.datetime "updated_at", :null => false
80
+ end
81
+
82
+ create_table "spud_users", :force => true do |t|
83
+ t.string "first_name"
84
+ t.string "last_name"
85
+ t.boolean "super_admin"
86
+ t.string "login", :null => false
87
+ t.string "email", :null => false
88
+ t.string "crypted_password", :null => false
89
+ t.string "password_salt", :null => false
90
+ t.string "persistence_token", :null => false
91
+ t.string "single_access_token", :null => false
92
+ t.string "perishable_token", :null => false
93
+ t.integer "login_count", :default => 0, :null => false
94
+ t.integer "failed_login_count", :default => 0, :null => false
95
+ t.datetime "last_request_at"
96
+ t.datetime "current_login_at"
97
+ t.datetime "last_login_at"
98
+ t.string "current_login_ip"
99
+ t.string "last_login_ip"
100
+ t.datetime "created_at", :null => false
101
+ t.datetime "updated_at", :null => false
102
+ t.string "time_zone"
103
+ end
104
+
105
+ add_index "spud_users", ["email"], :name => "index_spud_users_on_email"
106
+ add_index "spud_users", ["login"], :name => "index_spud_users_on_login"
107
+
108
+ end
@@ -0,0 +1,88 @@
1
+  (337.0ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
2
+  (275.8ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
3
+  (0.3ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
4
+ Migrating to CreateSpudInquiries (20120117133405)
5
+  (80.2ms) CREATE TABLE `spud_inquiries` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `email` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
6
+  (0.6ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120117133405')
7
+ Migrating to CreateSpudInquiryFields (20120117133412)
8
+  (185.5ms) 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 NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
9
+  (296.6ms) CREATE INDEX `index_spud_inquiry_fields_on_spud_inquiry_id` ON `spud_inquiry_fields` (`spud_inquiry_id`)
10
+  (22.3ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120117133412')
11
+ Migrating to CreateSpudInquiryForms (20120121194439)
12
+  (66.2ms) CREATE TABLE `spud_inquiry_forms` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `content` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
13
+  (0.6ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120121194439')
14
+ Migrating to CreateSpudInquiryFormFields (20120121194447)
15
+  (174.4ms) CREATE 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 NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
16
+  (0.8ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120121194447')
17
+ Migrating to AddFieldOrderToSpudInquiryFormFields (20120122173829)
18
+  (166.0ms) ALTER TABLE `spud_inquiry_form_fields` ADD `field_order` int(11)
19
+  (166.9ms) ALTER TABLE `spud_inquiry_form_fields` ADD `required` tinyint(1)
20
+  (168.7ms) CREATE INDEX `index_spud_inquiry_form_fields_on_field_order` ON `spud_inquiry_form_fields` (`field_order`)
21
+  (0.5ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120122173829')
22
+ Migrating to AddSpudInquiryFormIdToSpudInquiries (20120126132407)
23
+  (174.5ms) ALTER TABLE `spud_inquiries` ADD `spud_inquiry_form_id` int(11)
24
+  (176.7ms) ALTER TABLE `spud_inquiries` ADD `recipients` text
25
+  (166.3ms) ALTER TABLE `spud_inquiries` ADD `subject` varchar(255)
26
+  (118.8ms) ALTER TABLE `spud_inquiries` ADD `marked_as_read` tinyint(1) DEFAULT 0
27
+  (178.6ms) CREATE INDEX `index_spud_inquiries_on_marked_as_read` ON `spud_inquiries` (`marked_as_read`)
28
+  (157.2ms) CREATE INDEX `index_spud_inquiries_on_spud_inquiry_form_id` ON `spud_inquiries` (`spud_inquiry_form_id`)
29
+  (0.5ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120126132407')
30
+ Migrating to AddRecipientsToSpudInquiryForms (20120126132522)
31
+  (163.0ms) ALTER TABLE `spud_inquiry_forms` ADD `recipients` text
32
+  (166.1ms) ALTER TABLE `spud_inquiry_forms` ADD `subject` varchar(255)
33
+  (0.5ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120126132522')
34
+ Migrating to AddUrlNameToSpudInquiryForms (20120127023335)
35
+  (153.6ms) ALTER TABLE `spud_inquiry_forms` ADD `url_name` varchar(255)
36
+  (157.2ms) CREATE INDEX `index_spud_inquiry_forms_on_url_name` ON `spud_inquiry_forms` (`url_name`)
37
+  (0.6ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120127023335')
38
+ Migrating to ChangeInquiryFormFieldsColumn (20120413124900)
39
+  (149.4ms) ALTER TABLE `spud_inquiry_form_fields` CHANGE `options` `options` text DEFAULT NULL
40
+  (0.5ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120413124900')
41
+ Migrating to CreateSpudAdminPermissions (20120610131537)
42
+  (182.7ms) 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 NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
43
+  (0.4ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610131537')
44
+ Migrating to CreateSpudUsers (20120610131538)
45
+  (153.7ms) 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 NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
46
+  (171.1ms) CREATE INDEX `index_spud_users_on_login` ON `spud_users` (`login`)
47
+  (166.4ms) CREATE INDEX `index_spud_users_on_email` ON `spud_users` (`email`)
48
+  (0.6ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610131538')
49
+ Migrating to AddTimeZoneToSpudUser (20120610131539)
50
+  (162.8ms) ALTER TABLE `spud_users` ADD `time_zone` varchar(255)
51
+  (0.5ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610131539')
52
+ Migrating to AddScopeToSpudAdminPermissions (20120610131540)
53
+  (165.1ms) ALTER TABLE `spud_admin_permissions` ADD `scope` varchar(255)
54
+  (0.8ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610131540')
55
+ Migrating to CreateSpudUserSettings (20120610131541)
56
+  (149.9ms) 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 NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
57
+  (0.6ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20120610131541')
58
+  (0.1ms) SELECT `schema_migrations`.`version` FROM `schema_migrations`
59
+  (0.4ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
60
+  (0.5ms) DROP DATABASE IF EXISTS `spud_inquiries_test`
61
+  (0.3ms) CREATE DATABASE `spud_inquiries_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
62
+  (70.3ms) 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 NOT NULL, `updated_at` datetime NOT NULL, `scope` varchar(255)) ENGINE=InnoDB
63
+  (162.7ms) CREATE TABLE `spud_inquiries` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `email` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `spud_inquiry_form_id` int(11), `recipients` text, `subject` varchar(255), `marked_as_read` tinyint(1) DEFAULT 0) ENGINE=InnoDB
64
+  (181.8ms) CREATE INDEX `index_spud_inquiries_on_marked_as_read` ON `spud_inquiries` (`marked_as_read`)
65
+  (166.4ms) CREATE INDEX `index_spud_inquiries_on_spud_inquiry_form_id` ON `spud_inquiries` (`spud_inquiry_form_id`)
66
+  (172.1ms) 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 NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
67
+  (181.0ms) CREATE INDEX `index_spud_inquiry_fields_on_spud_inquiry_id` ON `spud_inquiry_fields` (`spud_inquiry_id`)
68
+  (161.7ms) CREATE 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 NOT NULL, `updated_at` datetime NOT NULL, `field_order` int(11), `required` tinyint(1)) ENGINE=InnoDB
69
+  (169.9ms) CREATE INDEX `index_spud_inquiry_form_fields_on_field_order` ON `spud_inquiry_form_fields` (`field_order`)
70
+  (150.3ms) CREATE TABLE `spud_inquiry_forms` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `content` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `recipients` text, `subject` varchar(255), `url_name` varchar(255)) ENGINE=InnoDB
71
+  (170.4ms) CREATE INDEX `index_spud_inquiry_forms_on_url_name` ON `spud_inquiry_forms` (`url_name`)
72
+  (149.4ms) 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 NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
73
+  (164.5ms) 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 NOT NULL, `updated_at` datetime NOT NULL, `time_zone` varchar(255)) ENGINE=InnoDB
74
+  (159.1ms) CREATE INDEX `index_spud_users_on_email` ON `spud_users` (`email`)
75
+  (155.5ms) CREATE INDEX `index_spud_users_on_login` ON `spud_users` (`login`)
76
+  (161.0ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
77
+  (172.6ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
78
+  (0.1ms) SELECT version FROM `schema_migrations`
79
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120610131541')
80
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120117133405')
81
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120117133412')
82
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120121194439')
83
+  (0.2ms) INSERT INTO `schema_migrations` (version) VALUES ('20120121194447')
84
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120122173829')
85
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120126132407')
86
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120126132522')
87
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120127023335')
88
+  (0.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20120413124900')
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,40 @@
1
+ # Track code coverage
2
+ require 'simplecov'
3
+ SimpleCov.start 'rails' do
4
+ # root "dummy/"
5
+ add_filter "/factories/"
6
+ end
7
+
8
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
9
+ ENV["RAILS_ENV"] = 'test'
10
+ require File.expand_path("../dummy/config/environment", __FILE__)
11
+ require 'rspec/rails'
12
+ require 'rspec/autorun'
13
+ require 'database_cleaner'
14
+ require 'shoulda'
15
+ require 'factory_girl'
16
+ require 'mocha'
17
+
18
+ # Requires supporting ruby files with custom matchers and macros, etc,
19
+ # in spec/support/ and its subdirectories.
20
+ ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
21
+ Dir[File.join(ENGINE_RAILS_ROOT,"spec/support/**/*.rb"), File.join(ENGINE_RAILS_ROOT,"factories/*")].each {|f| require f}
22
+
23
+ RSpec.configure do |config|
24
+ config.mock_with :mocha
25
+ config.use_transactional_fixtures = true
26
+ config.infer_base_class_for_anonymous_controllers = false
27
+
28
+ config.before(:suite) do
29
+ DatabaseCleaner.strategy = :transaction
30
+ DatabaseCleaner.clean_with(:truncation)
31
+ end
32
+
33
+ config.before(:each) do
34
+ DatabaseCleaner.start
35
+ end
36
+
37
+ config.after(:each) do
38
+ DatabaseCleaner.clean
39
+ end
40
+ end
@@ -0,0 +1,2 @@
1
+ require 'authlogic/test_case'
2
+ include Authlogic::TestCase
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spud_inquiries
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.9.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-13 00:00:00.000000000 Z
12
+ date: 2012-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70157590632880 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,87 +21,172 @@ dependencies:
21
21
  version: 3.2.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70157590632880
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 3.2.2
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: spud_core
27
- requirement: &70157590632160 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: 0.8.0
33
- - - <
34
36
  - !ruby/object:Gem::Version
35
37
  version: 0.9.0
36
38
  type: :runtime
37
39
  prerelease: false
38
- version_requirements: *70157590632160
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.9.0
39
46
  - !ruby/object:Gem::Dependency
40
- name: mysql2
41
- requirement: &70157590631080 !ruby/object:Gem::Requirement
47
+ name: liquid
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
42
57
  none: false
43
58
  requirements:
44
59
  - - ! '>='
45
60
  - !ruby/object:Gem::Version
46
61
  version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: mysql2
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - '='
68
+ - !ruby/object:Gem::Version
69
+ version: 0.3.11
47
70
  type: :development
48
71
  prerelease: false
49
- version_requirements: *70157590631080
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - '='
76
+ - !ruby/object:Gem::Version
77
+ version: 0.3.11
50
78
  - !ruby/object:Gem::Dependency
51
79
  name: rspec
52
- requirement: &70157590630620 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
53
81
  none: false
54
82
  requirements:
55
- - - ! '>='
83
+ - - '='
56
84
  - !ruby/object:Gem::Version
57
- version: '0'
85
+ version: 2.8.0
58
86
  type: :development
59
87
  prerelease: false
60
- version_requirements: *70157590630620
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - '='
92
+ - !ruby/object:Gem::Version
93
+ version: 2.8.0
61
94
  - !ruby/object:Gem::Dependency
62
95
  name: rspec-rails
63
- requirement: &70157590630120 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
64
97
  none: false
65
98
  requirements:
66
- - - ! '>='
99
+ - - '='
67
100
  - !ruby/object:Gem::Version
68
- version: '0'
101
+ version: 2.8.1
69
102
  type: :development
70
103
  prerelease: false
71
- version_requirements: *70157590630120
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - '='
108
+ - !ruby/object:Gem::Version
109
+ version: 2.8.1
110
+ - !ruby/object:Gem::Dependency
111
+ name: shoulda
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 3.0.1
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 3.0.1
72
126
  - !ruby/object:Gem::Dependency
73
127
  name: factory_girl
74
- requirement: &70157590629360 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
75
129
  none: false
76
130
  requirements:
77
- - - =
131
+ - - '='
78
132
  - !ruby/object:Gem::Version
79
133
  version: 2.5.0
80
134
  type: :development
81
135
  prerelease: false
82
- version_requirements: *70157590629360
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - '='
140
+ - !ruby/object:Gem::Version
141
+ version: 2.5.0
83
142
  - !ruby/object:Gem::Dependency
84
143
  name: mocha
85
- requirement: &70157590628640 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
86
145
  none: false
87
146
  requirements:
88
- - - =
147
+ - - '='
89
148
  - !ruby/object:Gem::Version
90
149
  version: 0.10.3
91
150
  type: :development
92
151
  prerelease: false
93
- version_requirements: *70157590628640
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - '='
156
+ - !ruby/object:Gem::Version
157
+ version: 0.10.3
94
158
  - !ruby/object:Gem::Dependency
95
159
  name: database_cleaner
96
- requirement: &70157590627920 !ruby/object:Gem::Requirement
160
+ requirement: !ruby/object:Gem::Requirement
97
161
  none: false
98
162
  requirements:
99
- - - =
163
+ - - '='
100
164
  - !ruby/object:Gem::Version
101
165
  version: 0.7.1
102
166
  type: :development
103
167
  prerelease: false
104
- version_requirements: *70157590627920
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - '='
172
+ - !ruby/object:Gem::Version
173
+ version: 0.7.1
174
+ - !ruby/object:Gem::Dependency
175
+ name: simplecov
176
+ requirement: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ~>
180
+ - !ruby/object:Gem::Version
181
+ version: 0.6.4
182
+ type: :development
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ~>
188
+ - !ruby/object:Gem::Version
189
+ version: 0.6.4
105
190
  description: This gem allows you to build forms for user submission and can send email
106
191
  notifications when a form is filled out.
107
192
  email:
@@ -124,6 +209,9 @@ files:
124
209
  - app/models/spud_inquiry_field.rb
125
210
  - app/models/spud_inquiry_form.rb
126
211
  - app/models/spud_inquiry_form_field.rb
212
+ - app/observers/inquiry_observer.rb
213
+ - app/observers/inquiry_sweeper.rb
214
+ - app/views/contacts/_show.html.erb
127
215
  - app/views/contacts/show.html.erb
128
216
  - app/views/contacts/thankyou.html.erb
129
217
  - app/views/layouts/spud/inquiries/detail.html.erb
@@ -149,41 +237,50 @@ files:
149
237
  - db/migrate/20120413124900_change_inquiry_form_fields_column.rb
150
238
  - lib/spud_inquiries/configuration.rb
151
239
  - lib/spud_inquiries/engine.rb
240
+ - lib/spud_inquiries/liquid_form.rb
152
241
  - lib/spud_inquiries/version.rb
153
242
  - lib/spud_inquiries.rb
154
243
  - lib/tasks/spud_inquiries_tasks.rake
155
244
  - MIT-LICENSE
156
245
  - Rakefile
157
246
  - README.markdown
158
- - test/dummy/app/assets/javascripts/application.js
159
- - test/dummy/app/assets/stylesheets/application.css
160
- - test/dummy/app/controllers/application_controller.rb
161
- - test/dummy/app/helpers/application_helper.rb
162
- - test/dummy/app/views/layouts/application.html.erb
163
- - test/dummy/config/application.rb
164
- - test/dummy/config/boot.rb
165
- - test/dummy/config/database.yml
166
- - test/dummy/config/environment.rb
167
- - test/dummy/config/environments/development.rb
168
- - test/dummy/config/environments/production.rb
169
- - test/dummy/config/environments/test.rb
170
- - test/dummy/config/initializers/backtrace_silencers.rb
171
- - test/dummy/config/initializers/inflections.rb
172
- - test/dummy/config/initializers/mime_types.rb
173
- - test/dummy/config/initializers/secret_token.rb
174
- - test/dummy/config/initializers/session_store.rb
175
- - test/dummy/config/initializers/wrap_parameters.rb
176
- - test/dummy/config/locales/en.yml
177
- - test/dummy/config/routes.rb
178
- - test/dummy/config.ru
179
- - test/dummy/public/404.html
180
- - test/dummy/public/422.html
181
- - test/dummy/public/500.html
182
- - test/dummy/public/favicon.ico
183
- - test/dummy/Rakefile
184
- - test/dummy/README.rdoc
185
- - test/dummy/script/rails
186
- - test/test_helper.rb
247
+ - spec/dummy/app/assets/javascripts/application.js
248
+ - spec/dummy/app/assets/stylesheets/application.css
249
+ - spec/dummy/app/controllers/application_controller.rb
250
+ - spec/dummy/app/helpers/application_helper.rb
251
+ - spec/dummy/app/views/layouts/application.html.erb
252
+ - spec/dummy/config/application.rb
253
+ - spec/dummy/config/boot.rb
254
+ - spec/dummy/config/database.yml
255
+ - spec/dummy/config/environment.rb
256
+ - spec/dummy/config/environments/development.rb
257
+ - spec/dummy/config/environments/production.rb
258
+ - spec/dummy/config/environments/test.rb
259
+ - spec/dummy/config/initializers/backtrace_silencers.rb
260
+ - spec/dummy/config/initializers/inflections.rb
261
+ - spec/dummy/config/initializers/mime_types.rb
262
+ - spec/dummy/config/initializers/secret_token.rb
263
+ - spec/dummy/config/initializers/session_store.rb
264
+ - spec/dummy/config/initializers/wrap_parameters.rb
265
+ - spec/dummy/config/locales/en.yml
266
+ - spec/dummy/config/routes.rb
267
+ - spec/dummy/config.ru
268
+ - spec/dummy/db/migrate/20120610131537_create_spud_admin_permissions.spud_core.rb
269
+ - spec/dummy/db/migrate/20120610131538_create_spud_users.spud_core.rb
270
+ - spec/dummy/db/migrate/20120610131539_add_time_zone_to_spud_user.spud_core.rb
271
+ - spec/dummy/db/migrate/20120610131540_add_scope_to_spud_admin_permissions.spud_core.rb
272
+ - spec/dummy/db/migrate/20120610131541_create_spud_user_settings.spud_core.rb
273
+ - spec/dummy/db/schema.rb
274
+ - spec/dummy/log/development.log
275
+ - spec/dummy/public/404.html
276
+ - spec/dummy/public/422.html
277
+ - spec/dummy/public/500.html
278
+ - spec/dummy/public/favicon.ico
279
+ - spec/dummy/Rakefile
280
+ - spec/dummy/README.rdoc
281
+ - spec/dummy/script/rails
282
+ - spec/spec_helper.rb
283
+ - spec/support/authlogic_helper.rb
187
284
  homepage: http://www.github.com/davydotcom/spud_inquiries
188
285
  licenses: []
189
286
  post_install_message:
@@ -198,7 +295,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
198
295
  version: '0'
199
296
  segments:
200
297
  - 0
201
- hash: 1304331212933766404
298
+ hash: -1072372052212535392
202
299
  required_rubygems_version: !ruby/object:Gem::Requirement
203
300
  none: false
204
301
  requirements:
@@ -207,40 +304,48 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
304
  version: '0'
208
305
  segments:
209
306
  - 0
210
- hash: 1304331212933766404
307
+ hash: -1072372052212535392
211
308
  requirements: []
212
309
  rubyforge_project:
213
- rubygems_version: 1.8.15
310
+ rubygems_version: 1.8.24
214
311
  signing_key:
215
312
  specification_version: 3
216
313
  summary: Inquiry form builder and mailer for spud (Useful for Contact Forms).
217
314
  test_files:
218
- - test/dummy/app/assets/javascripts/application.js
219
- - test/dummy/app/assets/stylesheets/application.css
220
- - test/dummy/app/controllers/application_controller.rb
221
- - test/dummy/app/helpers/application_helper.rb
222
- - test/dummy/app/views/layouts/application.html.erb
223
- - test/dummy/config/application.rb
224
- - test/dummy/config/boot.rb
225
- - test/dummy/config/database.yml
226
- - test/dummy/config/environment.rb
227
- - test/dummy/config/environments/development.rb
228
- - test/dummy/config/environments/production.rb
229
- - test/dummy/config/environments/test.rb
230
- - test/dummy/config/initializers/backtrace_silencers.rb
231
- - test/dummy/config/initializers/inflections.rb
232
- - test/dummy/config/initializers/mime_types.rb
233
- - test/dummy/config/initializers/secret_token.rb
234
- - test/dummy/config/initializers/session_store.rb
235
- - test/dummy/config/initializers/wrap_parameters.rb
236
- - test/dummy/config/locales/en.yml
237
- - test/dummy/config/routes.rb
238
- - test/dummy/config.ru
239
- - test/dummy/public/404.html
240
- - test/dummy/public/422.html
241
- - test/dummy/public/500.html
242
- - test/dummy/public/favicon.ico
243
- - test/dummy/Rakefile
244
- - test/dummy/README.rdoc
245
- - test/dummy/script/rails
246
- - test/test_helper.rb
315
+ - spec/dummy/app/assets/javascripts/application.js
316
+ - spec/dummy/app/assets/stylesheets/application.css
317
+ - spec/dummy/app/controllers/application_controller.rb
318
+ - spec/dummy/app/helpers/application_helper.rb
319
+ - spec/dummy/app/views/layouts/application.html.erb
320
+ - spec/dummy/config/application.rb
321
+ - spec/dummy/config/boot.rb
322
+ - spec/dummy/config/database.yml
323
+ - spec/dummy/config/environment.rb
324
+ - spec/dummy/config/environments/development.rb
325
+ - spec/dummy/config/environments/production.rb
326
+ - spec/dummy/config/environments/test.rb
327
+ - spec/dummy/config/initializers/backtrace_silencers.rb
328
+ - spec/dummy/config/initializers/inflections.rb
329
+ - spec/dummy/config/initializers/mime_types.rb
330
+ - spec/dummy/config/initializers/secret_token.rb
331
+ - spec/dummy/config/initializers/session_store.rb
332
+ - spec/dummy/config/initializers/wrap_parameters.rb
333
+ - spec/dummy/config/locales/en.yml
334
+ - spec/dummy/config/routes.rb
335
+ - spec/dummy/config.ru
336
+ - spec/dummy/db/migrate/20120610131537_create_spud_admin_permissions.spud_core.rb
337
+ - spec/dummy/db/migrate/20120610131538_create_spud_users.spud_core.rb
338
+ - spec/dummy/db/migrate/20120610131539_add_time_zone_to_spud_user.spud_core.rb
339
+ - spec/dummy/db/migrate/20120610131540_add_scope_to_spud_admin_permissions.spud_core.rb
340
+ - spec/dummy/db/migrate/20120610131541_create_spud_user_settings.spud_core.rb
341
+ - spec/dummy/db/schema.rb
342
+ - spec/dummy/log/development.log
343
+ - spec/dummy/public/404.html
344
+ - spec/dummy/public/422.html
345
+ - spec/dummy/public/500.html
346
+ - spec/dummy/public/favicon.ico
347
+ - spec/dummy/Rakefile
348
+ - spec/dummy/README.rdoc
349
+ - spec/dummy/script/rails
350
+ - spec/spec_helper.rb
351
+ - spec/support/authlogic_helper.rb