Parse the username, repo and protocol from a github clone url. In Ruby.
Add this line to your application's Gemfile:
gem 'github_url'And then execute:
$ bundle
Or install it yourself as:
$ gem install github_url
GithubUrl.parse("https://github.com/lurraca/github_url")
#=> #<GithubUrl::Parsed username="lurraca" repo="github_url" protocol="https">
- Fork it ( https://github.com/[my-github-username]/github_url/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request