corosync-ruby 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,6 +47,11 @@ module Corosync
47
47
  description.gsub("\"", "")
48
48
  end
49
49
 
50
+ def current_node_active?
51
+ current_node = `hostname`.strip
52
+ @online.include?(current_node)
53
+ end
54
+
50
55
  private
51
56
 
52
57
  def parse
@@ -102,4 +107,4 @@ module Corosync
102
107
  end
103
108
  end
104
109
  end
105
- end
110
+ end
@@ -24,11 +24,11 @@ module Corosync
24
24
  @started_on = Regexp.last_match[1]
25
25
 
26
26
  # get hostname of the current machine
27
- current_hostname = `hostname`.gsub!("\n", "")
27
+ current_hostname = `hostname`.strip
28
28
  @started_locally = @started_on == current_hostname
29
29
  else
30
30
  raise "Can't parse output"
31
31
  end
32
32
  end
33
33
  end
34
- end
34
+ end
metadata CHANGED
@@ -1,47 +1,67 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: corosync-ruby
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 4
10
+ version: 0.0.4
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Pavel Ivanov
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2013-05-06 00:00:00.000000000 Z
17
+
18
+ date: 2013-05-06 00:00:00 Z
13
19
  dependencies: []
20
+
14
21
  description:
15
22
  email: ivpavig@gmail.com
16
23
  executables: []
24
+
17
25
  extensions: []
26
+
18
27
  extra_rdoc_files: []
19
- files:
28
+
29
+ files:
20
30
  - lib/corosync-ruby.rb
21
31
  - lib/corosync-ruby/resource.rb
22
32
  - lib/corosync-ruby/cluster.rb
23
33
  homepage:
24
34
  licenses: []
35
+
25
36
  post_install_message:
26
37
  rdoc_options: []
27
- require_paths:
38
+
39
+ require_paths:
28
40
  - lib
29
- required_ruby_version: !ruby/object:Gem::Requirement
41
+ required_ruby_version: !ruby/object:Gem::Requirement
30
42
  none: false
31
- requirements:
32
- - - ! '>='
33
- - !ruby/object:Gem::Version
34
- version: '0'
35
- required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ hash: 3
47
+ segments:
48
+ - 0
49
+ version: "0"
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
51
  none: false
37
- requirements:
38
- - - ! '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ hash: 3
56
+ segments:
57
+ - 0
58
+ version: "0"
41
59
  requirements: []
60
+
42
61
  rubyforge_project:
43
- rubygems_version: 1.8.11
62
+ rubygems_version: 1.8.25
44
63
  signing_key:
45
64
  specification_version: 3
46
65
  summary: A simple wrapper for corosync cmd tool 'crm'
47
66
  test_files: []
67
+