Sha256: 66dc3e7a7e97661435b1a82d09c969fbf7739615ed1e1a151df1ee0db76a4027

Contents?: true

Size: 759 Bytes

Versions: 1

Compression:

Stored size: 759 Bytes

Contents

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

    def initialize(options = {})
      super

      @authors     ||= [`git config --get user.name`.strip]
      @email       ||= `git config --get user.email`.strip
      @homepage    ||= "http://github.com/#{github_user}/#{name}" || "[your github name]"

      @summary     ||= '[summary]'
      @description ||= '[description]'
      @strategy = options[:strategy]
    end

    def files
      case @strategy
      when 'git'
        '`git ls-files app lib`.split("\n")'
      else
        'Dir.glob("lib/**/**")'
      end
    end

    def filename
      "#{name}.gemspec"
    end

    def template_name
      'gemspec.erb'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gem-release-0.0.14 lib/gem_release/gemspec.rb