lib/right_scraper/repositories/git.rb in right_scraper-3.2.6 vs lib/right_scraper/repositories/git.rb in right_scraper-5.0.1

- old
+ new

@@ -1,7 +1,7 @@ #-- -# Copyright: Copyright (c) 2010-2011 RightScale, Inc. +# Copyright: Copyright (c) 2010-2013 RightScale, Inc. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # 'Software'), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, @@ -19,14 +19,17 @@ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #++ +# ancestor +require 'right_scraper/repositories' + module RightScraper module Repositories # A Git repository. - class Git < Base + class Git < ::RightScraper::Repositories::Base # (String) Optional, tag or branch of repository that should be downloaded attr_accessor :tag alias_method :revision, :tag @@ -78,15 +81,11 @@ # retriever(Retrivers::Git):: Retriever for this repository def retriever(options) RightScraper::Retrievers::Git.new(self, options) end - # Add this repository to the list of available types. - @@types[:git] = RightScraper::Repositories::Git - - # Add git URL schemas to the list of okay schemas. - @@okay_schemes << "git" - @@okay_schemes << "git+ssh" - @@okay_schemes << "ssh" + # self-register + register_self + register_url_schemas('git', 'git+ssh', 'ssh') end end end