-
Notifications
You must be signed in to change notification settings - Fork 242
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
Send more VCS details to lolsrv #181
Conversation
lolsrv more repository agnostic. Additional information includes: * full repo details {user}/{repo} * Timestamps of files * Full URL of commit built from the commit remote path
Add shotgun and Guard for faster, better, stronger development Consume NEW url and timestamp fields from plugin lolcommits/lolcommits#181 Rely on timestamp data when Github API call is not successful Github API auth Turned on Sintra config magic Switched to modular Sintra for less config loading overhead Google API keys read from environment, when available (reads from heroku when deployed) Style updates and JS optimizations via lazy loading Specify directly what size the images are
Add shotgun and Guard for faster, better, stronger development Consume NEW url and timestamp fields from plugin lolcommits/lolcommits#181 Rely on timestamp data when Github API call is not successful Github API auth Turned on Sintra config magic Switched to modular Sintra for less config loading overhead Google API keys read from environment, when available (reads from heroku when deployed) Style updates and JS optimizations via lazy loading Specify directly what size the images are Prefer time field, it's more often available
@@ -13,7 +13,9 @@ def initialize | |||
self.message = commit.message.split("\n").first | |||
self.sha = commit.sha[0..10] | |||
self.repo_internal_path = g.repo.path | |||
regex = /.*[:\/]([\w\-]*).git/ | |||
self.url = g.remote.url ? g.remote.url.gsub(':','/').gsub(/^git@/,'https://').gsub(/\.git$/,'') + '/commit/': '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like a rather lengthy expression here, maybe move this to a separate (private) method in this class? E.g.
def remote_https_url(url)
url.gsub(':','/').gsub(/^git@/,'https://').gsub(/\.git$/,'') + '/commit/'
end
# call with this (i think having self.url == nil is probably OK)
self.url = remote_https_url(g.remote.url) if g.remote.url
👍 Looks great, (just one minor comment) otherwise I think it's merge-able. |
Anything holding this up now? |
:repo => self.runner.repo, | ||
:date => File.ctime(file), | ||
:sha => sha) | ||
rescue => error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be rescue => e
couple more minor comments, otherwise good to go I think 👍 |
Thanks, looks OK to me now, merging 👍 |
Send more VCS details to lolsrv
released just now, in v0.5.3 |
This data is useful for making lolsrv more repository agnostic.
Additional information includes:
These features are blocking eteubert/lolsrv#2