basic vouch working

This commit is contained in:
spengreb 2019-09-30 17:22:33 +02:00
parent 51c0c9561a
commit 652e436e1d
2 changed files with 517 additions and 7 deletions

View file

@ -17,16 +17,26 @@ class VouchersController < ApplicationController
# POST /vouchers
def create
# Logic for creating a voucher
params[:voucher]
if Voucher.exists?(vouchee: params[:voucher])
output = ""
whitelist = `mcrcon -r -H mine.vereto.net -p #{ENV["MC_RCON_PASS"]} "whitelist list" | sed 's/There are*.*whitelisted players: //g'`.split(", ")
if Voucher.exists?(vouchee: params[:voucher]) && params[:voucher].in?(whitelist)
@voucher = Voucher.new(voucher_params)
if @voucher.save
output = `mcrcon -r -H mine.vereto.net -p #{ENV["MC_RCON_PASS"]} "whitelist add #{params[:vouchee]}"`
render json: output, status: :created, location: @voucher
else
render json: @voucher.errors, status: :unprocessable_entity
end
else
render json: "{ Voucher is not valid }" + params[:voucher].in?(whitelist), status: :unprocessable_entity
end
if @voucher.save
render json: @voucher, status: :created, location: @voucher
else
render json: @voucher.errors, status: :unprocessable_entity
end
end
# PATCH/PUT /vouchers/1

View file

@ -1368,3 +1368,503 @@ Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.7ms | Allocations: 1
NoMethodError (undefined method `save' for "NOPE":String):
app/controllers/vouchers_controller.rb:27:in `create'
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 16:58:06 +0200
Mysql2::Error::ConnectionError (Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)):
mysql2 (0.5.2) lib/mysql2/client.rb:90:in `connect'
mysql2 (0.5.2) lib/mysql2/client.rb:90:in `initialize'
activerecord (6.0.0) lib/active_record/connection_adapters/mysql2_adapter.rb:24:in `new'
activerecord (6.0.0) lib/active_record/connection_adapters/mysql2_adapter.rb:24:in `mysql2_connection'
activerecord (6.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:879:in `new_connection'
activerecord (6.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:923:in `checkout_new_connection'
activerecord (6.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:902:in `try_to_checkout_new_connection'
activerecord (6.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:863:in `acquire_connection'
activerecord (6.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:587:in `checkout'
activerecord (6.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:431:in `connection'
activerecord (6.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:1111:in `retrieve_connection'
activerecord (6.0.0) lib/active_record/connection_handling.rb:231:in `retrieve_connection'
activerecord (6.0.0) lib/active_record/connection_handling.rb:199:in `connection'
activerecord (6.0.0) lib/active_record/migration.rb:562:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (6.0.0) lib/active_support/callbacks.rb:101:in `run_callbacks'
actionpack (6.0.0) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (6.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (6.0.0) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (6.0.0) lib/active_support/tagged_logging.rb:80:in `block in tagged'
activesupport (6.0.0) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (6.0.0) lib/active_support/tagged_logging.rb:80:in `tagged'
railties (6.0.0) lib/rails/rack/logger.rb:26:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.0.7) lib/rack/runtime.rb:22:in `call'
activesupport (6.0.0) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/static.rb:126:in `call'
rack (2.0.7) lib/rack/sendfile.rb:111:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/host_authorization.rb:83:in `call'
rack-cors (1.0.3) lib/rack/cors.rb:95:in `call'
railties (6.0.0) lib/rails/engine.rb:526:in `call'
puma (3.12.1) lib/puma/configuration.rb:227:in `call'
puma (3.12.1) lib/puma/server.rb:660:in `handle_request'
puma (3.12.1) lib/puma/server.rb:474:in `process_client'
puma (3.12.1) lib/puma/server.rb:334:in `block in run'
puma (3.12.1) lib/puma/thread_pool.rb:135:in `block in spawn_thread'
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 16:58:27 +0200
 (3.3ms) SET @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
 (3.0ms) SELECT `schema_migrations`.`version` FROM `schema_migrations` ORDER BY `schema_migrations`.`version` ASC
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"simon", "vouchee"=>"rus64"}
Voucher Exists? (0.2ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:21:in `create'
Completed 200 OK in 103ms (Views: 0.2ms | ActiveRecord: 1.5ms | Allocations: 1824)
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 16:59:02 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"simon", "vouchee"=>"rus64"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:21:in `create'
Completed 200 OK in 111ms (Views: 0.1ms | ActiveRecord: 1.2ms | Allocations: 1207)
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 16:59:49 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"simon", "vouchee"=>"rus64"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:21:in `create'
Completed 200 OK in 101ms (Views: 0.2ms | ActiveRecord: 1.0ms | Allocations: 1295)
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 17:00:05 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"simon", "vouchee"=>"rus64"}
Voucher Exists? (0.2ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:21:in `create'
Completed 200 OK in 85ms (Views: 0.2ms | ActiveRecord: 0.7ms | Allocations: 1220)
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 17:00:11 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"simon", "vouchee"=>"rus64"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:21:in `create'
Completed 200 OK in 107ms (Views: 0.3ms | ActiveRecord: 1.0ms | Allocations: 1281)
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 17:01:44 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"simon", "vouchee"=>"rus64"}
Voucher Exists? (0.2ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:21:in `create'
Completed 200 OK in 109ms (Views: 0.2ms | ActiveRecord: 0.7ms | Allocations: 1212)
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 17:02:28 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"simon", "vouchee"=>"rus64"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:21:in `create'
Completed 500 Internal Server Error in 102ms (Views: 0.1ms | ActiveRecord: 1.0ms | Allocations: 1305)
AbstractController::DoubleRenderError (Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return".):
app/controllers/vouchers_controller.rb:35:in `create'
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 17:02:35 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"simon", "vouchee"=>"rus64"}
Voucher Exists? (0.2ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:21:in `create'
Completed 200 OK in 102ms (Views: 0.1ms | ActiveRecord: 0.7ms | Allocations: 1208)
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 17:02:46 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"simon", "vouchee"=>"rus64"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:21:in `create'
Completed 200 OK in 100ms (Views: 0.1ms | ActiveRecord: 0.7ms | Allocations: 1210)
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 17:03:33 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"simon", "vouchee"=>"rus64"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:21:in `create'
Completed 422 Unprocessable Entity in 105ms (Views: 0.2ms | ActiveRecord: 0.9ms | Allocations: 1209)
Started GET "/vouchers" for ::1 at 2019-09-30 17:03:40 +0200
Processing by VouchersController#index as HTML
Parameters: {"voucher"=>{}}
Voucher Load (0.5ms) SELECT `vouchers`.* FROM `vouchers`
↳ app/controllers/vouchers_controller.rb:9:in `index'
Completed 200 OK in 9ms (Views: 7.4ms | ActiveRecord: 1.7ms | Allocations: 4886)
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 17:04:52 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"simon", "vouchee"=>"rus64"}
Voucher Exists? (0.2ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
Completed 422 Unprocessable Entity in 123ms (Views: 0.1ms | ActiveRecord: 1.1ms | Allocations: 1210)
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 17:06:28 +0200
SyntaxError (/media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:23: syntax error, unexpected tIDENTIFIER, expecting then or ';' or '\n'
...]) && whitelist.include? params[:voucher]
... ^~~~~~
/media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:31: else without rescue is useless
else
^~~~
/media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:64: syntax error, unexpected end, expecting end-of-input):
app/controllers/vouchers_controller.rb:23: syntax error, unexpected tIDENTIFIER, expecting then or ';' or '\n'
app/controllers/vouchers_controller.rb:31: else without rescue is useless
app/controllers/vouchers_controller.rb:64: syntax error, unexpected end, expecting end-of-input
app/controllers/vouchers_controller.rb:23: syntax error, unexpected tIDENTIFIER, expecting then or ';' or '\n'
app/controllers/vouchers_controller.rb:31: else without rescue is useless
app/controllers/vouchers_controller.rb:64: syntax error, unexpected end, expecting end-of-input
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 17:06:48 +0200
SyntaxError (/media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:23: syntax error, unexpected tIDENTIFIER, expecting then or ';' or '\n'
...ucher]) && whitelist.in? params[:voucher]
... ^~~~~~
/media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:31: else without rescue is useless
else
^~~~
/media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:64: syntax error, unexpected end, expecting end-of-input):
app/controllers/vouchers_controller.rb:23: syntax error, unexpected tIDENTIFIER, expecting then or ';' or '\n'
app/controllers/vouchers_controller.rb:31: else without rescue is useless
app/controllers/vouchers_controller.rb:64: syntax error, unexpected end, expecting end-of-input
app/controllers/vouchers_controller.rb:23: syntax error, unexpected tIDENTIFIER, expecting then or ';' or '\n'
app/controllers/vouchers_controller.rb:31: else without rescue is useless
app/controllers/vouchers_controller.rb:64: syntax error, unexpected end, expecting end-of-input
Started POST "/vouchers?voucher=simon&vouchee=rus64" for ::1 at 2019-09-30 17:07:14 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"simon", "vouchee"=>"rus64"}
Voucher Exists? (0.2ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
Completed 422 Unprocessable Entity in 115ms (Views: 0.1ms | ActiveRecord: 0.8ms | Allocations: 1209)
Started GET "/vouchers" for ::1 at 2019-09-30 17:07:18 +0200
Processing by VouchersController#index as HTML
Parameters: {"voucher"=>{}}
Voucher Load (0.3ms) SELECT `vouchers`.* FROM `vouchers`
↳ app/controllers/vouchers_controller.rb:9:in `index'
Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 1.2ms | Allocations: 4612)
Started POST "/vouchers?voucher=rus64&vouchee=simon" for ::1 at 2019-09-30 17:07:49 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"rus64", "vouchee"=>"simon"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'rus64' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
Completed 422 Unprocessable Entity in 110ms (Views: 0.1ms | ActiveRecord: 0.3ms | Allocations: 736)
Started POST "/vouchers?voucher=promostarr&vouchee=simon" for ::1 at 2019-09-30 17:08:07 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"promostarr", "vouchee"=>"simon"}
Voucher Exists? (0.4ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'promostarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
Completed 422 Unprocessable Entity in 108ms (Views: 0.2ms | ActiveRecord: 0.4ms | Allocations: 734)
Started POST "/vouchers?voucher=promostarr&vouchee=simon" for ::1 at 2019-09-30 17:08:43 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"promostarr", "vouchee"=>"simon"}
Voucher Exists? (0.4ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'promostarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
Completed 500 Internal Server Error in 114ms (ActiveRecord: 0.8ms | Allocations: 1231)
TypeError (no implicit conversion of false into String):
app/controllers/vouchers_controller.rb:33:in `+'
app/controllers/vouchers_controller.rb:33:in `create'
Started POST "/vouchers?voucher=promostarr&vouchee=simon" for ::1 at 2019-09-30 17:08:59 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"promostarr", "vouchee"=>"simon"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'promostarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
Completed 422 Unprocessable Entity in 107ms (Views: 0.2ms | ActiveRecord: 0.8ms | Allocations: 1218)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:09:16 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'PromoStarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
Completed 422 Unprocessable Entity in 116ms (Views: 0.1ms | ActiveRecord: 0.3ms | Allocations: 738)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:09:34 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Voucher Exists? (0.2ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'PromoStarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
Completed 422 Unprocessable Entity in 108ms (Views: 0.2ms | ActiveRecord: 0.8ms | Allocations: 1230)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:09:41 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'PromoStarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
Completed 422 Unprocessable Entity in 111ms (Views: 0.2ms | ActiveRecord: 0.3ms | Allocations: 748)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:09:56 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Voucher Exists? (0.2ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'PromoStarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :vouchee attribute in Voucher model, pass `case_sensitive: true` option explicitly to the uniqueness validator. (called from create at /media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:26)
 (0.1ms) BEGIN
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = BINARY 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Create (0.9ms) INSERT INTO `vouchers` (`voucher`, `vouchee`, `created_at`, `updated_at`) VALUES ('PromoStarr', 'simon', '2019-09-30 15:09:57.086963', '2019-09-30 15:09:57.086963')
↳ app/controllers/vouchers_controller.rb:26:in `create'
 (2.2ms) COMMIT
↳ app/controllers/vouchers_controller.rb:26:in `create'
Completed 201 Created in 120ms (Views: 0.6ms | ActiveRecord: 4.7ms | Allocations: 8349)
Started GET "/vouchers" for ::1 at 2019-09-30 17:10:09 +0200
Processing by VouchersController#index as HTML
Parameters: {"voucher"=>{}}
Voucher Load (0.3ms) SELECT `vouchers`.* FROM `vouchers`
↳ app/controllers/vouchers_controller.rb:9:in `index'
Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 1.4ms | Allocations: 4800)
Started GET "/vouchers" for ::1 at 2019-09-30 17:12:19 +0200
Processing by VouchersController#index as HTML
Parameters: {"voucher"=>{}}
Voucher Load (0.2ms) SELECT `vouchers`.* FROM `vouchers`
↳ app/controllers/vouchers_controller.rb:9:in `index'
Completed 200 OK in 5ms (Views: 4.1ms | ActiveRecord: 1.7ms | Allocations: 4286)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:12:22 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Completed 200 OK in 105ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 118)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:12:31 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Completed 200 OK in 102ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 175)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:12:41 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Completed 200 OK in 103ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 235)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:12:48 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Completed 200 OK in 109ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 176)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:13:38 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Completed 200 OK in 104ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 180)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:14:17 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Completed 200 OK in 104ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 191)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:14:43 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Completed 200 OK in 109ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 190)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:15:01 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Completed 200 OK in 123ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 181)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:15:17 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Voucher Exists? (0.1ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'PromoStarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :vouchee attribute in Voucher model, pass `case_sensitive: true` option explicitly to the uniqueness validator. (called from create at /media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:26)
 (0.1ms) BEGIN
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = BINARY 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Create (0.2ms) INSERT INTO `vouchers` (`voucher`, `vouchee`, `created_at`, `updated_at`) VALUES ('PromoStarr', 'simon', '2019-09-30 15:15:17.717549', '2019-09-30 15:15:17.717549')
↳ app/controllers/vouchers_controller.rb:26:in `create'
 (2.7ms) COMMIT
↳ app/controllers/vouchers_controller.rb:26:in `create'
Completed 201 Created in 119ms (Views: 1.0ms | ActiveRecord: 4.3ms | Allocations: 8144)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:15:27 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'PromoStarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :vouchee attribute in Voucher model, pass `case_sensitive: true` option explicitly to the uniqueness validator. (called from create at /media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:26)
 (0.1ms) BEGIN
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = BINARY 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:26:in `create'
 (0.1ms) ROLLBACK
↳ app/controllers/vouchers_controller.rb:26:in `create'
Completed 422 Unprocessable Entity in 340ms (Views: 0.1ms | ActiveRecord: 0.9ms | Allocations: 179083)
Started POST "/vouchers?voucher=PromoStarr&vouchee=simon" for ::1 at 2019-09-30 17:15:35 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"simon"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'PromoStarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :vouchee attribute in Voucher model, pass `case_sensitive: true` option explicitly to the uniqueness validator. (called from create at /media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:26)
 (0.1ms) BEGIN
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = BINARY 'simon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:26:in `create'
 (0.1ms) ROLLBACK
↳ app/controllers/vouchers_controller.rb:26:in `create'
Completed 422 Unprocessable Entity in 114ms (Views: 0.1ms | ActiveRecord: 0.8ms | Allocations: 3669)
Started POST "/vouchers?voucher=PromoStarr&vouchee=Simon0519" for ::1 at 2019-09-30 17:16:04 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"Simon0519"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'PromoStarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :vouchee attribute in Voucher model, pass `case_sensitive: true` option explicitly to the uniqueness validator. (called from create at /media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:26)
 (0.1ms) BEGIN
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Exists? (0.2ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = BINARY 'Simon0519' LIMIT 1
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Create (0.2ms) INSERT INTO `vouchers` (`voucher`, `vouchee`, `created_at`, `updated_at`) VALUES ('PromoStarr', 'Simon0519', '2019-09-30 15:16:04.308520', '2019-09-30 15:16:04.308520')
↳ app/controllers/vouchers_controller.rb:26:in `create'
 (4.2ms) COMMIT
↳ app/controllers/vouchers_controller.rb:26:in `create'
Completed 201 Created in 119ms (Views: 0.4ms | ActiveRecord: 5.1ms | Allocations: 4202)
Started POST "/vouchers?voucher=Simon0519&vouchee=Spartan_Bacon" for ::1 at 2019-09-30 17:16:38 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"Simon0519", "vouchee"=>"Spartan_Bacon"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'Simon0519' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :vouchee attribute in Voucher model, pass `case_sensitive: true` option explicitly to the uniqueness validator. (called from create at /media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:26)
 (0.2ms) BEGIN
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = BINARY 'Spartan_Bacon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Create (0.3ms) INSERT INTO `vouchers` (`voucher`, `vouchee`, `created_at`, `updated_at`) VALUES ('Simon0519', 'Spartan_Bacon', '2019-09-30 15:16:38.270472', '2019-09-30 15:16:38.270472')
↳ app/controllers/vouchers_controller.rb:26:in `create'
 (2.7ms) COMMIT
↳ app/controllers/vouchers_controller.rb:26:in `create'
Completed 201 Created in 130ms (Views: 0.8ms | ActiveRecord: 3.8ms | Allocations: 4204)
Started POST "/vouchers?voucher=Simon0519&vouchee=Spartan_Bacon" for ::1 at 2019-09-30 17:18:23 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"Simon0519", "vouchee"=>"Spartan_Bacon"}
Voucher Exists? (0.2ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'Simon0519' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :vouchee attribute in Voucher model, pass `case_sensitive: true` option explicitly to the uniqueness validator. (called from create at /media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:26)
 (0.1ms) BEGIN
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = BINARY 'Spartan_Bacon' LIMIT 1
↳ app/controllers/vouchers_controller.rb:26:in `create'
 (0.1ms) ROLLBACK
↳ app/controllers/vouchers_controller.rb:26:in `create'
Completed 422 Unprocessable Entity in 108ms (Views: 0.2ms | ActiveRecord: 1.9ms | Allocations: 7578)
Started POST "/vouchers?voucher=PromoStarr&vouchee=Lala_1" for ::1 at 2019-09-30 17:18:38 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"Lala_1"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'PromoStarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :vouchee attribute in Voucher model, pass `case_sensitive: true` option explicitly to the uniqueness validator. (called from create at /media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:26)
 (0.1ms) BEGIN
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = BINARY 'Lala_1' LIMIT 1
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Create (0.3ms) INSERT INTO `vouchers` (`voucher`, `vouchee`, `created_at`, `updated_at`) VALUES ('PromoStarr', 'Lala_1', '2019-09-30 15:18:38.821110', '2019-09-30 15:18:38.821110')
↳ app/controllers/vouchers_controller.rb:26:in `create'
 (5.3ms) COMMIT
↳ app/controllers/vouchers_controller.rb:26:in `create'
Completed 201 Created in 231ms (Views: 0.3ms | ActiveRecord: 6.3ms | Allocations: 4133)
Started POST "/vouchers?voucher=PromoStarr&vouchee=Lala_1" for ::1 at 2019-09-30 17:18:46 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"PromoStarr", "vouchee"=>"Lala_1"}
Voucher Exists? (0.2ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'PromoStarr' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :vouchee attribute in Voucher model, pass `case_sensitive: true` option explicitly to the uniqueness validator. (called from create at /media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:26)
 (0.1ms) BEGIN
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = BINARY 'Lala_1' LIMIT 1
↳ app/controllers/vouchers_controller.rb:26:in `create'
 (0.2ms) ROLLBACK
↳ app/controllers/vouchers_controller.rb:26:in `create'
Completed 422 Unprocessable Entity in 121ms (Views: 0.2ms | ActiveRecord: 1.8ms | Allocations: 7530)
Started POST "/vouchers?voucher=Lala_1&vouchee=Scootzar" for ::1 at 2019-09-30 17:19:18 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"Lala_1", "vouchee"=>"Scootzar"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'Lala_1' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :vouchee attribute in Voucher model, pass `case_sensitive: true` option explicitly to the uniqueness validator. (called from create at /media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:26)
 (0.1ms) BEGIN
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = BINARY 'Scootzar' LIMIT 1
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Create (0.3ms) INSERT INTO `vouchers` (`voucher`, `vouchee`, `created_at`, `updated_at`) VALUES ('Lala_1', 'Scootzar', '2019-09-30 15:19:18.600654', '2019-09-30 15:19:18.600654')
↳ app/controllers/vouchers_controller.rb:26:in `create'
 (3.5ms) COMMIT
↳ app/controllers/vouchers_controller.rb:26:in `create'
Completed 201 Created in 489ms (Views: 0.3ms | ActiveRecord: 4.5ms | Allocations: 4133)
Started POST "/vouchers?voucher=Lala_1&vouchee=Scootzaar" for ::1 at 2019-09-30 17:19:55 +0200
Processing by VouchersController#create as HTML
Parameters: {"voucher"=>"Lala_1", "vouchee"=>"Scootzaar"}
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = 'Lala_1' LIMIT 1
↳ app/controllers/vouchers_controller.rb:23:in `create'
DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :vouchee attribute in Voucher model, pass `case_sensitive: true` option explicitly to the uniqueness validator. (called from create at /media/Linux-Shared/dev/gitlab.com/vereto-api/app/controllers/vouchers_controller.rb:26)
 (0.2ms) BEGIN
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Exists? (0.3ms) SELECT 1 AS one FROM `vouchers` WHERE `vouchers`.`vouchee` = BINARY 'Scootzaar' LIMIT 1
↳ app/controllers/vouchers_controller.rb:26:in `create'
Voucher Create (0.2ms) INSERT INTO `vouchers` (`voucher`, `vouchee`, `created_at`, `updated_at`) VALUES ('Lala_1', 'Scootzaar', '2019-09-30 15:19:55.623225', '2019-09-30 15:19:55.623225')
↳ app/controllers/vouchers_controller.rb:26:in `create'
 (4.9ms) COMMIT
↳ app/controllers/vouchers_controller.rb:26:in `create'
Completed 201 Created in 224ms (Views: 0.3ms | ActiveRecord: 5.9ms | Allocations: 4114)