erlnixify 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/features/step_definitions/node_steps.rb +8 -8
- data/features/step_definitions/settings_steps.rb +5 -5
- data/lib/erlnixify/opts.rb +2 -2
- data/lib/erlnixify/version.rb +1 -1
- data/lib/erlnixify.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Yzg4N2RiYzQ4NTMzMmMwOTQzNzhlZTc0ZmZlZGQwMWE2MjBiNDRmYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTlhYmVkZGE0MGJlZjBjMTc3YTJlNmNkMjkzMDY3YjZjMThkNzNiOQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGU4Y2Y5NGEzMWI0Zjc5Mjc2ZTMyOGIzZTg5Mzk5ZGI2OTU1MmQ3MWJmOGMy
|
10
|
+
ZTgyYzgxNWFhMWI2YmUzNzYwZDExZjMwMWRmMzgxN2JhOGU3MWQzYTEyOGE5
|
11
|
+
MmYxNzRhZjZkNTQzYzk5YTI1ZDg4ZGQzNmRiMzg0OWMyMTIyZjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDgzNmRjNmYwNDI1OGU0NGJmYjMyMGY3N2Q1ZDMyODFiNThmZDQyM2ZmOWRk
|
14
|
+
NGUwM2UzNGIwOWU4NGM3NzZjOGE4NmVmYWIzNDU3Mjk1Y2M5NDY4ZTI0MzRl
|
15
|
+
MjA5ZTUzNjg4ZjEyM2ZlNWIzYzJkYWFmYjgwZWY1MDhhNjhjNjM=
|
@@ -1,12 +1,12 @@
|
|
1
1
|
Given(/^a valid configuration$/) do
|
2
2
|
hostname = `hostname -f`.strip
|
3
|
-
@opts = Erlnixify::Opts.new(["
|
3
|
+
@opts = Erlnixify::Opts.new(["startdaemon", "--cookie", "fubachu",
|
4
4
|
"--startuptimeout", "10",
|
5
5
|
"--checkinterval", "10",
|
6
6
|
"--name", "foo",
|
7
7
|
"--command", "erl -noshell -setcookie fubachu -name foo@#{hostname}"
|
8
8
|
])
|
9
|
-
@settings = Erlnixify::Settings.new(@opts.options[:
|
9
|
+
@settings = Erlnixify::Settings.new(@opts.options[:startdaemon])
|
10
10
|
end
|
11
11
|
|
12
12
|
Then(/^no errors or problems occur$/) do
|
@@ -36,14 +36,14 @@ end
|
|
36
36
|
|
37
37
|
Given(/^a valid configuration with invalid command$/) do
|
38
38
|
hostname = `hostname -f`.strip
|
39
|
-
@opts = Erlnixify::Opts.new(["
|
39
|
+
@opts = Erlnixify::Opts.new(["startdaemon",
|
40
40
|
"--cookie", "fubachu",
|
41
41
|
"--startuptimeout", "10",
|
42
42
|
"--checkinterval", "10",
|
43
43
|
"--name", "foo",
|
44
44
|
"--command", "this should fail"
|
45
45
|
])
|
46
|
-
@settings = Erlnixify::Settings.new(@opts.options[:
|
46
|
+
@settings = Erlnixify::Settings.new(@opts.options[:startdaemon])
|
47
47
|
end
|
48
48
|
|
49
49
|
When(/^the node fails$/) do
|
@@ -57,7 +57,7 @@ end
|
|
57
57
|
|
58
58
|
Given(/^a valid configuration with invalid check command$/) do
|
59
59
|
hostname = `hostname -f`.strip
|
60
|
-
@opts = Erlnixify::Opts.new(["
|
60
|
+
@opts = Erlnixify::Opts.new(["startdaemon", "--cookie", "fubachu",
|
61
61
|
"--startuptimeout", "10",
|
62
62
|
"--checkinterval", "10",
|
63
63
|
"--name", "foo",
|
@@ -65,7 +65,7 @@ Given(/^a valid configuration with invalid check command$/) do
|
|
65
65
|
"--check", "invalid check",
|
66
66
|
|
67
67
|
])
|
68
|
-
@settings = Erlnixify::Settings.new(@opts.options[:
|
68
|
+
@settings = Erlnixify::Settings.new(@opts.options[:startdaemon])
|
69
69
|
end
|
70
70
|
|
71
71
|
When(/^the check fails$/) do
|
@@ -80,7 +80,7 @@ end
|
|
80
80
|
Given(/^a valid configuration with a long running check comamnd$/) do
|
81
81
|
check_time = 60 * 1000 # 60 seconds in milliseconds
|
82
82
|
hostname = `hostname -f`.strip
|
83
|
-
@opts = Erlnixify::Opts.new(["
|
83
|
+
@opts = Erlnixify::Opts.new(["startdaemon", "--cookie", "fubachu",
|
84
84
|
"--startuptimeout", "10",
|
85
85
|
"--checkinterval", "10",
|
86
86
|
"--name", "foo",
|
@@ -88,7 +88,7 @@ Given(/^a valid configuration with a long running check comamnd$/) do
|
|
88
88
|
"--check", "timer sleep [#{check_time}]",
|
89
89
|
|
90
90
|
])
|
91
|
-
@settings = Erlnixify::Settings.new(@opts.options[:
|
91
|
+
@settings = Erlnixify::Settings.new(@opts.options[:startdaemon])
|
92
92
|
end
|
93
93
|
|
94
94
|
When(/^the check command times out$/) do
|
@@ -8,11 +8,11 @@ end
|
|
8
8
|
|
9
9
|
Given(/^a settings file$/) do
|
10
10
|
file = File.dirname(__FILE__) + '/../test_data/settings_config.yml'
|
11
|
-
@opts = Erlnixify::Opts.new(["
|
11
|
+
@opts = Erlnixify::Opts.new(["startdaemon", "--config", file])
|
12
12
|
end
|
13
13
|
|
14
14
|
When(/^I load that settings file$/) do
|
15
|
-
@settings = Erlnixify::Settings.new(@opts.options[:
|
15
|
+
@settings = Erlnixify::Settings.new(@opts.options[:startdaemon])
|
16
16
|
end
|
17
17
|
|
18
18
|
Then(/^the settings should be available in the settings object$/) do
|
@@ -27,14 +27,14 @@ end
|
|
27
27
|
|
28
28
|
Given(/^an options object that contains config values$/) do
|
29
29
|
file = File.dirname(__FILE__) + '/../test_data/settings_config.yml'
|
30
|
-
@opts = Erlnixify::Opts.new(["
|
30
|
+
@opts = Erlnixify::Opts.new(["startdaemon", "--config", file,
|
31
31
|
"--checkinterval", "100",
|
32
32
|
"--startuptimeout", "500",
|
33
33
|
"--cookie", "fubachu"])
|
34
34
|
end
|
35
35
|
|
36
36
|
When(/^a new settings file is loaded up using that options$/) do
|
37
|
-
@settings = Erlnixify::Settings.new(@opts.options[:
|
37
|
+
@settings = Erlnixify::Settings.new(@opts.options[:startdaemon])
|
38
38
|
end
|
39
39
|
|
40
40
|
Then(/^the command line options override the file options$/) do
|
@@ -52,7 +52,7 @@ Given(/^a lack of a config file and command line options$/) do
|
|
52
52
|
end
|
53
53
|
|
54
54
|
When(/^a settings are loaded$/) do
|
55
|
-
@settings = Erlnixify::Settings.new(@opts.options[:
|
55
|
+
@settings = Erlnixify::Settings.new(@opts.options[:startdaemon])
|
56
56
|
end
|
57
57
|
|
58
58
|
Then(/^that settings object contains sane defaults$/) do
|
data/lib/erlnixify/opts.rb
CHANGED
@@ -16,7 +16,7 @@ module Erlnixify
|
|
16
16
|
|
17
17
|
banner = "Usage: erlnixify [options]"
|
18
18
|
|
19
|
-
command '
|
19
|
+
command 'startdaemon' do
|
20
20
|
on :b, :release=, 'Release Root Directory'
|
21
21
|
on :e, :erlang=, 'Erlang Root Directory'
|
22
22
|
on :o, :home=, "The home directory to explicitly set"
|
@@ -40,7 +40,7 @@ module Erlnixify
|
|
40
40
|
on :v, :version, "Show the Version"
|
41
41
|
|
42
42
|
run do |opts, args|
|
43
|
-
cmd = :
|
43
|
+
cmd = :startdaemon
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
data/lib/erlnixify/version.rb
CHANGED
data/lib/erlnixify.rb
CHANGED
@@ -17,7 +17,7 @@ module Erlnixify
|
|
17
17
|
end
|
18
18
|
|
19
19
|
if ((@opts.command == "start" or
|
20
|
-
@opts.command == "
|
20
|
+
@opts.command == "startdaemon") and not options[:command])
|
21
21
|
puts "missing command option, this is required"
|
22
22
|
puts @opts.opts.help
|
23
23
|
exit 1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: erlnixify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Merritt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|