Specification¶
In order to create a sublet, you need to create a specification which basically contains some information about your sublet.
Attributes¶
Here is a list of known attributes:
name¶
Name of the sublet
Example:
1 spec.name = "Sublet"
version¶
Version of the sublet
Example:
1 spec.version = "0.1"
tags¶
List of tags to categorize the sublet
Example:
1 spec.tags = [ "Broken" ]
files¶
List of files in the sublet
Example:
1 spec.files = [ "sublet.rb" ]
icons¶
List of supplied icons
Example:
1 spec.icons = [ "icon.xbm" ]
description¶
Short description of the sublet
Example:
1 spec.description = "A shiny new sublet"
notes¶
Longer description of the sublet
Example:
1 spec.notes = <<NOTES
2 This sublet is just a dummy, have fun with it!
3 NOTES
authors¶
List of authors of the sublet in case there are more than one
Example:
1 spec.authors = [ "You" ]
contact¶
Contact mail address
Example:
1 spec.contact = "[email protected]"
date¶
Date of creation
Example:
1 spec.date = "Sat Sep 13 19:00 CET 2008"
config¶
Description of config settings
Example:
1 spec.config = [
2 {
3 :name => "format_string",
4 :type => "string",
5 :description => "Format of the clock (man date)",
6 :def_value => "Default value"
7 },
8 ]
grabs¶
Description of grabs
Example:
1 spec.grabs = {
2 :SubletTest => "Test grab"
3 ]
required_version¶
Required version of subtle
Example:
1 spec.required_version = "0.9.10"
add_dependency(name, version)¶
Add a gem dependency
Example:
1 spec.add_dependency("a_gem", "0.0")
Template¶
If you use the template command sur will create an empty template with a spec file.
Example:
1 # Dummy specification file
2 # Created with sur-0.2.155
3 Sur::Specification.new do |s|
4 s.name = "Dummy"
5 s.authors = [ "Christoph Kappel" ]
6 s.date = "Sat Sep 13 19:00 CET 2008"
7 s.contact = "[email protected]"
8 s.description = "Does nothing"
9 s.notes = <<NOTES
10 Some verbosive information about the sublet
11 NOTES
12 s.config = [
13 { :name => "something", :type => "string", :description => "Configure something" }
14 ]
15 s.version = "0.0"
16 s.tags = [ "Dummy" ]
17 s.files = [ "dummy.rb" ]
18 s.icons = [ "icons/dummy.xbm" ]
19
20 # Requirements
21 s.required_version = "0.9.1883"
22 s.add_dependency("a_gem", "0.0")
23 end