lib/unwrappr/writers/project_links.rb in unwrappr-0.8.0 vs lib/unwrappr/writers/project_links.rb in unwrappr-0.8.1

- old
+ new

@@ -22,17 +22,15 @@ end private def change_log - link_or_strikethrough('change-log', - ruby_gems_info&.changelog_uri) + link_or_strikethrough('change-log', ruby_gems_info('changelog_uri')) end def source_code - link_or_strikethrough('source-code', - ruby_gems_info&.source_code_uri) + link_or_strikethrough('source-code', ruby_gems_info('source_code_uri')) end GEM_DIFF_URL_TEMPLATE = 'https://my.diffend.io/gems/%s/%s/%s' private_constant :GEM_DIFF_URL_TEMPLATE @@ -44,11 +42,11 @@ @gem_change.head_version.to_s) end link_or_strikethrough('gem-diff', gem_diff_url) end - def ruby_gems_info - @gem_change_info[:ruby_gems] + def ruby_gems_info(*args) + @gem_change_info.dig(:ruby_gems, *args) end def link_or_strikethrough(text, url) if url.nil? || url.empty? "~~#{text}~~"