This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
module Taggable | |
extend ActiveSupport::Concern | |
TYPE_MATCHER = { string: "varchar", text: "text", integer: "integer", citext: "citext" }.freeze | |
class_methods do | |
def has_tags(tag_name) #rubocop:disable Metrics/BlockLength, Metrics/AbcSize, Metrics/MethodLength, Naming/PredicateName | |
tag_array_type_fetcher = -> { TYPE_MATCHER[columns_hash[tag_name.to_s].type] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Rename all files with "_component" in the name to remove "_component" | |
directory="app/views/components" | |
find "$directory" -type f -name "*_component*" | while read file; do | |
dir=$(dirname "$file") | |
name=$(basename "$file") | |
new_name=${name/_component/} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "highline/import" | |
from_path = ask "Enter path for file to convert: " | |
to_path = ask "Enter the path where to save the spec file: " | |
unless File.exists? from_path | |
puts "Sorry this file doesn't exist!: #{from_path}" | |
puts "Please try again" | |
return | |
end | |
t_unit = File.read(from_path).to_s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'delayed/backend/active_record' | |
module Delayed | |
module Backend | |
module ActiveRecord | |
class Configuration | |
attr_accessor :cluster | |
end | |
# A job object that is persisted to the database. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
app-base: &app-base | |
image: docker-registry.wunder.tax/company/project-base:latest | |
env_file: | |
- .env.example | |
- .env | |
environment: | |
BUNDLE_GITLAB__WUNDER__TAX: ${BUNDLE_GITLAB__WUNDER__TAX} | |
WEBPACKER_DEV_SERVER_HOST: app-assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tap "codeclimate/formulae" | |
tap "eugenmayer/dockersync" | |
tap "heroku/brew" | |
tap "homebrew/bundle" | |
tap "homebrew/cask" | |
tap "homebrew/cask-fonts" | |
tap "homebrew/cask-versions" | |
tap "homebrew/core" | |
tap "homebrew/services" | |
tap "joshuaclayton/formulae" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3:20:50 PM worker.1 | 2019-05-06T13:20:50.801Z pid=72940 tid=ovbsba1tc INFO: Booting Sidekiq 6.0.0.pre1 with redis options {:url=>"redis://localhost:6379/7", :driver=>:async, :id=>"Sidekiq-server-PID-72940"} | |
3:20:50 PM worker.1 | 2019-05-06T13:20:50.997Z pid=72940 tid=ovbsba1tc INFO: Running in ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-darwin18] | |
3:20:50 PM worker.1 | 2019-05-06T13:20:50.997Z pid=72940 tid=ovbsba1tc INFO: See LICENSE and the LGPL-3.0 for licensing details. | |
3:20:50 PM worker.1 | 2019-05-06T13:20:50.997Z pid=72940 tid=ovbsba1tc INFO: Upgrade to Sidekiq Pro for more features and support: http://sidekiq.org | |
3:20:50 PM worker.1 | No async task available! | |
3:20:50 PM worker.1 | /Users/mikaelhenrikson/.gem/ruby/2.5.5/gems/async-1.17.1/lib/async/task.rb:148:in `current' | |
3:20:50 PM worker.1 | /Users/mikaelhenrikson/.gem/ruby/2.5.5/gems/async-io-1.23.0/lib/async/io/host_endpoint.rb:49:in `connect' | |
3:20:50 PM worker.1 | /Users/mikaelhenrikson/.gem/ruby/2.5.5/bundler/gems/redis-rb-c6eb41aa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/setup' | |
require 'async/await' | |
require 'async/redis' | |
require 'securerandom' | |
require 'pry' | |
class AsyncAwaitTest | |
include Async::Await | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.assets.ensureIndex({"tags.callname": 1, "tags.tags": 1}, {background: true}) | |
// index [['tags.callname', 1, ['tags.tags', 1]], { background: true } | |
db.permalinks.ensureIndex({"linkable_uuid": 1, "_current": 1}, {background: true}) | |
db.matches.ensureIndex({"id": 1, "_id": 1}, {background: true}) | |
db.live_events.ensureIndex({"asset_id": 1, "asset_version": 1, "_id": 1}, {background: true}) | |
db.mediafiles.ensureIndex({"match_id": 1, "filename": 1}, {background: true}) | |
db.users.ensureIndex({"confirmation_token": 1}, {background: true}) | |
db.assets.ensureIndex({"match_id": 1, "created_at": 1}, {background: true}) | |
db.orders.ensureIndex({"customer_id": 1, "order_status": 1}, {background: true}) | |
db.matches.ensureIndex({"sport_id": 1, "name": 1, "starts_at" -1 }, {background: true}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
background do | |
set_omniauth() | |
click_link_or_button 'Sign up with Facebook' | |
end |
NewerOlder