Skip to content

Instantly share code, notes, and snippets.

View hayduke19us's full-sized avatar
🐙

matthew sullivan hayduke19us

🐙
View GitHub Profile
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Editor
export EDITOR=/usr/local/bin/vim
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
Fastlift::FuturePromotion ........FF..FFFF
1) Fastlift::FuturePromotion.find next promotion's id for the first unit when the promo's booking hasn't started today should == 1
Failure/Error: it { should == promotions.first.id }
expected: 1
got: nil (using ==)
# ./spec/models/fastlift/future_promotion_spec.rb:77:in `block (5 levels) in <module:Fastlift>'
2) Fastlift::FuturePromotion.find next promotion's id for the first unit when the promo's booking has ended for today should == 1
Failure/Error: it { should == promotions.first.id }
expected: 1
got: nil (using ==)
Feature: Checkout Login
A user needs to be able to login while on the
checkout page.
Background:
Given the following market property exists:
| name | uuid | from_extranet |
| Hotel My | d324743-bc2d-5b36-be9a-bdab9063f371 | true |
And the following unit exists:
| title | property | uuid |
AllCops:
DisabledByDefault: true
DisplayStyleGuide: true
ExtraDetails: true
RunRailsCops: true
Exclude:
- 'lib/tasks/cucumber.rake'
- 'vendor/**/*'
Lint/EndAlignment:
inherit_from: .rubocop.yml
AllCops:
DisabledByDefault: false
DisplayCopNames: true
Lint/Void:
Exclude:
- 'features/**/*'
- 'spec/**/*'
require 'rugged'
module TaskHelpers
class SCM
attr_reader :repo, :remote, :year, :revision, :release, :release_cutoff
def initialize(env={})
@repo = Rugged::Repository.new Rails.root.to_s
@remote = env.fetch('REMOTE', 'origin')
@year = env.fetch('YEAR', Date.today.year)
def property
@p ||= Property.find_by_uuid('65f2bf1-ad65-4e98-8842-470c0ce6bfa0')
end
def rc
@rc ||= p.room_categories.first
end
def sp_id
@sp_id ||= p.supplier_properties.first.id

Special Alex Script

This is used to add supplier translated room type text translations for testing

Install

Clones the directory and changes the name to a more readable format.·

git clone https://gist.github.com/hayduke19us/73c83e90478727fadc0853c3d5516bc7.git &&
mv 73c83e90478727fadc0853c3d5516bc7 special_alex_script
module SpecialAlexScript # aka SAS
class Translator
attr_reader :uuids, :languages
def initialize(uuids)
@uuids = uuids.flatten
@languages = { 'French' => 'fr', 'Spanish' =>'es' }
end
def properties
module SpecialAlexScript # aka SAS
class Translator
attr_reader :uuids, :languages
def initialize(uuids)
@uuids = uuids.flatten
@languages = { 'French' => 'fr', 'Spanish' =>'es' }
end
def properties