Skip to content

Backbone 1.x#96

Merged
afeld merged 34 commits intoafeld:masterfrom
gkatsev:backbone1.0
Jan 8, 2014
Merged

Backbone 1.x#96
afeld merged 34 commits intoafeld:masterfrom
gkatsev:backbone1.0

Conversation

@gkatsev
Copy link
Copy Markdown
Collaborator

@gkatsev gkatsev commented Oct 22, 2013

Load up backbone 1.x and make sure that all the tests pass against it. This addresses #72.
This includes the commits from the previous PR #95.

@gkatsev
Copy link
Copy Markdown
Collaborator Author

gkatsev commented Oct 23, 2013

Looks like this isn't quite ready yet. I'm running NestedModel against the backbone tests directly and it still has some problems.

@gkatsev
Copy link
Copy Markdown
Collaborator Author

gkatsev commented Oct 24, 2013

It's now running backbone-nested against backbone's own model tests. All the tests passed locally. I would think that it means it works with backbone 1.x now. Probably would need a bit more testing to make sure things work.
Might be worth a refactor at some point to clean up some of the code.

test/index.html Outdated
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you include some reasoning here about why we are running the tests for non-nested models? I think I understand the reasoning, but want to a) make sure we're on the same page, and b) clarify for others who might be browsing the code.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is to run the tests against Backbone's Model to verify these tests which test the the usage of a model in the same scenarios as backbone itself will be valid.
If we want the basic cases to work the same way as Backbone.Model, then the tests should succeed when using Backbone.Model and not just Backbone.NestedModel.
If the model.js tests fail for either Backbone.Model or Backbone.NestedModel, that means that in the basic usage, the two are not compatible.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Mind adding a concise comment about that in here?

@afeld
Copy link
Copy Markdown
Owner

afeld commented Oct 25, 2013

Nice work, much appreciated! Please remove all the commented-out code that isn't needed anymore, but other than my comments above, looks very very close!

@gish
Copy link
Copy Markdown

gish commented Nov 19, 2013

How's it going with the changes? I'm eagerly waiting for this merge to happen.

@gkatsev
Copy link
Copy Markdown
Collaborator Author

gkatsev commented Nov 19, 2013

Sorry, been busy with other work. I'll try to get this finished this week.

@gish
Copy link
Copy Markdown

gish commented Nov 20, 2013

Let me know if you need a hand.

@gkatsev
Copy link
Copy Markdown
Collaborator Author

gkatsev commented Nov 20, 2013

Any testing you could give would be great.
Also, what's left is the response of the changed events. I inadvertently changed the functionality by returning only the object form and not the string form as well. If you get a chance to look at that as well, that would be amazing.

Update backbone dep to ~1.1.0
Move jslitmus to be a devDep.
This reverts commit 14bb6e3.
@afeld
Copy link
Copy Markdown
Owner

afeld commented Jan 8, 2014

Mind merging master, since that will filter out the commits from #95?

@gkatsev
Copy link
Copy Markdown
Collaborator Author

gkatsev commented Jan 8, 2014

Git is telling me it's all update to date. It's weird that it's still displaying those commits in this PR even though #95 was merged into master already.

@afeld
Copy link
Copy Markdown
Owner

afeld commented Jan 8, 2014

Sure you're merging from my master?

git pull git@github.com:afeld/backbone-nested.git master

@afeld
Copy link
Copy Markdown
Owner

afeld commented Jan 8, 2014

You should see 9e3f9d2 in your history.

@gkatsev
Copy link
Copy Markdown
Collaborator Author

gkatsev commented Jan 8, 2014

Oh, yeah, might be the wrong master, heh. Let me try again.

@gkatsev
Copy link
Copy Markdown
Collaborator Author

gkatsev commented Jan 8, 2014

I think that worked.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the clone() necessary?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly not. However, since we are passing it to a validation function provided by the user, we probably make sure that if they mutate these attrs, it doesn't mutate the internal model state.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a line note for it, in that case?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

bower.json Outdated
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why copy this file in?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file available from bower has useFakeTimers set to true which is causing problems.

afeld added a commit that referenced this pull request Jan 8, 2014
@afeld afeld merged commit c62814a into afeld:master Jan 8, 2014
@afeld
Copy link
Copy Markdown
Owner

afeld commented Jan 8, 2014

Many many 👏 on this!

@afeld afeld mentioned this pull request Jan 8, 2014
@afeld
Copy link
Copy Markdown
Owner

afeld commented Jan 8, 2014

Also, welcome @gkatsev as a collaborator on the repo! I'll still do everything through PRs, and ask that everyone else do the same.

@gkatsev gkatsev deleted the backbone1.0 branch January 8, 2014 17:06
@gkatsev
Copy link
Copy Markdown
Collaborator Author

gkatsev commented Jan 8, 2014

Sweet.
And yeah:
PR all the things

@afeld afeld mentioned this pull request Jan 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants