This file contains hidden or 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
User-agent: Googlebot | |
User-agent: ArchitextSpider | |
User-Agent: msnbot | |
User-Agent: yahoo-slurp | |
User-Agent: teoma | |
User-Agent: bingbot | |
Disallow: /*? | |
Disallow: /browse | |
Disallow: /users/ |
This file contains hidden or 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
""" | |
License: MIT | |
Author: Heath Matlock | |
Problem: https://en.wikipedia.org/wiki/Weasel_program | |
""" | |
import string | |
import random | |
from time import time | |
from operator import itemgetter |
This file contains hidden or 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 'use_case_helper' | |
describe UseCase::Plan::Hotel::Create do | |
describe "when executed" do | |
before do | |
hotel_search_usecase_class = mock("Hotel Search UseCase Class") | |
hotel_search_usecase_object = mock("Hotel Search UseCase Object") | |
hotel_usecase_search_result = mock("Hotel Search UseCase Result") | |
hotel_usecase_search_data = mock("Hotel Search UseCase Data") | |
hotel = mock("Hotel") |
This file contains hidden or 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 'use_case_helper' | |
describe UseCase::Plan::Hotel::Create do | |
describe "when executed" do | |
before do | |
params = {name: nil, hotel_id: nil} | |
# Smaller names will help on your mocks | |
# | |
# If you get an error instead of getting something like: |
This file contains hidden or 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
named_scope :between, lambda {|start_date, end_date| {:conditions => ["residential_insurance_applications.created_at BETWEEN ? AND ?", start_date.beginning_of_day, end_date.end_of_day]} } | |
named_scope :before, lambda {|end_date| {:conditions => ["residential_insurance_applications.created_at < ?", end_date.end_of_day]} } | |
named_scope :after, lambda {|start_date| {:conditions => ["residential_insurance_applications.created_at > ?", start_date.beginning_of_day]} } | |
named_scope :stale, lambda { {:conditions => ["completed_at IS NULL AND updated_at < ?", DEFAULT_STALE_THRESHOLD.ago]} } | |
named_scope :completed, :conditions => ["completed_at IS NOT NULL"] | |
named_scope :uncompleted, :conditions => ["completed_at IS NULL"] | |
named_scope :for_agency, lambda {|agency| {:include => [{:user => [:agency]}], :conditions => ["agencies.id = ?", agency.id] } } | |
named_scope :for_producer, lambda {|producer| {:conditions => ["residential_insurance_applications.producer_id = ?", producer.id] } } |