Sha256: 35ac3b861a4d77c925450cad40ee2b2d36dd5bc40a87a95f3280112316ffaa15

Contents?: true

Size: 468 Bytes

Versions: 10

Compression:

Stored size: 468 Bytes

Contents

class Terraspace::CLI::New
  module Helpers
    include Helpers::PluginGem

  private
    def build_gemfile(*list)
      lines = []
      list.compact.each do |name|
        lines << gem_line(name)
      end
      lines.join("\n")
    end

    def gem_line(name)
      if name == "terraspace"
        major_version = Terraspace::VERSION.split('.').first
        %Q|gem "#{name}", '~> #{major_version}'|
      else
        %Q|gem "#{name}"|
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
terraspace-2.2.6 lib/terraspace/cli/new/helpers.rb
terraspace-2.2.5 lib/terraspace/cli/new/helpers.rb
terraspace-2.2.4 lib/terraspace/cli/new/helpers.rb
terraspace-2.2.3 lib/terraspace/cli/new/helpers.rb
terraspace-2.2.2 lib/terraspace/cli/new/helpers.rb
terraspace-2.2.1 lib/terraspace/cli/new/helpers.rb
terraspace-2.2.0 lib/terraspace/cli/new/helpers.rb
terraspace-2.1.7 lib/terraspace/cli/new/helpers.rb
terraspace-2.1.6 lib/terraspace/cli/new/helpers.rb
terraspace-2.1.5 lib/terraspace/cli/new/helpers.rb