lib/gemsmith/templates/%gem_name%/lib/%gem_name%/identity.rb.tt in gemsmith-6.2.0 vs lib/gemsmith/templates/%gem_name%/lib/%gem_name%/identity.rb.tt in gemsmith-7.0.0
- old
+ new
@@ -1,23 +1,25 @@
-module <%= config.fetch(:gem).fetch(:class) %>
+# frozen_string_literal: true
+
+module <%= config.dig(:gem, :class) %>
# Gem identity information.
module Identity
def self.name
- "<%= config.fetch(:gem).fetch(:name) %>"
+ "<%= config.dig(:gem, :name) %>"
end
def self.label
- "<%= config.fetch(:gem).fetch(:class) %>"
+ "<%= config.dig(:gem, :class) %>"
end
def self.version
"0.1.0"
end
def self.version_label
"#{label} #{version}"
end
- <%- if config.fetch(:create).fetch(:cli) -%>
+ <%- if config.dig(:create, :cli) -%>
def self.file_name
".#{name}rc"
end
<%- end -%>