--- a/rakelib/rbspec.rb Sat Oct 29 23:54:12 2016 +0000
+++ b/rakelib/rbspec.rb Wed Nov 02 00:18:25 2016 +0000
@@ -494,8 +494,20 @@
class Repository < ConfigurationObject
property :type, :class => Symbol
- property :url
- property :mirror
+
+ # defines a canonical repossitory - this means, the one and only
+ # repository that contains "official" code.
+ property :canonical, :class => String
+
+ # defines a so called upstream repository - this means the repository
+ # where the code from staging repository goes once verified. If no
+ # upstream repository is defined, canonical repository is taken
+ # instead
+ property :upstream, :class => String
+
+ # defines staging repository
+ property :staging, :class => String
+
property :separator, :default => '.'
@@ -518,6 +530,17 @@
return visitor.visit_repository(self)
end
+ def upstream(value = '**token**')
+ if value != '**token**' then
+ self._set_property(:upstream, value)
+ else
+ if self.property_defined?(:upstream)
+ return self._get_property(:upstream)
+ else
+ return self.canonical
+ end
+ end
+ end
end # class Repository