{"url":"https://api.github.com/gists/eb65d4f32cb203764ad9","forks_url":"https://api.github.com/gists/eb65d4f32cb203764ad9/forks","commits_url":"https://api.github.com/gists/eb65d4f32cb203764ad9/commits","id":"eb65d4f32cb203764ad9","node_id":"MDQ6R2lzdGViNjVkNGYzMmNiMjAzNzY0YWQ5","git_pull_url":"https://gist.github.com/eb65d4f32cb203764ad9.git","git_push_url":"https://gist.github.com/eb65d4f32cb203764ad9.git","html_url":"https://gist.github.com/michaellihs/eb65d4f32cb203764ad9","files":{"gitlab_site.md":{"filename":"gitlab_site.md","type":"text/markdown","language":"Markdown","raw_url":"https://gist.githubusercontent.com/michaellihs/eb65d4f32cb203764ad9/raw/0c320c5f06d22eabfc7e85847bf1a89adb95236a/gitlab_site.md","size":738,"truncated":false,"content":"# Gitlab Helper for opening Gitlab project site of current git repository\n\n## Setup\n\n(On a Mac) create the following ruby script in  `/usr/bin/gitlab_site`\n\n````ruby\n#!/usr/bin/ruby\n\ngit_remote = `git remote -v`.scan(/git@(.+?).git/)\nif git_remote.is_a? Array\n  git_remote = git_remote[0][0]\nelse\n  fail 'No git remote detectable for current directory!'\nend\nremote_url = 'https://' + git_remote.gsub(/:/, '/')\n `open #{remote_url}`\n ````\nmake it executable\n\n```` sh \nchmod u+x /usr/bin/gitlab_site\n````\n\n## Usage\n\nYou can now run\n\n```` sh \ngitlab_site\n````\n \nin any directory containing a git repository with a remote to your Gitlab Server...\n\nThat's it - have fun!\n\nP.S. any suggestions on improving the script are highly appreciated :-)","encoding":"utf-8"}},"public":true,"created_at":"2015-07-29T07:33:44Z","updated_at":"2015-08-29T14:26:10Z","description":"Opens a Gitlab site for the current directory","comments":0,"user":null,"comments_enabled":true,"comments_url":"https://api.github.com/gists/eb65d4f32cb203764ad9/comments","owner":{"login":"michaellihs","id":575011,"node_id":"MDQ6VXNlcjU3NTAxMQ==","avatar_url":"https://avatars.githubusercontent.com/u/575011?v=4","gravatar_id":"","url":"https://api.github.com/users/michaellihs","html_url":"https://github.com/michaellihs","followers_url":"https://api.github.com/users/michaellihs/followers","following_url":"https://api.github.com/users/michaellihs/following{/other_user}","gists_url":"https://api.github.com/users/michaellihs/gists{/gist_id}","starred_url":"https://api.github.com/users/michaellihs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaellihs/subscriptions","organizations_url":"https://api.github.com/users/michaellihs/orgs","repos_url":"https://api.github.com/users/michaellihs/repos","events_url":"https://api.github.com/users/michaellihs/events{/privacy}","received_events_url":"https://api.github.com/users/michaellihs/received_events","type":"User","user_view_type":"public","site_admin":false},"forks":[],"history":[{"user":{"login":"michaellihs","id":575011,"node_id":"MDQ6VXNlcjU3NTAxMQ==","avatar_url":"https://avatars.githubusercontent.com/u/575011?v=4","gravatar_id":"","url":"https://api.github.com/users/michaellihs","html_url":"https://github.com/michaellihs","followers_url":"https://api.github.com/users/michaellihs/followers","following_url":"https://api.github.com/users/michaellihs/following{/other_user}","gists_url":"https://api.github.com/users/michaellihs/gists{/gist_id}","starred_url":"https://api.github.com/users/michaellihs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaellihs/subscriptions","organizations_url":"https://api.github.com/users/michaellihs/orgs","repos_url":"https://api.github.com/users/michaellihs/repos","events_url":"https://api.github.com/users/michaellihs/events{/privacy}","received_events_url":"https://api.github.com/users/michaellihs/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"d383dd6c55825fa12ceeae4f1aa5eda37c473ad5","committed_at":"2015-07-29T07:34:34Z","change_status":{"total":8,"additions":6,"deletions":2},"url":"https://api.github.com/gists/eb65d4f32cb203764ad9/d383dd6c55825fa12ceeae4f1aa5eda37c473ad5"},{"user":{"login":"michaellihs","id":575011,"node_id":"MDQ6VXNlcjU3NTAxMQ==","avatar_url":"https://avatars.githubusercontent.com/u/575011?v=4","gravatar_id":"","url":"https://api.github.com/users/michaellihs","html_url":"https://github.com/michaellihs","followers_url":"https://api.github.com/users/michaellihs/followers","following_url":"https://api.github.com/users/michaellihs/following{/other_user}","gists_url":"https://api.github.com/users/michaellihs/gists{/gist_id}","starred_url":"https://api.github.com/users/michaellihs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaellihs/subscriptions","organizations_url":"https://api.github.com/users/michaellihs/orgs","repos_url":"https://api.github.com/users/michaellihs/repos","events_url":"https://api.github.com/users/michaellihs/events{/privacy}","received_events_url":"https://api.github.com/users/michaellihs/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"f3beae5001edaa413d0d117bd5c519d348b92df9","committed_at":"2015-07-29T07:33:44Z","change_status":{"total":33,"additions":33,"deletions":0},"url":"https://api.github.com/gists/eb65d4f32cb203764ad9/f3beae5001edaa413d0d117bd5c519d348b92df9"}],"truncated":false}