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
| // RomanticDB.js | |
| // ---------------------------------- | |
| // v0.0.1 | |
| // | |
| // Copyright (c)2013 Jake Craige | |
| // Distributed under MIT license | |
| // | |
| // http://jcraige.com | |
| // | |
| // *TODO:* |
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
| window.ENV.development = true; | |
| window.ENV.nodeApiUrl = 'http://worthit-node-server.herokuapp.com/api/v1'; | |
| window.ENV.apiUrl = 'http://worthit-development.herokuapp.com/api/v2'; | |
| window.ENV.appEnv = 'development'; |
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
| function toEmberObject(result) { | |
| var object = ParseModel.create(result.attributes); | |
| object._parseAttributes = Ember.keys(result.attributes) | |
| object._parseObject = result; | |
| object.set('id', result.id) | |
| object.set('createdAt', result.createdAt) | |
| return object; | |
| } | |
| function mapToEmberObjects(results) { |
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
| // RomanticDB.js | |
| // ---------------------------------- | |
| // v0.0.1 | |
| // | |
| // Copyright (c)2013 Jake Craige | |
| // Distributed under MIT license | |
| // | |
| // http://jcraige.com | |
| // | |
| // *TODO:* |
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
| RSpec.configure do |config| | |
| config.filter_run_excluding false_positive: true unless ENV['ALL'] | |
| end |
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
| # ~/.tmuxinator/beauty-now.yml | |
| name: Butler | |
| root: ~/Work/butler | |
| windows: | |
| - ember: | |
| layout: a6b8,222x79,0,0[222x63,0,0,16,222x15,0,64,21] | |
| panes: | |
| - cd ember-app; vim |
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
| ProjectsController = Ember.ArrayController.extend | |
| readyForDesign: Em.computed.filterBy('model', 'activePhase', 'ready_for_design') | |
| design: Em.computed.filterBy('model', 'activePhase', 'design') | |
| readyForDevelopment: Em.computed.filterBy('model', 'activePhase', 'ready_for_development') | |
| development: Em.computed.filterBy('model', 'activePhase', 'development') | |
| qualityAssurance: Em.computed.filterBy('model', 'activePhase', 'quality_assurance') | |
| onHold: Em.computed.filterBy('model', 'activePhase', 'on_hold') | |
| completed: Em.computed.filterBy('model', 'activePhase', 'completed') | |
| overdue: Em.computed.filterBy('model', 'dueString', 'overdue') |
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
| badRequest = (err, reply)-> | |
| reply Boom.badRequest(err) | |
| exports.search = {} | |
| exports.search.validate = | |
| query: | |
| categoryId: Joi.number().integer().required() | |
| subcategoryId: Joi.number().integer().required() | |
| startTime: Joi.string().required() | |
| zipCode: Joi.string().required() |
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
| # puts an x icon on an input when focused to clear the text. meant to be wrapped | |
| # around a single input | |
| ClearInputComponent = Ember.Component.extend | |
| classNames: ['clear-input'] | |
| didInsertElement: -> | |
| @$x = @$().find('.x-container') | |
| @$input = @$().find('input') | |
| if @$input.length > 1 | |
| throw new Error('You can only include 1 input inside of the {{clear-input}} component') |
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
| TwoTap = Ember.Mixin.create | |
| # returns either a two tap url or the product url if it's form an unsupported | |
| # vendor | |
| getTwoTapUrl: (product, tracking)-> | |
| return (product.get('affiliateUrl') || product.get('url')) unless tracking.get('twoTapEnabled') | |
| uniqueToken = "#{product.get('id')}-#{tracking.get('id')}" | |
| url = ENV.services.twotap.baseUrl |