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
# POST /api/subscriptions.json | |
+ Request (application/json; charset=utf-8) | |
{ | |
"order_number": "R758060012", | |
"order_token": "c3hVyiLjOhlJAg1YAgFdBw", | |
"subscription": { | |
"frequency": 2, | |
"is_recurring": true |
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
version: '2' | |
services: | |
db: | |
image: kiasaki/alpine-postgres | |
volumes: | |
- ./pgdata:/pgdata | |
ports: | |
- "5432:5432" | |
environment: | |
POSTGRES_DB: greenhouse_development |
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
module Spree | |
PermittedAttributes.module_eval do | |
def subscription_attributes | |
[ | |
:activated_at | |
] | |
end | |
module_function :subscription_attributes |
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
before_install: | |
- "export NODE_VERSION=6" | |
# Build me a Node | |
- "rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $NODE_VERSION" | |
# Repo for Yarn | |
- "sudo apt-key adv --keyserver pgp.mit.edu --recv D101F7899D41F3C3" | |
- "echo 'deb http://dl.yarnpkg.com/debian/ stable main' | sudo tee /etc/apt/sources.list.d/yarn.list" | |
- "sudo apt-get update -qq" | |
- "sudo apt-get install -y -qq yarn" | |
- "yarn install" |
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
FROM ruby:2.1.8-alpine | |
MAINTAINER DW & Braidn <[email protected]> | |
# Env | |
ENV REFRESHED_AT 2016-09-21 | |
ENV PROJECT_NAME quarterly | |
ENV REPO_DIR /home/$PROJECT_NAME/repo | |
ENV GEM_HOME /home/$PROJECT_NAME/gems | |
ENV ENV_FILE /home/$PROJECT_NAME/repo/.env | |
ENV BUILD_PACKAGES bash libffi-dev openssl-dev linux-headers zlib-dev readline-dev yaml-dev git curl-dev ruby-dev build-base | |
ENV RUBY_PACKAGES ruby-io-console ruby-bundler nodejs libxml2-dev libxslt-dev postgresql-dev |
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
RSpec.shared_context 'shopify_shop' do | |
let(:refund_amount) { 100 } | |
let(:shopify_payment_method) do | |
gateway = Spree::Gateway::ShopifyGateway.new | |
gateway.set_preference(:api_key, ENV.fetch('SHOPIFY_API_KEY')) | |
gateway.set_preference(:password, ENV.fetch('SHOPIFY_PASSWORD')) | |
gateway.set_preference(:shop_name, ENV.fetch('SHOPIFY_SHOP_NAME')) | |
gateway | |
end |
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 'spec_helper' | |
require 'solidus_retail/order/generate_pos_order' | |
RSpec.describe SolidusRetail::Order::GeneratePosOrder, type: :model do | |
include_context 'shopify_shop' | |
it 'instantiates itself successfully' do | |
binding.pry | |
end | |
end |
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
$(document).ready(function() { | |
var $footerForm = $('.m-footer-newsletter .mc-embedded-subscribe-form') | |
var $popupForm = $('.newsletter-popup-inner .mc-embedded-subscribe-form') | |
if( $footerForm.length > 0) { | |
initForm($footerForm); | |
} | |
if( $popupForm.length > 0) { | |
initForm($popupForm); |
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
/* | |
Copyright 2015 Jun Wako <[email protected]> | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 2 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
# This file is used by Rack-based servers to start the application. | |
require ::File.expand_path('../config/environment', __FILE__) | |
run Rails.application | |
require 'rack/cors' | |
use Rack::Cors do | |
allow do | |
origins '*' | |
resource '*', |