Class: MyLib

Inherits:
Thor
  • Object
show all
Defined in:
lib/mylib.rb

Instance Method Summary collapse

Instance Method Details

#pullObject



16
17
18
19
20
21
# File 'lib/mylib.rb', line 16

def pull 
    Open3.popen3('find . -type d -name .git -exec git --git-dir={} --work-tree=$PWD/{}/.. pull \;') do | stdin, stdout, stderr, wait_thr|
        puts stdout.read
        # puts stderr.read
    end
end

#pushObject



24
25
26
27
28
29
# File 'lib/mylib.rb', line 24

def push
    Open3.popen3('find . -type d -name .git -exec git --git-dir={} --work-tree=$PWD/{}/.. push \;') do | stdin, stdout, stderr, wait_thr|
        puts stdout.read
        # puts stderr.read
    end
end

#statusObject



7
8
9
10
11
12
13
# File 'lib/mylib.rb', line 7

def status 
#   system  'find . -type d -name .git -exec git --git-dir={} --work-tree=$PWD/{}/.. status \;'
    Open3.popen3('find . -type d -name .git -exec git --git-dir={} --work-tree=$PWD/{}/.. status \;') do | stdin, stdout, stderr, wait_thr|
        puts stdout.read
        # puts stderr.read
    end
end