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
CREATE MATERIALIZED VIEW products_shopify_ids_on_active_shops AS | |
SELECT shopify_domain, array_agg(col ORDER BY col) AS product_shopify_ids | |
FROM ( | |
SELECT DISTINCT | |
shops.shopify_domain AS shopify_domain, | |
unnest(offers.offerable_product_shopify_ids) AS col | |
FROM shops | |
INNER JOIN offers | |
ON shops.id = offers.shop_id | |
INNER JOIN subscriptions |
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 'json' | |
raw_data = File.read('prod_vars.json') | |
# {"ASSET_HOST": "https://foo.cloudfront.net", } | |
vars_info = JSON.parse(raw_data); | |
puts "### vars_info ###>> #{vars_info.inspect}" |
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 | |
RSpec.describe Api::V2::DonationsController, type: :request do | |
let(:donor) { Fabricate(:donor) } | |
before do | |
cookies = ActionDispatch::Request.new(Rails.application.env_config.deep_dup).cookie_jar | |
@tmp = cookies.signed[:donor_jwtapi] = { value: { token: donor.token} , httponly: true } | |
end |
OlderNewer