instance method install_using_git

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v3.2.22.5 Private

Available in: v2.2.3 v2.3.18 v3.0.20 v3.1.12 v3.2.22.5

Signature

install_using_git(options = {})

No documentation comment.

Parameters

options opt = {}
Source
# File railties/lib/commands/plugin.rb, line 268
    def install_using_git(options = {})
      root = rails_env.root
      install_path = mkdir_p "#{root}/vendor/plugins/#{name}"
      Dir.chdir install_path do
        init_cmd = "git init"
        init_cmd += " -q" if options[:quiet] and not $verbose
        puts init_cmd if $verbose
        system(init_cmd)
        base_cmd = "git pull --depth 1 #{uri}"
        base_cmd += " -q" if options[:quiet] and not $verbose
        base_cmd += " #{options[:revision]}" if options[:revision]
        puts base_cmd if $verbose
        if system(base_cmd)
          puts "removing: .git" if $verbose
          rm_rf ".git"
        else
          rm_rf install_path
        end
      end
    end

Defined in railties/lib/commands/plugin.rb line 268 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Plugin

Type at least 2 characters to search.

↑↓ navigate · open · esc close