Top Level Namespace
Defined Under Namespace
Modules: Pod, RepoSvnExt
Instance Method Summary collapse
- #create_source_with_url(url) ⇒ Object
-
#name_for_url(url) ⇒ String
For now, this uses the last component of the URL as the name So my.server.com/somedir/Specs will return Specs.
- #update_or_add_source(source) ⇒ Void
Instance Method Details
#create_source_with_url(url) ⇒ Object
49 50 51 52 53 54 |
# File 'lib/cocoapods_plugin.rb', line 49 def create_source_with_url(url) name = name_for_url(url) repos_dir = Pod::Config.instance.repos_dir repo = repos_dir + name Pod::SvnSource.new(repo,url) end |
#name_for_url(url) ⇒ String
For now, this uses the last component of the URL as the name So my.server.com/somedir/Specs will return Specs
41 42 43 44 45 46 |
# File 'lib/cocoapods_plugin.rb', line 41 def name_for_url(url) return nil unless url delim = '/' components = url.split(delim) components.last end |
#update_or_add_source(source) ⇒ Void
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/cocoapods_plugin.rb', line 19 def update_or_add_source(source) name = source.name url = source.url dir = source.repo if dir.exist? argv = CLAide::ARGV.new([name]) cmd = Pod::Command::RepoSvn::Update.new(argv) else argv = CLAide::ARGV.new([name, url]) cmd = Pod::Command::RepoSvn::Add.new(argv) end cmd.run() end |