peerflixrb 6.0.3 → 6.0.4

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: 0f7bcb073f24458549284c9e8cb92d6c337da868fd0c13e3734ef552957bc949
4
- data.tar.gz: 56158f226f507e1f3e54a527aecc6ae7e92234c15806b3f4af2e8ef7c92f38ea
3
+ metadata.gz: 826b84bfdb258e73d333e2e00c8a9e4392246ce7214a58b64f8627e3429f3053
4
+ data.tar.gz: 447a1ef9ab849b363cf96b9867f350ee99d16fbc60c49126a9105984f513c5c3
5
5
  SHA512:
6
- metadata.gz: 5a97d4de8f821411d02b7090db220edd32176cf9fc03e1c31600abbaef36b4edec93cb7c5ca9f4817c089a4ae99263c1dbfa6c7d0fadb0fb59fdec3f32d5d92c
7
- data.tar.gz: a5390a8e4d19d790825500ef60de7b6e631c5916afe87006bb09ebc17794ac9d22956f0e4457f77aec6708a2a527ff04799603f1a075cc63278c2d440b503924
6
+ metadata.gz: bd9e5f017ba2b09e401b66fcb25de9594c7f3c4901957015b20b593b6fe9e6c4cfd4c06123f91386452ca33568f8cce2fd783e3ae1a6f106a24ef8bd43c506c6
7
+ data.tar.gz: 2735d012e1d463e238b735795b594c25cc09f6e13f11c3cb2e1f8980a5522efd0eef7bcd8e916f2eedc9924ba3e06a02601a5091a2e5443016c8507000a74585
@@ -10,20 +10,29 @@ module Peerflixrb
10
10
  end
11
11
 
12
12
  def check_requirements
13
- unless system('node --version > /dev/null 2>&1')
13
+ unless node_installed?
14
14
  say 'Nodejs is required to make it work.'.red
15
15
  exit
16
16
  end
17
17
 
18
- unless system('webtorrent --version > /dev/null 2>&1')
18
+ unless webtorrent_installed?
19
19
  say 'webtorrent is required. Type "npm install -g webtorrent-cli" in your shell to install it.'.red
20
20
  exit
21
21
  end
22
22
  end
23
23
 
24
24
  def webtorrent
25
+ return 'webtorrent' if webtorrent_installed?
25
26
  return "#{BINARY_PATH}/webtorrent-cli-#{os}" if os
26
- return 'webtorrent' if check_requirements
27
+ check_requirements
28
+ end
29
+
30
+ def node_installed?
31
+ system('node --version > /dev/null 2>&1')
32
+ end
33
+
34
+ def webtorrent_installed?
35
+ system('webtorrent --version > /dev/null 2>&1')
27
36
  end
28
37
 
29
38
  def choose_video_and_subtitles(search_result, options)
@@ -1,3 +1,3 @@
1
1
  module Peerflixrb
2
- VERSION = '6.0.3'.freeze
2
+ VERSION = '6.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peerflixrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.3
4
+ version: 6.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Marchante
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-16 00:00:00.000000000 Z
11
+ date: 2018-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addic7ed_downloader