Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate support for DS.FixtureAdapter #3091

Merged
merged 1 commit into from
May 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

### Master

- Removed support for DS.FixtureAdapter. You can use it as an addon, or
build it using [Ember Giftwrap](https://github.com/ef4/ember-giftwrap).
https://github.com/emberjs/ember-data-fixture-adapter/tree/master

### Release 1.0.0-beta.18 (May 18, 2015)

- [#3066](https://github.com/emberjs/data/pull/3066) Doc typo: primaryTypeClasss -> primaryTypeClass [@lolmaus](https://github.com/lolmaus)
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,6 @@ adapter translates that into an XHR request to (for example)
By default, Ember Data will use the `RESTAdapter`, which adheres to a
set of RESTful JSON conventions.

Ember Data also ships with the `FixtureAdapter`, useful for testing and
prototyping before you have a server, and the `ActiveModelAdapter`,
which is designed to work out-of-the-box with the
[`ActiveModel::Serializers`](https://github.com/rails-api/active_model_serializers)
gem for Rails.

To learn more about adapters, including what conventions the
`RESTAdapter` follows and how to build your own, see the Ember.js
Guides: [Connecting to an HTTP
Expand Down
17 changes: 16 additions & 1 deletion packages/ember-data/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ DS.RecordArrayManager = RecordArrayManager;

DS.RESTAdapter = RESTAdapter;
DS.BuildURLMixin = BuildURLMixin;
DS.FixtureAdapter = FixtureAdapter;

DS.RESTSerializer = RESTSerializer;
DS.JSONSerializer = JSONSerializer;
Expand Down Expand Up @@ -135,6 +134,22 @@ Ember.defineProperty(DS, 'normalizeModelName', {
value: normalizeModelName
});

var fixtureAdapterWasDeprecated = false;

if (Ember.platform.hasPropertyAccessors) {
Ember.defineProperty(DS, 'FixtureAdapter', {
get: function() {
if (!fixtureAdapterWasDeprecated) {
Ember.deprecate('DS.FixtureAdapter has been deprecated and moved into an unsupported addon: https://github.com/emberjs/ember-data-fixture-adapter/tree/master');
fixtureAdapterWasDeprecated = true;
}
return FixtureAdapter;
}
});
} else {
DS.FixtureAdapter = FixtureAdapter;
}

Ember.lookup.DS = DS;

export default DS;
Loading