nps_surveys 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa05de9f710b4e73303345f68d43d0b633fc8dc5
4
- data.tar.gz: 36f14835b067991aa7a859b3f8104d47561b691c
3
+ metadata.gz: a74cc017e4ee09753961a88290bc25b39014b6c0
4
+ data.tar.gz: c2eaab839a1b3635c7a4f0a08d7711e4d20c3ab2
5
5
  SHA512:
6
- metadata.gz: a40595a9727acbc79a23ec609494f4898db601caf7531a4d910e05bcff8fff72c4a67a02cd7ec39e7b1d026e46b3966d9fe65b2c98fec3e519c1e92ef6633d73
7
- data.tar.gz: 411b5cb2e80ec254df8072685d71e7f94e1ca05cc045d623a49b0ef4ad0234eba571caf2ad2f2085eba4e63ad8faacd6b104749ba06e28607771b39d9b560bfc
6
+ metadata.gz: 812cb72b97508afe0dfb248bca38a68ca866f13d033ad1a6a80b7c76958e4dfdc8b44f5787179242b5ea72bb8aab274bb69ac68e23930635a504c75b22384714
7
+ data.tar.gz: ae1b66cb553863d582fa2a8ceae3bd8029f7e85eb9a20cf222787272dc3cd2ab4ada3478792e9b8efb014a8e833923a6fefe60a83d074e5ee2bfca7d0aaf24c5
@@ -1,5 +1,8 @@
1
1
  module NPSSurveys
2
2
  class Response < ActiveRecord::Base
3
+
4
+ set_table_name NPSSurveys.table_name
5
+
3
6
  validates :survey, presence: true
4
7
  validates :user_id, presence: true
5
8
  end
@@ -3,6 +3,7 @@ NPSSurveys.route_namespace = :api_internal
3
3
  NPSSurveys.route_path = 'api/internal'
4
4
  NPSSurveys.route_scope = 'nps_surveys'
5
5
  NPSSurveys.current_user = lambda { |controller| controller.send(:current_user) }
6
+ NPSSurveys.table_name = 'nps_surveys_responses'
6
7
 
7
8
  ActiveSupport::Inflector.inflections do |inflect|
8
9
  inflect.acronym 'NPS'
data/lib/nps_surveys.rb CHANGED
@@ -3,5 +3,5 @@ require 'nps_surveys/engine'
3
3
 
4
4
  module NPSSurveys
5
5
  mattr_accessor :controller_parent_class, :route_namespace,
6
- :route_path, :route_scope, :current_user
6
+ :route_path, :route_scope, :current_user, :table_name
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module NPSSurveys
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.2.2'.freeze
3
3
  end
@@ -4,9 +4,7 @@ module NPSSurveys
4
4
  describe ApiInternal::ResponsesController do
5
5
  before(:each) do
6
6
  user = FactoryGirl.create(:user)
7
- NPSSurveys.current_user = lambda do
8
- user
9
- end
7
+ NPSSurveys.current_user = lambda { |controller| user }
10
8
  end
11
9
 
12
10
  routes { Engine.routes }
@@ -16,7 +14,7 @@ module NPSSurveys
16
14
  %w{ hola1 hola2 hola3 }.map do |s|
17
15
  r = Response.new
18
16
  r.survey = s
19
- r.user_id = NPSSurveys.current_user.call.id
17
+ r.user_id = NPSSurveys.current_user.call(nil).id
20
18
  r.save!
21
19
  r
22
20
  end
@@ -1 +1,72 @@
1
1
  Connecting to database specified by database.yml
2
+ Connecting to database specified by database.yml
3
+ Connecting to database specified by database.yml
4
+  (1.3ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
5
+  (45.5ms) DROP DATABASE IF EXISTS `nps_surveys_test`
6
+  (0.3ms) CREATE DATABASE `nps_surveys_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
7
+  (28.5ms) CREATE TABLE `nps_surveys_responses` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `survey` varchar(255) NOT NULL, `user_id` int(11) NOT NULL, `score` int(11), `feedback` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
8
+  (23.9ms) CREATE INDEX `nps_surveys_responses_user_id_fk` ON `nps_surveys_responses` (`user_id`)
9
+  (29.2ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `login` varchar(255), `password` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
10
+  (74.7ms) ALTER TABLE `nps_surveys_responses` ADD CONSTRAINT `nps_surveys_responses_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(id)
11
+  (37.6ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
12
+  (65.7ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
13
+  (0.2ms) SELECT version FROM `schema_migrations`
14
+  (13.7ms) INSERT INTO `schema_migrations` (version) VALUES ('20160728080202')
15
+  (6.9ms) INSERT INTO `schema_migrations` (version) VALUES ('20160721092137')
16
+  (7.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20160614145840')
17
+ Connecting to database specified by database.yml
18
+  (0.2ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
19
+  (42.6ms) DROP DATABASE IF EXISTS `nps_surveys_test`
20
+  (0.3ms) CREATE DATABASE `nps_surveys_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
21
+  (28.7ms) CREATE TABLE `nps_surveys_responses` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `survey` varchar(255) NOT NULL, `user_id` int(11) NOT NULL, `score` int(11), `feedback` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
22
+  (21.1ms) CREATE INDEX `nps_surveys_responses_user_id_fk` ON `nps_surveys_responses` (`user_id`)
23
+  (27.9ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `login` varchar(255), `password` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
24
+  (116.1ms) ALTER TABLE `nps_surveys_responses` ADD CONSTRAINT `nps_surveys_responses_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(id)
25
+  (47.9ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
26
+  (69.7ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
27
+  (0.3ms) SELECT version FROM `schema_migrations`
28
+  (6.0ms) INSERT INTO `schema_migrations` (version) VALUES ('20160728080202')
29
+  (6.5ms) INSERT INTO `schema_migrations` (version) VALUES ('20160721092137')
30
+  (5.2ms) INSERT INTO `schema_migrations` (version) VALUES ('20160614145840')
31
+ Connecting to database specified by database.yml
32
+  (0.2ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
33
+  (44.2ms) DROP DATABASE IF EXISTS `nps_surveys_test`
34
+  (0.3ms) CREATE DATABASE `nps_surveys_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
35
+  (30.3ms) CREATE TABLE `nps_surveys_responses` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `survey` varchar(255) NOT NULL, `user_id` int(11) NOT NULL, `score` int(11), `feedback` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
36
+  (20.6ms) CREATE INDEX `nps_surveys_responses_user_id_fk` ON `nps_surveys_responses` (`user_id`)
37
+  (30.7ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `login` varchar(255), `password` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
38
+  (76.8ms) ALTER TABLE `nps_surveys_responses` ADD CONSTRAINT `nps_surveys_responses_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(id)
39
+  (29.2ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
40
+  (41.0ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
41
+  (0.1ms) SELECT version FROM `schema_migrations`
42
+  (3.8ms) INSERT INTO `schema_migrations` (version) VALUES ('20160728080202')
43
+  (3.7ms) INSERT INTO `schema_migrations` (version) VALUES ('20160721092137')
44
+  (4.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20160614145840')
45
+ Connecting to database specified by database.yml
46
+  (0.2ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
47
+  (41.0ms) DROP DATABASE IF EXISTS `nps_surveys_test`
48
+  (0.2ms) CREATE DATABASE `nps_surveys_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
49
+  (28.9ms) CREATE TABLE `nps_surveys_responses` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `survey` varchar(255) NOT NULL, `user_id` int(11) NOT NULL, `score` int(11), `feedback` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
50
+  (20.8ms) CREATE INDEX `nps_surveys_responses_user_id_fk` ON `nps_surveys_responses` (`user_id`)
51
+  (29.7ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `login` varchar(255), `password` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
52
+  (97.3ms) ALTER TABLE `nps_surveys_responses` ADD CONSTRAINT `nps_surveys_responses_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(id)
53
+  (46.4ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
54
+  (74.2ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
55
+  (0.4ms) SELECT version FROM `schema_migrations`
56
+  (6.4ms) INSERT INTO `schema_migrations` (version) VALUES ('20160728080202')
57
+  (5.1ms) INSERT INTO `schema_migrations` (version) VALUES ('20160721092137')
58
+  (6.9ms) INSERT INTO `schema_migrations` (version) VALUES ('20160614145840')
59
+ Connecting to database specified by database.yml
60
+  (0.2ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` 
61
+  (153.4ms) DROP DATABASE IF EXISTS `nps_surveys_test`
62
+  (0.5ms) CREATE DATABASE `nps_surveys_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
63
+  (34.1ms) CREATE TABLE `nps_surveys_responses` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `survey` varchar(255) NOT NULL, `user_id` int(11) NOT NULL, `score` int(11), `feedback` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
64
+  (23.4ms) CREATE INDEX `nps_surveys_responses_user_id_fk` ON `nps_surveys_responses` (`user_id`)
65
+  (32.5ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `login` varchar(255), `password` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
66
+  (78.7ms) ALTER TABLE `nps_surveys_responses` ADD CONSTRAINT `nps_surveys_responses_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(id)
67
+  (32.3ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
68
+  (46.3ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
69
+  (0.4ms) SELECT version FROM `schema_migrations`
70
+  (7.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20160728080202')
71
+  (8.4ms) INSERT INTO `schema_migrations` (version) VALUES ('20160721092137')
72
+  (10.0ms) INSERT INTO `schema_migrations` (version) VALUES ('20160614145840')
@@ -182,3 +182,159 @@ Completed 200 OK in 11.1ms (Views: 0.3ms | ActiveRecord: 8.5ms)
182
182
  Processing by NPSSurveys::ApiInternal::ResponsesController#index as HTML
183
183
  NPSSurveys::Response Load (0.3ms) SELECT `nps_surveys_responses`.* FROM `nps_surveys_responses` WHERE `nps_surveys_responses`.`user_id` = 4
184
184
  Completed 200 OK in 4.0ms (Views: 0.1ms | ActiveRecord: 0.3ms)
185
+ Connecting to database specified by database.yml
186
+  (0.1ms) BEGIN
187
+ SQL (0.3ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:08:23', 'gandhi_1', 'dragons22', '2016-08-22 10:08:23')
188
+  (4.4ms) COMMIT
189
+ Processing by NPSSurveys::ApiInternal::ResponsesController#create as HTML
190
+ Parameters: {"score"=>"4"}
191
+ Completed 500 Internal Server Error in 6.4ms
192
+  (0.1ms) BEGIN
193
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:08:23', 'gandhi_2', 'dragons22', '2016-08-22 10:08:23')
194
+  (4.5ms) COMMIT
195
+ Processing by NPSSurveys::ApiInternal::ResponsesController#create as HTML
196
+ Parameters: {"survey"=>"hola", "score"=>"4"}
197
+ Completed 500 Internal Server Error in 0.3ms
198
+  (0.1ms) BEGIN
199
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:08:23', 'gandhi_3', 'dragons22', '2016-08-22 10:08:23')
200
+  (4.1ms) COMMIT
201
+ Processing by NPSSurveys::ApiInternal::ResponsesController#create as HTML
202
+ Parameters: {"survey"=>"hola", "score"=>"4"}
203
+ Completed 500 Internal Server Error in 0.7ms
204
+  (0.1ms) BEGIN
205
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:08:23', 'gandhi_4', 'dragons22', '2016-08-22 10:08:23')
206
+  (4.0ms) COMMIT
207
+  (0.1ms) BEGIN
208
+ SQL (0.2ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:08:23', NULL, NULL, 'hola1', '2016-08-22 10:08:23', 4)
209
+  (3.9ms) COMMIT
210
+  (0.1ms) BEGIN
211
+ SQL (0.2ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:08:23', NULL, NULL, 'hola2', '2016-08-22 10:08:23', 4)
212
+  (7.7ms) COMMIT
213
+  (0.1ms) BEGIN
214
+ SQL (2.3ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:08:23', NULL, NULL, 'hola3', '2016-08-22 10:08:23', 4)
215
+  (4.0ms) COMMIT
216
+  (0.1ms) BEGIN
217
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:08:23', 'gandhi_5', 'dragons22', '2016-08-22 10:08:23')
218
+  (4.4ms) COMMIT
219
+  (0.1ms) BEGIN
220
+ SQL (0.2ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:08:23', NULL, NULL, 'hola4', '2016-08-22 10:08:23', 5)
221
+  (3.9ms) COMMIT
222
+  (0.1ms) BEGIN
223
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:08:23', 'gandhi_6', 'dragons22', '2016-08-22 10:08:23')
224
+  (4.0ms) COMMIT
225
+ Processing by NPSSurveys::ApiInternal::ResponsesController#index as HTML
226
+ Completed 500 Internal Server Error in 0.8ms
227
+ Connecting to database specified by database.yml
228
+  (0.1ms) BEGIN
229
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:09:08', 'gandhi_1', 'dragons22', '2016-08-22 10:09:08')
230
+  (9.4ms) COMMIT
231
+  (0.1ms) BEGIN
232
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:09:08', 'gandhi_2', 'dragons22', '2016-08-22 10:09:08')
233
+  (7.2ms) COMMIT
234
+ Processing by NPSSurveys::ApiInternal::ResponsesController#create as HTML
235
+ Parameters: {"score"=>"4"}
236
+  (0.1ms) BEGIN
237
+  (0.1ms) ROLLBACK
238
+ Completed 422 Unprocessable Entity in 11.3ms (Views: 0.7ms | ActiveRecord: 0.2ms)
239
+  (0.1ms) BEGIN
240
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:09:08', 'gandhi_3', 'dragons22', '2016-08-22 10:09:08')
241
+  (9.3ms) COMMIT
242
+ Processing by NPSSurveys::ApiInternal::ResponsesController#create as HTML
243
+ Parameters: {"survey"=>"hola", "score"=>"4"}
244
+  (0.1ms) BEGIN
245
+ SQL (0.2ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:09:08', NULL, 4, 'hola', '2016-08-22 10:09:08', 3)
246
+  (5.9ms) COMMIT
247
+ Completed 200 OK in 9.6ms (Views: 0.6ms | ActiveRecord: 6.2ms)
248
+ NPSSurveys::Response Load (0.3ms) SELECT `nps_surveys_responses`.* FROM `nps_surveys_responses` ORDER BY `nps_surveys_responses`.`id` DESC LIMIT 1
249
+  (0.1ms) BEGIN
250
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:09:08', 'gandhi_4', 'dragons22', '2016-08-22 10:09:08')
251
+  (7.2ms) COMMIT
252
+ Processing by NPSSurveys::ApiInternal::ResponsesController#create as HTML
253
+ Parameters: {"survey"=>"hola", "score"=>"4"}
254
+  (0.1ms) BEGIN
255
+ SQL (0.2ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:09:08', NULL, 4, 'hola', '2016-08-22 10:09:08', 4)
256
+  (12.7ms) COMMIT
257
+ Completed 200 OK in 15.4ms (Views: 0.6ms | ActiveRecord: 13.0ms)
258
+ Connecting to database specified by database.yml
259
+  (0.3ms) BEGIN
260
+ SQL (0.4ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:09:57', 'gandhi_1', 'dragons22', '2016-08-22 10:09:57')
261
+  (4.2ms) COMMIT
262
+ Processing by NPSSurveys::ApiInternal::ResponsesController#create as HTML
263
+ Parameters: {"score"=>"4"}
264
+  (0.1ms) BEGIN
265
+  (0.1ms) ROLLBACK
266
+ Completed 422 Unprocessable Entity in 16.8ms (Views: 0.7ms | ActiveRecord: 1.4ms)
267
+  (0.1ms) BEGIN
268
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:09:57', 'gandhi_2', 'dragons22', '2016-08-22 10:09:57')
269
+  (5.1ms) COMMIT
270
+ Processing by NPSSurveys::ApiInternal::ResponsesController#create as HTML
271
+ Parameters: {"survey"=>"hola", "score"=>"4"}
272
+  (0.1ms) BEGIN
273
+ SQL (0.3ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:09:57', NULL, 4, 'hola', '2016-08-22 10:09:57', 2)
274
+  (3.0ms) COMMIT
275
+ Completed 200 OK in 7.0ms (Views: 0.8ms | ActiveRecord: 3.4ms)
276
+ NPSSurveys::Response Load (0.3ms) SELECT `nps_surveys_responses`.* FROM `nps_surveys_responses` ORDER BY `nps_surveys_responses`.`id` DESC LIMIT 1
277
+  (0.1ms) BEGIN
278
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:09:57', 'gandhi_3', 'dragons22', '2016-08-22 10:09:57')
279
+  (5.0ms) COMMIT
280
+ Processing by NPSSurveys::ApiInternal::ResponsesController#create as HTML
281
+ Parameters: {"survey"=>"hola", "score"=>"4"}
282
+  (0.1ms) BEGIN
283
+ SQL (0.3ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:09:57', NULL, 4, 'hola', '2016-08-22 10:09:57', 3)
284
+  (7.8ms) COMMIT
285
+ Completed 200 OK in 10.8ms (Views: 0.3ms | ActiveRecord: 8.2ms)
286
+  (0.1ms) BEGIN
287
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:09:57', 'gandhi_4', 'dragons22', '2016-08-22 10:09:57')
288
+  (5.2ms) COMMIT
289
+ Connecting to database specified by database.yml
290
+  (0.1ms) BEGIN
291
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:10:17', 'gandhi_1', 'dragons22', '2016-08-22 10:10:17')
292
+  (5.2ms) COMMIT
293
+  (0.1ms) BEGIN
294
+ SQL (0.2ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:10:17', NULL, NULL, 'hola1', '2016-08-22 10:10:17', 1)
295
+  (2.9ms) COMMIT
296
+  (0.1ms) BEGIN
297
+ SQL (0.2ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:10:17', NULL, NULL, 'hola2', '2016-08-22 10:10:17', 1)
298
+  (5.1ms) COMMIT
299
+  (0.1ms) BEGIN
300
+ SQL (0.2ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:10:17', NULL, NULL, 'hola3', '2016-08-22 10:10:17', 1)
301
+  (2.9ms) COMMIT
302
+  (0.1ms) BEGIN
303
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:10:17', 'gandhi_2', 'dragons22', '2016-08-22 10:10:17')
304
+  (8.3ms) COMMIT
305
+  (0.1ms) BEGIN
306
+ SQL (3.8ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:10:17', NULL, NULL, 'hola4', '2016-08-22 10:10:17', 2)
307
+  (2.9ms) COMMIT
308
+  (0.2ms) BEGIN
309
+ SQL (0.3ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:10:17', 'gandhi_3', 'dragons22', '2016-08-22 10:10:17')
310
+  (5.2ms) COMMIT
311
+ Processing by NPSSurveys::ApiInternal::ResponsesController#index as HTML
312
+ NPSSurveys::Response Load (0.4ms) SELECT `nps_surveys_responses`.* FROM `nps_surveys_responses` WHERE `nps_surveys_responses`.`user_id` = 1
313
+ Completed 200 OK in 10.2ms (Views: 0.1ms | ActiveRecord: 0.4ms)
314
+  (0.1ms) BEGIN
315
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:10:17', 'gandhi_4', 'dragons22', '2016-08-22 10:10:17')
316
+  (2.8ms) COMMIT
317
+ Processing by NPSSurveys::ApiInternal::ResponsesController#create as HTML
318
+ Parameters: {"survey"=>"hola", "score"=>"4"}
319
+  (0.1ms) BEGIN
320
+ SQL (0.2ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:10:17', NULL, 4, 'hola', '2016-08-22 10:10:17', 4)
321
+  (5.1ms) COMMIT
322
+ Completed 200 OK in 8.4ms (Views: 0.5ms | ActiveRecord: 5.5ms)
323
+ NPSSurveys::Response Load (0.3ms) SELECT `nps_surveys_responses`.* FROM `nps_surveys_responses` ORDER BY `nps_surveys_responses`.`id` DESC LIMIT 1
324
+  (0.1ms) BEGIN
325
+ SQL (0.2ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:10:17', 'gandhi_5', 'dragons22', '2016-08-22 10:10:17')
326
+  (2.6ms) COMMIT
327
+ Processing by NPSSurveys::ApiInternal::ResponsesController#create as HTML
328
+ Parameters: {"survey"=>"hola", "score"=>"4"}
329
+  (0.1ms) BEGIN
330
+ SQL (0.2ms) INSERT INTO `nps_surveys_responses` (`created_at`, `feedback`, `score`, `survey`, `updated_at`, `user_id`) VALUES ('2016-08-22 10:10:17', NULL, 4, 'hola', '2016-08-22 10:10:17', 5)
331
+  (5.0ms) COMMIT
332
+ Completed 200 OK in 9.3ms (Views: 1.7ms | ActiveRecord: 5.4ms)
333
+  (0.2ms) BEGIN
334
+ SQL (0.3ms) INSERT INTO `users` (`created_at`, `login`, `password`, `updated_at`) VALUES ('2016-08-22 10:10:17', 'gandhi_6', 'dragons22', '2016-08-22 10:10:17')
335
+  (3.3ms) COMMIT
336
+ Processing by NPSSurveys::ApiInternal::ResponsesController#create as HTML
337
+ Parameters: {"score"=>"4"}
338
+  (0.2ms) BEGIN
339
+  (0.2ms) ROLLBACK
340
+ Completed 422 Unprocessable Entity in 16.4ms (Views: 1.2ms | ActiveRecord: 0.4ms)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nps_surveys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Redbooth team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-17 00:00:00.000000000 Z
11
+ date: 2016-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails