Skip to content

Releases: adopted-ember-addons/ember-data-factory-guy

v2.5.3

04 May 10:49
Compare
Choose a tag to compare

v2.5.2

01 May 20:24
Compare
Choose a tag to compare
  • added timesCalled property to mockUpdate ( which I forgot to do ) #186

v2.5.1

01 May 20:23
Compare
Choose a tag to compare
  • added timesCalled method to mock GET requests so you can verify how many times the mock was used #186

v2.5.0

01 May 13:09
Compare
Choose a tag to compare
  • FactoryGuy now officially supports EmberDataModelFragments #184, #185, #188
  • Moved ember, ember-data to 2.5
  • Bumped up version of mockjax that is installed to => 2.1.1

v2.4.5

22 Apr 16:07
Compare
Choose a tag to compare

Merged pull requests:

  • Wrap arrays that use prototype extensions in Ember.A() #192 (@gilest)
  • Refactor the equivalence function so that it works with arrays as well #191 (@bryanaka)
  • Add Change log #190 ( @Robdel12 )
  • Fix deprecation warning Ember.merge > Ember.assign for ember@2.5.0 #189 (@krasnoukhov)
  • Handle active model formatted request data properly #187 (@ccleung)

v2.4.4

26 Mar 00:26
Compare
Choose a tag to compare
  • adds support for ember-data-model-fragments again after it got lost in past releases. #184

v2.4.3

24 Mar 17:08
Compare
Choose a tag to compare
  • Added ability to handle embedded relationships ( marked by embedded: always ) when using DS.EmbeddedRecordsMixin #183
    • Tested on REST based adapters only so milage may vary on JSONAPI adapter

v2.4.2

19 Mar 15:26
Compare
Choose a tag to compare
  • Can now add another json payload to a current one
    • Useful for sideloading arbitrary records to the current payload
    • uses the add method on the json payload
  let batMan = build('bat_man');
  let user = build('user').add(batMan);

  user = {
    user: {
      id: 1,
      name: 'User1',
      style: "normal"
    },
    'super-heros': [
      {
        id: 1,
        name: "BatMan",
        type: "SuperHero"
      }
    ]
  };

v2.4.1

09 Mar 08:52
Compare
Choose a tag to compare
  • Removed usage of Set and Array.from, since phantomjs 1.9x was not loving it.

v2.4.0

07 Mar 02:35
Compare
Choose a tag to compare

Major update to json payload creation

  • You can now compose payload relationships to an unlimited degree with build/buildList methods
  • This is kind of a big deal, because you can now compose relationships with build/buildList
    like you do with make/makeList and not ever have to think about what your doing. Just do it.
  • Example:
  let company1 = build('company', {name: 'A Corp'});
  let company2 = build('company', {name: 'B Corp'});
  let owners = buildList('user', { company:company1 }, { company:company2 });
  let buildJson = build('property', { owners });

  let buildJson = {   // => RESTAdapter format 
    property: {
      id: 1,
      name: 'Silly property',
      owners: [1,2]
    },
    users: [
      {
        id: 1,
        name: "User1",
        company: {id: 1, type: "company"},
        style: "normal"
      },
      {
        id: 2,
        name: "User2",
        company: {id: 2, type: "company"},
        style: "normal"
      }
    ],
    companies: [
      {
        id: 1,
        type: 'Company',
        name: "A Corp"
      },
      {
        id: 2,
        type: 'Company',
        name: "B Corp"
      }
    ]
  };
  • This sets the stage for being able to arbitrarily add other includes to a payload built with build/buildList methods.

    • In other words .. in future could do this:
      build('user').includes('cows')
  • Added new json payload proxy classes which wield ridiculous power.

  • Can now reference the id attribute in factory definition inline functions

  • Complete rewrite of json payload builders / converter classes

    • If you looked at the code before it was like reading war and peace. Now it is more like green eggs and ham.
  • You might have to upgrade to phantomjs2 for automated builds if you have not already.

    • It's worth it because it is so much faster than 1.9x
    • see #179 for details on install on mac osx and for travis builds