Class List Method List File List

# Class: SvnUpdater

Inherits:
  Updater
  - Object
  - Updater
  - SvnUpdater
  show all
Defined in:
  lib/common/updater/svn_updater.rb

## Constant Summary

REVISION_PATTERN =

      /revision="(\d+)"/i

TRUNK_URL =

      'https://github.com/wpscanteam/wpscan'

## Instance Attribute Summary

### Attributes inherited from Updater

#repo_directory

## Instance Method Summary (collapse)

- - (Boolean) is_installed?
- - (Object) local_revision_number
- - (Object) update

### Methods inherited from Updater

#initialize

## Constructor Details

This class inherits a constructor from Updater

## Instance Method Details

### - (`Boolean`) is_installed?

Returns:

- (`Boolean`)

    10
    11
    12
    # File 'lib/common/updater/svn_updater.rb', line 10

    def is_installed?
      %x[svn info "#@repo_directory" --xml 2>&1] =~ /revision=/ ? true : false
    end

### - (`Object`) local_revision_number

    14
    15
    16
    17
    # File 'lib/common/updater/svn_updater.rb', line 14

    def local_revision_number
      local_revision = %x[svn info "#@repo_directory" --xml 2>&1]
      local_revision[REVISION_PATTERN, 1].to_s
    end

### - (`Object`) update

    19
    20
    21
    # File 'lib/common/updater/svn_updater.rb', line 19

    def update
      %x[svn up "#@repo_directory"]
    end