Sha256: c4b424732aac16b38a82d2d2698a865ec2f3f567d4229abd9e7b117c3f2ae2f9

Contents?: true

Size: 834 Bytes

Versions: 5

Compression:

Stored size: 834 Bytes

Contents

require 'rubygems'
require 'rubygems/gem_runner'
require 'net/http'

class VRaptorGem
    #def initialize(who)
    #    @who = who
    #end
    #def install_and_configure
    #    if is_installed?
    #        configure
    #    elsif exists?
    #        install
    #        configure
    #    end
    #end
    #
    #private
    #def is_installed?
    #    Gem::GemPathSearcher.new.find(@who)
    #end
    #def exists?
    #  url = URI.parse("http://rubygems.org/gems/#{@who}")
    #  req = Net::HTTP::Get.new(url.path)
    #  res = Net::HTTP.start(url.host, url.port) {|http|
    #         http.request(req)
    #       }
    #    res.code == '200'
    #end
    #def install
    #    Gem::GemRunner.new.run ["install", @who]
    #end
    #def configure
    #    VraptorScaffold::Execution.new.run(["configure", @who])
    #end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vraptor-scaffold-1.3.0 lib/vraptor-scaffold/generators/plugin/vraptor_gem.rb
vraptor-scaffold-1.3.0.rc lib/vraptor-scaffold/generators/plugin/vraptor_gem.rb
vraptor-scaffold-1.2.3 lib/vraptor-scaffold/generators/plugin/vraptor_gem.rb
vraptor-scaffold-1.2.1 lib/vraptor-scaffold/generators/plugin/vraptor_gem.rb
vraptor-scaffold-1.2.0 lib/vraptor-scaffold/generators/plugin/vraptor_gem.rb