| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
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 Ember from 'ember'; | |
| import { test } from 'ember-qunit'; | |
| import startApp from '../helpers/start-app'; | |
| import {yoloInstagramRecentMediaJson} from './fixtures/instagram-json'; | |
| var App; | |
| module('Integration: Instagram Search', { | |
| setup: function() { | |
| App = startApp(); |
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 Ember from 'ember'; | |
| var FakeClientApi = Ember.Object.extend({ | |
| recentMediaForTagStub: null, | |
| stubRecentMediaForTag: function(callback){ | |
| this.recentMediaForTagStub = callback; | |
| }, | |
| recentMediaForTag: function(tag, options) { | |
| if (this.recentMediaForTagStub) { | |
| var results = this.recentMediaForTagStub.call(this, tag, options); |
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 Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| tag: null, | |
| displayMessage: null, | |
| searchResults: null, | |
| count: 10, | |
| instagramApiClient: null, // injected |
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 Ember from 'ember'; | |
| import ENV from "dependency-injection-demo/config/environment"; | |
| export default Ember.Object.extend({ | |
| appId: ENV.INSTAGRAM_CLIENT_ID, | |
| /* | |
| * Makes a JSONP request to get recent media tagged with a particular hashtag. | |
| * | |
| * Supported keys for options: |
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 InstagramApiClient from 'dependency-injection-demo/adapters/instagram'; | |
| import Ember from 'ember'; | |
| export default { | |
| name: 'register-stubbables', | |
| initialize: function(container, app) { | |
| if (!Ember.testing) { | |
| app.register('instagram-api-client:main', InstagramApiClient); | |
| } | |
| app.inject('controller:index', 'instagramApiClient', 'instagram-api-client:main'); |
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 Ember from 'ember'; | |
| import ENV from "dependency-injection-demo/config/environment"; | |
| export default Ember.Controller.extend({ | |
| tag: null, | |
| displayMessage: null, | |
| searchResults: null, | |
| appId: ENV.INSTAGRAM_CLIENT_ID, | |
| count: 10, |
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 #1 --- | |
| // Create sum function which takes someArray as a parameter. | |
| // In the function: | |
| // -Declare a variable count = 0 | |
| // -Iterate through someArray in a for loop, adding each | |
| // number in someArray to count | |
| // Return count. | |
| var sum = function(someArray) { | |
| var count = 0; |
NewerOlder