Sha256: 4e8561bbb826f0e27b31aeaf91930f6059a7d201f7bbcf62a9e9ef3de5a5f1f0

Contents?: true

Size: 411 Bytes

Versions: 20

Compression:

Stored size: 411 Bytes

Contents

class Commands
  def self.for(model)
    "#{model.class.name}Commands".constantize.new(model)
  end

  def self.git_version
    @git_version ||= begin
      `git --version` =~ /([\d\.]+)/
      raise 'git command not found' unless $1
      Gem::Version.new($1)
    end
  end

  delegate :git_version, to: :class

  def env
    @env ||= Shipit.env
  end

  def git(*args)
    Command.new("git", *args)
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
shipit-engine-0.5.2 lib/commands.rb
shipit-engine-0.5.1 lib/commands.rb
shipit-engine-0.5.0 lib/commands.rb
shipit-engine-0.4.10 lib/commands.rb
shipit-engine-0.4.9 lib/commands.rb
shipit-engine-0.4.8 lib/commands.rb
shipit-engine-0.4.7 lib/commands.rb
shipit-engine-0.4.6 lib/commands.rb
shipit-engine-0.4.5 lib/commands.rb
shipit-engine-0.4.4 lib/commands.rb
shipit-engine-0.4.3 lib/commands.rb
shipit-engine-0.4.2 lib/commands.rb
shipit-engine-0.4.1 lib/commands.rb
shipit-engine-0.4.0 lib/commands.rb
shipit-engine-0.3.1 lib/commands.rb
shipit-engine-0.3.0 lib/commands.rb
shipit-engine-0.2.3 lib/commands.rb
shipit-engine-0.2.2 lib/commands.rb
shipit-engine-0.2.1 lib/commands.rb
shipit-engine-0.2.0 lib/commands.rb