Sha256: 1f5fbe50bbeb609bde0cdb935372161608925b3e88cad8e8fda540ebe01e5cc8

Contents?: true

Size: 767 Bytes

Versions: 2

Compression:

Stored size: 767 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

2 entries across 2 versions & 1 rubygems

Version Path
gem-release-0.0.13 lib/gem_release/gemspec.rb
gem-release-0.0.12 lib/gem_release/gemspec.rb