Class: MxxRu::Externals::Hg
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- MxxRu::Externals::Hg
- Includes:
- Impl::ExternalBasics, Impl::OptionsHolder
- Defined in:
- lib/mxx_ru/externals.rb
Instance Attribute Summary collapse
-
#tag(v) ⇒ Object
(also: #tag=)
readonly
Returns the value of attribute tag.
Attributes included from Impl::ExternalBasics
Instance Method Summary collapse
- #define_rules(old_or_new) ⇒ Object
-
#initialize(name) {|_self| ... } ⇒ Hg
constructor
A new instance of Hg.
- #make_hash ⇒ Object
Methods included from Impl::OptionsHolder
Methods included from Impl::ExternalBasics
Constructor Details
#initialize(name) {|_self| ... } ⇒ Hg
Returns a new instance of Hg.
584 585 586 587 588 589 590 |
# File 'lib/mxx_ru/externals.rb', line 584 def initialize(name) defaults(name) yield self if block_given? Registry::handle_external(@name, self) end |
Instance Attribute Details
#tag(v) ⇒ Object (readonly) Also known as: tag=
Returns the value of attribute tag.
592 593 594 |
# File 'lib/mxx_ru/externals.rb', line 592 def tag @tag end |
Instance Method Details
#define_rules(old_or_new) ⇒ Object
600 601 602 603 604 605 606 607 608 609 610 611 |
# File 'lib/mxx_ru/externals.rb', line 600 def define_rules(old_or_new) define(old_or_new) do |tmp_dir| sh_args = ['hg', 'clone'] sh_args << '--updaterev' << @tag.to_s if @tag (sh_args) sh_args << @url << tmp_dir sh *sh_args end end |
#make_hash ⇒ Object
596 597 598 |
# File 'lib/mxx_ru/externals.rb', line 596 def make_hash .merge!( basics_to_map ).merge!( { :tag => @tag } ) end |