New sublet format

DSL for sublets
Added by Christoph Kappel 3 months ago

I postponed this update knowing that this will break existing sublets, but it's really worth the hazzle.

Instead of using the class approach I added a DSL which greatly increases the readability of the sublets. This means that older sublets will not be loaded anymore, but every sublet in Sur has been updated accordingly.

Here is a small example for a new sublet:

1 configure :hello_world do |s|
2   s.interval = 120
3 end
4 
5 on :run do |s|
6   s.data = "Hello, World!" 
7 end

Sorry, I hope this will limit the problems due migration, besides the improved readability there are many benefits internal for the code.


Comments

Added by murth murth 3 months ago

Many of the new sublets require icons that aren't present anywhere I can find, least of all where they're supposed to be.
Will this somehow be resolved/added to sur?
Or are we meant to create ourselves?

Added by Robert Gleeson 3 months ago

Murth murth,

Yeah sometime in the near future sur will bundle icons as well as your sublet in a compressed archive.
When you fetch your sublet, all the files you need to get up and running will be there for you to use.

- Rob