eclipsed 0.6.0 → 0.6.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f63c6d0d63cac35782b5b066e4696140d5ac40c1
4
- data.tar.gz: 9d7e36652abcd13f48684390b6d4da9df9758fbe
3
+ metadata.gz: 5de76ce7d0350c518da9ad156ff9fc645b76229d
4
+ data.tar.gz: 321fa325a8bca970b543c65afc8fdbccb674a796
5
5
  SHA512:
6
- metadata.gz: 7a181516271b9df82c0b11746f747b0ff148a5cf1b56c1b3ca1413b667510c1731fee9c91b0e4a887ba8037f02cbc31e0c00cc7a60fa93a17eb200a45b31d383
7
- data.tar.gz: 92a4e6bf01d3ed426b753944542dcf2c8aef5a7d79286338edb06a7e59a9814369ea0622bf61acb74d6f96cb37f295a2a0892c666cdb0a112837d3cfcc58448d
6
+ metadata.gz: 6dffaac7ab67b176b764b25c787425760dcf2d9055684ef1e10a0ba0999f8ffeee005ecde5f5551df7b445610d10c4492283494c1a9669c776686c69fe870722
7
+ data.tar.gz: ad0a62d1fb99d5063ac95898b76177a6f9d919c388ad10e939dd83fabb8087a9dd9c182d9b5595aa3845bc05fc3996053115e051079f9dc4aa8e615f7ccaf4d1
@@ -1,3 +1,3 @@
1
1
  module Eclipsed
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
data/lib/eclipsed.rb CHANGED
@@ -23,26 +23,27 @@ module Eclipsed
23
23
 
24
24
  class Core
25
25
  include Eclipsed
26
- # Initialize {{{
27
- def initialize
28
- @nodelist = File.open(find_confpath) { |f| JSON.parse(f.read) }['network']['nodes']
29
- @app_dir = File.open(find_confpath) { |f| JSON.parse(f.read) }['path']['applications']
26
+ # Configure {{{
27
+ def configure
28
+ json_conf = File.open(find_confpath) { |f| JSON.parse(f.read) }
29
+ @nodelist = json_conf['network']['nodes']
30
+ @app_dir = json_conf['path']['applications']
30
31
  @verbose = false
31
32
  end
32
33
 
33
34
  # }}}
34
- # find_confpath {{{
35
- def find_confpath
36
- home = "#{ENV['HOME']}/.eclipse.json"
37
- etc = "/etc/.eclipse.json"
38
-
39
- if File.exists? home
40
- return home
41
- elsif File.exists? etc
42
- return etc
43
- end
44
- end
45
- # }}}
35
+ # find_confpath {{{
36
+ def find_confpath
37
+ home = "#{ENV['HOME']}/.eclipse.json"
38
+ etc = "/etc/.eclipse.json"
39
+
40
+ if File.exists? home
41
+ return home
42
+ elsif File.exists? etc
43
+ return etc
44
+ end
45
+ end
46
+ # }}}
46
47
  # launch {{{
47
48
  def launch
48
49
  thr = print_async "Initializing framework..."
@@ -169,8 +170,11 @@ module Eclipsed
169
170
  end
170
171
 
171
172
  class CLI_driver < Core
172
- def initialize input: #{{{
173
- super()
173
+ def initialize input: #{{{
174
+ super
175
+
176
+ configure
177
+
174
178
  OptionParser.new do |opts|
175
179
  opts.banner = "eclipsed (Eclipse Daemon controler) is an script to manage the EclipseDFS\n" +
176
180
  "Usage: eclipsed [options] <actions> [FILE]..."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eclipsed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vicente Adolfo Bolea Sanchez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-04 00:00:00.000000000 Z
11
+ date: 2016-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler