Sha256: 9faec0234bf31e944fa01cd05bf2abe2b18f8dbd12ea07d4642e0aeef6f282b8

Contents?: true

Size: 785 Bytes

Versions: 1

Compression:

Stored size: 785 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 || 'git'
      when 'glob'
        'Dir.glob("lib/**/**")'
      when 'git'
        '`git ls-files {app,lib}`.split("\n")'
      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.11 lib/gem_release/gemspec.rb