Sha256: 874cdb20c5a01c3ab1cc5c7a7b3b8898b24c36eebc387c389591ba47b24c0151

Contents?: true

Size: 930 Bytes

Versions: 32

Compression:

Stored size: 930 Bytes

Contents

class Jeweler
  module Commands
    module Version
      class Base

        attr_accessor :repo, :version_helper, :gemspec, :commit

        def run
          update_version

          self.version_helper.write
          self.gemspec.version = self.version_helper.to_s

          commit_version if self.repo && self.commit
        end

        def update_version
          raise "Subclasses should implement this"
        end

        def commit_version
          if self.repo
            self.repo.add(version_helper.path)
            self.repo.commit("Version bump to #{self.version_helper.to_s}")
          end
        end


        def self.build_for(jeweler)
          command = new
          command.repo = jeweler.repo
          command.version_helper = jeweler.version_helper
          command.gemspec = jeweler.gemspec
          command.commit = jeweler.commit

          command
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 9 rubygems

Version Path
dima-jeweler-1.2.0 lib/jeweler/commands/version/base.rb
gohanlonllc-jeweler-0.11.1.20090513153819 lib/jeweler/commands/version/base.rb
gohanlonllc-jeweler-1.0.0.20080513000000 lib/jeweler/commands/version/base.rb
gohanlonllc-jeweler-1.0.0.20090513153819 lib/jeweler/commands/version/base.rb
mcornick-jeweler-1.2.0 lib/jeweler/commands/version/base.rb
monkeyhelper-jeweler-1.0.1 lib/jeweler/commands/version/base.rb
namelessjon-jeweler-1.0.1 lib/jeweler/commands/version/base.rb
pivotal-jeweler-1.0.1.1 lib/jeweler/commands/version/base.rb
technicalpickles-jeweler-1.0.0 lib/jeweler/commands/version/base.rb
technicalpickles-jeweler-1.0.1 lib/jeweler/commands/version/base.rb
technicalpickles-jeweler-1.0.2 lib/jeweler/commands/version/base.rb
technicalpickles-jeweler-1.1.0 lib/jeweler/commands/version/base.rb
technicalpickles-jeweler-1.2.1 lib/jeweler/commands/version/base.rb
gemrage-1.0.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/version/base.rb
gemrage-0.4.1 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/version/base.rb
gemrage-0.4.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/version/base.rb
gemrage-0.3.2 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/version/base.rb
gemrage-0.3.1 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/version/base.rb
gemrage-0.3.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/version/base.rb
gemrage-0.2.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/version/base.rb