ruaur 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ruaur/aur.rb +5 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a217ea790cb5ea2d30d52b5d8abc618e8a9f3c1d
4
- data.tar.gz: c9c8e17c01bb44ccff2a3abb69c44c98416dc5f1
3
+ metadata.gz: ee660ebb69292cbb7d613cb076faa93bdcc1a502
4
+ data.tar.gz: 159581b34b351e9a9030cf235f5e684aa950dc65
5
5
  SHA512:
6
- metadata.gz: 30d807390fde76fe21d1f146cb487a3dc26bab10497f72c2e77bfdb410c1d483b3ec668410d486aed82af428d4c0952297e98beeb4f2437ed8a0b4fe625f0617
7
- data.tar.gz: 4e060c8e64cf1b4b8b3d5bd83de1b967d8421b1e8a6f988ed92e2dda4cafee08fb25659df6016279f9a2bf87d91395d0c963b3227faf4f34ce8bd8264f7b2890
6
+ metadata.gz: 29959cf32e4f6a75642b0dbb8b0fc23ca2cb4207925f1eaddcc0e43fd85268489ca7b6199fad0982bdd8c0f9fa7864a914330c23637c5f6915df67d6d5354a6c
7
+ data.tar.gz: 60e1fc3e13337b25d1551e5940e1eef2c202502c051656fef77d43367c5bc6a58773833e8176c6217c7a3220358c8130b3195950f9ad285c54bb35551acd0a06
data/lib/ruaur/aur.rb CHANGED
@@ -185,6 +185,7 @@ class RuAUR::AUR
185
185
  )
186
186
  end
187
187
 
188
+ return nil if (response.body.empty?)
188
189
  body = JSON.parse(response.body)
189
190
 
190
191
  if (body["type"] == "error")
@@ -250,9 +251,9 @@ class RuAUR::AUR
250
251
  private :install_dependencies
251
252
 
252
253
  def multiinfo(pkgs)
253
- return Array.new if (pkgs.nil? || pkgs.empty?)
254
-
255
254
  results = Array.new
255
+ return results if (pkgs.nil? || pkgs.empty?)
256
+
256
257
  query = "type=multiinfo&arg[]=#{pkgs.join("&arg[]=")}"
257
258
  response = Typhoeus.get("#{@rpc_url}?#{query}", timeout: 5)
258
259
 
@@ -262,6 +263,7 @@ class RuAUR::AUR
262
263
  )
263
264
  end
264
265
 
266
+ return results if (response.body.empty?)
265
267
  body = JSON.parse(response.body)
266
268
 
267
269
  if (body["type"] == "error")
@@ -330,6 +332,7 @@ class RuAUR::AUR
330
332
  )
331
333
  end
332
334
 
335
+ return results if (response.body.empty?)
333
336
  body = JSON.parse(response.body)
334
337
 
335
338
  if (body["type"] == "error")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruaur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-24 00:00:00.000000000 Z
11
+ date: 2017-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake