Apache benchmark test:
ab -n 900 -c 80 -p test.data http://localhost:8183/api/accounts/authenticate
HTTP:
Percentage of the requests served within a certain time (ms)
50% 151
66% 163
75% 173
require 'test_helper' | |
class DragDropTest < ActionDispatch::IntegrationTest | |
setup do | |
Capybara.current_driver = Capybara.javascript_driver # :selenium by default | |
end | |
def test_drag_item_1_to_list_2 | |
visit '/drag_drop' | |
element = page.find(:id, 'item_1') |
crypto.createHmac('sha512', salt).update(content).digest("base64"); | |
http://adambard.com/blog/3-wrong-ways-to-store-a-password/ |
Apache benchmark test:
ab -n 900 -c 80 -p test.data http://localhost:8183/api/accounts/authenticate
HTTP:
Percentage of the requests served within a certain time (ms)
50% 151
66% 163
75% 173
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
# Use this template to report PaperTrail bugs. | |
# It is based on the ActiveRecord template. | |
# https://github.com/rails/rails/blob/master/guides/bug_report_templates/active_record_gem.rb | |
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end |
require 'openssl' | |
require "base64" | |
DELIMITER = ":cba_signature_delimiter:" | |
# Airtasker sends encoded data | |
key = OpenSSL::PKey::RSA.new(File.read('private.pem')) | |
timestamp = '31480574670' # unix time stamp in utc timezone | |
signature = key.sign(OpenSSL::Digest::SHA256.new, timestamp) | |
data = timestamp + DELIMITER + Base64.strict_encode64(signature) |
This documents the upgrade from Rails 4.2 to 5.2 through four parts: Backend, Frontend, Infrascture and Checkboxes
Run rake command rails app:update
, it creates a set of new configration files for active storage, action cable, content security policy etc. As we dont use these features, the default ones from code generation are kept.