Class: Rake::XForge::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rake/contrib/xforge/base.rb

Overview

Base class for XForge tasks.

Direct Known Subclasses

NewsPublisher, Release

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ Base

Returns a new instance of Base.



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/rake/contrib/xforge/base.rb', line 30

def initialize(project)
  @project = project

  @changes_file = "CHANGES"
  @version = ::PKG_VERSION if defined?(::PKG_VERSION)
  
  if block_given?
    yield self
    set_defaults
    execute
  end
end

Instance Attribute Details

#changes_fileObject

The CHANGES file. If this file exists, it is parsed according to the standard CHANGES version parsing routines. See CHANGES FORMAT below for more information. Defaults to CHANGES if unset. #version must also be set.

CHANGES FORMAT

The CHANGES file is essentially an RDoc-format changelog in the form:

== Version VERSION-Pattern

RELEASE NOTES

* Change 1
* Change 2


26
27
28
# File 'lib/rake/contrib/xforge/base.rb', line 26

def changes_file
  @changes_file
end

#password=(value) ⇒ Object

The password for the xForge login of a release administrator of the project being released. This should NOT be stored in the Rakefile.



10
11
12
# File 'lib/rake/contrib/xforge/base.rb', line 10

def password=(value)
  @password = value
end

#user_name=(value) ⇒ Object

The user name for the xForge login of a release administrator of the project being released. This should NOT be stored in the Rakefile.



7
8
9
# File 'lib/rake/contrib/xforge/base.rb', line 7

def user_name=(value)
  @user_name = value
end

#versionObject

Modifies the release version and affects CHANGES file parsing.



28
29
30
# File 'lib/rake/contrib/xforge/base.rb', line 28

def version
  @version
end