miga-base 1.3.6.0 → 1.3.6.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/cli/action/db.rb +11 -9
- data/lib/miga/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31fc3458b62146b7023d8e7693bc47cf27befb6fbaf55c67db9132769ee26e14
|
4
|
+
data.tar.gz: 48fbd1a5fefd22d02be11dbb49f2ecb88d0f482f9049f190960314e538ee731c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad214259efa48d434c5a6cbbf1cf2031f33172672a5803b734adaed5d5575503c3dcb3277e324e540b6ad3a36127218785cd540079d0b3c6d5fb87bd9206bd35
|
7
|
+
data.tar.gz: 96b955f290c7cebebb2d9ec0379b4111c274eeb4d9233b1af997718a1c3e482d30c86d98f2bc62ae25aae2b961087fdc74359fc879a61bd59b7fecbbcb0110fa
|
data/lib/miga/cli/action/db.rb
CHANGED
@@ -149,9 +149,12 @@ class MiGA::Cli::Action::Db < MiGA::Cli::Action
|
|
149
149
|
MiGA::Json.parse(file)
|
150
150
|
end
|
151
151
|
|
152
|
+
def local_manifest_file
|
153
|
+
File.join(cli[:local], '_local_manif.json')
|
154
|
+
end
|
155
|
+
|
152
156
|
def local_manifest
|
153
|
-
|
154
|
-
MiGA::Json.parse(file) if File.exist?(file)
|
157
|
+
MiGA::Json.parse(local_manifest_file) if File.exist?(local_manifest_file)
|
155
158
|
end
|
156
159
|
|
157
160
|
def db_requested(manif)
|
@@ -169,11 +172,10 @@ class MiGA::Cli::Action::Db < MiGA::Cli::Action
|
|
169
172
|
end
|
170
173
|
|
171
174
|
def version_requested(db)
|
172
|
-
if cli[:version] == :latest
|
173
|
-
cli[:version] = db[:latest].to_sym
|
174
|
-
end
|
175
|
+
cli[:version] = db[:latest].to_sym if cli[:version] == :latest
|
175
176
|
ver = db[:versions][cli[:version]]
|
176
177
|
raise 'Cannot find database version' if ver.nil?
|
178
|
+
ver[:version] = cli[:version]
|
177
179
|
|
178
180
|
cli.puts "# Database size: #{version_size(ver)}"
|
179
181
|
ver
|
@@ -249,14 +251,14 @@ class MiGA::Cli::Action::Db < MiGA::Cli::Action
|
|
249
251
|
|
250
252
|
def register_database(manif, db, ver)
|
251
253
|
cli.say "Registering database locally"
|
252
|
-
|
253
|
-
reg[:last_update] = Time.now.to_s
|
254
|
+
reg = (local_manifest || {}).merge(last_update: Time.now.to_s)
|
254
255
|
reg[:databases] ||= {}
|
255
256
|
reg[:databases][cli[:database]] ||= {}
|
256
257
|
reg[:databases][cli[:database]][:manif_last_update] = manif[:last_update]
|
257
258
|
reg[:databases][cli[:database]][:manif_host] = manif[:host]
|
258
|
-
|
259
|
+
reg[:databases][cli[:database]].merge! db
|
260
|
+
reg[:databases][cli[:database]].delete(:versions)
|
259
261
|
reg[:databases][cli[:database]][:local_version] = ver
|
260
|
-
MiGA::Json.generate(reg,
|
262
|
+
MiGA::Json.generate(reg, local_manifest_file)
|
261
263
|
end
|
262
264
|
end
|
data/lib/miga/version.rb
CHANGED
@@ -12,7 +12,7 @@ module MiGA
|
|
12
12
|
# - String indicating release status:
|
13
13
|
# - rc* release candidate, not released as gem
|
14
14
|
# - [0-9]+ stable release, released as gem
|
15
|
-
VERSION = [1.3, 6,
|
15
|
+
VERSION = [1.3, 6, 2].freeze
|
16
16
|
|
17
17
|
##
|
18
18
|
# Nickname for the current major.minor version.
|
@@ -20,7 +20,7 @@ module MiGA
|
|
20
20
|
|
21
21
|
##
|
22
22
|
# Date of the current gem relese.
|
23
|
-
VERSION_DATE = Date.new(2023,
|
23
|
+
VERSION_DATE = Date.new(2023, 5, 18)
|
24
24
|
|
25
25
|
##
|
26
26
|
# References of MiGA
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miga-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.6.
|
4
|
+
version: 1.3.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luis M. Rodriguez-R
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|