boxnet 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Boxnet
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/boxnet.rb CHANGED
@@ -25,12 +25,13 @@ class Boxnet
25
25
  def self.get_account_tree(auth_token, folder_id, options={})
26
26
  params = []
27
27
  params << "onelevel" if options[:onelevel]
28
+ params << "nozip" if options[:nozip]
28
29
 
29
30
  if params.empty?
30
31
  get(@@URL + "?api_key=#{@@API_KEY}&action=get_account_tree&auth_token=#{auth_token}&folder_id=#{folder_id}")
31
32
  else
32
33
  params_string = params.join(",")
33
- get(@@URL + "?api_key=#{@@API_KEY}&action=get_account_tree&auth_token=#{auth_token}&folder_id=#{folder_id}&params=#{params_string}")
34
+ get(@@URL + "?api_key=#{@@API_KEY}&action=get_account_tree&auth_token=#{auth_token}&folder_id=#{folder_id}&params[]=#{params_string}")
34
35
  end
35
36
  end
36
37
 
data/spec/boxnet_spec.rb CHANGED
@@ -68,7 +68,18 @@ describe Boxnet do
68
68
  it { @result.should_not be_nil }
69
69
  it { @result["response"]["status"].should == "listing_ok" }
70
70
  it { @result["response"]["tree"].should_not be_nil }
71
- end
71
+ end
72
+
73
+ context "get no zip from root" do
74
+ before(:each) do
75
+ ticket = ENV["BOXNET_TICKET"]
76
+ auth_token = ENV["BOXNET_AUTHTOKEN"]
77
+ @result = Boxnet.get_account_tree(auth_token, "0", :nozip => true)
78
+ end
79
+ it { @result.should_not be_nil }
80
+ it { @result["response"]["status"].should == "listing_ok" }
81
+ it { @result["response"]["tree"].should_not be_nil }
82
+ end
72
83
  end
73
84
 
74
85
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: boxnet
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jonathan Birkholz