lib/pinpress.rb in pinpress-1.2.2 vs lib/pinpress.rb in pinpress-1.2.3

- old
+ new

@@ -114,14 +114,14 @@ else output += template.opener if template.opener output += PinPress.generate_items(template_type, template, pins, opts) output += template.closer if template.closer end + configuration.save return output rescue StandardError => e - p e.to_s messenger.debug(e.to_s) raise "Pinboard API failed; are you sure you've run " \ " `pinpress init` (and that your API key is correct)?" end end @@ -171,11 +171,11 @@ ) default_pin_template = { name: 'pinpress_default', opener: '<ul>', - item: '<li><b><a title="<%= description %>" href="<%= href %>" target="_blank"><%= description %></a>.</b><%= extended %></li>', + item: '<li><b><a title="<%= description %>" href="<%= href %>" target="_blank"><%= description %></a>.</b> <%= extended %></li>', closer: '</ul>' } default_tag_template = { name: 'pinpress_default', @@ -188,12 +188,11 @@ pm = CLIUtils::Prefs.new(PinPress::PREF_FILES['INIT'], configuration) pm.ask configuration.ingest_prefs(pm) - messenger.debug { - "Configuration values after pref collection: #{ configuration.data }" - } + messenger.debug("Configuration values after pref collection: #{ configuration.data }") + configuration.save @initialized = true end # Present a list of installed templates to the user