Sha256: a12b149dddc28c082413e597424ebcb10b1d97198f2186395bb25a307a0293e2

Contents?: true

Size: 421 Bytes

Versions: 45

Compression:

Stored size: 421 Bytes

Contents

class Git
	def self.branch
		begin
		  `git branch`.scan(/\* ([.\w-]+)/)[0][0]
	    rescue
	    	''
	    end
    end

    def self.remote_origin directory=''
    	url=''
    	directory=Dir.pwd if directory.length == 0
    	Dir.chdir(directory) do
    		begin
    			url=`git remote show origin`.scan(/Fetch URL: ([\.\-:\/\w\d]+)/)[0]
    		rescue
    			url=''
    		end
    	end
    	url
    end
end

Version data entries

45 entries across 45 versions & 2 rubygems

Version Path
dev-2.0.139 lib/commands/git.rb
dev-2.0.138 lib/commands/git.rb
dev-2.0.137 lib/commands/git.rb
dev-2.0.136 lib/commands/git.rb
dev-2.0.135 lib/commands/git.rb
dev-2.0.134 lib/commands/git.rb
dev-2.0.133 lib/commands/git.rb
dev-2.0.132 lib/commands/git.rb
dev-2.0.131 lib/commands/git.rb
dev-2.0.130 lib/commands/git.rb
dev-2.0.129 lib/commands/git.rb
dev-2.0.128 lib/commands/git.rb
dev-2.0.127 lib/commands/git.rb
dev-2.0.126 lib/commands/git.rb
dev-2.0.124 lib/commands/git.rb
dev-2.0.123 lib/commands/git.rb
dev-2.0.122 lib/commands/git.rb
dev-2.0.121 lib/commands/git.rb
dev-2.0.119 lib/commands/git.rb
dev-2.0.118 lib/commands/git.rb