Merge branch 'command-object' * command-object: ErrorToSend => FinalStanza Since Command#finish causes an error, a then off the end won't work Refactor commands to have Command and Command::Execution objects
Refactor commands to have Command and Command::Execution objects Brings the common elements of all commands together, and threads the most useful state (such as ability to reply) through automatically using the new EMPromise fiber trampoline.
Merge branch 'logging' * logging: Slightly better logging
Slightly better logging Import structured logging gem ougai and replace current use of puts/warn with logging calls. Gives us level, timestamp, and formatting for exceptions and/or hash of arbitrary context data. Can do JSON logging if we ever need that, but set to human-readable (with colour if isatty) for now.
Use stats-instrument with graphite support
Send to StatsD for different inbound stanza types
Merge branch 'create-reset-sip-account' * create-reset-sip-account: Create or reset SIP account Factor out Catapult connection
Factor out Catapult connection So that every object which needs to talk to Catapult does not need to know everthing about it.
Add Sentry Capture in #panic and a few other places, add customer and route context as well as some initial breadcrumbs in the register command.
Merge branch 'invites' * invites: Block repeated invite code tries by customer id Allow user to activate using invite code
Allow user to activate using invite code Checks if the code is available and marks it used, then activates. Tracks who invited and who used in the table for later reward or punishment.
Merge branch 'new-signup-add-credit-card' * new-signup-add-credit-card: Happy path for credit card signup Panic should work on any value for error Allow getting default payment method, not just index Object representing the backend SGX to use Stop polluting Object namespace with Blather DSL Work in the presence of em-synchrony Helper to allow ordering phone number from Bandwidth v2 Helper to get a promise that resolves after N seconds Every payment kind will need the plan, so put it at the top Use registration pattern for Payment kinds Method to bill the plan of a Customer Use Forwardable for simple delegations Helper to allow using sync-style code in a Promise context New signup: go to web to choose credit card OOB helper Reject promise on stanza error Fix typo
Helper to allow ordering phone number from Bandwidth v2 Uses their gem which uses Faraday. Set Faraday to em-synchrony so their gem is now using EventMachine but still sync so their code will work unchanged. Wrap all uses of the gem in EM.promise_fiber to get a promise back out of that. Implement a poll helper that can wait until a new order is complete at Bandwidth before continuing. They support an HTTP callback method, but only global on account? This is much easier to work with in our context.
Merge branch 'register-command-first-pass' * register-command-first-pass: Add sourcehut CI Add Rakefile to run all tests Initial registration flow for Bitcoin Registrations that start on the web will have a tel selected already Helpers for doing Electrum RPC Add helper to fetch current BTC sell prices Allow skipping tests without being caught in pry
Add helper to fetch current BTC sell prices Scrapes the sell price for Bitcoin from canadianbitcoins.com USD price is done by converting this CAD sell price to USD via openexchangerates
Split logic out into testable objects Rubocop clean. Good test coverage of helper objects.
Write initial buy credit command
Initial commit Supports registering with backend SGX via basic iq:register. Does not support data forms version with nice labels. Does not verify billing or anything else yet, just unconditionally registers the user.