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
test "invalidates some quotes when parcel dimensions cannot be handled by a vehicle type", %{ | |
bypass: bypass | |
} do | |
Bypass.expect(bypass, "POST", "/v1/commercial-api/get-a-quote", fn conn -> | |
Conn.resp(conn, 200, Jason.encode!(Fixtures.Gophr.quotes_success_response(40))) | |
end) | |
pending_quotes = | |
[:bicycle, :bicycle_cargo, :motorcycle, :car, :van_small, :van] | |
|> Enum.map(&generate_quote/1) |
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
defmodule BucklerBot.Handlers.Private do | |
use Agala.Provider.Telegram, :handler | |
import BucklerBot.Gettext | |
require Logger | |
def init(opts), do: opts | |
def call(conn = %Agala.Conn{ | |
request: %{"message" => %{"chat" => %{"id" => chat_id, "type" => "private"}, "text" => "/ping"}} | |
}, _) do |
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
defmodule BucklerBot.Handlers.Private do | |
use Agala.Provider.Telegram, :handler | |
import BucklerBot.Gettext | |
require Logger | |
def init(opts), do: opts | |
def call(conn = %Agala.Conn{ | |
request: %{"message" => %{"chat" => %{"id" => chat_id, "type" => "private"}, "text" => "/ping"}} | |
}, _) do |
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
from d in Delivery, | |
join: o in Order, on: o.id == d.order_id, | |
join: h in HistoryItem, on: h.delivery_id == d.id, | |
preload: [history_items: h, order: o], | |
where: … # Here my where clause | |
select: d |
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
from d in Delivery, | |
join: in Order, on: o.id == d.order_id, | |
join: h in HistoryItem, on: h.delivery_id == d.id, | |
where: … # Here my where clause | |
select: {d, o, h} |
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
from d in Delivery, | |
join: o in Order, on: o.id == d.order_id, | |
where: ... # Here my where clause | |
select: {d, o} |
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
defmodule Spread.Pulser.Worker do | |
@moduledoc """ | |
This module manages the flow of opportunities and trades | |
""" | |
use GenServer | |
alias Spread.Pulser.Logic, as: PulserLogic | |
alias Spread.TradingPair.Manager | |
## Client API |
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
import React from 'react' | |
import { storiesOf, action } from '@storybook/react' | |
import Component from '../../../src/components/MunicipalitySelect/index' | |
import Provider from '../../../src/test/MockedApolloProvider' | |
const defaultValue = { | |
id: 'TG9jYXRpb246MzA=', | |
name: 'Vestby', | |
slug: 'vestby_akershus_municipality', | |
__typename: 'Location', |
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
import React from 'react' | |
import { graphql } from 'react-apollo' | |
import gql from 'graphql-tag' | |
import { pipe, prop } from 'ramda' | |
type FileInputProps = { | |
label: string, | |
onChange: Function, | |
required: boolean, | |
dataCy: string, |
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
// @flow | |
import React from 'react' | |
import { identity } from 'ramda' | |
import { Query } from 'react-apollo' | |
import { createSelector } from 'reselect' | |
import RecentEvent from '@/pages/photographerDashboard/app/recentEvents/RecentEvent' | |
import meQuery from '@/modules/query/me' | |
import Loader from '@/components/Loader' | |
import pathOrDefaultValue from '@/utils/pathOrDefaultValue' | |
import type { Event } from '@/modules/types/event' |
NewerOlder