lib/gemsmith/templates/%gem_name%/%gem_name%.gemspec.tt in gemsmith-11.2.0 vs lib/gemsmith/templates/%gem_name%/%gem_name%.gemspec.tt in gemsmith-11.3.0

- old
+ new

@@ -1,6 +1,6 @@ -$LOAD_PATH.append File.expand_path("../lib", __FILE__) +$LOAD_PATH.append File.expand_path("lib", __dir__) require "<%= config.dig(:gem, :path) %>/identity" Gem::Specification.new do |spec| spec.name = <%= config.dig(:gem, :class) %>::Identity.name spec.version = <%= config.dig(:gem, :class) %>::Identity.version @@ -15,11 +15,11 @@ spec.signing_key = Gem.default_key_path spec.cert_chain = [Gem.default_cert_path] <%- end -%> spec.required_ruby_version = "~> <%= config.dig(:versions, :ruby)[/\d+\.\d+/] %>" - <%- if config.dig(:generate, :rails) -%> + <%- if config.dig(:generate, :engine) || config.dig(:generate, :rails) -%> spec.add_dependency "rails", "~> <%= config.dig(:versions, :rails) %>" <%- end -%> <%- if config.dig(:generate, :cli) -%> spec.add_dependency "runcom", "~> 2.0" spec.add_dependency "thor", "~> 0.20" @@ -41,19 +41,19 @@ spec.add_development_dependency "pry", "~> 0.10" spec.add_development_dependency "pry-byebug", "~> 3.5" <%- end -%> spec.add_development_dependency "rake", "~> 12.3" <%- if config.dig(:generate, :reek) -%> - spec.add_development_dependency "reek", "~> 4.7" + spec.add_development_dependency "reek", "~> 4.8" <%- end -%> <%- if config.dig(:generate, :rspec) -%> - spec.add_development_dependency "<%= config.dig(:generate, :rails) ? "rspec-rails" : "rspec" %>", "~> 3.7" + spec.add_development_dependency "<%= config.dig(:generate, :engine) || config.dig(:generate, :rails) ? "rspec-rails" : "rspec" %>", "~> 3.7" <%- end -%> <%- if config.dig(:generate, :rubocop) -%> - spec.add_development_dependency "rubocop", "~> 0.52" + spec.add_development_dependency "rubocop", "~> 0.53" <%- end -%> - <%- if config.dig(:generate, :rails) -%> + <%- if config.dig(:generate, :engine) || config.dig(:generate, :rails) -%> spec.files = Dir["app/**/*", "bin/**/*", "config/**/*", "lib/**/*", "vendor/**/*"] <%- else -%> spec.files = Dir["lib/**/*"] <%- end -%> spec.extra_rdoc_files = Dir["README*", "LICENSE*"]