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

Add code blocks to the ch13 (control-database) #26

Merged
merged 2 commits into from
Nov 9, 2015

Conversation

bocharsky-bw
Copy link
Member

Resolve ch13-control-database in #12

@bocharsky-bw
Copy link
Member Author

For this chapter the difference is: ThereIsAnAdminUserWithPassword() in the screencast and ThereIsAUserWithPassword() in the code blocks. Does it very bad here? Should we change it in source code?

@bocharsky-bw bocharsky-bw changed the title Add code blocks to the ch13 Add code blocks to the ch13 (control-database) Nov 8, 2015
@weaverryan
Copy link
Member

I think we should change this one - seem just important enough. Are you able to make that change? If you are, do it for this PR :)

@bocharsky-bw
Copy link
Member Author

@weaverryan I tried to do it but I'm not sure that it happened.
There're my steps:

  • Move to the certain step with tuts move bootstrap-load-symfony
  • Rename method to ThereIsAnAdminUserWithPassword in FeatureContext.php
  • Commit this changes in _tuts/behat3/bootstrap-load-symfony branch
  • Checkout to the code-blocks-ch13 branch
  • Compile changes with tuts compile, commit them and push to the code-blocks-ch13 branch

I did something wrong?

@weaverryan
Copy link
Member

@bocharsky-bw I think you're really close - it's a little tricky, especially to do it on a branch. I think these are the correct steps:

  • Checkout to the code-blocks-ch13 branch. Make sure it is in sync with behat3 just in case
  • Move to the certain step with tuts move bootstrap-load-symfony
  • Rename method to ThereIsAnAdminUserWithPassword in FeatureContext.php
  • Commit this changes to whatever branch you're on.
  • Compile changes with tuts compile. This will commit the changes to your code-blocks-ch13 branch. Push that.
  • Run tuts reset to kill all of the branches for the steps

Now, to actually update the code block, you'll need to go into the code block gui and change the sha to be the latest sha on your code-blocks-ch13 branch. That will allow the code blocks gui to see your latest code changes.

I'd revert your changes to _tuts/steps.json before trying this - and maybe also run tuts2 reset on the behat3 branch to "clear out all the branches". Ultimately, this PR should have changes to _tuts/steps.json and at least one .diff file in _tuts/.

Let me know if that makes sense! It's still a very technical and delicate tool - especially when working not on the master/behat3 branch.

@bocharsky-bw
Copy link
Member Author

Yeah, it works! Seems the problem was that I did checkout back to the code-blocks-ch13 before running tuts compile. But there're a lot of file was changed in _tuts... I think it's correct, right?

weaverryan added a commit that referenced this pull request Nov 9, 2015
Add code blocks to the ch13 (control-database)
@weaverryan weaverryan merged commit ac5b5ca into behat3 Nov 9, 2015
@weaverryan weaverryan deleted the code-blocks-ch13 branch November 9, 2015 23:28
@weaverryan
Copy link
Member

👍 Yes, it's because the sha is stored in the diff's, which we really don't need. Diffs are still quite a mysterious (and delicate) thing - I'd like to learn more about them and see if the sha's can be removed from those files.

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.

2 participants