miga-base 0.6.4.1 → 0.6.4.2
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 +4 -4
- data/lib/miga/lair.rb +12 -12
- data/lib/miga/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b861cfbdaa0d9cd28403345bd4dc61c4814a07c09a59709f09415dd05007a60
|
4
|
+
data.tar.gz: 4738c33442f61be5a6fe0c6cf36c05cabb4fcd5b08f481099651bdacbc2d97fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad69cb41e41f11d5aa0ad38af53a007eac213ab5901df9432d140d510fda2d8b8a7e6f4fda5302709e47c0150030cfdf601c54d9ce308d99aa82deeeb05ed0e8
|
7
|
+
data.tar.gz: aba5401cef4cafba7afdf48765ab3690313d768140229fcb297b1d02eba441816fc0f8f69ecfa7e477de6ac0d5387c324e900fb6b20151bd736bfe7814737155
|
data/lib/miga/lair.rb
CHANGED
@@ -94,12 +94,14 @@ class MiGA::Lair < MiGA::MiGA
|
|
94
94
|
# Searches for MiGA projects recursively in all
|
95
95
|
# subdirectories that are not MiGA projects.
|
96
96
|
def each_project(dir = path)
|
97
|
-
Dir.
|
97
|
+
Dir.children(dir).each do |f|
|
98
98
|
f = File.join(dir, f)
|
99
|
-
if MiGA::Project.
|
100
|
-
|
99
|
+
if MiGA::Project.exist? f
|
100
|
+
project = MiGA::Project.load(f)
|
101
|
+
raise "Cannot load project: #{f}" if project.nil?
|
102
|
+
yield(project)
|
101
103
|
elsif Dir.exists? f
|
102
|
-
each_project(f) { |
|
104
|
+
each_project(f) { |project| yield(project) }
|
103
105
|
end
|
104
106
|
end
|
105
107
|
end
|
@@ -107,21 +109,19 @@ class MiGA::Lair < MiGA::MiGA
|
|
107
109
|
##
|
108
110
|
# Traverse directories checking MiGA projects
|
109
111
|
def check_directories
|
110
|
-
each_project do |
|
111
|
-
alive = MiGA::Daemon.last_alive(
|
112
|
+
each_project do |project|
|
113
|
+
alive = MiGA::Daemon.last_alive(project)
|
112
114
|
next if !alive.nil? && alive > Time.now - options[:wait_for]
|
113
|
-
launch_daemon(
|
115
|
+
launch_daemon(project)
|
114
116
|
end
|
115
117
|
end
|
116
118
|
|
117
119
|
##
|
118
|
-
# Launch daemon for the
|
119
|
-
def launch_daemon(
|
120
|
-
|
121
|
-
raise "Cannot load project: #{dir}" if project.nil?
|
120
|
+
# Launch daemon for the MiGA::Project +project+
|
121
|
+
def launch_daemon(project)
|
122
|
+
say "Launching daemon: #{project.path}"
|
122
123
|
d = MiGA::Daemon.new(project, options[:json])
|
123
124
|
d.runopts(:shutdown_when_done, true) unless options[:keep_inactive]
|
124
|
-
say "Launching daemon: #{dir}"
|
125
125
|
d.daemon(:start, [], false)
|
126
126
|
end
|
127
127
|
|
data/lib/miga/version.rb
CHANGED
@@ -10,7 +10,7 @@ module MiGA
|
|
10
10
|
# - Float representing the major.minor version.
|
11
11
|
# - Integer representing gem releases of the current version.
|
12
12
|
# - Integer representing minor changes that require new version number.
|
13
|
-
VERSION = [0.6, 4,
|
13
|
+
VERSION = [0.6, 4, 2]
|
14
14
|
|
15
15
|
##
|
16
16
|
# Nickname for the current major.minor version.
|