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
| GIT | |
| remote: git://github.com/sporkrb/spork.git | |
| revision: 224df492657e617a0c93c0319e78f0eefee5b636 | |
| specs: | |
| spork (1.0.0rc4) | |
| PATH | |
| remote: engines/doki_core | |
| specs: | |
| doki_core (0.0.1) |
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
| // pods/components/validated-input/component.js | |
| import Ember from 'ember'; | |
| import Validators from 'doki/validators/all'; | |
| export default Ember.Component.extend({ | |
| validator: 'presence', | |
| value: null, |
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
| // initializers/registrar.js | |
| import Modals from 'doki/controllers/modals'; | |
| // TODO: this can't be right | |
| export function initialize(registry, application) { | |
| console.log('[5] Registrar::initialize'); | |
| application.register('controller:modals/add-resource-modal', Modals.AddResourceModal, { singleton: false }); | |
| application.register('controller:modals/confirm-class-delete-modal', Modals.ConfirmClassDeleteModal, { singleton: false }); |
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 AuthenticatedRoute from 'doki/routes/authenticated'; | |
| export default AuthenticatedRoute.extend({ | |
| requireDean: false, | |
| activate() { | |
| this._super(); | |
| this.checkAccess(); | |
| }, |
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
| model(params) { | |
| return Ember.RSVP.hash({ | |
| course: this.store.find('course', params.course_id), | |
| topics: this.store.find('topic', { course_id: params.course_id }) | |
| }); | |
| }, | |
| setupController(controller, model) { | |
| // when first called model will be { course: Class, topics: Class } | |
| // next time entered, model will just be Class (just the value of "course" ) |
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
| // router.js | |
| this.route('parents'); | |
| this.route('parent', { path: 'parent/:parent_id' }, function() { | |
| }); | |
| // parents | |
| model() { | |
| console.log('PARENTS'); | |
| return this.store.findAll('parent') | |
| } |
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
| WebDeveloper.Information.displayFocusTarget = function(display, documents) | |
| { | |
| var contentDocument = null; | |
| var bodyDocument = null; | |
| var elements = null; | |
| var focusables = 'a[href], *[tabindex], area, button, iframe, input, select, textarea'; | |
| for(var i = 0, l = documents.length; i < l; i++) | |
| { | |
| contentDocument = documents[i]; |
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
| # Does not work | |
| progress = DokiCore::Progress.where(user: user, course: course) | |
| .first_or_initialize(progressable: progressable) | |
| puts progress.valid? # false | |
| puts progress.errors.to_a # ['course is blank', 'user is blank'] | |
| pp progress # { course_id: 1, user_id: 1 } <<------- WTF! | |
| # Works | |
| progress = DokiCore::Progress.where(user: user, course: course).first |
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
| { | |
| "settings": { | |
| "todoreview": { | |
| "case_sensitive": true, | |
| "patterns": { | |
| "HIGH": "HIGH[\\s]*?:[\\s]*(?P<high>.*)$", | |
| "TODO": "TODO[\\s]*?:[\\s]*(?P<todo>.*)$", | |
| "NOTE": "NOTE[\\s]*?:[\\s]*(?P<note>.*)$", | |
| "FIXME": "FIX ?ME[\\s]*?:[\\s]*(?P<fixme>.*)$", | |
| "CHANGED": "CHANGED[\\s]*?:[\\s]*(?P<changed>.*)$" |