Git Product home page Git Product logo

Comments (52)

OpakAlex avatar OpakAlex commented on May 11, 2024

Hi! It's good idea, can you add this, and create PR?

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

@davetheninja .. I would be happy to merge your patch with these new additions, so go for it.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Most excellent. I will get on the case. One other question, i noticed in the gruntfile there is grunt-contrib-coffee which is not used within the build proccess.

Is this something you were looking to do, migrate to coffeescript?

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

I was going to write the tests in coffeescript, but not the core code. I was having some trouble with async tests in coffeescript so I abandoned that idea and kept with the js, but I could revisit that one day.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Can you confirm if the master tests pass on your machine? Trying to run them and they are failing on

Error: Assertion Failed: The content property of DS.PromiseArray should be set before modifying it

Wondering if its a bug or my machine. Thanks

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Just spotted the travis file. Checked on TravisCI and can confirm it master thats failing not my local.

Ill see if i can fix that while im at it

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

That was a strange one .. because my tests pass .. but when I see that error on Travis, so it's nice that you can reproduce that .. because I could not. If you can fix .. even better.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

What version of ember/ember data are you running locally.

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

1.0.0-beta.8.2a68c63a

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Test in question is #createRecord adds belongsTo association to records it hasMany of within fixture adapter factory test

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

Good to know .. but I am not getting that error .. what versions of ember / ember-data are you running?

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

i have tried a few different, from a bower install (using whats specified in the bower.json) and have upped the versions incrementally to beta.9 - no dice

currently stepping through code in ember to see why its blowing up

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

ok .. I wish I could reproduce it myself .. so thanks for trying to track it down.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

sure. what OS are you running? (not sure it would make a difference though)

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

mavericks .. and what versions of ember and ember data get you this failure .. ( all of them? it sounds like )

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

from ember 1.6 -> 1.8 beta 1 and ember-data 1.0.0-beta.7 -> 1.0.0-beta.9

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Its something to do with has many and async (RSVP call within the user find promise) . Ill have another look at it tomorrow

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Right. So I went back to Travis to check the logs.....

a1181df

That was the commit that caused the build to fail.

I hate computers.

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

geez .. that commit does not even do anything in particular .. which is why I just threw my hands up and ignored the travis test failure, since it seemed bogus. But now that you are actually reproducing it and have the bug live and fresh on your machine .. well .. yeah .. good point about computers.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Right. Just to err on the side of caution, I checked out the GREEN tag. Still doesnt work on my machine.

Could you try a clean clone of the repo, bower install, npm install grunt test

To see if it happens on a clean build on your machine

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

AH HA!!! I figured it out.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Last passing Travis Build.....

bower install ember-data#1.0.0-beta.8
bower install jquery#1.10.2
bower install ember#1.6.1

First Failing

bower install ember-data#1.0.0-beta.9
bower install jquery#1.10.2
bower install ember#1.6.1

I forced install 1.6.1 and 1.0.0-beta.8 locally and now the tests pass.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

So to get a green build on travis, put a hard dependency on 1.6.1 and beta 8 for the time being.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Victory is sweet. Time for beer.

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

Hooray .. for you .. and for me .. I got the test to fail with fresh install ( looks like newer ember release kills that test .. but I will try and fix also ) ..

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Sure, I need a green build before I start committing changes - need a solid platform if you know what I mean.

Expect Pull requests tomorrow instead of tonight :-)

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

no problem .. will be nice to get this sorted out

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

I have been looking at this and the code in DS.FixtureAdapter.createRecord .. ( which is where the problem is ) and to me .. its not worth fixing this .. since I am thinking it is best to drop support for the fixture adapter anyway ..
the purpose of this project is that you don't have to use the fixture adapter, so why am I supporting it ( out of legacy is the answer .. but I barely bother with keeping fixture adapter happy ) ..
so if you start to feel like your going down a deep well and getting nowhere ..

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Agree.


Sent from Mailbox

On Fri, Sep 5, 2014 at 1:12 AM, Daniel Sudol [email protected]
wrote:

I have been looking at this and the code in DS.FixtureAdapter.createRecord .. ( which is where the problem is ) and to me .. its not worth fixing this .. since I am thinking it is best to drop support for the fixture adapter anyway ..
the purpose of this project is that you don't have to use the fixture adapter, so why am I supporting it ( out of legacy is the answer .. but I barely bother with keeping fixture adapter happy ) ..

so if you start to feel like your going down a deep well and getting nowhere ..

Reply to this email directly or view it on GitHub:
#21 (comment)

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

I mentioned the test failure to @KnownSubset .. and asked him if he could try and fix it, since he has more interest in making that code work. If he can't fix it .. I will comment out the test so the build passes and wait for inspiration to fix it myself.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

any reason why the has_many.js include in the qunit index.html is not being referenced from the dist package?

from ember-data-factory-guy.

OpakAlex avatar OpakAlex commented on May 11, 2024

i think has_many.js is outdated. In latest ember-data it's not works. I have commit to up it on latest version, but we need change tests for FixtureAdapter. Build belongs_to is broken.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

p.s I have a basic setup working now where RequireJS is now supported.

I am going to refactor the test structure so that I can run all tests from Global scope and through Require.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Ok No problem

from ember-data-factory-guy.

OpakAlex avatar OpakAlex commented on May 11, 2024

@davetheninja You can see my last 3 commits https://github.com/OpakAlex/ember-data-factory-guy/commits/master

from ember-data-factory-guy.

OpakAlex avatar OpakAlex commented on May 11, 2024

Do you use broccoli for you build?

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Personally I do use broccoli yes, I have no problem whatsoever using Grunt though given it is already integrated.

Would Broccoli be something you would want to use?

from ember-data-factory-guy.

OpakAlex avatar OpakAlex commented on May 11, 2024

yes, i want new version with Broccoli. It will be very nice, and we can add some console commands for ember-cli. #17 Check this one.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Yeh thats quite sweet indeed :-)

To be honest with you guys, looking through the googlz this is the first project that has come close to what I am looking for in regards to streamlined testing within ember.

I am completely against use of fixtures as from experience (rails etc) they get out of control very quickly.

Factories on the other hand are much easier to maintain and override on a test per test basis.

Even more honestly (or stupidly) I have not even got this project to run on my app yet (amd dependency) hence I am working to add the requirejs goodies - just to test the app :-)

Once its added and I see if I can use this project, going forward I will be more than happy to invest time contributing.

As I said, from the features you currently support it looks almost perfect for my use case.

Bravo

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

One other thing I would recommend is using broc + es6 concat or similar and setting up the dependencies within your source files:

Example:

import Sequence from './sequence'

var FactoryGuy = {

  someMethodThatUsesSequence: function() {
    return Sequence.generate();
  }

}

export default FactoryGuy

The above is completely trivial example but that pattern has helped me so much (even more so when combined with CoffeeScript) when architecting my JS apps and libs.

from ember-data-factory-guy.

OpakAlex avatar OpakAlex commented on May 11, 2024

If you need help to testing your Ember app you can ping me.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Thanks

from ember-data-factory-guy.

KnownSubset avatar KnownSubset commented on May 11, 2024

@davetheninja I think everyone is against hard coded fixtures, but using a library/factories that populate the list of fixtures is an entirely different thing. I do think that the library should become adapter agnostic so that we rely only upon the store otherwise ember-data-factory-guy's adoption will always be hindered if a new adapter comes out.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Exactly. That's what I meant.

Factory -> attributes
factory -> store


Sent from Mailbox

On Fri, Sep 5, 2014 at 10:35 PM, Nathan [email protected] wrote:

@davetheninja I think everyone is against hard coded fixtures, but using a library/factories that populate the list of fixtures is an entirely different thing. I do think that the library should become adapter agnostic so that we rely only upon the store otherwise ember-data-factory-guy's adoption will always be hindered if a new adapter comes out.

Reply to this email directly or view it on GitHub:
#21 (comment)

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

@davetheninja .. I am not convinced on the need for switching to brocolli, so don't include that in this pull request ( lets save for another time ) And @OpakAlex, if you want this switch from grunt, try and implement it yourself first.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Sure. As I already said I have no intention to do anything other than requirejs initially.


Sent from Mailbox

On Sat, Sep 6, 2014 at 7:27 PM, Daniel Sudol [email protected]
wrote:

@davetheninja .. I am not convinced on the need for switching to brocolli, so don't include that in this pull request ( lets save for another time ) And @OpakAlex, if you want this switch from grunt, try and implement it yourself first.

Reply to this email directly or view it on GitHub:
#21 (comment)

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

Got it .. and I am looking forward to seeing that in action. :)

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

Hi @davetheninja .. how is it going with the amd conversion? I am guessing it got stalled .. but hoping you can finish it one of these days :)

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

@indirect made this happen so I am closing this one.

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

Apologies for being AWOL, family and work commitments. I am actually getting time to do some of my own project coding again.

The new factory-guy is excellent btw. Well done

from ember-data-factory-guy.

danielspaniel avatar danielspaniel commented on May 11, 2024

Thanks @davetheninja .. mucho appreciado and glad to see you back :)

from ember-data-factory-guy.

davetheninja avatar davetheninja commented on May 11, 2024

😌

from ember-data-factory-guy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.