From df82c975ee5cb6ff3000bca99b246d90e8be7eec Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 22 Dec 2017 23:23:27 -0500 Subject: fix tag names in page titles --- lib/config.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/config.rb') diff --git a/lib/config.rb b/lib/config.rb index 4690559..57e3b3f 100644 --- a/lib/config.rb +++ b/lib/config.rb @@ -42,10 +42,8 @@ class Config return @data['person_emails'][name] end # Categories - def categories - return @data['categories'].keys - end def category_name(abbr) - return @data['categories'][abbr] + @categories ||= (@data['categories'] || {}).map{|k,v|[k.downcase,v]}.to_h + return @categories[abbr.downcase] end end -- cgit v1.2.3 From c70e32b7d43282e0cb4b4d36ca4956bd5e1b9ed6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 23 Dec 2017 00:31:48 -0500 Subject: config: fix typo, prevent it from happening again --- lib/config.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/config.rb') diff --git a/lib/config.rb b/lib/config.rb index 57e3b3f..944acc3 100644 --- a/lib/config.rb +++ b/lib/config.rb @@ -21,11 +21,7 @@ class Config return @default_license ||= @data['default_license'] end def license_uri(name) - str = @data['license_uris'][name] - if str.nil? - return nil - end - return URI::parse(str) + return URI::parse(@data['license_uris'][name]) end # People def default_author -- cgit v1.2.3