example.ru in almanack-0.0.1.alpha3 vs example.ru in almanack-1.0.0.pre

- old
+ new

@@ -1,20 +1,24 @@ require "bundler/setup" -require "rack/reloader" -require "almanack" +require "almanack/server" -today = DateTime.now +now = Time.now -Almanack.config.title = 'Discworld Holidays' +Almanack.config do |calendar| + calendar.title = 'Discworld Holidays' -Almanack.config.add_events [ - { - title: "Hogswatch", - start_date: today, - description: 'The sausages have been strung, the wreaths of oakleaves hung and the stockings dangled. The pork pie, the sherry and the all-important turnip await their festive guests. The poker lent against the fireplace may or may not have been bent over the head of some nightmare creature.', - location: 'Castle of Bones' - }, - { title: "Soul Cake Tuesday", start_date: today + 10 }, - { title: "Eve of Small Gods", start_date: today + 30 }, -] + calendar.theme = 'starter' + + calendar.add_events [ + { + title: "Hogswatch", + start_date: now + Almanack::Calendar::ONE_DAY, + end_date: now + Almanack::Calendar::ONE_DAY * 2, + description: 'The sausages have been strung, the wreaths of oakleaves hung and the stockings dangled. The pork pie, the sherry and the all-important turnip await their festive guests. The poker lent against the fireplace may or may not have been bent over the head of some nightmare creature.', + location: 'Castle of Bones' + }, + { title: "Soul Cake Tuesday", start_date: now + 10 * Almanack::Calendar::ONE_DAY }, + { title: "Eve of Small Gods", start_date: now + 30 * Almanack::Calendar::ONE_DAY }, + ] +end run Almanack::Server