unipept 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/unipept/api_runner.rb +8 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e2b134dc5a0b633c5d3aba0b1e21e290dc821c3
4
- data.tar.gz: 63972b5c62b6272f9fe27ef0145739e0a152d535
3
+ metadata.gz: f2c0a7c05cff467fda34a5a011e8c2a301cfe252
4
+ data.tar.gz: f0a58a71cb1c07773992fdf562bcc29dec6d2b47
5
5
  SHA512:
6
- metadata.gz: 5e66de364e9a572a17e9ae32c1cc3a3c18aa002f22d9a22525f6c610619e814cf277cc7c9a25c599ae401cf586e0b996aec9ed52e435648bd807eee073b91a2c
7
- data.tar.gz: 135dce274a849f9dff3ffd94cf7a04d25a7f32c0066ec80a7e1c38e1486bd2041b40d9de1a7e811a868e97e07444bc1c21a4dcd35c52c7267246b536fe92bfb3
6
+ metadata.gz: c3167ebb88be529deae748259d400b76b20a2ff7425095c5fbf47724da08fc7492193e5fe3c5779dfe1f82f9dfff0460e946e84b9978e07d31a51a966ebf47ab
7
+ data.tar.gz: a95d748dfaa3cceec4a8456e1e7ba99d972b810f73b6ec5d6703bf7e5d264e7eb3cf9998a0f238c22f18b238d832b940cc2c2a251c1c24c75abfa622596f8062
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
@@ -182,7 +182,7 @@ module Unipept
182
182
  end
183
183
 
184
184
  def peptide_iterator(peptides, &block)
185
- first = peptides.first
185
+ first = peptides.next
186
186
  if first.start_with? '>'
187
187
  # FASTA MODE ENGAGED
188
188
  fasta_header = first
@@ -201,9 +201,14 @@ module Unipept
201
201
  sub -= fasta_mapper.values.uniq
202
202
  block.call(sub, i, fasta_mapper)
203
203
  end
204
-
205
204
  else
206
- peptides.each_slice(batch_size).with_index(&block)
205
+ # shame we have to be this explicit, but it appears to be the only way
206
+ Enumerator.new do |y|
207
+ y << first
208
+ loop do
209
+ y << peptides.next
210
+ end
211
+ end.each_slice(batch_size).with_index(&block)
207
212
  end
208
213
  end
209
214
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unipept
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toon Willems