You need ChromeDriver (and Chrome) installed locally and running.
You can install ChromeDriver with Homebrew on MacOS:
brew install chromedriver
module AnyFixture | |
INSERT_RXP = /^INSERT INTO ([\S]+)/ | |
class Cache | |
attr_reader :store | |
delegate :clear, to: :store | |
def initialize | |
@store = {} |
# frozen_string_literal: true | |
module Directives | |
class Pp < GraphQL::Schema::Directive | |
class Profiler < Types::BaseEnum | |
graphql_name "PpProfiler" | |
description "Available profilers for @pp directive" | |
value :mem | |
value :stack |
module ApplicationCable | |
class Connection < ActionCable::Base::Connection | |
# we need to keep tenant information for subsequent messages, | |
# so let's store it as an identifier | |
identified_by :tenant | |
def connect | |
# assuming you store current tenant in session | |
self.tenant = request.session[:current_tenant] | |
reject_unauthorized_connection unless tenant |
This is a demo of leveraging the proposed Action Cable architecture to implement an SSE transport for Action Cable (without changing the user-space code, e.g., Connection and Channel classes).
Start the server by running the following command:
ruby main.rb
Now, you can connect to Action Cable over SSE via cURL as follows:
language: ruby | |
rvm: | |
- 2.2.3 | |
# Если Travis пишет вам слишком часто, то отключаем email уведомления | |
notifications: | |
email: false | |
# Указываем базу данных | |
addons: |
#!/usr/bin/env ruby | |
ADDED_OR_MODIFIED = /^\s*(A|AM|M)/.freeze | |
changed_files = `git status --porcelain`.split(/\n/) | |
unstaged_files = `git ls-files -m`.split(/\n/) | |
changed_files = changed_files.select { |f| f =~ ADDED_OR_MODIFIED } | |
changed_files = changed_files.map { |f| f.split(" ")[1] } |
module FactoryGirl | |
module Doctor | |
module FloatDuration | |
refine Float do | |
def duration | |
t = self | |
format("%02d:%02d.%03d", t / 60, t % 60, t.modulo(1) * 1000) | |
end | |
end | |
end |
# if you want to render flamegraphs | |
gem "stackprof", require: false # required by flamegraph | |
gem "flamegraph", require: false |