{ "_args": [ [ "ember-data@git+ssh://git@github.com/emberjs/data.git#beta", "/Users/tricknotes/src/github.com/tricknotes/super-rentals" ] ], "_from": "git+ssh://git@github.com/emberjs/data.git#beta", "_id": "ember-data@2.4.0-beta.1", "_inCache": true, "_installable": true, "_location": "/ember-data", "_phantomChildren": {}, "_requested": { "hosted": { "directUrl": "https://raw.githubusercontent.com/emberjs/data/beta/package.json", "gitUrl": "git://github.com/emberjs/data.git#beta", "httpsUrl": "git+https://github.com/emberjs/data.git#beta", "shortcut": "github:emberjs/data#beta", "ssh": "git@github.com:emberjs/data.git#beta", "sshUrl": "git+ssh://git@github.com/emberjs/data.git#beta", "type": "github" }, "name": "ember-data", "raw": "ember-data@git+ssh://git@github.com/emberjs/data.git#beta", "rawSpec": "git+ssh://git@github.com/emberjs/data.git#beta", "scope": null, "spec": "git+ssh://git@github.com/emberjs/data.git#beta", "type": "hosted" }, "_requiredBy": [ "#DEV:/" ], "_resolved": "git+ssh://git@github.com/emberjs/data.git#86f89cbed2a2218368dc652fdb74d8553efaa76c", "_shasum": "9fd442c98abba857dfe1a7378e6f87f72514f7fc", "_shrinkwrap": null, "_spec": "ember-data@git+ssh://git@github.com/emberjs/data.git#beta", "_where": "/Users/tricknotes/src/github.com/tricknotes/super-rentals", "author": "", "bugs": { "url": "https://github.com/emberjs/data/issues" }, "dependencies": { "babel-plugin-feature-flags": "^0.2.0", "babel-plugin-filter-imports": "^0.2.0", "broccoli-babel-transpiler": "^5.5.0", "broccoli-file-creator": "^1.0.0", "broccoli-merge-trees": "^1.0.0", "chalk": "^1.1.1", "ember-cli-babel": "^5.1.3", "ember-cli-path-utils": "^1.0.0", "ember-cli-string-utils": "^1.0.0", "ember-cli-test-info": "^1.0.0", "ember-cli-version-checker": "^1.1.4", "ember-inflector": "^1.9.4", "exists-sync": "0.0.3", "git-repo-info": "^1.1.2", "inflection": "^1.8.0", "semver": "^5.1.0", "silent-error": "^1.0.0" }, "description": "A data layer for your Ember applications.", "devDependencies": { "bower": "^1.6.5", "broccoli-asset-rev": "^2.1.2", "broccoli-concat": "0.0.13", "broccoli-funnel": "^1.0.0", "broccoli-jscs": "^1.1.0", "broccoli-stew": "^1.0.1", "broccoli-string-replace": "^0.1.1", "broccoli-uglify-sourcemap": "^1.0.1", "broccoli-yuidoc": "^2.1.0", "ember-cli": "1.13.12", "ember-cli-app-version": "0.5.0", "ember-cli-blueprint-test-helpers": "^0.6.0", "ember-cli-content-security-policy": "0.4.0", "ember-cli-dependency-checker": "^1.0.1", "ember-cli-htmlbars": "0.7.9", "ember-cli-htmlbars-inline-precompile": "^0.2.0", "ember-cli-ic-ajax": "0.2.1", "ember-cli-inject-live-reload": "^1.3.1", "ember-cli-internal-test-helpers": "^0.5.0", "ember-cli-qunit": "^1.0.0", "ember-cli-release": "0.2.3", "ember-cli-uglify": "^1.2.0", "ember-disable-prototype-extensions": "^1.0.0", "ember-disable-proxy-controllers": "^1.0.0", "ember-export-application-global": "^1.0.3", "ember-publisher": "0.0.7", "ember-try": "0.0.6", "ember-watson": "^0.7.0", "github": "^0.2.4", "glob": "^5.0.13", "lodash.assign": "^3.2.0", "mocha": "^2.3.4", "mocha-only-detector": "0.0.2", "rimraf": "^2.3.2", "rsvp": "^3.1.0" }, "directories": { "doc": "doc", "test": "tests" }, "ember-addon": { "configPath": "tests/dummy/config", "paths": [ "lib/enable-optional-features-via-url" ] }, "engines": { "node": ">= 0.10.0" }, "gitHead": "86f89cbed2a2218368dc652fdb74d8553efaa76c", "homepage": "https://github.com/emberjs/data#readme", "keywords": [ "ember-addon" ], "license": "MIT", "name": "ember-data", "optionalDependencies": {}, "peerDependencies": { "ember-inflector": "^1.9.4" }, "readme": "## Ember Data [![Build Status](https://secure.travis-ci.org/emberjs/data.svg?branch=master)](http://travis-ci.org/emberjs/data)\n\nEmber Data is a library for robustly managing model data in your\nEmber.js applications.\n\nEmber Data is designed to be agnostic to the underlying persistence\nmechanism, so it works just as well with JSON APIs over HTTP as it does\nwith streaming WebSockets or local IndexedDB storage.\n\nIt provides many of the facilities you'd find in server-side ORMs like\nActiveRecord, but is designed specifically for the unique environment of\nJavaScript in the browser.\n\nIn particular, Ember Data uses Promises/A+-compatible promises from the\nground up to manage loading and saving records, so integrating with\nother JavaScript APIs is easy.\n\nIgor Terzic is currently the lead maintainer of Ember Data, while the rest\nof the core team include Yehuda Katz, Tom Dale, Brendan McLoughlin, \nChristoffer Persson and Stanley Stuart.\n\n## Using Ember Data\n\n### Getting Ember Data\n\n```no-highlight\nbower install ember-data --save\n```\n\nThe latest passing build from the \"master\" branch is available on\n[http://emberjs.com/builds/#/canary](http://emberjs.com/builds/#/canary).\n\nSimilarly, the latest passing build from the \"beta\" branch can be found\non [http://emberjs.com/builds/#/beta](http://emberjs.com/builds/#/beta)\n\nOr build ember-data.js yourself. Clone the repository and run `npm run build:production`\nafter [setup](#setup). You'll find ember-data.js in the `dist` directory.\n\n#### Internet Explorer 8\n\n**Internet Explorer 8 is no longer supported by Ember Data on versions\n2.0 and later.**\n\nIf you require IE8 support, you can use the `1.13` series of releases.\nThe source code is available on the `release-1-13` branch.\n\nInternet Explorer 8 support requires Ember 1.8.1 (which provides a polyfill for `Object.create`).\n\n### Instantiating the Store\n\nIn Ember Data, the _store_ is responsible for managing the lifecycle of\nyour models. Every time you need a model or a collection of models,\nyou'll ask the store for it.\n\nTo create a store, you don't need to do anything. Just by loading the\nEmber Data library, all of the routes and controllers in your\napplication will get a new `store` property. This property is an\ninstance of `DS.Store` that will be shared across all of the routes and\ncontrollers in your app.\n\n### Defining Your Models\n\nFirst thing's first: tell Ember Data about the models in your\napplication. For example, imagine we're writing a blog reader app.\n\nHere's what your model definition would look like if you're using\nES6 modules (via ember-cli):\n\n```js\n// app/models/blog-post.js\nimport DS from 'ember-data';\n\nexport default DS.Model.extend({\n title: DS.attr('string'),\n createdAt: DS.attr('date'),\n\n comments: DS.hasMany('comment')\n});\n\n// app/models/comment.js\nimport DS from 'ember-data';\n\nexport default DS.Model.extend({\n body: DS.attr('string'),\n username: DS.attr('string'),\n\n post: DS.belongsTo('blog-post')\n});\n```\n\nIf you're using globals (that is, not something like ember-cli), your\nmodels would look like this:\n\n```js\nvar attr = DS.attr;\nvar hasMany = DS.hasMany;\nvar belongsTo = DS.belongsTo;\n\nApp.BlogPost = DS.Model.extend({\n title: attr('string'),\n createdAt: attr('date'),\n\n comments: hasMany('comment')\n});\n\nApp.Comment = DS.Model.extend({\n body: attr('string'),\n username: attr('string'),\n\n post: belongsTo('blog-post')\n});\n```\n\n### A Brief Note on Adapters\n\nWithout immediately diving in to the depths of the architecture, one\nthing you _should_ know is that Ember Data uses an object called an\n_adapter_ to know how to talk to your server.\n\nAn adapter is just an object that knows how to translate requests from\nEmber Data into requests on your server. For example, if I ask the Ember\nData store for a record of type `person` with an ID of `123`, the\nadapter translates that into an XHR request to (for example)\n`api.example.com/v3/person/123.json`.\n\nBy default, Ember Data will use the `RESTAdapter`, which adheres to a\nset of RESTful JSON conventions.\n\nTo learn more about adapters, including what conventions the\n`RESTAdapter` follows and how to build your own, see the Ember.js\nGuides: [Connecting to an HTTP\nServer](http://emberjs.com/guides/models/connecting-to-an-http-server/).\n\n### Fetching a Collection of Models\n\nFrom your route or controller:\n\n```js\nthis.store.findAll('blog-post');\n```\n\nThis returns a promise that resolves to the collection of records.\n\n### Fetching a Single Model\n\n```js\nthis.store.findRecord('blog-post', 123);\n```\n\nThis returns a promise that resolves to the requested record. If the\nrecord can't be found or there was an error during the request, the\npromise will be rejected.\n\n### Even More Documentation\n\nFor much more detail on how to use Ember Data, see the [Ember.js Guides\non models](http://emberjs.com/guides/models/).\n\n# Building Ember Data\n\n1. Ensure that [Node.js](http://nodejs.org/) is installed.\n2. Run `npm install` to ensure the required dependencies are installed.\n3. Run `npm run build:production` to build Ember Data. The builds will be placed in the `dist/` directory.\n\n# Contribution\n\nSee [CONTRIBUTING.md](https://github.com/emberjs/data/blob/master/CONTRIBUTING.md)\n\n## How to Run Unit Tests\n\n### Setup\n\n1. Install Node.js from http://nodejs.org or your favorite package manager.\n\n2. Install Ember CLI and bower. `npm install -g ember-cli bower`\n\n3. Run `npm install` inside the project root to install the JS dependencies.\n\n### In Your Browser\n\n1. To start the development server, run `npm start`.\n\n2. Visit http://localhost:4200\n\n### From the CLI\n\n1. Install phantomjs from http://phantomjs.org\n\n2. Run `npm test`\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/emberjs/data.git" }, "scripts": { "bower": "bower install", "build": "ember build", "node-tests": "node node-tests/nodetest-runner.js", "production": "ember build --environment=production", "start": "ember server", "test": "ember try:testall", "test:optional-features": "ember test --environment=test-optional-features" }, "version": "2.4.0-beta.1" }