lib/right_scraper/repositories/svn.rb in right_scraper-3.2.6 vs lib/right_scraper/repositories/svn.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 repository that is stored in a Subversion server.
- class Svn < Base
+ class Svn < ::RightScraper::Repositories::Base
# (String) Optional, tag or branch of repository that should be downloaded
attr_accessor :tag
alias_method :revision, :tag
@@ -83,14 +86,11 @@
# retriever(Retrivers::Svn):: Retriever for this repository
def retriever(options)
RightScraper::Retrievers::Svn.new(self, options)
end
- # Add this repository to the list of available types.
- @@types[:svn] = RightScraper::Repositories::Svn
-
- # Add git URL schemas to the list of okay schemas.
- @@okay_schemes << "svn"
- @@okay_schemes << "svn+ssh"
+ # self-register
+ register_self
+ register_url_schemas('svn', 'svn+ssh')
end
end
end