Sha256: e0e2a2643c937cc95c0f071797c3a5d7d7ef81d3b363dbedec4660dec77b8429

Contents?: true

Size: 761 Bytes

Versions: 3

Compression:

Stored size: 761 Bytes

Contents

module GemRelease
  class Gemspec < Template
    attr_reader :author, :email, :homepage, :summary, :description, :strategy

    def initialize(options = {})
      super('gemspec', options)

      @author      ||= user_name
      @email       ||= user_email
      @homepage    ||= "https://github.com/#{github_user}/#{name}" || "[your github name]"

      @summary     ||= '[TODO: summary]'
      @description ||= '[TODO: description]'

      @strategy = options[:strategy]
    end

    def files
      case strategy
      when 'git'
        '`git ls-files app lib`.split("\n")'
      else
        'Dir.glob("{lib/**/*,[A-Z]*}")'
      end
    end

    def exists?
      File.exists?(filename)
    end

    def filename
      "#{name}.gemspec"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gem-release-0.1.2 lib/gem_release/gemspec.rb
gem-release-0.1.1 lib/gem_release/gemspec.rb
gem-release-0.1.0 lib/gem_release/gemspec.rb