Sha256: 240effa378aa7d37854c5114265e2bf1e3d01ec72bdd8eeb8e463cde44eaf0e0

Contents?: true

Size: 987 Bytes

Versions: 13

Compression:

Stored size: 987 Bytes

Contents

class Jeweler
  module Commands
    class WriteGemspec
      attr_accessor :base_dir, :gemspec, :version, :output, :gemspec_helper, :version_helper

      def initialize
        self.output = $stdout
      end

      def run
        gemspec_helper.spec.version ||= begin
          version_helper.refresh
          version_helper.to_s
        end

        gemspec_helper.spec.date    = Time.now
        gemspec_helper.write

        output.puts "Generated: #{gemspec_helper.path}"  
      end

      def gemspec_helper
        @gemspec_helper ||= GemSpecHelper.new(self.gemspec, self.base_dir)
      end

      def self.build_for(jeweler)
        command = new

        command.base_dir = jeweler.base_dir
        command.gemspec = jeweler.gemspec
        command.version = jeweler.version
        command.output = jeweler.output
        command.gemspec_helper = jeweler.gemspec_helper
        command.version_helper = jeweler.version_helper

        command
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
gemrage-1.0.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/write_gemspec.rb
gemrage-0.4.1 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/write_gemspec.rb
gemrage-0.4.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/write_gemspec.rb
gemrage-0.3.2 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/write_gemspec.rb
gemrage-0.3.1 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/write_gemspec.rb
gemrage-0.3.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/write_gemspec.rb
gemrage-0.2.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/write_gemspec.rb
gemrage-0.1.2 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/write_gemspec.rb
gemrage-0.1.1 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/write_gemspec.rb
gemrage-0.1.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/write_gemspec.rb
gemrage-0.0.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/write_gemspec.rb
jeweler-1.4.0 lib/jeweler/commands/write_gemspec.rb
jeweler-1.3.0 lib/jeweler/commands/write_gemspec.rb