Sha256: 2e5fc8d9026a1dceed0890e48a556f88d0d9d1d58a6b464d61fcda3c7d2eee4e
Contents?: true
Size: 459 Bytes
Versions: 2
Compression:
Stored size: 459 Bytes
Contents
require 'delegate' module Pumper class Specification < SimpleDelegator def initialize specification = File.read(gemspec_file) super(eval(specification)) end def for_gemfile "gem '#{ name }', '~> #{ version }'" end def gem_file_name "#{ name }-#{ version }.gem" end def version super.to_s end private def gemspec_file Dir.glob("#{ Dir.pwd }/*.gemspec").first end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pumper-1.3.0 | lib/pumper/specification.rb |
pumper-1.2.0 | lib/pumper/specification.rb |