diff --git a/bin/penchant b/bin/penchant index 3c6280c..8e22ba2 100755 --- a/bin/penchant +++ b/bin/penchant @@ -134,7 +134,19 @@ ensure_git_hooks! defaults_for env(:local), :path => '../%s' # reference a github repository with gem 'my-gem', :github => 'username' -property :github, :git => 'git://github.com/$1/%s.git' +# also supports modern bundler user/repo syntax +property(:github) { |name| + parts = name.split('/') + + url = case parts.length + when 1 + "git://github.com/\#{name}/%s.git" + when 2 + "git://github.com/\#{parts.first}/\#{parts.last}.git" + end + + { :git => url } +} RB gemfile(:remote) end diff --git a/lib/penchant/version.rb b/lib/penchant/version.rb index 5b54960..039d8e7 100644 --- a/lib/penchant/version.rb +++ b/lib/penchant/version.rb @@ -1,3 +1,3 @@ module Penchant - VERSION = "0.2.26" + VERSION = "0.2.27" end