ffcrm_endpoint 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +77 -0
  4. data/Rakefile +38 -0
  5. data/app/controllers/ffcrm_endpoint/endpoints_controller.rb +26 -0
  6. data/app/views/ffcrm_endpoint/endpoints/consume.html.haml +4 -0
  7. data/app/views/ffcrm_endpoint/endpoints/consume.js.erb +0 -0
  8. data/config/routes.rb +5 -0
  9. data/lib/ffcrm_endpoint/endpoint.rb +78 -0
  10. data/lib/ffcrm_endpoint/engine.rb +16 -0
  11. data/lib/ffcrm_endpoint/version.rb +3 -0
  12. data/lib/ffcrm_endpoint.rb +4 -0
  13. data/lib/tasks/ffcrm_endpoint_tasks.rake +4 -0
  14. data/spec/controllers/endpoints_controller_spec.rb +27 -0
  15. data/spec/dummy/README.rdoc +261 -0
  16. data/spec/dummy/Rakefile +7 -0
  17. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  18. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  19. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  20. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  21. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  22. data/spec/dummy/config/application.rb +65 -0
  23. data/spec/dummy/config/boot.rb +10 -0
  24. data/spec/dummy/config/database.yml +17 -0
  25. data/spec/dummy/config/environment.rb +5 -0
  26. data/spec/dummy/config/environments/development.rb +37 -0
  27. data/spec/dummy/config/environments/production.rb +67 -0
  28. data/spec/dummy/config/environments/test.rb +37 -0
  29. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  30. data/spec/dummy/config/initializers/inflections.rb +15 -0
  31. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  32. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  33. data/spec/dummy/config/initializers/session_store.rb +8 -0
  34. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  35. data/spec/dummy/config/locales/en.yml +5 -0
  36. data/spec/dummy/config/routes.rb +58 -0
  37. data/spec/dummy/config.ru +4 -0
  38. data/spec/dummy/db/schema.rb +457 -0
  39. data/spec/dummy/log/development.log +221 -0
  40. data/spec/dummy/log/test.log +374 -0
  41. data/spec/dummy/public/404.html +26 -0
  42. data/spec/dummy/public/422.html +26 -0
  43. data/spec/dummy/public/500.html +25 -0
  44. data/spec/dummy/public/favicon.ico +0 -0
  45. data/spec/dummy/script/rails +6 -0
  46. data/spec/lib/endpoint_spec.rb +34 -0
  47. data/spec/routing/endpoint_routing_spec.rb +21 -0
  48. data/spec/spec_helper.rb +17 -0
  49. metadata +197 -0
@@ -0,0 +1,374 @@
1
+ Connecting to database specified by database.yml
2
+  (252.1ms) CREATE TABLE "account_aliases" ("id" serial primary key, "account_id" integer, "destroyed_account_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
3
+  (55.8ms) CREATE TABLE "account_contacts" ("id" serial primary key, "account_id" integer, "contact_id" integer, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4
+  (65.1ms) CREATE TABLE "account_opportunities" ("id" serial primary key, "account_id" integer, "opportunity_id" integer, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
5
+  (87.5ms) CREATE TABLE "accounts" ("id" serial primary key, "user_id" integer, "assigned_to" integer, "name" character varying(64) DEFAULT '' NOT NULL, "access" character varying(8) DEFAULT 'Public', "website" character varying(64), "toll_free_phone" character varying(32), "phone" character varying(32), "fax" character varying(32), "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "email" character varying(64), "background_info" character varying(255), "rating" integer DEFAULT 0 NOT NULL, "category" character varying(32), "subscribed_users" text)
6
+  (74.7ms) CREATE INDEX "index_accounts_on_assigned_to" ON "accounts" ("assigned_to")
7
+  (180.8ms) CREATE UNIQUE INDEX "index_accounts_on_user_id_and_name_and_deleted_at" ON "accounts" ("user_id", "name", "deleted_at")
8
+  (173.0ms) CREATE TABLE "activities" ("id" serial primary key, "user_id" integer, "subject_id" integer, "subject_type" character varying(255), "action" character varying(32) DEFAULT 'created', "info" character varying(255) DEFAULT '', "private" boolean DEFAULT 'f', "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
9
+  (55.5ms) CREATE INDEX "index_activities_on_created_at" ON "activities" ("created_at")
10
+  (64.3ms) CREATE INDEX "index_activities_on_user_id" ON "activities" ("user_id")
11
+  (81.7ms) CREATE TABLE "addresses" ("id" serial primary key, "street1" character varying(255), "street2" character varying(255), "city" character varying(64), "state" character varying(64), "zipcode" character varying(16), "country" character varying(64), "full_address" character varying(255), "address_type" character varying(16), "addressable_id" integer, "addressable_type" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "deleted_at" timestamp)
12
+  (56.2ms) CREATE INDEX "index_addresses_on_addressable_id_and_addressable_type" ON "addresses" ("addressable_id", "addressable_type")
13
+  (107.0ms) CREATE TABLE "avatars" ("id" serial primary key, "user_id" integer, "entity_id" integer, "entity_type" character varying(255), "image_file_size" integer, "image_file_name" character varying(255), "image_content_type" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
14
+  (98.3ms) CREATE TABLE "campaigns" ("id" serial primary key, "user_id" integer, "assigned_to" integer, "name" character varying(64) DEFAULT '' NOT NULL, "access" character varying(8) DEFAULT 'Public', "status" character varying(64), "budget" decimal(12,2), "target_leads" integer, "target_conversion" float, "target_revenue" decimal(12,2), "leads_count" integer, "opportunities_count" integer, "revenue" decimal(12,2), "starts_on" date, "ends_on" date, "objectives" text, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "background_info" character varying(255), "subscribed_users" text) 
15
+  (55.8ms) CREATE INDEX "index_campaigns_on_assigned_to" ON "campaigns" ("assigned_to")
16
+  (64.3ms) CREATE UNIQUE INDEX "index_campaigns_on_user_id_and_name_and_deleted_at" ON "campaigns" ("user_id", "name", "deleted_at")
17
+  (98.4ms) CREATE TABLE "comments" ("id" serial primary key, "user_id" integer, "commentable_id" integer, "commentable_type" character varying(255), "private" boolean, "title" character varying(255) DEFAULT '', "comment" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "state" character varying(16) DEFAULT 'Expanded' NOT NULL)
18
+  (74.7ms) CREATE TABLE "contact_aliases" ("id" serial primary key, "contact_id" integer, "destroyed_contact_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
19
+  (65.4ms) CREATE TABLE "contact_opportunities" ("id" serial primary key, "contact_id" integer, "opportunity_id" integer, "role" character varying(32), "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
20
+  (89.1ms) CREATE TABLE "contacts" ("id" serial primary key, "user_id" integer, "lead_id" integer, "assigned_to" integer, "reports_to" integer, "first_name" character varying(64) DEFAULT '' NOT NULL, "last_name" character varying(64) DEFAULT '' NOT NULL, "access" character varying(8) DEFAULT 'Public', "title" character varying(64), "department" character varying(64), "source" character varying(32), "email" character varying(64), "alt_email" character varying(64), "phone" character varying(32), "mobile" character varying(32), "fax" character varying(32), "blog" character varying(128), "linkedin" character varying(128), "facebook" character varying(128), "twitter" character varying(128), "born_on" date, "do_not_call" boolean DEFAULT 'f' NOT NULL, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "background_info" character varying(255), "skype" character varying(128), "subscribed_users" text) 
21
+  (58.1ms) CREATE INDEX "index_contacts_on_assigned_to" ON "contacts" ("assigned_to")
22
+  (64.2ms) CREATE UNIQUE INDEX "id_last_name_deleted" ON "contacts" ("user_id", "last_name", "deleted_at")
23
+  (130.3ms) CREATE TABLE "emails" ("id" serial primary key, "imap_message_id" character varying(255) NOT NULL, "user_id" integer, "mediator_id" integer, "mediator_type" character varying(255), "sent_from" character varying(255) NOT NULL, "sent_to" character varying(255) NOT NULL, "cc" character varying(255), "bcc" character varying(255), "subject" character varying(255), "body" text, "header" text, "sent_at" timestamp, "received_at" timestamp, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "state" character varying(16) DEFAULT 'Expanded' NOT NULL)
24
+  (55.8ms) CREATE INDEX "index_emails_on_mediator_id_and_mediator_type" ON "emails" ("mediator_id", "mediator_type")
25
+  (64.3ms) CREATE TABLE "field_groups" ("id" serial primary key, "name" character varying(64), "label" character varying(128), "position" integer, "hint" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "tag_id" integer, "klass_name" character varying(32))
26
+  (132.0ms) CREATE TABLE "fields" ("id" serial primary key, "type" character varying(255), "field_group_id" integer, "position" integer, "name" character varying(64), "label" character varying(128), "hint" character varying(255), "placeholder" character varying(255), "as" character varying(32), "collection" text, "disabled" boolean, "required" boolean, "maxlength" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "pair_id" integer, "settings" text) 
27
+  (97.1ms) CREATE INDEX "index_fields_on_field_group_id" ON "fields" ("field_group_id")
28
+  (63.5ms) CREATE INDEX "index_fields_on_name" ON "fields" ("name")
29
+  (73.3ms) CREATE TABLE "groups" ("id" serial primary key, "name" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
30
+  (23.4ms) CREATE TABLE "groups_users" ("group_id" integer, "user_id" integer) 
31
+  (56.6ms) CREATE INDEX "index_groups_users_on_group_id_and_user_id" ON "groups_users" ("group_id", "user_id")
32
+  (72.4ms) CREATE INDEX "index_groups_users_on_group_id" ON "groups_users" ("group_id")
33
+  (55.2ms) CREATE INDEX "index_groups_users_on_user_id" ON "groups_users" ("user_id")
34
+  (106.4ms) CREATE TABLE "leads" ("id" serial primary key, "user_id" integer, "campaign_id" integer, "assigned_to" integer, "first_name" character varying(64) DEFAULT '' NOT NULL, "last_name" character varying(64) DEFAULT '' NOT NULL, "access" character varying(8) DEFAULT 'Public', "title" character varying(64), "company" character varying(64), "source" character varying(32), "status" character varying(32), "referred_by" character varying(64), "email" character varying(64), "alt_email" character varying(64), "phone" character varying(32), "mobile" character varying(32), "blog" character varying(128), "linkedin" character varying(128), "facebook" character varying(128), "twitter" character varying(128), "rating" integer DEFAULT 0 NOT NULL, "do_not_call" boolean DEFAULT 'f' NOT NULL, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "background_info" character varying(255), "skype" character varying(128), "subscribed_users" text) 
35
+  (64.1ms) CREATE INDEX "index_leads_on_assigned_to" ON "leads" ("assigned_to")
36
+  (55.6ms) CREATE UNIQUE INDEX "index_leads_on_user_id_and_last_name_and_deleted_at" ON "leads" ("user_id", "last_name", "deleted_at")
37
+  (106.6ms) CREATE TABLE "lists" ("id" serial primary key, "name" character varying(255), "url" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
38
+  (97.9ms) CREATE TABLE "opportunities" ("id" serial primary key, "user_id" integer, "campaign_id" integer, "assigned_to" integer, "name" character varying(64) DEFAULT '' NOT NULL, "access" character varying(8) DEFAULT 'Public', "source" character varying(32), "stage" character varying(32), "probability" integer, "amount" decimal(12,2), "discount" decimal(12,2), "closes_on" date, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "background_info" character varying(255), "subscribed_users" text) 
39
+  (49.9ms) CREATE INDEX "index_opportunities_on_assigned_to" ON "opportunities" ("assigned_to")
40
+  (55.4ms) CREATE UNIQUE INDEX "id_name_deleted" ON "opportunities" ("user_id", "name", "deleted_at")
41
+  (56.5ms) CREATE TABLE "permissions" ("id" serial primary key, "user_id" integer, "asset_id" integer, "asset_type" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "group_id" integer)
42
+  (56.1ms) CREATE INDEX "index_permissions_on_asset_id_and_asset_type" ON "permissions" ("asset_id", "asset_type")
43
+  (64.0ms) CREATE INDEX "index_permissions_on_group_id" ON "permissions" ("group_id")
44
+  (55.3ms) CREATE INDEX "index_permissions_on_user_id" ON "permissions" ("user_id")
45
+  (90.2ms) CREATE TABLE "preferences" ("id" serial primary key, "user_id" integer, "name" character varying(32) DEFAULT '' NOT NULL, "value" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
46
+  (64.4ms) CREATE INDEX "index_preferences_on_user_id_and_name" ON "preferences" ("user_id", "name")
47
+  (98.4ms) CREATE TABLE "sessions" ("id" serial primary key, "session_id" character varying(255) NOT NULL, "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
48
+  (56.1ms) CREATE INDEX "index_sessions_on_session_id" ON "sessions" ("session_id")
49
+  (105.0ms) CREATE INDEX "index_sessions_on_updated_at" ON "sessions" ("updated_at")
50
+  (106.4ms) CREATE TABLE "settings" ("id" serial primary key, "name" character varying(32) DEFAULT '' NOT NULL, "value" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
51
+  (64.2ms) CREATE INDEX "index_settings_on_name" ON "settings" ("name")
52
+  (73.1ms) CREATE TABLE "taggings" ("id" serial primary key, "tag_id" integer, "taggable_id" integer, "tagger_id" integer, "tagger_type" character varying(255), "taggable_type" character varying(50), "context" character varying(50), "created_at" timestamp) 
53
+  (56.0ms) CREATE INDEX "index_taggings_on_tag_id" ON "taggings" ("tag_id")
54
+  (63.9ms) CREATE INDEX "index_taggings_on_taggable_id_and_taggable_type_and_context" ON "taggings" ("taggable_id", "taggable_type", "context")
55
+  (56.7ms) CREATE TABLE "tags" ("id" serial primary key, "name" character varying(255))
56
+  (106.2ms) CREATE TABLE "tasks" ("id" serial primary key, "user_id" integer, "assigned_to" integer, "completed_by" integer, "name" character varying(255) DEFAULT '' NOT NULL, "asset_id" integer, "asset_type" character varying(255), "priority" character varying(32), "category" character varying(32), "bucket" character varying(32), "due_at" timestamp, "completed_at" timestamp, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "background_info" character varying(255), "subscribed_users" text) 
57
+  (55.9ms) CREATE INDEX "index_tasks_on_assigned_to" ON "tasks" ("assigned_to")
58
+  (55.5ms) CREATE UNIQUE INDEX "index_tasks_on_user_id_and_name_and_deleted_at" ON "tasks" ("user_id", "name", "deleted_at")
59
+  (106.1ms) CREATE TABLE "users" ("id" serial primary key, "username" character varying(32) DEFAULT '' NOT NULL, "email" character varying(64) DEFAULT '' NOT NULL, "first_name" character varying(32), "last_name" character varying(32), "title" character varying(64), "company" character varying(64), "alt_email" character varying(64), "phone" character varying(32), "mobile" character varying(32), "aim" character varying(32), "yahoo" character varying(32), "google" character varying(32), "skype" character varying(32), "password_hash" character varying(255) DEFAULT '' NOT NULL, "password_salt" character varying(255) DEFAULT '' NOT NULL, "persistence_token" character varying(255) DEFAULT '' NOT NULL, "perishable_token" character varying(255) DEFAULT '' NOT NULL, "last_request_at" timestamp, "last_login_at" timestamp, "current_login_at" timestamp, "last_login_ip" character varying(255), "current_login_ip" character varying(255), "login_count" integer DEFAULT 0 NOT NULL, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "admin" boolean DEFAULT 'f' NOT NULL, "suspended_at" timestamp, "single_access_token" character varying(255))
60
+  (64.3ms) CREATE INDEX "index_users_on_email" ON "users" ("email")
61
+  (55.4ms) CREATE INDEX "index_users_on_last_request_at" ON "users" ("last_request_at")
62
+  (55.1ms) CREATE INDEX "index_users_on_perishable_token" ON "users" ("perishable_token")
63
+  (54.9ms) CREATE INDEX "index_users_on_remember_token" ON "users" ("persistence_token")
64
+  (63.1ms) CREATE UNIQUE INDEX "index_users_on_username_and_deleted_at" ON "users" ("username", "deleted_at")
65
+  (114.7ms) CREATE TABLE "versions" ("id" serial primary key, "item_type" character varying(255) NOT NULL, "item_id" integer NOT NULL, "event" character varying(512) NOT NULL, "whodunnit" character varying(255), "object" text, "created_at" timestamp, "object_changes" text, "related_id" integer, "related_type" character varying(255))
66
+  (66.4ms) CREATE INDEX "index_versions_on_item_type_and_item_id" ON "versions" ("item_type", "item_id")
67
+  (55.2ms) CREATE INDEX "index_versions_on_whodunnit" ON "versions" ("whodunnit")
68
+  (15.3ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
69
+  (90.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
70
+  (0.3ms) SELECT version FROM "schema_migrations"
71
+  (196.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20130312064954')
72
+ Connecting to database specified by database.yml
73
+  (0.1ms) BEGIN
74
+  (0.1ms) ROLLBACK
75
+  (0.1ms) BEGIN
76
+  (0.1ms) ROLLBACK
77
+  (0.1ms) BEGIN
78
+  (0.1ms) ROLLBACK
79
+ Connecting to database specified by database.yml
80
+  (0.1ms) BEGIN
81
+  (0.1ms) ROLLBACK
82
+  (0.1ms) BEGIN
83
+  (0.1ms) ROLLBACK
84
+  (0.1ms) BEGIN
85
+  (0.1ms) ROLLBACK
86
+ Connecting to database specified by database.yml
87
+  (0.1ms) BEGIN
88
+  (0.1ms) ROLLBACK
89
+  (0.1ms) BEGIN
90
+  (0.1ms) ROLLBACK
91
+  (0.1ms) BEGIN
92
+  (0.1ms) ROLLBACK
93
+ Connecting to database specified by database.yml
94
+ Connecting to database specified by database.yml
95
+ Connecting to database specified by database.yml
96
+  (0.1ms) BEGIN
97
+  (0.2ms) ROLLBACK
98
+  (0.1ms) BEGIN
99
+  (0.1ms) ROLLBACK
100
+  (0.0ms) BEGIN
101
+  (0.1ms) ROLLBACK
102
+  (0.0ms) BEGIN
103
+  (0.0ms) ROLLBACK
104
+  (0.0ms) BEGIN
105
+  (0.1ms) ROLLBACK
106
+  (0.0ms) BEGIN
107
+  (0.1ms) ROLLBACK
108
+  (0.1ms) BEGIN
109
+  (0.1ms) ROLLBACK
110
+ Connecting to database specified by database.yml
111
+  (0.1ms) BEGIN
112
+  (0.1ms) ROLLBACK
113
+ Connecting to database specified by database.yml
114
+  (0.1ms) BEGIN
115
+  (0.2ms) ROLLBACK
116
+  (0.1ms) BEGIN
117
+  (0.1ms) ROLLBACK
118
+  (0.0ms) BEGIN
119
+  (0.1ms) ROLLBACK
120
+ Connecting to database specified by database.yml
121
+  (0.1ms) BEGIN
122
+  (0.2ms) ROLLBACK
123
+  (0.1ms) BEGIN
124
+  (0.1ms) ROLLBACK
125
+  (0.0ms) BEGIN
126
+  (0.1ms) ROLLBACK
127
+ Connecting to database specified by database.yml
128
+  (0.1ms) BEGIN
129
+  (0.2ms) ROLLBACK
130
+  (0.1ms) BEGIN
131
+  (0.1ms) ROLLBACK
132
+  (0.1ms) BEGIN
133
+  (0.1ms) ROLLBACK
134
+ Connecting to database specified by database.yml
135
+  (0.1ms) BEGIN
136
+  (0.2ms) ROLLBACK
137
+  (0.1ms) BEGIN
138
+  (0.1ms) ROLLBACK
139
+  (0.1ms) BEGIN
140
+  (0.1ms) ROLLBACK
141
+ Connecting to database specified by database.yml
142
+  (0.1ms) BEGIN
143
+  (0.2ms) ROLLBACK
144
+  (0.1ms) BEGIN
145
+  (0.1ms) ROLLBACK
146
+  (0.1ms) BEGIN
147
+  (0.1ms) ROLLBACK
148
+ Connecting to database specified by database.yml
149
+  (0.1ms) BEGIN
150
+  (0.1ms) ROLLBACK
151
+  (0.1ms) BEGIN
152
+  (0.1ms) ROLLBACK
153
+  (0.0ms) BEGIN
154
+  (0.1ms) ROLLBACK
155
+ Connecting to database specified by database.yml
156
+  (0.1ms) BEGIN
157
+  (0.2ms) ROLLBACK
158
+  (0.1ms) BEGIN
159
+  (0.1ms) ROLLBACK
160
+  (0.0ms) BEGIN
161
+  (0.1ms) ROLLBACK
162
+ Connecting to database specified by database.yml
163
+  (0.1ms) BEGIN
164
+  (0.2ms) ROLLBACK
165
+  (0.1ms) BEGIN
166
+  (0.1ms) ROLLBACK
167
+  (0.0ms) BEGIN
168
+  (0.1ms) ROLLBACK
169
+ Connecting to database specified by database.yml
170
+  (0.1ms) BEGIN
171
+  (0.3ms) ROLLBACK
172
+ Connecting to database specified by database.yml
173
+  (0.1ms) BEGIN
174
+  (0.2ms) ROLLBACK
175
+ Connecting to database specified by database.yml
176
+  (0.1ms) BEGIN
177
+  (0.3ms) ROLLBACK
178
+ Connecting to database specified by database.yml
179
+  (0.1ms) BEGIN
180
+  (0.2ms) ROLLBACK
181
+ Connecting to database specified by database.yml
182
+  (0.1ms) BEGIN
183
+  (0.2ms) ROLLBACK
184
+ Connecting to database specified by database.yml
185
+  (0.1ms) BEGIN
186
+  (0.2ms) ROLLBACK
187
+ Connecting to database specified by database.yml
188
+  (0.1ms) BEGIN
189
+  (0.2ms) ROLLBACK
190
+ Connecting to database specified by database.yml
191
+  (0.1ms) BEGIN
192
+ Processing by EndpointsController#processor as HTML
193
+ Completed 500 Internal Server Error in 29ms
194
+  (0.2ms) ROLLBACK
195
+ Connecting to database specified by database.yml
196
+  (0.1ms) BEGIN
197
+ Processing by EndpointsController#processor as HTML
198
+ Completed 500 Internal Server Error in 19ms
199
+  (0.2ms) ROLLBACK
200
+ Connecting to database specified by database.yml
201
+  (0.1ms) BEGIN
202
+ Processing by EndpointsController#processor as JS
203
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
204
+  (0.2ms) ROLLBACK
205
+ Connecting to database specified by database.yml
206
+  (0.1ms) BEGIN
207
+  (0.2ms) ROLLBACK
208
+ Connecting to database specified by database.yml
209
+  (0.1ms) BEGIN
210
+  (0.2ms) ROLLBACK
211
+ Connecting to database specified by database.yml
212
+  (0.1ms) BEGIN
213
+  (0.2ms) ROLLBACK
214
+ Connecting to database specified by database.yml
215
+  (0.1ms) BEGIN
216
+  (0.2ms) ROLLBACK
217
+ Connecting to database specified by database.yml
218
+  (0.1ms) BEGIN
219
+  (0.2ms) ROLLBACK
220
+ Connecting to database specified by database.yml
221
+  (0.1ms) BEGIN
222
+  (0.2ms) ROLLBACK
223
+ Connecting to database specified by database.yml
224
+  (0.1ms) BEGIN
225
+  (0.3ms) ROLLBACK
226
+ Connecting to database specified by database.yml
227
+  (0.1ms) BEGIN
228
+  (0.2ms) ROLLBACK
229
+ Connecting to database specified by database.yml
230
+  (0.1ms) BEGIN
231
+  (0.3ms) ROLLBACK
232
+ Connecting to database specified by database.yml
233
+  (0.1ms) BEGIN
234
+ Processing by EndpointsController#processor as JS
235
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
236
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
237
+  (0.2ms) ROLLBACK
238
+ Connecting to database specified by database.yml
239
+  (0.1ms) BEGIN
240
+ Processing by EndpointsController#processor as JS
241
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
242
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
243
+  (0.3ms) ROLLBACK
244
+ Connecting to database specified by database.yml
245
+  (0.1ms) BEGIN
246
+ Processing by EndpointsController#processor as JS
247
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
248
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
249
+  (0.2ms) ROLLBACK
250
+  (0.1ms) BEGIN
251
+ Processing by EndpointsController#processor as JS
252
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
253
+ Completed 406 Not Acceptable in 0ms (ActiveRecord: 0.0ms)
254
+  (0.1ms) ROLLBACK
255
+  (0.1ms) BEGIN
256
+ Processing by EndpointsController#processor as JS
257
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
258
+ Completed 406 Not Acceptable in 0ms (ActiveRecord: 0.0ms)
259
+  (0.2ms) ROLLBACK
260
+ Connecting to database specified by database.yml
261
+  (0.1ms) BEGIN
262
+ Processing by EndpointsController#consume as JS
263
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
264
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
265
+  (0.2ms) ROLLBACK
266
+ Connecting to database specified by database.yml
267
+  (0.1ms) BEGIN
268
+ Processing by EndpointsController#consume as JS
269
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
270
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
271
+  (0.2ms) ROLLBACK
272
+ Connecting to database specified by database.yml
273
+  (0.1ms) BEGIN
274
+ Processing by EndpointsController#consume as JS
275
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
276
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
277
+  (0.2ms) ROLLBACK
278
+ Connecting to database specified by database.yml
279
+  (0.1ms) BEGIN
280
+ Processing by EndpointsController#consume as JS
281
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
282
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
283
+  (0.2ms) ROLLBACK
284
+  (0.1ms) BEGIN
285
+ Processing by EndpointsController#consume as JS
286
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
287
+ Completed 406 Not Acceptable in 0ms (ActiveRecord: 0.0ms)
288
+  (0.1ms) ROLLBACK
289
+  (0.1ms) BEGIN
290
+ Processing by EndpointsController#consume as JS
291
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
292
+ Completed 406 Not Acceptable in 0ms (ActiveRecord: 0.0ms)
293
+  (0.1ms) ROLLBACK
294
+ Connecting to database specified by database.yml
295
+  (0.1ms) BEGIN
296
+ Processing by EndpointsController#consume as JS
297
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
298
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
299
+  (0.2ms) ROLLBACK
300
+ Connecting to database specified by database.yml
301
+  (0.1ms) BEGIN
302
+ Processing by EndpointsController#consume as JS
303
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
304
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
305
+  (0.2ms) ROLLBACK
306
+ Connecting to database specified by database.yml
307
+  (0.1ms) BEGIN
308
+ Processing by EndpointsController#consume as JS
309
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
310
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
311
+  (0.2ms) ROLLBACK
312
+ Connecting to database specified by database.yml
313
+  (0.1ms) BEGIN
314
+ Processing by EndpointsController#consume as JS
315
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
316
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
317
+  (0.2ms) ROLLBACK
318
+ Connecting to database specified by database.yml
319
+  (0.1ms) BEGIN
320
+ Processing by EndpointsController#consume as JS
321
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
322
+ Completed 500 Internal Server Error in 1ms
323
+  (0.2ms) ROLLBACK
324
+ Connecting to database specified by database.yml
325
+  (0.1ms) BEGIN
326
+ Processing by EndpointsController#consume as JS
327
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
328
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
329
+  (0.2ms) ROLLBACK
330
+ Connecting to database specified by database.yml
331
+  (0.1ms) BEGIN
332
+ Processing by EndpointsController#consume as JS
333
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
334
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
335
+  (0.2ms) ROLLBACK
336
+ Connecting to database specified by database.yml
337
+  (0.1ms) BEGIN
338
+ Processing by EndpointsController#consume as JS
339
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
340
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
341
+ Connecting to database specified by database.yml
342
+  (0.1ms) BEGIN
343
+ Processing by EndpointsController#consume as JS
344
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
345
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
346
+  (0.2ms) ROLLBACK
347
+ Connecting to database specified by database.yml
348
+  (0.1ms) BEGIN
349
+ Processing by EndpointsController#consume as JS
350
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
351
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
352
+  (0.2ms) ROLLBACK
353
+ Connecting to database specified by database.yml
354
+  (0.1ms) BEGIN
355
+ Processing by EndpointsController#consume as JS
356
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
357
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
358
+  (0.2ms) ROLLBACK
359
+  (0.1ms) BEGIN
360
+ Processing by EndpointsController#consume as JS
361
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
362
+ Completed 406 Not Acceptable in 0ms (ActiveRecord: 0.0ms)
363
+  (0.1ms) ROLLBACK
364
+ Connecting to database specified by database.yml
365
+  (0.1ms) BEGIN
366
+ Processing by EndpointsController#consume as JS
367
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
368
+ Completed 406 Not Acceptable in 1ms (ActiveRecord: 0.0ms)
369
+  (0.2ms) ROLLBACK
370
+  (0.1ms) BEGIN
371
+ Processing by EndpointsController#consume as JS
372
+ Parameters: {"klass_name"=>"my_custom_endpoint"}
373
+ Completed 406 Not Acceptable in 0ms (ActiveRecord: 0.0ms)
374
+  (0.1ms) ROLLBACK
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -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,34 @@
1
+ require 'spec_helper'
2
+
3
+ describe FfcrmEndpoint::Endpoint do
4
+
5
+ describe "initialize" do
6
+
7
+ it "should initialize params"
8
+ it "should raise an error if action is blank" do
9
+ # expect { something }.to raise_error(SomeError)
10
+ end
11
+
12
+ end
13
+
14
+ describe "process" do
15
+
16
+ it "should find the subclass"
17
+
18
+ it "should call process on the subclass"
19
+
20
+ it "should raise an error if it cannot find the subclass"
21
+
22
+ end
23
+
24
+ describe "config" do
25
+
26
+ it "should provide access to subclass settings"
27
+
28
+ end
29
+
30
+ it "should register a subclass"
31
+ it "should return the subclass class"
32
+ it "should return the subclass class name"
33
+
34
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ describe EndpointsController do
4
+
5
+ describe "routing" do
6
+
7
+ it "generates endpoint route for custom action [GET]" do
8
+ expect(:get => "endpoints/custom").to route_to(:controller => "endpoints", :action => "custom")
9
+ end
10
+
11
+ it "generates endpoint route for custom action [POST]" do
12
+ expect(:post => "endpoints/custom").to route_to(:controller => "endpoints", :action => "custom")
13
+ end
14
+
15
+ it "generates endpoint route for custom action [PUT]" do
16
+ expect(:put => "endpoints/custom").to route_to(:controller => "endpoints", :action => "custom")
17
+ end
18
+
19
+ end
20
+
21
+ end
@@ -0,0 +1,17 @@
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+
3
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
4
+ require 'rspec/rails'
5
+ require 'rspec/autorun'
6
+ require 'factory_girl_rails'
7
+
8
+ Rails.backtrace_cleaner.remove_silencers!
9
+
10
+ # Load support files
11
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
12
+
13
+ RSpec.configure do |config|
14
+ config.mock_with :rspec
15
+ config.use_transactional_fixtures = true
16
+ config.infer_base_class_for_anonymous_controllers = false
17
+ end