quora_notify 0.0.13 → 0.0.14

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: 6f39df8825db01dd6f31a430a340cce1e0e60a94
4
- data.tar.gz: 11df380ad2a5b787c591af0b34b2c65dcc0fe1b2
3
+ metadata.gz: 40216942a40702daa59be3cd991f5e54030f4797
4
+ data.tar.gz: b03aa42596928965369d3869565fbcd8507314b4
5
5
  SHA512:
6
- metadata.gz: ccc8f79e99c60769477d0a5acd88970bd7e09471b2d651c5e2bc0744a730d16de4a49cb2e85f20a2bd9da7c6a8348ecd93ad8d811c41f68e24b8c6c5928cb8a5
7
- data.tar.gz: a9920c7076e88681a892d85cff52da8bd5bef0a5a57d35094ada0b927f1035cefe47e9a307737194d70a52801f87c0b9b4c03457ce79c6e42e95ff6c34e260c1
6
+ metadata.gz: ad4ced3897f2c5da17e1a267e29b35d7485385ad542067fd831cda73368e68308e0ae0150b09d6152a58441d9ca182e86e127cc2b3ef1dbff5221ecb3c980640
7
+ data.tar.gz: d5b5272e26941b793abfe14901af9dacdfe93df77a4219152042e43b1b2a3a7a45f80e2f2d9291f9313bdd61b4690f5a163b6d6b2aea262114ba7a2446d8bb22
@@ -59,7 +59,6 @@ module QuoraNotify
59
59
  begin
60
60
  reader.read_cookies
61
61
  rescue QuoraNotify::Exceptions::CookieReaderException => e
62
- puts e
63
62
  []
64
63
  rescue Exception => e
65
64
  puts e
@@ -7,9 +7,11 @@ module QuoraNotify::CookieReaders
7
7
  def read_cookies
8
8
  raise QuoraNotify::Exceptions::CookieReaderException, 'No cookie file found' unless File.exists?(cookie_file_path)
9
9
 
10
+ cookies = []
10
11
  File.open(cookie_file_path, 'rb') do |cookie_file|
11
- process_file cookie_file
12
+ cookies = process_file cookie_file
12
13
  end
14
+ cookies
13
15
  end
14
16
 
15
17
  private
@@ -18,8 +20,8 @@ module QuoraNotify::CookieReaders
18
20
  header = cookie_file.read(4)
19
21
  raise QuoraNotify::Exceptions::CookieReaderException, 'Not recognized as a binarycookie file' unless header == 'cook'
20
22
 
21
- n_pages = cookie_file.read(4).unpack('l>')[0]
22
- sizes = (0..n_pages - 1).collect { |page| cookie_file.read(4).unpack('l>')[0] }
23
+ n_pages = cookie_file.read(4).unpack('N')[0]
24
+ sizes = (0..n_pages - 1).collect { |page| cookie_file.read(4).unpack('N')[0] }
23
25
  pages = sizes.collect { |size| cookie_file.read(size) }
24
26
 
25
27
  cookie_groups = pages.collect do |page|
@@ -1,3 +1,3 @@
1
1
  module QuoraNotify
2
- VERSION = '0.0.13'
2
+ VERSION = '0.0.14'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quora_notify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joey Carmello
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-02 00:00:00.000000000 Z
11
+ date: 2013-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: terminal-notifier