{"id":15994258,"url":"https://github.com/pixelhandler/ember-data-extensions","last_synced_at":"2025-07-12T15:38:56.792Z","repository":{"id":12871375,"uuid":"15547738","full_name":"pixelhandler/ember-data-extensions","owner":"pixelhandler","description":"Extensions for Ember Data - Adapters, Serializers and Mixins","archived":false,"fork":false,"pushed_at":"2014-05-13T18:39:10.000Z","size":1262,"stargazers_count":40,"open_issues_count":0,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-28T01:18:25.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixelhandler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-31T09:58:28.000Z","updated_at":"2023-09-12T08:08:29.000Z","dependencies_parsed_at":"2022-08-28T14:52:21.139Z","dependency_job_id":null,"html_url":"https://github.com/pixelhandler/ember-data-extensions","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelhandler%2Fember-data-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelhandler%2Fember-data-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelhandler%2Fember-data-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelhandler%2Fember-data-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixelhandler","download_url":"https://codeload.github.com/pixelhandler/ember-data-extensions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243869431,"owners_count":20361016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T07:07:58.223Z","updated_at":"2025-03-17T15:32:19.131Z","avatar_url":"https://github.com/pixelhandler.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extensions for Ember Data\n\n[![Build Status](https://travis-ci.org/pixelhandler/ember-data-extensions.png?branch=master)](https://travis-ci.org/pixelhandler/ember-data-extensions)\n\n## Using Bower\n\nFor info: `bower info ember-data-extensions`\n\nTo install the repo in your projects 'bower_components' directory:\n\n    bower install ember-data-extensions\n\nUse the files in the 'dist' directory.\n\n### Add to your project's bower.json as a dependency:\n\n```\n{\n  \"name\": \"your project\",\n  \"dependencies\": {\n    \"jquery\": \"~1.10.2\",\n    \"handlebars\": \"~1.3.0\",\n    \"ember\": \"~1.5.0\",\n    \"ember-data\": \"~1.0.0-beta.7\",\n    \"ember-data-extensions\": \"~1.0.0-beta.7\"\n  }\n}\n```\n\n* See: [Bower.io](http://bower.io)\n\n\n## Online Docs\n\n* [Generated docs](http://pixelhandler.github.io/ember-data-extensions/docs/)\n* [Wiki](https://github.com/pixelhandler/ember-data-extensions/wiki)\n\n\n## Ember Data compatability\n\nThe releases (tags) will follow Ember Data's versions, see the [releases] page\n\n[releases]: https://github.com/pixelhandler/ember-data-extensions/releases\n\n## Packages\n\nThe goal of this repository is to share packages as extensions to the Ember Data project.\nSpecifically: adapters, serializers, mixins for supporting various backend data storage systems.\n\nSee the `/dist` directory for built files (ready to download/use).\n\n\n### embedded-adapter\n\nAn fork of `activemodel-adapter` with support for embedded `hasMany` and `belongsTo` \nrelationships embedded in JSON payloads. The ActiveModelAdapter and ActiveModelSerializer\nwere converted to mixins (and extended for supporting embedded belongsTo relationships).\n\nThe `ActiveModelAdapter` is a subclass of the RESTAdapter designed to integrate\nwith a JSON API that uses an underscored naming convention instead of camelCasing.\nIt has been designed to work out of the box with the\n[active_model_serializers](http://github.com/rails-api/active_model_serializers) Ruby gem\n\n[Mongoid](https://github.com/mongoid/mongoid) supports using `embeds_many` and `embeds_one`\nin (Rails) models. Also `has_one` and `has_many` can be used with `ActiveModel::Serializers`. \nThere are various embedded options, ids or objects.\n\nLike the ActiveModelAdapter/Serializer the EmbeddedAdapter/Serializer extends the\nRESTAdapter/Serializer using mixins for supporting embedded records. See\n[proposal on discuss](http://discuss.emberjs.com/t/extend-ds-activemodelserializer-support-for-embedded-objects-belongsto-relationship-using-embeds-one).\n\n**Builds:**\n\n* [embedded-adapter.js](dist/embedded-adapter.js)\n* [embedded-adapter.min.js](dist/embedded-adapter.min.js)\n\n_Note: `EmbeddedMixin`, `UnderscoredAdapterMixin` and `UnderscoredSerializer` are included\nin the build, along with an application initializer (name: `embeddedAdapter`). Thanks to \nBradley Priest (and the Ember.js community) for the `ActiveModelAdapter`, which provides a\nlarge portion of support for embedded records in JSON payloads. The embedded-json-adapter\nand embedded-json-mixin are forks of the activemodel-adapter package._\n\n\n### mixins\n\nThe mixins can be used independently from the `EmbeddedSerializer`.\n\n**[Builds](dist):**\n\n* [embedded-mixin.js](dist/embedded-mixin.js)\n* [embedded-mixin.min.js](dist/embedded-mixin.min.js)\n* [underscored-adapter-mixin.js](dist/underscored-adapter-mixin.js)\n* [underscored-adapter-mixin.min.js](dist/underscored-adapter-mixin.min.js)\n* [underscored-serializer-mixin.js](dist/underscored-serializer-mixin.js)\n* [underscored-serializer-mixin.min.js](dist/underscored-serializer-mixin.min.js)\n* [embedded_in_model_mixin.js](dist/embedded_in_model_mixin.js)\n* [embedded_in_model_mixin.min.js](dist/embedded_in_model_mixin.min.js)\n* [model_with_embedded_mixin.js](dist/model_with_embedded_mixin.js)\n* [model_with_embedded_mixin.min.js](dist/model_with_embedded_mixin.min.js)\n\nSee the [embedded-adapter/initializer.js](packages/embedded-adapter/lib/initializer.js)\nfile as an example implemenation for a custom adapter/serializer based on using mixins\nfor supporting an API that uses snake_case properties and embedded related objects in\narrays or as plain objects.\n\n\n# Contributing\n\nBelow are notes for using this repository to developing extensions for Ember Data.\n\n\n## Install\n\n`make install` or...\n\n1. Clone this repo\n1. `npm install` installs brunch and testem\n1. Fetch dependencies - `bower install`\n\n\n## Build\n\n`make` or...\n\nBuild command: `brunch b` creates a file for distribution in the `/dist` directory.\n\n* See brunch docs, [commands](https://github.com/brunch/brunch/blob/stable/docs/commands.md)\n* The 'config.js' file is used for the (brunch) build.\n\n\n### Production Build\n\n`make prod` or...\n\nBuild command to create an optimized file: `brunch build --optimize`\n\n\n## Test\n\n`make test` or... Run tests with command `testem` (dev) or `testem ci` (uses for Travis build)\n\n* See [testem docs](https://github.com/airportyh/testem)\n\n* Ember Data test helpers copied/adapted from the \n[ember_configuration.js](https://github.com/emberjs/data/blob/master/tests/ember_configuration.js) \nfile in the Ember Data project\n\n\n## Dependencies\n\nEmber.js, jQuery, Handlebars, Ember Data\n\nSee the [package.json](package.json)\n\n\n### Bower\n\n* Bower is used to fetch Ember.js with the command: `bower install`\n* Update Ember with command: `bower update`\n\n\n## Code Quality\n\n`make lint` or...\n\n* `jshint packages/mixins/lib/*`\n* `jshint packages/mixins/tests/*`\n\nUses JSHint, when using commands to build or test, i.e. `make`, `make prod` or `make test`\nthe jshint check is performed first.\n\n\n## Code Coverage Report\n\n[Blanket.js](http://blanketjs.org) with grunt a task is used for running code coverage reports\nduring continuous integration tooling w/ Travis.\n\nTo execute reports locally, use `make coverage` or...\n\n    open http://localhost:8080/tests/coverage.html?coverage=true\n    python -m SimpleHTTPServer 8080\n\n_the `open` command above works on mac, use \u003cControl-c\u003e to quit_\n\nThe coverage report (Blanket.js results) shows a list of files. Click a file to inspect code, \nred lines are not reached when tests execute.\n\nSee:\n\n* [blanket.js](http://blanketjs.org)\n* [grunt-blanket-qunit](https://github.com/ModelN/grunt-blanket-qunit)\n\n\n## Continuous Integration (CI)\n\nSee [Travis CI report](https://travis-ci.org/pixelhandler/ember-data-extensions)\n\nUse command: `make ci` to execute build and execute tests locally.\n\nOptions for CI: `testem ci` or `grunt blanket_qunit --verbose`\n\n\n## Grunt\n\nThe [Gruntfile.js](Gruntfile.js) default task is `blanket_qunit` which exectutes the QUnit\nand Blanket.js test reports. The blanket_qunit task has an option for `threshold` which is\nthe acceptable percentage of code coverage (e.g. 97%).\n\n\n## Documentation\n\n`make doc` or...\n\n* `yuidoc ./packages/activemodel-adapter/lib/* -c yuidoc.json --server` (you can append a port number e.g. `--server 8888`, the default port is 3000)\n\nDocs are generated from source using [yuidoc](https://github.com/yui/yuidoc).\n\n`make docfiles` is used to generante files for the gh-pages branch of this repo,\n**[generated docs](http://pixelhandler.github.io/ember-data-extensions/docs/)**\n\nSee the [wiki](https://github.com/pixelhandler/ember-data-extensions/wiki) for notes on usage.\n\n\n## Development\n\nA recent/current version of Node.js is required for using the build and test tools.\n\n### PhantomJS\n\nHeadless testing is done with phantomjs.\n\nNPM can install phantomjs, execute `sudo npm install phantomjs -g`\n\nOr, To install with brew, execute `brew install phantomjs`.\n\n* See: [Homebrew]\n\n[Homebrew]: http://brew.sh\n\nBe sure your executable path resolves to the version of phanomjs you expect to use.\n\n\n### Troubleshooting\n\nIf you have trouble using the default `make install` command perhaps try the following:\n\nYou may need to use sudo for the following:\n\n1. `npm install -g bower`\n1. `npm install -g testem`\n1. `npm install -g brunch`\n1. `npm install -g jshint`\n1. `npm install -g grunt`\n1. `npm install -g grunt-cli`\n1. `npm install -g grunt-blanket-qunit --save-dev`\n\nThen try:\n\n1. `npm install`\n1. `bower install`\n\n\n### Makefile\n\nVarious tasks (targets) for building, testing and continuous integration.\n\n* `make lint`: lints all files in the 'packages' directory w/ jshint\n* `make test`: starts `testem` and watches packages for changes to re-run test suites\n  * use any local browser: [http://localhost:7357/](http://localhost:7357/)\n* `make coverage`: starts python server with code coverage report, [http://localhost:8080/tests/coverage.html?coverage=true](http://localhost:8080/tests/coverage.html?coverage=true)\n* `make ci`: Run all tests in w/ output for continuous integration (uses phantomjs)\n* `make`: builds packages to '/dist' directory\n* `make prod`: builds optimized packages to '/dist' directory\n* `make dist`: Build all packages for distribution in '/dist' directory\n* `make clean`: empties '/dist' directory\n* `make doc`: browse documentation from source code [http://localhost:3333](http://localhost:3333)\n* `make docfiles`: generate (html) documentation from source code, use w/ gh-pages branch \n\n_See the 'Troubleshooting' section above if you are unable to execute `make ci`_\n\n\n### Config files\n\n* [config.js](config.js) is used by brunch.io build tools\n* [testem.json](testem.json) is used for testing w/ both developer and ci modes\n* [Gruntfile.js](Gruntfile.js) supports code coverage/testing tools used with continuous integration\n* [yuidoc.json](yuidoc.json) is for generating documentation from source code using yuidocjs\n* [bower.json](bower.json) is used to install dependencies (Ember.js, etc.)\n* [.travis.yml](.travis.yml) is used for continuous integration with [travis-ci.org](https://travis-ci.org/pixelhandler/ember-data-extensions)\n* [.jshintrc](.jshintrc) is used for code quality w/ jshint\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelhandler%2Fember-data-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixelhandler%2Fember-data-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelhandler%2Fember-data-extensions/lists"}