rmega 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/rmega/nodes/factory.rb +4 -1
- data/lib/rmega/nodes/file.rb +4 -1
- data/lib/rmega/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0861e3b68280695813f70b8ee46e63e7dc66084c
|
4
|
+
data.tar.gz: c3cc58126f747db8807c3e0cdd811b961c006a64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9df582d7a167366705ca029154fea91c8333e33f0a200ac8b87cf2af1233f30c98decf18fe3064b2859d063427ae81453d28c78750084f08aaa834c35ef87508
|
7
|
+
data.tar.gz: a70d8d931a432b73f3f6d2b40939d0bdda2ed34e644a083f44f83360eeb8d27b5c1a47bcf42240e15d85d24c061b5c21de1f6df9a3b0a66f3904bd1620e2de0f
|
data/CHANGELOG.md
CHANGED
data/lib/rmega/nodes/factory.rb
CHANGED
@@ -37,7 +37,10 @@ module Rmega
|
|
37
37
|
node = if url =~ FOLDER_URL_REGEXP
|
38
38
|
nodes_data = session.request({a: 'f', c: 1, r: 1}, {n: public_handle})
|
39
39
|
session.master_key = Utils.base64urldecode(key)
|
40
|
-
session.storage.nodes = nodes_data['f'].map
|
40
|
+
session.storage.nodes = nodes_data['f'].map do |data|
|
41
|
+
data["__n"] = public_handle
|
42
|
+
Nodes::Factory.build(session, data)
|
43
|
+
end
|
41
44
|
session.storage.nodes[0]
|
42
45
|
else
|
43
46
|
data = session.request(a: 'g', g: 1, p: public_handle)
|
data/lib/rmega/nodes/file.rb
CHANGED
@@ -5,7 +5,10 @@ module Rmega
|
|
5
5
|
include Downloadable
|
6
6
|
|
7
7
|
def storage_url
|
8
|
-
@storage_url ||=
|
8
|
+
@storage_url ||= begin
|
9
|
+
query_params = data["__n"] ? {n: data["__n"]} : {}
|
10
|
+
data['g'] || request({a: 'g', g: 1, n: handle}, query_params)['g']
|
11
|
+
end
|
9
12
|
end
|
10
13
|
|
11
14
|
def size
|
data/lib/rmega/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rmega
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- topac
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|