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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 137fdede22cdd2e053dea69f98b227700a8b606f
4
- data.tar.gz: 49ed20b4c7b0aa5419861c59f842f5a35a2a883d
3
+ metadata.gz: 0861e3b68280695813f70b8ee46e63e7dc66084c
4
+ data.tar.gz: c3cc58126f747db8807c3e0cdd811b961c006a64
5
5
  SHA512:
6
- metadata.gz: 0de9a225767de5aeacb5a82629a10df8e8017bd2f49c2514904a9bb59b451d300c554ae990512644b064aa16e24a085989a16aa16a400094b1d8ef3a3c3ff652
7
- data.tar.gz: 75d935e07f6957227d87800831efa7e07a5966cb134324798e6f5b37b4780e726f97e094d984ab5f137e002a19475fd167bb8142c5af0b4556ee6152907f7531
6
+ metadata.gz: 9df582d7a167366705ca029154fea91c8333e33f0a200ac8b87cf2af1233f30c98decf18fe3064b2859d063427ae81453d28c78750084f08aaa834c35ef87508
7
+ data.tar.gz: a70d8d931a432b73f3f6d2b40939d0bdda2ed34e644a083f44f83360eeb8d27b5c1a47bcf42240e15d85d24c061b5c21de1f6df9a3b0a66f3904bd1620e2de0f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.2.2
2
+
3
+ ### Changes
4
+ * \#17 Fixed download of shared folders
5
+
1
6
  ## 0.2.1
2
7
 
3
8
  ### New Features
@@ -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 { |data| Nodes::Factory.build(session, data) }
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)
@@ -5,7 +5,10 @@ module Rmega
5
5
  include Downloadable
6
6
 
7
7
  def storage_url
8
- @storage_url ||= data['g'] || request(a: 'g', g: 1, n: handle)['g']
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
@@ -1,4 +1,4 @@
1
1
  module Rmega
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  HOMEPAGE = "https://github.com/topac/rmega"
4
4
  end
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.1
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: 2015-09-20 00:00:00.000000000 Z
11
+ date: 2016-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry