This original request http://web.com/api/v1/resources hits the /api namespace and is sent to the proxy.js app. The proxy.js app recieves /v1/resources and uses that to build the new request to http:/api.com/v1/resources.
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
| # Given the following tests | |
| Given I create an invitation for "jon@shake.com" | |
| And I create an invitation for "justin@lab49.com" | |
| When I send my invitations | |
| Then I should have sent emails to: | |
| | email | | |
| | jon@shake.com | | |
| | justin@lab49.com | |
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
| namespace :xcode do | |
| desc 'install xcode' | |
| task :install => [:download, :mount, :link] | |
| task :download do | |
| # Whatever version you'd like | |
| execute 'curl -o ~/Downloads/Xcode.dmg https://s3.amazonaws.com/[insert-your-bucket-here]/xcode_5.1.1.dmg' | |
| end | |
| task :mount 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
| var winston = require('winston') | |
| , kue = require('kue') | |
| , workers = require('./app/workers') | |
| , queue = require('./config/queue'); | |
| Object.keys(workers).forEach(function(name){ | |
| Object.keys(workers[name]).forEach(function(task){ | |
| queue.process(name + '/' + task, 20, function(job, done){ | |
| var args = job.data.args || []; |
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
| Shared = require './shared' | |
| Data = require './data' | |
| webdriver = require 'selenium-webdriver' | |
| SeleniumServer = require('selenium-webdriver/remote').SeleniumServer | |
| seleniumJar = require('selenium-server-standalone-jar') | |
| server = null | |
| driver = null | |
| timeout = 200 | |
| browser = {} |
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
| #! /usr/bin/env node | |
| var locate = require('mozilla-get-url') | |
| , child_process = require('child_process') | |
| , ProgressBar = require('progress') | |
| , async = require('async') | |
| , chalk = require('chalk') | |
| , request = require('request') | |
| , fs = require('fs-extra') | |
| , path = require('path'); |
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
| ShakeWeb.controller('AuditEventShowController', [ | |
| '$scope', '$compile', 'dataservice', '$templateCache' function( | |
| $scope, $compile, dataservice, $templateCache ) { | |
| var map = { | |
| DraftCreatedAuditEvent: | |
| '<div>' + | |
| '<p>Draft Created by {{ audit_event.created_by_email }}</p>' + | |
| '<p>{{ audit_event.created_at }}</p>' + | |
| '</div>', |
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
| ShakeWeb.controller('AgreementController', | |
| [ '$scope', '$stateParams', 'Agreement', '$q', function( | |
| $scope, $stateParams, Agreement, $q ) { | |
| $scope.status = 'No'; | |
| Agreement.find($stateParams.id).then(function (agreement) { | |
| $scope.agreement = agreement; | |
| }); |
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
| // MyStats | |
| // /v1/comissions?created_at[gte]=Date&created_at[lt]=Date | |
| [ | |
| { }, { } | |
| ] | |
| // /v1/comission_summary?created_at[gte]=Date&created_at[lt]=Date |
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
| public class ApplicationController { | |
| private boolean ensure_valid_client() { | |
| return current_oauth2_client.clientSecret == request.getClientSecret(); | |
| } | |
| private OAuth2Client current_oauth2_client() { | |
| return OAuth2Client oauth2Client = OAuth2Client.findById(request.getClientId()); | |
| } | |
| } |