Sha256: 97923d3ef7360ecce38159625150639212bc8c65ecee11652d0ff3a524acd300

Contents?: true

Size: 713 Bytes

Versions: 12

Compression:

Stored size: 713 Bytes

Contents

module OhlohScm::Adapters
  class GitSvnAdapter < AbstractAdapter
    def git_svn_log(cmd:, oneline:)
      oneline_flag = '--oneline' if oneline
      run("#{git_svn_log_cmd} #{oneline_flag} #{cmd}").strip
    end

    def accept_ssl_certificate_cmd
      File.expand_path('../../../../../bin/accept_svn_ssl_certificate', __FILE__)
    end

    def username_and_password_opts(source_scm)
      username = source_scm.username.to_s.empty? ? '' : "--username #{ @source_scm.username }"
      password = source_scm.password.to_s.empty? ? '' : "--password='#{@source_scm.password}'"
      "#{username} #{password}"
    end

    private

    def git_svn_log_cmd
      "cd #{self.url} && git svn log"
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ohloh_scm-2.5.1 lib/ohloh_scm/adapters/git_svn/misc.rb
ohloh_scm-2.4.14 lib/ohloh_scm/adapters/git_svn/misc.rb
ohloh_scm-2.4.13 lib/ohloh_scm/adapters/git_svn/misc.rb
ohloh_scm-2.4.12 lib/ohloh_scm/adapters/git_svn/misc.rb
ohloh_scm-2.4.11 lib/ohloh_scm/adapters/git_svn/misc.rb
ohloh_scm-2.4.10 lib/ohloh_scm/adapters/git_svn/misc.rb
ohloh_scm-2.4.9 lib/ohloh_scm/adapters/git_svn/misc.rb
ohloh_scm-2.4.8 lib/ohloh_scm/adapters/git_svn/misc.rb
ohloh_scm-2.4.7 lib/ohloh_scm/adapters/git_svn/misc.rb
ohloh_scm-2.4.6 lib/ohloh_scm/adapters/git_svn/misc.rb
ohloh_scm-2.4.5 lib/ohloh_scm/adapters/git_svn/misc.rb
ohloh_scm-2.4.4 lib/ohloh_scm/adapters/git_svn/misc.rb