Sha256: 4e775b15464116c55922394005a72b683ffc20cb9e23cffe729b4f995fb34c8c

Contents?: true

Size: 414 Bytes

Versions: 6

Compression:

Stored size: 414 Bytes

Contents

module Gritano
  class Command
    def self.eval(cmd)
      case cmd
        when /^git-receive-pack/ then
          return :write, "git-receive-pack", self.repo(cmd)
        when /^git-upload-pack/ then
          return :read, "git-upload-pack", self.repo(cmd)
      end
    end
    
    def self.repo(cmd)
      cmd.gsub(/^git-receive-pack/, '').gsub(/^git-upload-pack/, '').gsub("'", '').strip
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gritano-0.1.7 lib/gritano/command.rb
gritano-0.1.6 lib/gritano/command.rb
gritano-0.1.5 lib/gritano/command.rb
gritano-0.1.4 lib/gritano/command.rb
gritano-0.1.3 lib/gritano/command.rb
gritano-0.1.2 lib/gritano/command.rb