Sha256: 65ed717143bed1da851727bd44b74d84a62e3f12d978b99fc28670e8a25b72e0

Contents?: true

Size: 1.01 KB

Versions: 19

Compression:

Stored size: 1.01 KB

Contents

class Jeweler
  module Commands
    class SetupRubyforge
      attr_accessor :gemspec, :output, :rubyforge

      def run
        raise NoRubyForgeProjectInGemspecError unless @gemspec.rubyforge_project

        @rubyforge.configure

        output.puts "Logging into rubyforge"
        @rubyforge.login

        output.puts "Creating #{@gemspec.name} package in the #{@gemspec.rubyforge_project} project"
        begin
          @rubyforge.create_package(@gemspec.rubyforge_project, @gemspec.name)
        rescue StandardError => e
          case e.message
          when /no <group_id> configured for <#{Regexp.escape @gemspec.rubyforge_project}>/
            raise RubyForgeProjectNotConfiguredError, @gemspec.rubyforge_project
          else
            raise
          end
        end
      end

      def self.build_for(jeweler)
        command = new

        command.gemspec = jeweler.gemspec
        command.output = jeweler.output
        command.rubyforge = jeweler.rubyforge

        command
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 6 rubygems

Version Path
gohanlonllc-jeweler-0.11.1.20090513153819 lib/jeweler/commands/setup_rubyforge.rb
gohanlonllc-jeweler-1.0.0.20080513000000 lib/jeweler/commands/setup_rubyforge.rb
gohanlonllc-jeweler-1.0.0.20090513153819 lib/jeweler/commands/setup_rubyforge.rb
monkeyhelper-jeweler-1.0.1 lib/jeweler/commands/setup_rubyforge.rb
namelessjon-jeweler-1.0.1 lib/jeweler/commands/setup_rubyforge.rb
pivotal-jeweler-1.0.1.1 lib/jeweler/commands/setup_rubyforge.rb
technicalpickles-jeweler-0.10.0 lib/jeweler/commands/setup_rubyforge.rb
technicalpickles-jeweler-0.10.1 lib/jeweler/commands/setup_rubyforge.rb
technicalpickles-jeweler-0.10.2 lib/jeweler/commands/setup_rubyforge.rb
technicalpickles-jeweler-0.11.0 lib/jeweler/commands/setup_rubyforge.rb
technicalpickles-jeweler-1.0.0 lib/jeweler/commands/setup_rubyforge.rb
technicalpickles-jeweler-1.0.1 lib/jeweler/commands/setup_rubyforge.rb
technicalpickles-jeweler-1.0.2 lib/jeweler/commands/setup_rubyforge.rb
jeweler-1.0.2 lib/jeweler/commands/setup_rubyforge.rb
jeweler-1.0.0 lib/jeweler/commands/setup_rubyforge.rb
jeweler-0.10.2 lib/jeweler/commands/setup_rubyforge.rb
jeweler-0.11.0 lib/jeweler/commands/setup_rubyforge.rb
jeweler-0.11.1 lib/jeweler/commands/setup_rubyforge.rb
jeweler-1.0.1 lib/jeweler/commands/setup_rubyforge.rb