handle modern bundler :github syntax for gem property with default penchant files
This commit is contained in:
parent
2250d629be
commit
eeb743467d
14
bin/penchant
14
bin/penchant
@ -134,7 +134,19 @@ ensure_git_hooks!
|
|||||||
defaults_for env(:local), :path => '../%s'
|
defaults_for env(:local), :path => '../%s'
|
||||||
|
|
||||||
# reference a github repository with gem 'my-gem', :github => 'username'
|
# 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
|
RB
|
||||||
gemfile(:remote)
|
gemfile(:remote)
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
module Penchant
|
module Penchant
|
||||||
VERSION = "0.2.26"
|
VERSION = "0.2.27"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user