lib/onebox/engine/github_commit_onebox.rb in onebox-2.2.14 vs lib/onebox/engine/github_commit_onebox.rb in onebox-2.2.15
- old
+ new
@@ -8,10 +8,10 @@
include Engine
include LayoutSupport
include JSON
include Onebox::Mixins::GithubBody
- matches_regexp Regexp.new("^https?://(?:www\.)?(?:(?:\w)+\.)?(github)\.com(?:/)?(?:.)*/commit/")
+ matches_regexp(/^https?:\/\/(?:www\.)?(?:(?:\w)+\.)?(github)\.com(?:\/)?(?:.)*\/commit\//)
always_https
def url
"https://api.github.com/repos/#{match[:owner]}/#{match[:repository]}/commits/#{match[:sha]}"
end