lib/nutrella/configuration.rb in nutrella-1.5.4 vs lib/nutrella/configuration.rb in nutrella-1.6.0
- old
+ new
@@ -19,10 +19,11 @@
organization: #{NULOGY_ORGANIZATION_ID}
launch_command: open $url$
enable_trello_app: false
enable_logging: false
cache_capacity: 5
+ cache_first: '^PM-\d+'
YAML
attr_reader :path, :values
def self.values(path)
@@ -44,11 +45,12 @@
token: configuration.fetch("token"),
organization: configuration.fetch("organization", NULOGY_ORGANIZATION_ID),
launch_command: configuration.fetch("launch_command", "open $url$"),
enable_trello_app: configuration.fetch("enable_trello_app", "false"),
enable_logging: configuration.fetch("enable_logging", "false"),
- cache_capacity: configuration.fetch("cache_capacity", 5)
+ cache_capacity: configuration.fetch("cache_capacity", 5),
+ cache_first: to_reg_exp("cache_first")
}
rescue => e
abort "#{path} #{e}"
end
@@ -74,8 +76,12 @@
You still need to enter your Trello API keys into the config file.
See https://github.com/amckinnell/nutrella for instructions.
TEXT
+ end
+
+ def to_reg_exp(key)
+ Regexp.new(configuration.fetch(key, '^PM-\d+'), Regexp::IGNORECASE)
end
end
end