Skip to content

Instantly share code, notes, and snippets.

View superCap3's full-sized avatar
🎯
Focusing

superCap3

🎯
Focusing
View GitHub Profile
@superCap3
superCap3 / error
Created March 19, 2014 14:20
dhd stress
Puma caught this error: `protect_from_csrf` is activated, but `sessions` are not. To enable csrf
protection, use:
enable :sessions
or deactivate protect_from_csrf:
disable :protect_from_csrf
(RuntimeError)
/app/vendor/bundle/ruby/2.1.0/gems/padrino-core-0.11.4/lib/padrino-core/application.rb:271:in `setup_csrf_protection'
@superCap3
superCap3 / create.log
Created February 10, 2014 21:59
Testing the list/create/update/delete ad methods
71: # create an ad
72: # create_ad(oid, cid, n, mpid, sd, ed, d, vinit, vaud, vlang, pltyp, ct, pdev, arc, params = {})
73: gmt_start = DateTime.parse("2014-1-26").to_time.to_i #+ offset_in_seconds
74: gmt_end = DateTime.parse("2014-1-31" + 'T23:59:00').to_time.to_i
75: new_add = mash(@adap.create_ad("6482","44810", "Best Test Ad Ever!", "33", gmt_start, gmt_end, "15", "AUTO", "YES", "ENGLISH", "GAME_PLAYER", "PRO", "ANY", "VIDEO"))
=> 76: binding.pry
77: end
78: end
[1] pry(#<AdapMiddleware::App>)> gmt_start
71: # create an ad
72: # create_ad(oid, cid, n, mpid, sd, ed, d, vinit, vaud, vlang, pltyp, ct, pdev, arc, params = {})
73: gmt_start = DateTime.parse("2014-1-26").to_time.to_i #+ offset_in_seconds
74: gmt_end = DateTime.parse("2014-1-31" + 'T23:59:00').to_time.to_i
75: new_add = mash(@adap.create_ad("6482","44810", "Best Test Ad Ever!", "33", gmt_start, gmt_end, "15", "AUTO", "YES", "ENGLISH", "GAME_PLAYER", "PRO", "ANY", "VIDEO"))
=> 76: binding.pry
77: end
78: end
[1] pry(#<AdapMiddleware::App>)> gmt_start
{"result"=>{"code"=>"OK", "msg"=>""},
"ads"=>
[{"id"=>2,
"campaign_id"=>7181,
"external_id"=>"Google-5min-2",
"name"=>"Google Overlay",
"ad_type"=>"OO",
"status"=>"DELETED",
"serving_start_date"=>1245264514,
"serving_end_date"=>1325404740,
I, [2014-01-22T18:07:45.269786 #8702] INFO -- : making the call to get the timezone id from console
Adding handle: conn: 0x7f860b156000
Adding handle: send: 0
Adding handle: recv: 0
Curl_addHandleToPipeline: length: 1
- Conn 0 (0x7f860b156000) send_pipe: 1, recv_pipe: 0
About to connect() to go.adap.tv port 443 (#0)
Trying 74.217.78.174...
Connected to go.adap.tv (74.217.78.174) port 443 (#0)
TLS 1.2 connection using TLS_RSA_WITH_RC4_128_SHA
"campaign has this value: #<Typhoeus::Response:0x007fbc52b69bd8>"
43446
TypeError - wrong argument type JSON::Pure::Generator::State (expected Data):
/Users/adrian/.rvm/gems/ruby-2.0.0-p353/gems/json_pure-1.8.1/lib/json/pure/generator.rb:366:in `to_json'
/Users/adrian/.rvm/gems/ruby-2.0.0-p353/gems/json_pure-1.8.1/lib/json/pure/generator.rb:366:in `block in json_transform'
/Users/adrian/.rvm/gems/ruby-2.0.0-p353/gems/json_pure-1.8.1/lib/json/pure/generator.rb:359:in `each'
/Users/adrian/.rvm/gems/ruby-2.0.0-p353/gems/json_pure-1.8.1/lib/json/pure/generator.rb:359:in `json_transform'
/Users/adrian/.rvm/gems/ruby-2.0.0-p353/gems/json_pure-1.8.1/lib/json/pure/generator.rb:341:in `to_json'
/Users/adrian/.rvm/gems/ruby-2.0.0-p353/gems/json_pure-1.8.1/lib/json/pure/generator.rb:293:in `generate'
/Users/adrian/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/json/common.rb:224:in `generate'
"campaign has this value: #<Typhoeus::Response:0x007f81d9bc5ae0>"
{"result"=>{"code"=>"CAMPAIGN_NAME_EXIST", "msg"=>"A campaign with this name already exists"}, "id"=>0}
TypeError - wrong argument type JSON::Pure::Generator::State (expected Data):
/Users/adrian/.rvm/gems/ruby-2.0.0-p353/gems/json_pure-1.8.1/lib/json/pure/generator.rb:366:in `to_json'
/Users/adrian/.rvm/gems/ruby-2.0.0-p353/gems/json_pure-1.8.1/lib/json/pure/generator.rb:366:in `block in json_transform'
/Users/adrian/.rvm/gems/ruby-2.0.0-p353/gems/json_pure-1.8.1/lib/json/pure/generator.rb:359:in `each'
/Users/adrian/.rvm/gems/ruby-2.0.0-p353/gems/json_pure-1.8.1/lib/json/pure/generator.rb:359:in `json_transform'
/Users/adrian/.rvm/gems/ruby-2.0.0-p353/gems/json_pure-1.8.1/lib/json/pure/generator.rb:341:in `to_json'
/Users/adrian/.rvm/gems/ruby-2.0.0-p353/gems/json_pure-1.8.1/lib/json/pure/generator.rb:293:in `generate'
/Users/adrian/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/json/common.rb:224:in `generate'
stuff here