Class: Nucleon::Action::Network::Remote

Inherits:
Object
  • Object
show all
Includes:
Mixin::Action::Project, Mixin::Action::Push
Defined in:
lib/nucleon/action/network/remote.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.describeObject


Info



13
14
15
# File 'lib/nucleon/action/network/remote.rb', line 13

def self.describe
  super(:network, :remote, 980)
end

Instance Method Details

#argumentsObject



35
36
37
# File 'lib/nucleon/action/network/remote.rb', line 35

def arguments
  [ :project_reference ]
end

#configureObject


Settings



20
21
22
23
24
25
26
27
# File 'lib/nucleon/action/network/remote.rb', line 20

def configure
  super do
    codes :project_failure, :push_failure

    project_config
    push_config
  end
end

#executeObject


Operations



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/nucleon/action/network/remote.rb', line 42

def execute
  super do |node|
    ensure_network do
      info('start')

      settings[:pull] = false
      settings[:push] = true

      if project = project_load(network.directory, false, false)
        provider = settings[:project_provider]

        if settings[:project_reference].match(/^\s*([a-zA-Z0-9_-]+):::(.*)\s*$/)
          provider = $1
        end

        myself.status = code.push_failure unless push(project)
      else
        myself.status = code.project_failure
      end
    end
  end
end

#ignoreObject




31
32
33
# File 'lib/nucleon/action/network/remote.rb', line 31

def ignore
  node_ignore + [ :propogate_push, :pull, :push, :net_remote ]
end