Skip to content

fix(urlMatcherFactory.js): change to allow url query param names to c… #2415

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

Closed
wants to merge 4 commits into from

Conversation

SmilingJoe
Copy link

…ontain periods

This change modifies the searchPlaceholder regex to include the period
character as valid for url query param names. This change also modifies
the regex found in the addParameter function which validates the param
name just prior to adding to the list of parameters. A new set of unit
tests were added to urlMatcherFactorySpec to ensure this modification
works correctly.

This change fixes issue #2395

…ontain periods

This change modifies the searchPlaceholder regex to include the period
character as valid for url query param names. This change also modifies
the regex found in the addParameter function which validates the param
name just prior to adding to the list of parameters. A new set of unit
tests were added to urlMatcherFactorySpec to ensure this modification
works correctly.

This change resolves issue angular-ui#2395
@SmilingJoe
Copy link
Author

Just noticed that this appears to conflict with PR #1718.

@nateabele
Copy link
Contributor

Well, #1718 needs a rebase. I'd be fine with this one superseding that one if you pulled in his additional test cases.

@SmilingJoe
Copy link
Author

Ok, I'll work on incorporating those into this PR on Monday.

@nateabele
Copy link
Contributor

Sounds good, thanks. Ping me when you're ready and I'll check back.

@SmilingJoe
Copy link
Author

Hello,

Ok, I think I've incorporated all of the tests created from #1718.

Please review and let me know if I missed anything. This is my first contribution to a github project, so my apologies if I've missed anything.

Thanks!

@nateabele
Copy link
Contributor

Looks good! Just squash it down to 1 commit and we'll be all set (see http://prjs.radify.io/#/angular-ui/ui-router/pulls/2415).

Iain MacNeill added 2 commits December 14, 2015 10:57
…ontain periods

This change modifies the searchPlaceholder regex to include the period
character as valid for url query param names. This change also modifies
the regex found in the addParameter function which validates the param
name just prior to adding to the list of parameters. A new set of unit
tests were added to urlMatcherFactorySpec to ensure this modification
works correctly.

This change resolves issue angular-ui#2395
@SmilingJoe
Copy link
Author

Ok, not sure if I made things worse or not. Here's the commands I executed:

[1] git rebase -i HEAD~2

Originally, this displayed two 'pick' lines. I replaced the second line's 'pick' with 'squash', then saved.
When the comments section appeared, I commented out the 2nd commit note, then saved.

I then saw the following display:

[detached HEAD c35e3db] fix(urlMatcherFactory.js): change to allow url query param names to contain periods
 2 files changed, 24 insertions(+), 2 deletions(-)
Successfully rebased and updated refs/heads/master.

[2] git push origin master

This resulted in the following failure messages:

To https://github.com/SmilingJoe/ui-router.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/SmilingJoe/ui-router.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

[3] git pull

This resulted in the very much not helpful message of:

Merge made by the 'recursive' strategy.

[4] git push origin master

Counting objects: 2, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 689 bytes | 0 bytes/s, done.
Total 2 (delta 0), reused 0 (delta 0)
To https://github.com/SmilingJoe/ui-router.git
   151ca8c..ad2059f  master -> master

However, now it shows there are 4 commits. Guessing that this isn't what you're looking for. Sorry about my lack of experience here... can you help explain where I went wrong?

@nateabele
Copy link
Contributor

I'll see if I can take care of it later.

@SmilingJoe
Copy link
Author

Again, sorry about this. I should have realized that 'rebase' was a more advanced command and asked for more explicit instructions. Let me know if it would be easier for me to something on my end. I'll refrain from making any more modifications until I hear back from you.

@nateabele
Copy link
Contributor

@SmilingJoe You actually did the rebase correctly, but doing a rebase always results in having to force-push, so the git pull is where you got off-track. Good job getting most of the way there.

@nateabele
Copy link
Contributor

Fixed in d31b333.

@nateabele nateabele closed this Dec 15, 2015
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