peerflixrb 0.3.0 → 0.3.1

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
  SHA1:
3
- metadata.gz: d2f2c082e18ca5a4abf745c880c5964fd09ea43f
4
- data.tar.gz: c2fa0139362b9508400e5f4acab705a029405cff
3
+ metadata.gz: 0c99cd60f17ec04636fc7ec99205b76ce455080a
4
+ data.tar.gz: cae2db68501ad2fad0572793844e500260beedaa
5
5
  SHA512:
6
- metadata.gz: 4a58425f9b6636a2e8750e29ee7ffa3f682419c1bb3f637afdf8abcae48769003ae9c40d14507da64e183f0f58c138acf2c9702cface71e449248399b226601d
7
- data.tar.gz: 631fc9a08fd38a581203aa018eac2fce18638fc4125a8bf231673a30bfc55c75a875598f697bd6c5cee6e663906340edbe69fe821352df5a9bd673a0442c6c4e
6
+ metadata.gz: 7a2c785d040f30b7a82d7ed3b3cbfa8c3cb19bf991628587a09c88cbaf033d3559be61261ba03e9a9ebce243dcfba1095b39ed8e5ae5ee904bd6b3449062f463
7
+ data.tar.gz: e454f2d3bc7430c81ba164c2a0c5baf44d8cbefc4f8ca11250704ba90903190b115c6a783b674faba91e02cb71b8f0fce5e03b3cb19a8a9fe8432083db25d63d
data/bin/peerflixrb CHANGED
@@ -54,6 +54,8 @@ end
54
54
 
55
55
  # main
56
56
  # TODO: handle failing and invalid searches
57
+ require 'pry'
58
+ binding.pry
57
59
  kat = Peerflixrb::KAT.new(options[:search])
58
60
  cache_dir = "/tmp/torrent-stream/#{kat.info_hash}"
59
61
 
@@ -70,9 +72,15 @@ command << " --subtitles '#{sub_file}'" if sub_file
70
72
  command << " --#{options[:video_player]}" if options[:video_player]
71
73
  command << ' -- --fullscreen'
72
74
 
73
- system command
74
-
75
- # Cleaning up
76
- video_file = Dir["#{cache_dir}/**/*.{mkv,mp4,avi,wmv,mpg,flv,mov}"].first
77
- FileUtils.cp(sub_file, File.dirname(video_file)) if sub_file
78
- puts "Your downloads will be in #{cache_dir} for 3 days :)"
75
+ begin
76
+ # Execute peerflix
77
+ system command
78
+ rescue Interrupt
79
+ puts
80
+ puts 'Interrupted!'
81
+ ensure
82
+ # Cleaning up
83
+ video_file = Dir["#{cache_dir}/**/*.{mkv,mp4,avi,wmv,mpg,flv,mov}"].first
84
+ FileUtils.mv(sub_file, File.dirname(video_file)) if sub_file
85
+ puts "Your downloads will be in #{cache_dir} for 3 days :)"
86
+ end
@@ -1,3 +1,3 @@
1
1
  module Peerflixrb
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.3.1'.freeze
3
3
  end
data/peerflixrb.gemspec CHANGED
@@ -29,4 +29,5 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'factory_girl', '~> 4.5'
30
30
  spec.add_development_dependency 'webmock', '~> 1.24'
31
31
  spec.add_development_dependency 'pry', '~> 0.10'
32
+ spec.add_development_dependency 'pry-byebug', '~> 3.3'
32
33
  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: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Marchante
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-11 00:00:00.000000000 Z
11
+ date: 2016-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0.10'
139
+ - !ruby/object:Gem::Dependency
140
+ name: pry-byebug
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '3.3'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '3.3'
139
153
  description:
140
154
  email:
141
155
  - davidmarchan@gmail.com