Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Mar 14, 2015
0 parents commit 2306e5d
Show file tree
Hide file tree
Showing 12 changed files with 1,078 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .editorconfig
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
10 changes: 10 additions & 0 deletions .gitattributes
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
12 changes: 12 additions & 0 deletions .gitignore
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
18 changes: 18 additions & 0 deletions .jshintrc
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
}
8 changes: 8 additions & 0 deletions .travis.yml
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
313 changes: 313 additions & 0 deletions .verb.md
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") %}
Loading

0 comments on commit 2306e5d

Please sign in to comment.