Class: Pod::Command::RepoSvn::Add
- Inherits:
-
Pod::Command::RepoSvn
- Object
- Pod::Command
- Pod::Command::RepoSvn
- Pod::Command::RepoSvn::Add
- Defined in:
- lib/pod/command/repo_svn.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Add
constructor
A new instance of Add.
- #run ⇒ Object
- #validate! ⇒ Object
Methods inherited from Pod::Command::RepoSvn
Constructor Details
#initialize(argv) ⇒ Add
Returns a new instance of Add.
23 24 25 26 |
# File 'lib/pod/command/repo_svn.rb', line 23 def initialize(argv) @name, @url = argv.shift_argument, argv.shift_argument super end |
Instance Method Details
#run ⇒ Object
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/pod/command/repo_svn.rb', line 35 def run UI.section("Checking out spec-repo `#{@name}` from `#{@url}` using svn") do config.repos_dir.mkpath Dir.chdir(config.repos_dir) do command = "checkout --non-interactive --trust-server-cert '#{@url}' #{@name}" !svn(command) end SourcesManager.check_version_information(dir) #todo: TEST ME end end |
#validate! ⇒ Object
28 29 30 31 32 33 |
# File 'lib/pod/command/repo_svn.rb', line 28 def validate! super unless @name && @url help! "Adding a spec-repo needs a `NAME` and a `URL`." end end |