lib/dopstick/generator/gem/generator.rb in dopstick-0.0.6 vs lib/dopstick/generator/gem/generator.rb in dopstick-0.0.7

- old
+ new

@@ -113,16 +113,16 @@ no_commands do def render_tree(skip_content_spaces = false) content = [] options.namespace_names.each_with_index do |name, count| - content << (" " * count) + "module #{name}" + content << ((" " * count) + "module #{name}") end spacer = skip_content_spaces ? "" : " " - content << (spacer * options.namespace_size) + yield + content << ((spacer * options.namespace_size) + yield) (options.namespace_size - 1).downto(0) do |count| content << "#{' ' * count}end" end @@ -150,9 +150,22 @@ def erb(file) ERB.new( File.read("#{self.class.source_root}/#{file}") ).result(binding) + end + + def dependabot_package_ecosystem + "bundler" + end + + def ruby_versions_for_workflow + options.ruby_versions.map do |v| + canonical_segments = ::Gem::Version.new(v).canonical_segments + canonical_segments << 0 if canonical_segments.size < 2 + + canonical_segments.join(".").inspect + end.join(", ") end end end end end