Project

General

Profile

unexist.dev

Assorted tidbits and projects

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:

spec.name = "Sublet" 

version

Version of the sublet

Example:

spec.version = "0.1" 

tags

List of tags to categorize the sublet

Example:

spec.tags = [ "Broken" ]

files

List of files in the sublet

Example:

spec.files = [ "sublet.rb" ]

icons

List of supplied icons

Example:

spec.icons = [ "icon.xbm" ]

description

Short description of the sublet

Example:

spec.description = "A shiny new sublet" 

notes

Longer description of the sublet

Example:

spec.notes = <<NOTES
This sublet is just a dummy, have fun with it!
NOTES

authors

List of authors of the sublet in case there are more than one

Example:

  spec.authors = [ "You" ]

contact

Contact mail address

Example:

spec.contact = "your@mail.com" 

date

Date of creation

Example:

spec.date = "Sat Sep 13 19:00 CET 2008" 

config

Description of config settings

Example:

spec.config = [
  {
    :name        => "format_string",
    :type        => "string",
    :description => "Format of the clock (man date)",
    :def_value   => "Default value" 
  },
]

grabs

Description of grabs

Example:

spec.grabs = {
  :SubletTest => "Test grab" 
]

required_version

Required version of subtle

Example:

spec.required_version = "0.9.10" 

add_dependency(name, version)

Add a gem dependency

Example:

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:

# Dummy specification file
# Created with sur-0.2.155
Sur::Specification.new do |s|
  s.name             = "Dummy" 
  s.authors          = [ "Christoph Kappel" ]
  s.date             = "Sat Sep 13 19:00 CET 2008" 
  s.contact          = "unexist@dorfelite.net" 
  s.description      = "Does nothing" 
  s.notes            = <<NOTES
Some verbosive information about the sublet
NOTES
  s.config           = [
    { :name => "something", :type => "string",  :description => "Configure something" }
  ]
  s.version          = "0.0" 
  s.tags             = [ "Dummy" ]
  s.files            = [ "dummy.rb" ]
  s.icons            = [ "icons/dummy.xbm" ]

  # Requirements
  s.required_version = "0.9.1883" 
  s.add_dependency("a_gem", "0.0")
end