-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
AMD/Require and use strict #21
Comments
Hi! It's good idea, can you add this, and create PR? |
@davetheninja .. I would be happy to merge your patch with these new additions, so go for it. |
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? |
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. |
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 |
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 |
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. |
What version of ember/ember data are you running locally. |
1.0.0-beta.8.2a68c63a |
Test in question is #createRecord adds belongsTo association to records it hasMany of within fixture adapter factory test |
Good to know .. but I am not getting that error .. what versions of ember / ember-data are you running? |
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 |
ok .. I wish I could reproduce it myself .. so thanks for trying to track it down. |
sure. what OS are you running? (not sure it would make a difference though) |
mavericks .. and what versions of ember and ember data get you this failure .. ( all of them? it sounds like ) |
from ember 1.6 -> 1.8 beta 1 and ember-data 1.0.0-beta.7 -> 1.0.0-beta.9 |
Its something to do with has many and async (RSVP call within the user find promise) . Ill have another look at it tomorrow |
Right. So I went back to Travis to check the logs..... That was the commit that caused the build to fail. I hate computers. |
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. |
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 |
AH HA!!! I figured it out. |
Last passing Travis Build.....bower install ember-data#1.0.0-beta.8 First Failingbower install ember-data#1.0.0-beta.9 I forced install 1.6.1 and 1.0.0-beta.8 locally and now the tests pass. |
So to get a green build on travis, put a hard dependency on 1.6.1 and beta 8 for the time being. |
Victory is sweet. Time for beer. |
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 ) .. |
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 :-) |
no problem .. will be nice to get this sorted out |
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 .. |
Agree. — On Fri, Sep 5, 2014 at 1:12 AM, Daniel Sudol [email protected]
|
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. |
any reason why the has_many.js include in the qunit index.html is not being referenced from the dist package? |
i think |
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. |
Ok No problem |
@davetheninja You can see my last 3 commits https://github.com/OpakAlex/ember-data-factory-guy/commits/master |
Do you use broccoli for you build? |
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? |
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. |
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 |
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. |
If you need help to testing your Ember app you can ping me. |
Thanks |
@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. |
Exactly. That's what I meant. Factory -> attributes — On Fri, Sep 5, 2014 at 10:35 PM, Nathan [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. |
Sure. As I already said I have no intention to do anything other than requirejs initially. — On Sat, Sep 6, 2014 at 7:27 PM, Daniel Sudol [email protected]
|
Got it .. and I am looking forward to seeing that in action. :) |
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 :) |
@indirect made this happen so I am closing this one. |
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 |
Thanks @davetheninja .. mucho appreciado and glad to see you back :) |
😌 |
Hey,
I really am quite interested in using this library for dev/testing however in its current state I am unable to use it.
Issues:
Question:
If you are totally against strict and AMD then there is no point me spending time forking and patching.
Thanks
Davie
The text was updated successfully, but these errors were encountered: