lib/nutrella/configuration.rb in nutrella-1.4.0 vs lib/nutrella/configuration.rb in nutrella-1.5.0

- old
+ new

@@ -16,10 +16,11 @@ token: <your developer token> # Optional Configuration organization: #{NULOGY_ORGANIZATION_ID} launch_command: open $url$ + enable_trello_app: False YAML attr_reader :path, :values def self.values(path) @@ -33,20 +34,23 @@ end private def load_configuration - configuration = YAML.load_file(path) - @values = { key: configuration.fetch("key"), secret: configuration.fetch("secret"), token: configuration.fetch("token"), organization: configuration.fetch("organization", NULOGY_ORGANIZATION_ID), - launch_command: configuration.fetch("launch_command", "open $url$") + launch_command: configuration.fetch("launch_command", "open $url$"), + enable_trello_app: configuration.fetch("enable_trello_app", "False") } rescue => e abort "#{path} #{e}" + end + + def configuration + @_configuration ||= YAML.load_file(path) end def configuration_missing? return false if File.exist?(path)