Class: Reap::Project::Metadata
- Inherits:
-
InfoObject
- Object
- InfoObject
- Reap::Project::Metadata
- Defined in:
- lib/reap/metadata.rb
Overview
Project Metadata
The Project Metadata class stores project information. This information includes the general information about a project, such as title, description, homepage, etc. which is essentially static. Once set, it will probably will never change. The class also contains default settings for packaging; information that is usually static, but may vary for a partciular package platform or format.
When utilizing this class it is important not confuse oneself thinking that a project is not a project just becuase it is a sub-project. A sub-project is a project, it just happens to belong to a master project.
Constant Summary collapse
- PROJECT_FILE =
'{,meta/}{project}{info,}{.yaml,.yml,}'
- VERSION_FILE =
'{,meta/}{version}{.text,.txt,}'
Instance Attribute Summary collapse
-
#author ⇒ Object
Author(s) of this project.
-
#bin_path ⇒ Object
Location(s) of executables.
-
#bin_paths ⇒ Object
Location(s) of executables.
-
#binpath ⇒ Object
Location(s) of executables.
-
#binpaths ⇒ Object
Location(s) of executables.
-
#brief ⇒ Object
Brief one-line description of the package (Max 80 chars.).
-
#build_dependencies ⇒ Object
What packages does this package need to build? (eg. ‘rake’, ‘reap’, etc.).
-
#build_dependency ⇒ Object
What packages does this package need to build? (eg. ‘rake’, ‘reap’, etc.).
-
#build_requirement ⇒ Object
Abirtary information about what might be needed to build this package.
-
#build_requirements ⇒ Object
Abirtary information about what might be needed to build this package.
-
#buildno ⇒ Object
Build number can br set to an arbitrar number, or if set to true, it will defaults to a number based on current date-time.
-
#category ⇒ Object
General one-word software category.
-
#changelog ⇒ Object
Changelog file.
-
#codename ⇒ Object
Current version code name.
-
#compile ⇒ Object
Script to run prior to build.
-
#conflict ⇒ Object
What other packages does this package conflict.
-
#conflicts ⇒ Object
What other packages does this package conflict.
-
#contact ⇒ Object
Contact(s) (defaults to authors).
-
#copyright ⇒ Object
Copyright notice.
-
#created ⇒ Object
The date the project was started.
-
#date ⇒ Object
Date of release.
-
#default ⇒ Object
This only applys to Rolls.
-
#dependencies ⇒ Object
What other packages must this package have in order to function.
-
#dependency ⇒ Object
What other packages must this package have in order to function.
-
#description ⇒ Object
More detailed description of the package.
-
#development ⇒ Object
Project’s development site.
-
#devlist ⇒ Object
Developer’s mailing list.
-
#devsite ⇒ Object
Project’s development site.
-
#digest ⇒ Object
Encryption digest type used.
-
#distribute ⇒ Object
Files to be distributed in a package.
-
#docs ⇒ Object
Internet address(es) to online documentation.
-
#document ⇒ Object
Generate documentation on installation?.
-
#documentation ⇒ Object
Internet address(es) to online documentation.
-
#domain ⇒ Object
Official domain associated with this package.
-
#download ⇒ Object
Internet address(es) to downloadable packages.
-
#email ⇒ Object
Gerneral email address.
-
#exclude ⇒ Object
File to exclude from package.
-
#executable ⇒ Object
Files in this package that are executables.
-
#executables ⇒ Object
Files in this package that are executables.
-
#extensions ⇒ Object
Packages that are intended to compile on install may need this.
-
#gem_path ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems).
-
#gem_paths ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems).
-
#gempath ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems).
-
#gempaths ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems).
-
#has_rdoc ⇒ Object
Generate documentation on installation?.
-
#homepage ⇒ Object
Project’s homepage.
-
#ignore ⇒ Object
Files to generally ignore, mainly used for manifest collection.
-
#include ⇒ Object
Files to be distributed in a package.
-
#lib_path ⇒ Object
Location(s) of libraries (used by Rolls).
-
#lib_paths ⇒ Object
Location(s) of libraries (used by Rolls).
-
#libpath ⇒ Object
Location(s) of libraries (used by Rolls).
-
#libpaths ⇒ Object
Location(s) of libraries (used by Rolls).
-
#libraries ⇒ Object
Library files in this package that are public.
-
#library ⇒ Object
Library files in this package that are public.
-
#license ⇒ Object
Distribution License.
-
#list ⇒ Object
Project’s mailing list.
-
#load_path ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems).
-
#load_paths ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems).
-
#loadpath ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems).
-
#loadpaths ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems).
-
#location ⇒ Object
Location is needed to calculate some conventional defaults.
-
#mailinglist ⇒ Object
Project’s mailing list.
-
#manifest ⇒ Object
Manifest file.
-
#master ⇒ Object
If this is a sub-project, then
master
is the “Unix” name of the master project to which this sub-project belongs. -
#name ⇒ Object
“Unix” name of this project.
-
#package ⇒ Object
Package name.
-
#platform ⇒ Object
Platform.
-
#private_key ⇒ Object
Private key file associated with this library.
-
#project ⇒ Object
“Unix” name of this project.
-
#provide ⇒ Object
What other package(s) does this package provide the same dependency fulfilment.
-
#provides ⇒ Object
What other package(s) does this package provide the same dependency fulfilment.
-
#provisions ⇒ Object
What other package(s) does this package provide the same dependency fulfilment.
-
#public_key ⇒ Object
Public key file associated with this library.
-
#recommend ⇒ Object
What other packages should be used with this package.
-
#recommendations ⇒ Object
What other packages should be used with this package.
-
#recommends ⇒ Object
What other packages should be used with this package.
-
#released ⇒ Object
Date of release.
-
#replace ⇒ Object
What other packages does this package replace.
-
#replacements ⇒ Object
What other packages does this package replace.
-
#replaces ⇒ Object
What other packages does this package replace.
-
#repo ⇒ Object
Internet address to source code repository.
-
#repository ⇒ Object
Internet address to source code repository.
-
#requirement ⇒ Object
Abirtary information about what might be needed to use this package.
-
#requirements ⇒ Object
Abirtary information about what might be needed to use this package.
-
#scm ⇒ Object
Specifices the type of revision control system used.
-
#scm_files ⇒ Object
Files that are tracked under revision control.
-
#slogan ⇒ Object
Slogan or “trademark” phrase.
-
#status ⇒ Object
Status of this release: alpha, beta, RC1, etc.
-
#subtitle ⇒ Object
Subtitle is limited to 60 characters.
-
#suggest ⇒ Object
What other packages could be useful with this package.
-
#suggestions ⇒ Object
What other packages could be useful with this package.
-
#suggests ⇒ Object
What other packages could be useful with this package.
-
#summary ⇒ Object
Brief one-line description of the package (Max 80 chars.).
-
#synopsis ⇒ Object
More detailed description of the package.
-
#title ⇒ Object
The title of the project (free-form, defaults to name).
-
#track ⇒ Object
Files that are tracked under revision control.
-
#userlist ⇒ Object
Project’s mailing list.
-
#version ⇒ Object
Version number (eg. ‘1.0.0’).
-
#website ⇒ Object
Project’s homepage.
-
#wiki ⇒ Object
Internet address for project wiki.
Class Method Summary collapse
- .read(location) ⇒ Object
-
.read_project(location) ⇒ Object
Parse release file for release information.
-
.read_version(location) ⇒ Object
Parse version file for current release information.
Instance Method Summary collapse
-
#filelist ⇒ Object
List of file included in a package.
-
#initialize(location, data = {}) ⇒ Metadata
constructor
New Project.
-
#package_name ⇒ Object
(also: #stage_name)
Package name is generally in the form of
name-version
, orname-version-platform
ifplatform
is specified. -
#project_taguri ⇒ Object
Returns a standard taguri id for the library and release.
Methods inherited from InfoObject
#[], alias_accessor, alias_method, attr_accessor, #attributes, #gather, instance_attributes, #instance_data, #select, #taguri, #to_hash, #to_xml, #to_yaml, #to_yaml_properties, #update, #valid?, #validate, validate, validation
Constructor Details
#initialize(location, data = {}) ⇒ Metadata
New Project.
91 92 93 94 |
# File 'lib/reap/metadata.rb', line 91 def initialize(location, data={}) @location = location super(data) end |
Instance Attribute Details
#author ⇒ Object
Author(s) of this project. (Usually in “name <email>” format.)
165 166 167 |
# File 'lib/reap/metadata.rb', line 165 def @author end |
#bin_path ⇒ Object
Location(s) of executables.
275 276 277 |
# File 'lib/reap/metadata.rb', line 275 def bin_path @bin_path end |
#bin_paths ⇒ Object
Location(s) of executables.
275 276 277 |
# File 'lib/reap/metadata.rb', line 275 def bin_paths @bin_paths end |
#binpath ⇒ Object
Location(s) of executables.
275 276 277 |
# File 'lib/reap/metadata.rb', line 275 def binpath @binpath end |
#binpaths ⇒ Object
Location(s) of executables.
275 276 277 |
# File 'lib/reap/metadata.rb', line 275 def binpaths @binpaths end |
#brief ⇒ Object
Brief one-line description of the package (Max 80 chars.)
117 118 119 |
# File 'lib/reap/metadata.rb', line 117 def brief @brief end |
#build_dependencies ⇒ Object
What packages does this package need to build? (eg. ‘rake’, ‘reap’, etc.)
411 412 413 |
# File 'lib/reap/metadata.rb', line 411 def build_dependencies @build_dependencies end |
#build_dependency ⇒ Object
What packages does this package need to build? (eg. ‘rake’, ‘reap’, etc.)
411 412 413 |
# File 'lib/reap/metadata.rb', line 411 def build_dependency @build_dependency end |
#build_requirement ⇒ Object
Abirtary information about what might be needed to build this package.
416 417 418 |
# File 'lib/reap/metadata.rb', line 416 def build_requirement @build_requirement end |
#build_requirements ⇒ Object
Abirtary information about what might be needed to build this package.
416 417 418 |
# File 'lib/reap/metadata.rb', line 416 def build_requirements @build_requirements end |
#buildno ⇒ Object
Build number can br set to an arbitrar number, or if set to true, it will defaults to a number based on current date-time.
225 226 227 |
# File 'lib/reap/metadata.rb', line 225 def buildno @buildno end |
#category ⇒ Object
General one-word software category.
161 162 163 |
# File 'lib/reap/metadata.rb', line 161 def category @category end |
#changelog ⇒ Object
Changelog file.
354 355 356 |
# File 'lib/reap/metadata.rb', line 354 def changelog @changelog end |
#codename ⇒ Object
Current version code name.
221 222 223 |
# File 'lib/reap/metadata.rb', line 221 def codename @codename end |
#compile ⇒ Object
Script to run prior to build. No entry indicates no compilation.
449 450 451 |
# File 'lib/reap/metadata.rb', line 449 def compile @compile end |
#conflict ⇒ Object
What other packages does this package conflict.
387 388 389 |
# File 'lib/reap/metadata.rb', line 387 def conflict @conflict end |
#conflicts ⇒ Object
What other packages does this package conflict.
387 388 389 |
# File 'lib/reap/metadata.rb', line 387 def conflicts @conflicts end |
#contact ⇒ Object
Contact(s) (defaults to authors). TODO Move to Variants?
169 170 171 |
# File 'lib/reap/metadata.rb', line 169 def contact @contact end |
#copyright ⇒ Object
Copyright notice.
148 149 150 |
# File 'lib/reap/metadata.rb', line 148 def copyright @copyright end |
#created ⇒ Object
The date the project was started.
145 146 147 |
# File 'lib/reap/metadata.rb', line 145 def created @created end |
#date ⇒ Object
Date of release.
236 237 238 |
# File 'lib/reap/metadata.rb', line 236 def date @date end |
#default ⇒ Object
This only applys to Rolls. It is the default file to load. TODO: Think of a more descirptive name than ‘default’.
297 298 299 |
# File 'lib/reap/metadata.rb', line 297 def default @default end |
#dependencies ⇒ Object
What other packages must this package have in order to function.
372 373 374 |
# File 'lib/reap/metadata.rb', line 372 def dependencies @dependencies end |
#dependency ⇒ Object
What other packages must this package have in order to function.
372 373 374 |
# File 'lib/reap/metadata.rb', line 372 def dependency @dependency end |
#description ⇒ Object
More detailed description of the package.
128 129 130 |
# File 'lib/reap/metadata.rb', line 128 def description @description end |
#development ⇒ Object
Project’s development site.
189 190 191 |
# File 'lib/reap/metadata.rb', line 189 def development @development end |
#devlist ⇒ Object
Developer’s mailing list.
204 205 206 |
# File 'lib/reap/metadata.rb', line 204 def devlist @devlist end |
#devsite ⇒ Object
Project’s development site.
189 190 191 |
# File 'lib/reap/metadata.rb', line 189 def devsite @devsite end |
#digest ⇒ Object
Encryption digest type used.
(md5, sha1, sha128, sha256, sha512).
305 306 307 |
# File 'lib/reap/metadata.rb', line 305 def digest @digest end |
#distribute ⇒ Object
Files to be distributed in a package. Defaults to all files. If an entry is a directory then all it’s contents are also included. This along with @exclude@ and @ignore@ is used to generate a manifest.
499 500 501 |
# File 'lib/reap/metadata.rb', line 499 def distribute @distribute end |
#docs ⇒ Object
Internet address(es) to online documentation.
192 193 194 |
# File 'lib/reap/metadata.rb', line 192 def docs @docs end |
#document ⇒ Object
Generate documentation on installation?
463 464 465 |
# File 'lib/reap/metadata.rb', line 463 def document @document end |
#documentation ⇒ Object
Internet address(es) to online documentation.
192 193 194 |
# File 'lib/reap/metadata.rb', line 192 def documentation @documentation end |
#domain ⇒ Object
Official domain associated with this package.
183 184 185 |
# File 'lib/reap/metadata.rb', line 183 def domain @domain end |
#download ⇒ Object
Internet address(es) to downloadable packages.
195 196 197 |
# File 'lib/reap/metadata.rb', line 195 def download @download end |
#email ⇒ Object
Gerneral email address.
174 175 176 |
# File 'lib/reap/metadata.rb', line 174 def email @email end |
#exclude ⇒ Object
File to exclude from package. This is usually more useful than @distribute@, as it allows you to remove from all files, rather then explicitly designate everything to be included. Exlcusions have priority over dsitribute’s inclusions. If an entry is a directory then all it’s contents are also excluded.
508 509 510 |
# File 'lib/reap/metadata.rb', line 508 def exclude @exclude end |
#executable ⇒ Object
Files in this package that are executables. These files must in the packages bin/ directory. If left blank all bin/ files are included.
248 249 250 |
# File 'lib/reap/metadata.rb', line 248 def executable @executable end |
#executables ⇒ Object
Files in this package that are executables. These files must in the packages bin/ directory. If left blank all bin/ files are included.
248 249 250 |
# File 'lib/reap/metadata.rb', line 248 def executables @executables end |
#extensions ⇒ Object
Packages that are intended to compile on install may need this. It is a list of “extension scripts” which generate Makefiles for use in compilation.
453 454 455 |
# File 'lib/reap/metadata.rb', line 453 def extensions @extensions end |
#gem_path ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems). The default is lib/, which is usually correct.
291 292 293 |
# File 'lib/reap/metadata.rb', line 291 def gem_path @gem_path end |
#gem_paths ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems). The default is lib/, which is usually correct.
291 292 293 |
# File 'lib/reap/metadata.rb', line 291 def gem_paths @gem_paths end |
#gempath ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems). The default is lib/, which is usually correct.
291 292 293 |
# File 'lib/reap/metadata.rb', line 291 def gempath @gempath end |
#gempaths ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems). The default is lib/, which is usually correct.
291 292 293 |
# File 'lib/reap/metadata.rb', line 291 def gempaths @gempaths end |
#has_rdoc ⇒ Object
Generate documentation on installation?
463 464 465 |
# File 'lib/reap/metadata.rb', line 463 def has_rdoc @has_rdoc end |
#homepage ⇒ Object
Project’s homepage.
186 187 188 |
# File 'lib/reap/metadata.rb', line 186 def homepage @homepage end |
#ignore ⇒ Object
Files to generally ignore, mainly used for manifest collection. Ignore has priority over @exclude@ and @distribute@.
514 515 516 |
# File 'lib/reap/metadata.rb', line 514 def ignore @ignore end |
#include ⇒ Object
Files to be distributed in a package. Defaults to all files. If an entry is a directory then all it’s contents are also included. This along with @exclude@ and @ignore@ is used to generate a manifest.
499 500 501 |
# File 'lib/reap/metadata.rb', line 499 def include @include end |
#lib_path ⇒ Object
Location(s) of libraries (used by Rolls). In most cases this is something like:
'lib/myapp'
It would be nice if this could just be lib/ as it would mean one less layer in a project heirarchy. But RubyGems and traditional installers could not handle this, so this isn’t a reasonable course at this point.
285 286 287 |
# File 'lib/reap/metadata.rb', line 285 def lib_path @lib_path end |
#lib_paths ⇒ Object
Location(s) of libraries (used by Rolls). In most cases this is something like:
'lib/myapp'
It would be nice if this could just be lib/ as it would mean one less layer in a project heirarchy. But RubyGems and traditional installers could not handle this, so this isn’t a reasonable course at this point.
285 286 287 |
# File 'lib/reap/metadata.rb', line 285 def lib_paths @lib_paths end |
#libpath ⇒ Object
Location(s) of libraries (used by Rolls). In most cases this is something like:
'lib/myapp'
It would be nice if this could just be lib/ as it would mean one less layer in a project heirarchy. But RubyGems and traditional installers could not handle this, so this isn’t a reasonable course at this point.
285 286 287 |
# File 'lib/reap/metadata.rb', line 285 def libpath @libpath end |
#libpaths ⇒ Object
Location(s) of libraries (used by Rolls). In most cases this is something like:
'lib/myapp'
It would be nice if this could just be lib/ as it would mean one less layer in a project heirarchy. But RubyGems and traditional installers could not handle this, so this isn’t a reasonable course at this point.
285 286 287 |
# File 'lib/reap/metadata.rb', line 285 def libpaths @libpaths end |
#libraries ⇒ Object
Library files in this package that are public. This is akin to load_path but specifies specific files that can be loaded from the outside –where as those not listed are considerd private.
NOTE: This is not enforced –and may never be. It complicates library loading. Ie. how to distinguish public loading from external loading. But it something that can be consider more carfully in the future. For now it can serve as an optional reference.
270 271 272 |
# File 'lib/reap/metadata.rb', line 270 def libraries @libraries end |
#library ⇒ Object
Library files in this package that are public. This is akin to load_path but specifies specific files that can be loaded from the outside –where as those not listed are considerd private.
NOTE: This is not enforced –and may never be. It complicates library loading. Ie. how to distinguish public loading from external loading. But it something that can be consider more carfully in the future. For now it can serve as an optional reference.
270 271 272 |
# File 'lib/reap/metadata.rb', line 270 def library @library end |
#license ⇒ Object
Distribution License.
153 154 155 |
# File 'lib/reap/metadata.rb', line 153 def license @license end |
#list ⇒ Object
Project’s mailing list.
201 202 203 |
# File 'lib/reap/metadata.rb', line 201 def list @list end |
#load_path ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems). The default is lib/, which is usually correct.
291 292 293 |
# File 'lib/reap/metadata.rb', line 291 def load_path @load_path end |
#load_paths ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems). The default is lib/, which is usually correct.
291 292 293 |
# File 'lib/reap/metadata.rb', line 291 def load_paths @load_paths end |
#loadpath ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems). The default is lib/, which is usually correct.
291 292 293 |
# File 'lib/reap/metadata.rb', line 291 def loadpath @loadpath end |
#loadpaths ⇒ Object
The traditional load path(s) (used by Ruby’s own site loading and RubyGems). The default is lib/, which is usually correct.
291 292 293 |
# File 'lib/reap/metadata.rb', line 291 def loadpaths @loadpaths end |
#location ⇒ Object
Location is needed to calculate some conventional defaults.
98 99 100 |
# File 'lib/reap/metadata.rb', line 98 def location @location end |
#mailinglist ⇒ Object
Project’s mailing list.
201 202 203 |
# File 'lib/reap/metadata.rb', line 201 def mailinglist @mailinglist end |
#manifest ⇒ Object
Manifest file. Defaults to ‘MANIFEST’. (I like to put it in meta/MANIFEST, personally.)
358 359 360 |
# File 'lib/reap/metadata.rb', line 358 def manifest @manifest end |
#master ⇒ Object
If this is a sub-project, then master
is the “Unix” name of the master project to which this sub-project belongs.
142 143 144 |
# File 'lib/reap/metadata.rb', line 142 def master @master end |
#name ⇒ Object
“Unix” name of this project.
131 132 133 |
# File 'lib/reap/metadata.rb', line 131 def name @name end |
#package ⇒ Object
Package name. This defaults to project name, but it may vary under different package formats –deb vs. gem, for instance.
426 427 428 |
# File 'lib/reap/metadata.rb', line 426 def package @package end |
#platform ⇒ Object
Platform. The default is nil, which is considered cross-platform. This tends to only change for special builds.
TODO: if current?
438 439 440 |
# File 'lib/reap/metadata.rb', line 438 def platform @platform end |
#private_key ⇒ Object
Private key file associated with this library. This is useful for security purposes especially remote loading. [_privkey.pem]
317 318 319 |
# File 'lib/reap/metadata.rb', line 317 def private_key @private_key end |
#project ⇒ Object
“Unix” name of this project.
131 132 133 |
# File 'lib/reap/metadata.rb', line 131 def project @project end |
#provide ⇒ Object
What other package(s) does this package provide the same dependency fulfilment. For example, a package ‘bar-plus’ might fulfill the same dependency criteria as package ‘bar’, so ‘bar-plus’ is said to provide ‘bar’.
399 400 401 |
# File 'lib/reap/metadata.rb', line 399 def provide @provide end |
#provides ⇒ Object
What other package(s) does this package provide the same dependency fulfilment. For example, a package ‘bar-plus’ might fulfill the same dependency criteria as package ‘bar’, so ‘bar-plus’ is said to provide ‘bar’.
399 400 401 |
# File 'lib/reap/metadata.rb', line 399 def provides @provides end |
#provisions ⇒ Object
What other package(s) does this package provide the same dependency fulfilment. For example, a package ‘bar-plus’ might fulfill the same dependency criteria as package ‘bar’, so ‘bar-plus’ is said to provide ‘bar’.
399 400 401 |
# File 'lib/reap/metadata.rb', line 399 def provisions @provisions end |
#public_key ⇒ Object
Public key file associated with this library. This is useful for security purposes especially remote loading. [pubkey.pem]
311 312 313 |
# File 'lib/reap/metadata.rb', line 311 def public_key @public_key end |
#recommend ⇒ Object
What other packages should be used with this package.
377 378 379 |
# File 'lib/reap/metadata.rb', line 377 def recommend @recommend end |
#recommendations ⇒ Object
What other packages should be used with this package.
377 378 379 |
# File 'lib/reap/metadata.rb', line 377 def recommendations @recommendations end |
#recommends ⇒ Object
What other packages should be used with this package.
377 378 379 |
# File 'lib/reap/metadata.rb', line 377 def recommends @recommends end |
#released ⇒ Object
Date of release.
236 237 238 |
# File 'lib/reap/metadata.rb', line 236 def released @released end |
#replace ⇒ Object
What other packages does this package replace.
392 393 394 |
# File 'lib/reap/metadata.rb', line 392 def replace @replace end |
#replacements ⇒ Object
What other packages does this package replace.
392 393 394 |
# File 'lib/reap/metadata.rb', line 392 def replacements @replacements end |
#replaces ⇒ Object
What other packages does this package replace.
392 393 394 |
# File 'lib/reap/metadata.rb', line 392 def replaces @replaces end |
#repo ⇒ Object
Internet address to source code repository. (http://, ftp://, etc.)
351 352 353 |
# File 'lib/reap/metadata.rb', line 351 def repo @repo end |
#repository ⇒ Object
Internet address to source code repository. (http://, ftp://, etc.)
351 352 353 |
# File 'lib/reap/metadata.rb', line 351 def repository @repository end |
#requirement ⇒ Object
Abirtary information about what might be needed to use this package. This is strictly information for the end-user to consider.
Eg. "Fast graphics card"
406 407 408 |
# File 'lib/reap/metadata.rb', line 406 def requirement @requirement end |
#requirements ⇒ Object
Abirtary information about what might be needed to use this package. This is strictly information for the end-user to consider.
Eg. "Fast graphics card"
406 407 408 |
# File 'lib/reap/metadata.rb', line 406 def requirements @requirements end |
#scm ⇒ Object
Specifices the type of revision control system used.
darcs, svn, cvs, etc.
Will try to determine which version control system is being used.
332 333 334 |
# File 'lib/reap/metadata.rb', line 332 def scm @scm end |
#scm_files ⇒ Object
Files that are tracked under revision control. Default is all less standard exceptions. ‘+’ and ‘-’ prefixes can be used to augment the list rather than fully override it.
347 348 349 |
# File 'lib/reap/metadata.rb', line 347 def scm_files @scm_files end |
#slogan ⇒ Object
Slogan or “trademark” phrase.
158 159 160 |
# File 'lib/reap/metadata.rb', line 158 def slogan @slogan end |
#status ⇒ Object
Status of this release: alpha, beta, RC1, etc.
231 232 233 |
# File 'lib/reap/metadata.rb', line 231 def status @status end |
#subtitle ⇒ Object
Subtitle is limited to 60 characters.
112 113 114 |
# File 'lib/reap/metadata.rb', line 112 def subtitle @subtitle end |
#suggest ⇒ Object
What other packages could be useful with this package.
382 383 384 |
# File 'lib/reap/metadata.rb', line 382 def suggest @suggest end |
#suggestions ⇒ Object
What other packages could be useful with this package.
382 383 384 |
# File 'lib/reap/metadata.rb', line 382 def suggestions @suggestions end |
#suggests ⇒ Object
What other packages could be useful with this package.
382 383 384 |
# File 'lib/reap/metadata.rb', line 382 def suggests @suggests end |
#summary ⇒ Object
Brief one-line description of the package (Max 80 chars.)
117 118 119 |
# File 'lib/reap/metadata.rb', line 117 def summary @summary end |
#synopsis ⇒ Object
More detailed description of the package.
128 129 130 |
# File 'lib/reap/metadata.rb', line 128 def synopsis @synopsis end |
#title ⇒ Object
The title of the project (free-form, defaults to name).
105 106 107 |
# File 'lib/reap/metadata.rb', line 105 def title @title end |
#track ⇒ Object
Files that are tracked under revision control. Default is all less standard exceptions. ‘+’ and ‘-’ prefixes can be used to augment the list rather than fully override it.
347 348 349 |
# File 'lib/reap/metadata.rb', line 347 def track @track end |
#userlist ⇒ Object
Project’s mailing list.
201 202 203 |
# File 'lib/reap/metadata.rb', line 201 def userlist @userlist end |
#version ⇒ Object
Version number (eg. ‘1.0.0’).
218 219 220 |
# File 'lib/reap/metadata.rb', line 218 def version @version end |
#website ⇒ Object
Project’s homepage.
186 187 188 |
# File 'lib/reap/metadata.rb', line 186 def website @website end |
#wiki ⇒ Object
Internet address for project wiki.
198 199 200 |
# File 'lib/reap/metadata.rb', line 198 def wiki @wiki end |
Class Method Details
.read(location) ⇒ Object
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/reap/metadata.rb', line 50 def self.read(location) = read_project(location) versdata = read_version(location) data = {} data.update() data.update(versdata) new(location, data) end |
.read_project(location) ⇒ Object
Parse release file for release information.
63 64 65 66 67 68 69 70 71 |
# File 'lib/reap/metadata.rb', line 63 def self.read_project(location) glob = File.join(location, PROJECT_FILE) file = Dir.glob(glob, File::FNM_CASEFOLD).first if file YAML::load(File.open(file)) else raise LoadError, "project file not found" end end |
.read_version(location) ⇒ Object
Parse version file for current release information.
75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/reap/metadata.rb', line 75 def self.read_version(location) glob = File.join(location, VERSION_FILE) file = Dir.glob(glob, File::FNM_CASEFOLD).first if file str = File.read(file) version, status, date, *null = *str.strip.split(/\s+/) date = Date.parse(date).strftime("%Y-%m-%d") data = {'version' => version, 'status' => status, 'date' => date} else data = {} end return data end |
Instance Method Details
#filelist ⇒ Object
List of file included in a package. This is generated using @distribute@, @exlude@ and @ignore@.
532 533 534 |
# File 'lib/reap/metadata.rb', line 532 def filelist @filelist ||= collect_files(true) end |
#package_name ⇒ Object Also known as: stage_name
Package name is generally in the form of name-version
, or name-version-platform
if platform
is specified.
TODO: Improve buildno support.
475 476 477 478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/reap/metadata.rb', line 475 def package_name if buildno buildno = Time.now.strftime("%H*60+%M") versnum = "#{version}.#{buildno}" else versnum = version end if platform "#{package}-#{versnum}-#{platform}" else "#{package}-#{versnum}" end end |
#project_taguri ⇒ Object
Returns a standard taguri id for the library and release.
209 210 211 |
# File 'lib/reap/metadata.rb', line 209 def project_taguri "tag:#{name}.#{domain},#{created}" # or released? end |