Class: Git::Dropbox::CLI
- Inherits:
-
Thor
- Object
- Thor
- Git::Dropbox::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/git/dropbox/cli.rb
Instance Method Summary collapse
Instance Method Details
#init ⇒ Object
23 24 25 26 |
# File 'lib/git/dropbox/cli.rb', line 23 def init folder = "#{ENV['HOME']}/Dropbox/git" Git::Dropbox::Config.init!(folder) end |
#list ⇒ Object
30 31 32 33 |
# File 'lib/git/dropbox/cli.rb', line 30 def list config = load_config config['repositories'].each { |r| puts r } end |
#sync ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/git/dropbox/cli.rb', line 12 def sync config = load_config repositories = [:all] ? config['repositories'] : [Dir.pwd] repositories.each do |repo| say "Synchronizing repository #{repo}" Repository.new(config).sync(repo) end end |