Class: RubyPackager::ReleaseInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/RubyPackager/ReleaseInfo.rb

Overview

This class is the base class of all releases info to be provided by packages.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeReleaseInfo

Constructor



47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/RubyPackager/ReleaseInfo.rb', line 47

def initialize
  # This sets also default values
  @author_info = {}
  @project_info = {}
  @executables_info = []
  @install_info = {}
  @sf_info = {}
  @rf_info = {}
  @gem_info = {}
  # Files patterns list
  @core_files = []
  @additional_files = []
  @test_files = []
end

Instance Attribute Details

#additional_filesObject (readonly)

List of additional files patterns

list< String >


40
41
42
# File 'lib/RubyPackager/ReleaseInfo.rb', line 40

def additional_files
  @additional_files
end

#author_infoObject (readonly)

Information about the author

map< Symbol, Object >


8
9
10
# File 'lib/RubyPackager/ReleaseInfo.rb', line 8

def author_info
  @author_info
end

#core_filesObject (readonly)

List of core files patterns

list< String >


36
37
38
# File 'lib/RubyPackager/ReleaseInfo.rb', line 36

def core_files
  @core_files
end

#executables_infoObject (readonly)

Information about the executables

list< map< Symbol, Object > >


16
17
18
# File 'lib/RubyPackager/ReleaseInfo.rb', line 16

def executables_info
  @executables_info
end

#gem_infoObject (readonly)

Information about the Gem

map< Symbol, Object >


32
33
34
# File 'lib/RubyPackager/ReleaseInfo.rb', line 32

def gem_info
  @gem_info
end

#install_infoObject (readonly)

Information about the installer

map< Symbol, Object >


20
21
22
# File 'lib/RubyPackager/ReleaseInfo.rb', line 20

def install_info
  @install_info
end

#project_infoObject (readonly)

Information about the project

map< Symbol, Object >


12
13
14
# File 'lib/RubyPackager/ReleaseInfo.rb', line 12

def project_info
  @project_info
end

#rf_infoObject (readonly)

Information about RubyForge

map< Symbol, Object >


28
29
30
# File 'lib/RubyPackager/ReleaseInfo.rb', line 28

def rf_info
  @rf_info
end

#sf_infoObject (readonly)

Information about SourceForge

map< Symbol, Object >


24
25
26
# File 'lib/RubyPackager/ReleaseInfo.rb', line 24

def sf_info
  @sf_info
end

#test_filesObject (readonly)

List of test files patterns

list< String >


44
45
46
# File 'lib/RubyPackager/ReleaseInfo.rb', line 44

def test_files
  @test_files
end

Instance Method Details

#add_additional_files(iFilesPatternsList) ⇒ Object

Add additional files patterns

Parameters
  • iFilesPatternsList (list<String>): The list of files patterns to add

Return
  • ReleaseInfo: self



197
198
199
200
201
# File 'lib/RubyPackager/ReleaseInfo.rb', line 197

def add_additional_files(iFilesPatternsList)
  @additional_files.concat(iFilesPatternsList)

  return self
end

#add_core_files(iFilesPatternsList) ⇒ Object

Add core files patterns

Parameters
  • iFilesPatternsList (list<String>): The list of files patterns to add

Return
  • ReleaseInfo: self



185
186
187
188
189
# File 'lib/RubyPackager/ReleaseInfo.rb', line 185

def add_core_files(iFilesPatternsList)
  @core_files.concat(iFilesPatternsList)

  return self
end

#add_test_files(iFilesPatternsList) ⇒ Object

Add test files patterns

Parameters
  • iFilesPatternsList (list<String>): The list of files patterns to add

Return
  • ReleaseInfo: self



209
210
211
212
213
# File 'lib/RubyPackager/ReleaseInfo.rb', line 209

def add_test_files(iFilesPatternsList)
  @test_files.concat(iFilesPatternsList)

  return self
end

#author(iParams) ⇒ Object

Add Author properties

Parameters
  • iParams (map<Symbol,Object>): The parameters:

    • :name (String): The author name

    • :email (String): The author’s email

    • :web_page_url (String): The author’s web page

Return
  • ReleaseInfo: self



71
72
73
74
75
# File 'lib/RubyPackager/ReleaseInfo.rb', line 71

def author(iParams)
  @author_info.merge!(iParams)

  return self
end

#executable(iParams) ⇒ Object

Add executable package properties. This method can be called several times to specify several executables.

Parameters
  • iParams (map<Symbol,Object>): The parameters:

    • :startup_rb_file (String): Name of RB file to execute as startup file.

    • :exe_name (String): Name of executable file to produce.

    • :icon_name (String): Name of the executable icon.

    • :terminal_application (Boolean): Does this binary execute in a terminal ?

Return
  • ReleaseInfo: self



108
109
110
111
112
# File 'lib/RubyPackager/ReleaseInfo.rb', line 108

def executable(iParams)
  @executables_info << iParams

  return self
end

#gem(iParams) ⇒ Object

Add Gem properties

Parameters
  • iParams (map<Symbol,Object>): The parameters:

    • :gem_name (String): The Gem name

    • :gem_platform_class_name (String): The name of the Gem platform class

    • :require_path (String): Single path to require

    • :require_paths (list<String>): Paths to require

    • :has_rdoc (String): Include RDoc in the Gem ?

    • :extra_rdoc_files (list<String>): List of file patterns to be included in the RDoc but not in the Gem

    • :test_file (String): Name of the test file to execute

    • :gem_dependencies (list< [String,String] >): List of [ Gem, Version criteria ] this Gem depends on

    • :extensions (list<String>): List of paths to extconf.rb files to include as native C extensions

Return
  • ReleaseInfo: self



173
174
175
176
177
# File 'lib/RubyPackager/ReleaseInfo.rb', line 173

def gem(iParams)
  @gem_info.merge!(iParams)

  return self
end

#install(iParams) ⇒ Object

Add installer properties

Parameters
  • iParams (map<Symbol,Object>): The parameters:

    • :nsis_file_name (String): Name of the NSI file to use to generate the installer

    • :installer_name (String): Name of the generated installer

Return
  • ReleaseInfo: self



122
123
124
125
126
# File 'lib/RubyPackager/ReleaseInfo.rb', line 122

def install(iParams)
  @install_info.merge!(iParams)

  return self
end

#project(iParams) ⇒ Object

Add Project properties

Parameters
  • iParams (map<Symbol,Object>): The parameters:

    • :name (String): Project name

    • :web_page_url (String): Project home page

    • :summary (String): Project Summary

    • :description (String): Project description

    • :image_url (String): URL of the project’s image

    • :favicon_url (String): URL of the project’s favicon

    • :browse_source_url (String): URL to browse the source code

    • :dev_status (String): Development status

Return
  • ReleaseInfo: self



91
92
93
94
95
# File 'lib/RubyPackager/ReleaseInfo.rb', line 91

def project(iParams)
  @project_info.merge!(iParams)

  return self
end

#ruby_forge(iParams) ⇒ Object

Add RubyForge properties

Parameters
  • iParams (map<Symbol,Object>): The parameters:

    • :login (String): The releaser’s RubyForge login

    • :project_unix_name (String): Unix name of the RubyForge project

Return
  • ReleaseInfo: self



152
153
154
155
156
# File 'lib/RubyPackager/ReleaseInfo.rb', line 152

def ruby_forge(iParams)
  @rf_info.merge!(iParams)

  return self
end

#source_forge(iParams) ⇒ Object

Add SF.NET properties

Parameters
  • iParams (map<Symbol,Object>): The parameters:

    • :login (String): The releaser’s SF.NET login

    • :project_unix_name (String): Unix name of the SF project

    • :ask_for_password (Boolean): Do we ask for the user password to give to SSH ?

    • :ask_for_key_passphrase (Boolean): Do we ask for the key passphrase to give to SSH ?

Return
  • ReleaseInfo: self



138
139
140
141
142
# File 'lib/RubyPackager/ReleaseInfo.rb', line 138

def source_forge(iParams)
  @sf_info.merge!(iParams)

  return self
end