miga-base 1.3.9.4 → 1.3.9.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 436166fe9bbc76b69f014879610440e9646261f1a06dbc134418b79fa3da9b08
4
- data.tar.gz: fb835c9bfa4829a3ac1c5ae8bdc1c5998cd8b9c4a55d3988538b9c24b2f4329f
3
+ metadata.gz: d4b28c04587658e8efa8fcbd012d003b24d1526c1563d82d33a4ae68f561926c
4
+ data.tar.gz: d835e3bf5474c897c000d7b2f096dda0946a0ee759fa9d43b017b5f4ffdf324f
5
5
  SHA512:
6
- metadata.gz: 77e76a0dea664321aad58b4eee310d91cd9fa34c6ae0339451c83d2d169cbf9c160ed6c469401d0155280a28612ae8cde47a0c00be739371986f64621e44ef68
7
- data.tar.gz: cdece24eb38d804b729c3c7f9018f7f3e835db258a59abe1ce560baf8bce29223a957f8498b96d6a647994361903d2d8179f2c6e6890451923dd44c5ae6cbcd8
6
+ metadata.gz: 6121ff05020da43565f597167e0a36a948bc5d4d8507ab38128e2bfdfd72000d0bddff02e20ad3bf3ef62fd0d5dd48cc7db68c2a77c662ba24baa7185fd3763d
7
+ data.tar.gz: f19fb727f8adb2620fa92c742421466cd1668991d5ce6bf80571f5a633b7f0b0767d83159871151681d0cd7469e296b6698c2efea32d65e63f570e55d5df5881
@@ -79,7 +79,7 @@ module MiGA::Cli::Action::Download::Ncbi
79
79
 
80
80
  if cli[:ncbi_list_json]
81
81
  cli.say "Saving remote list: #{cli[:ncbi_list_json]}"
82
- MiGA::Json.generate_plain(list, cli[:ncbi_list_json])
82
+ MiGA::Json.generate_fast(list, cli[:ncbi_list_json])
83
83
  end
84
84
 
85
85
  list
data/lib/miga/json.rb CHANGED
@@ -75,6 +75,13 @@ class MiGA::Json < MiGA::MiGA
75
75
  generate_generic(:generate, obj, path)
76
76
  end
77
77
 
78
+ ##
79
+ # Generates and returns plain JSON to represent +obj+ without checking for
80
+ # circular references. If +path+ is passed, it saves the JSON in that file.
81
+ def generate_fast(obj, path = nil)
82
+ generate_generic(:fast_generate, obj, path)
83
+ end
84
+
78
85
  private
79
86
 
80
87
  def generate_generic(method, obj, path)
@@ -26,7 +26,7 @@ module MiGA::Project::Dataset
26
26
  ##
27
27
  # Returns MiGA::Dataset
28
28
  def dataset(name)
29
- name = name.miga_name
29
+ name = name.to_s.miga_name
30
30
  return nil unless MiGA::Dataset.exist?(self, name)
31
31
 
32
32
  @datasets ||= {}
@@ -65,7 +65,7 @@ class MiGA::RemoteDataset
65
65
  :ncbi_datasets_download, :genome, opts[:ids],
66
66
  :zip, nil, opts[:extra], opts[:obj]
67
67
  )
68
- zip_tmp = Tempfile.new('asm.zip')
68
+ zip_tmp = Tempfile.new(['asm', '.zip'], encoding: zipped.encoding.to_s)
69
69
  zip_tmp.print(zipped)
70
70
  zip_tmp.close
71
71
 
@@ -76,7 +76,7 @@ class MiGA::RemoteDataset
76
76
  if entry.file? && entry.name =~ /_genomic\.fna$/
77
77
  DEBUG "Extracting: #{entry.name}"
78
78
  entry.get_input_stream do |ifh|
79
- cont = MiGA::MiGA.normalize_encoding(ifh.read) + "\n"
79
+ cont = MiGA::MiGA.normalize_encoding(ifh.read).chomp + "\n"
80
80
  ofh&.print(cont)
81
81
  o += cont
82
82
  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, 9, 4].freeze
15
+ VERSION = [1.3, 9, 6].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(2024, 1, 23)
23
+ VERSION_DATE = Date.new(2024, 1, 24)
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.9.4
4
+ version: 1.3.9.6
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: 2024-01-23 00:00:00.000000000 Z
11
+ date: 2024-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons