[Gemfile] Add option to cp_gem to make using gem from path easier
Showing
| # Declares a dependency to the git repo of CocoaPods gem. This declaration is | # Declares a dependency to the git repo of CocoaPods gem. This declaration is | ||
| # compatible with the local git repos feature of Bundler. | # compatible with the local git repos feature of Bundler. | ||
| # | # | ||
| def cp_gem(name, repo_name, branch = 'master') | def cp_gem(name, repo_name, branch = 'master', path: false) | ||
| url = "https://github.com/CocoaPods/#{repo_name}.git" | opts = if path | ||
| gem name, :git => url, :branch => branch | { :path => "../#{repo_name}" } | ||
| else | |||
| url = "https://github.com/CocoaPods/#{repo_name}.git" | |||
| { :git => url, :branch => branch } | |||
| end | |||
| gem name, opts | |||
| end | end | ||
| source 'https://rubygems.org' | source 'https://rubygems.org' | ||
| ... | ... |
Please
register
or
sign in
to comment