-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2306e5d
Showing
12 changed files
with
1,078 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.json] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = false | ||
|
||
[test/fixtures/*] | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Enforce Unix newlines | ||
* text eol=lf | ||
|
||
# binaries | ||
*.ai binary | ||
*.psd binary | ||
*.jpg binary | ||
*.gif binary | ||
*.png binary | ||
*.jpeg binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*.DS_Store | ||
*.sublime-* | ||
_gh_pages | ||
bower_components | ||
node_modules | ||
npm-debug.log | ||
actual | ||
test/actual | ||
temp | ||
tmp | ||
TODO.md | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"asi": false, | ||
"boss": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"eqnull": true, | ||
"esnext": true, | ||
"immed": true, | ||
"latedef": false, | ||
"laxcomma": false, | ||
"mocha": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"node": true, | ||
"sub": true, | ||
"undef": true, | ||
"unused": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
- "0.12" | ||
- "iojs" | ||
git: | ||
depth: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,313 @@ | ||
# {%= name %} {%= badge("fury") %} {%= badge("travis") %} | ||
|
||
> {%= description %} | ||
**Why another GitHub URL parser library?** | ||
|
||
Seems like every lib I've found does too much, like both stringifying and parsing, or converts the URL from one format to another, only returns certain segments of the URL except for what I need, yields inconsistent results or has poor coverage. | ||
|
||
{%= include("install-npm", {save: true}) %} | ||
|
||
## Usage | ||
|
||
```js | ||
var gh = require('{%= name %}'); | ||
``` | ||
|
||
## Example results | ||
|
||
Generated results from test fixtures: | ||
|
||
```js | ||
// assemble/verb#1.2.3 | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "1.2.3" | ||
} | ||
|
||
// assemble/verb#branch | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "branch" | ||
} | ||
|
||
// assemble/verb | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// git+https://github.com/assemble/verb.git | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// git+ssh://github.com/assemble/verb.git | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// git://gh.pages.com/assemble/verb.git | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// git://github.assemble.com/assemble/verb.git | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// git://github.assemble.two.com/assemble/verb.git | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// git://github.com/assemble/verb | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// git://github.com/assemble/verb.git | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// [email protected]:assemble/verb.git | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// [email protected]:assemble/verb.git#1.2.3 | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "1.2.3" | ||
} | ||
|
||
// [email protected]:assemble/verb.git#v1.2.3 | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "v1.2.3" | ||
} | ||
|
||
// [email protected]:assemble/verb.git | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// github:assemble/verb | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// http://github.com/assemble | ||
{ | ||
"user": "assemble", | ||
"repo": null, | ||
"repopath": null, | ||
"branch": "master" | ||
} | ||
|
||
// http://github.com/assemble/verb | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// http://github.com/assemble/verb.git | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// http://github.com/assemble/verb/tree | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// http://github.com/assemble/verb/tree/master | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// http://github.com/assemble/verb/tree/master/foo/bar | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master/foo/bar" | ||
} | ||
|
||
// https://assemble.github.com/assemble/verb/somefile.tar.gz | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// https://assemble.github.com/assemble/verb/somefile.zip | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// https://[email protected]/assemble/verb.git | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// https://gh.pages.com/assemble/verb.git | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// https://github.com/assemble/verb | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// https://github.com/assemble/verb.git | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// https://github.com/assemble/verb/blob/1.2.3/README.md | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "1.2.3" | ||
} | ||
|
||
// https://github.com/assemble/verb/blob/249b21a86400b38969cee3d5df6d2edf8813c137/README.md | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// https://github.com/assemble/verb/blob/master/assemble/index.js | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// https://github.com/assemble/verb/tree/1.2.3 | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "1.2.3" | ||
} | ||
|
||
// https://github.com/assemble/verb/tree/feature/1.2.3 | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "feature/1.2.3" | ||
} | ||
|
||
// https://github.com/repos/assemble/verb/tarball | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
|
||
// https://github.com/repos/assemble/verb/zipball | ||
{ | ||
"user": "assemble", | ||
"repo": "verb", | ||
"repopath": "assemble/verb", | ||
"branch": "master" | ||
} | ||
``` | ||
|
||
## Related projects | ||
{%= related(['is-git-url']) %} | ||
|
||
## Running tests | ||
{%= include("tests") %} | ||
|
||
## Contributing | ||
{%= include("contributing") %} | ||
|
||
## Author | ||
{%= include("author") %} | ||
|
||
## License | ||
{%= copyright() %} | ||
{%= license() %} | ||
|
||
*** | ||
|
||
{%= include("footer") %} |
Oops, something went wrong.