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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40216942a40702daa59be3cd991f5e54030f4797
|
4
|
+
data.tar.gz: b03aa42596928965369d3869565fbcd8507314b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad4ced3897f2c5da17e1a267e29b35d7485385ad542067fd831cda73368e68308e0ae0150b09d6152a58441d9ca182e86e127cc2b3ef1dbff5221ecb3c980640
|
7
|
+
data.tar.gz: d5b5272e26941b793abfe14901af9dacdfe93df77a4219152042e43b1b2a3a7a45f80e2f2d9291f9313bdd61b4690f5a163b6d6b2aea262114ba7a2446d8bb22
|
data/lib/quora_notify/base.rb
CHANGED
@@ -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('
|
22
|
-
sizes = (0..n_pages - 1).collect { |page| cookie_file.read(4).unpack('
|
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|
|
data/lib/quora_notify/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2013-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: terminal-notifier
|