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
| describe('Validations', function() { | |
| before(function() { | |
| this.alert = stub(window, 'alert'); | |
| }); | |
| after(function() { | |
| this.alert.restore(); | |
| }); | |
| it('validates password', function() { |
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
| import icAjax from 'ic-ajax'; | |
| // ... | |
| authenticate: function() { | |
| var request = icAjax(this.get('createSessionUrl'), { | |
| method: 'POST', | |
| dataType: 'json', | |
| data: JSON.stringify(data), | |
| contentType: 'application/json' | |
| }); | |
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 |
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
| 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
| 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
| # ~/.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
| RSpec.configure do |config| | |
| config.filter_run_excluding false_positive: true unless ENV['ALL'] | |
| end |