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 Project | |
module Mailers | |
class BaseMailer < Sinatra::Mailer::Base | |
default from: ENV["MAIL_FROM"] || 'localhost', content_type: 'text/html' | |
class << self | |
def feedback!(text, email = nil, name='') | |
mail(to: "some@example.com", subject: 'Feedback', body: text) do | |
reply_to "#{name}<#{email}>" if email.present? | |
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
before do | |
case env["SERVER_NAME"] | |
when /test\./ | |
App.db.search_path = [:test, :public] | |
when /test2\./ | |
App.db.search_path = [:test2, :public] | |
else | |
App.db.search_path = [:public] | |
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
#= require jsuri | |
class window.Spree | |
@ready: (callback) -> | |
jQuery(document).ready(callback) | |
@mountedAt: -> | |
"<%= Rails.application.routes.url_helpers.spree_path %>" | |
@pathFor: (path) -> | |
"#{window.location.origin}#{@mountedAt()}#{path}" |
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 | |
module Core | |
class Engine < ::Rails::Engine | |
def self.add_routes(&block) | |
@spree_routes ||= [] | |
# Anything that causes the application's routes to be reloaded, | |
# will cause this method to be called more than once | |
# i.e. https://github.com/plataformatec/devise/blob/31971e69e6a1bcf6c7f01eaaa44f227c4af5d4d2/lib/devise/rails.rb#L14 | |
# In the case of Devise, this *only* happens in the production env |
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 service for our factories. Don't blow .json extension. This is easiest path to get JSON request in AUTO mode. | |
angular.module("identityService", ["ngResource"]) | |
.factory 'Identity', ($resource) -> | |
$resource '/api/v1/identities/:id.json', | |
{ id:'@id' } | |
# Added update via PUT | |
@identities.config ($resourceProvider) -> | |
$resourceProvider.defaults.actions.update = { method: 'PUT' } |
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
# Karma configuration | |
# Generated on Tue Aug 20 2013 16:26:25 GMT-0400 (EDT) | |
module.exports = (config) -> | |
config.set | |
# base path, that will be used to resolve all patterns, eg. files, exclude | |
basePath: '..' | |
# frameworks to use |
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
describe('e2e: main', function() { | |
var ptor; | |
beforeEach(function() { | |
browser.get('/'); | |
ptor = protractor.getInstance(); | |
}); | |
it('should load the home page', function() { |
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
'use strict'; | |
angular.module('app.routes', ['ngRoute', 'app.config']) | |
.config(['$routeProvider', 'ROUTES', ($routeProvider, ROUTES) -> | |
$routeProvider | |
# Organizations | |
.when(ROUTES.organizations, { | |
templateUrl: '/templates/organizations/index.html', |
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
'use strict'; | |
angular.module('app.routes') | |
.config(['$routeProvider', ($routeProvider) -> | |
angular.extend({}, $routeProvider, { | |
orgWhen: (path, route) -> | |
route.resolve ||= {} | |
route.resolve = _.merge(route.resolve, { | |
chef: 'OrganizationCheckerProvider' |
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
'use strict'; | |
class DataBagService | |
_exec = {} | |
_tmp = {} | |
_fs = {} | |
_knife = '' | |
constructor: (@$q) -> | |
console.log 'DataBagService: constructor called' |
OlderNewer