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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9035e8f6ccd641c75bedc38b5f78d3eb1815c51956d399728b1e862c2920cbb
4
- data.tar.gz: 2ffdecb639083a3a40d2bab3a39f1df92cb22279314ede2a5a843b278c8be9ee
3
+ metadata.gz: 31fc3458b62146b7023d8e7693bc47cf27befb6fbaf55c67db9132769ee26e14
4
+ data.tar.gz: 48fbd1a5fefd22d02be11dbb49f2ecb88d0f482f9049f190960314e538ee731c
5
5
  SHA512:
6
- metadata.gz: 42db29082a3b8097f8ec6f55839202d79e8d00496d55bab8093e4355a26f9133249506266e7f0eb64acea18fb91885abc493a0fe92c81c0eef27ec11f08d3eff
7
- data.tar.gz: 5b4ce9ae27ac4542e2af836176dde909f013461b9916f1d1f4cfc0831d6e494d5de76c57d9c7b64ebd87aefd21a2c79edf55a0192838b6e589be21e9e5a4ebb1
6
+ metadata.gz: ad214259efa48d434c5a6cbbf1cf2031f33172672a5803b734adaed5d5575503c3dcb3277e324e540b6ad3a36127218785cd540079d0b3c6d5fb87bd9206bd35
7
+ data.tar.gz: 96b955f290c7cebebb2d9ec0379b4111c274eeb4d9233b1af997718a1c3e482d30c86d98f2bc62ae25aae2b961087fdc74359fc879a61bd59b7fecbbcb0110fa
@@ -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
- file = File.join(cli[:local], '_local_manif.json')
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
- local_manif = local_manifest || {}
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
- db.each { |k, v| reg[:databases][cli[:database]][k] = v }
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, local_manif)
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, 0].freeze
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, 4, 25)
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.0
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-04-25 00:00:00.000000000 Z
11
+ date: 2023-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons