ruby-box 1.9.3 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/VERSION +1 -1
- data/lib/ruby-box.rb +1 -0
- data/lib/ruby-box/item.rb +9 -0
- data/lib/ruby-box/shared_link.rb +10 -0
- data/ruby-box.gemspec +3 -2
- data/spec/integration_spec.rb +2 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjMyZTQ5ZjBiOTU5NWI0YWM0YTY3MjY2MGQ1NjIyOTIxNmExZWFmZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTI5MzI1N2IwM2NjOTUxZjEwYmI5NGM2NWEzOTc5YTY3MTRhNjI2ZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTI2OTUwMTQ1YWM5MGMzNTZjMjlhYzhiYjE1MWJjOTI1MWQ2NTg5Yzg2NzQ0
|
10
|
+
NzE0MGQwN2EwMDIyNDI2OTA4ZTQ4MWU1NGFiNzM5OWFjYWZjMjkzZjFkM2Zk
|
11
|
+
NmNkNzY3MGRmZWYzOTUzYzI3MTMzODcwYTA2ZWJkYjg3M2E5MGY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjUxNzdjNDk5NTZiMGYyZTRkNGVhY2E5ZTRmNTI1ZThlOWFhYmFiNDFiNzU3
|
14
|
+
Y2RjMGM5ZDlkNTQyOTQxM2NiODA0Y2U0MzNkOGU2ODkwNzQ0ODAwYWM1MTEz
|
15
|
+
YWMyNjRjOGE3YzFlODhjZTY5MjQ2NjkwZDIyYjMwNTk1ZGMwYTA=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.10.0
|
data/lib/ruby-box.rb
CHANGED
data/lib/ruby-box/item.rb
CHANGED
@@ -110,6 +110,11 @@ module RubyBox
|
|
110
110
|
create_shared_link(nil)
|
111
111
|
end
|
112
112
|
|
113
|
+
def shared_link
|
114
|
+
return nil unless @raw_item['shared_link']
|
115
|
+
RubyBox::Item.factory(@session, @raw_item['shared_link'].merge('type' => 'shared_link'))
|
116
|
+
end
|
117
|
+
|
113
118
|
protected
|
114
119
|
|
115
120
|
def self.factory(session, entry)
|
@@ -125,6 +130,10 @@ module RubyBox
|
|
125
130
|
false
|
126
131
|
end
|
127
132
|
|
133
|
+
def as_json(opts={})
|
134
|
+
@raw_item
|
135
|
+
end
|
136
|
+
|
128
137
|
private
|
129
138
|
|
130
139
|
def many(key)
|
data/ruby-box.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "ruby-box"
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.10.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Attachments.me"]
|
12
|
-
s.date = "2013-08-
|
12
|
+
s.date = "2013-08-08"
|
13
13
|
s.description = "ruby gem for box.com 2.0 api"
|
14
14
|
s.email = "ben@attachments.me"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -36,6 +36,7 @@ Gem::Specification.new do |s|
|
|
36
36
|
"lib/ruby-box/folder.rb",
|
37
37
|
"lib/ruby-box/item.rb",
|
38
38
|
"lib/ruby-box/session.rb",
|
39
|
+
"lib/ruby-box/shared_link.rb",
|
39
40
|
"lib/ruby-box/user.rb",
|
40
41
|
"lib/ruby-box/web_link.rb",
|
41
42
|
"ruby-box.gemspec",
|
data/spec/integration_spec.rb
CHANGED
@@ -214,7 +214,8 @@ describe RubyBox, :skip => true do
|
|
214
214
|
|
215
215
|
# share link was successfully created.
|
216
216
|
folder.shared_link.url.should match /https?:\/\/[\S]+/
|
217
|
-
|
217
|
+
folder.shared_link.is_a?(RubyBox::SharedLink).should == true
|
218
|
+
|
218
219
|
# share link can be disabled.
|
219
220
|
folder.disable_shared_link
|
220
221
|
folder.shared_link.should == nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-box
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Attachments.me
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multipart-post
|
@@ -149,6 +149,7 @@ files:
|
|
149
149
|
- lib/ruby-box/folder.rb
|
150
150
|
- lib/ruby-box/item.rb
|
151
151
|
- lib/ruby-box/session.rb
|
152
|
+
- lib/ruby-box/shared_link.rb
|
152
153
|
- lib/ruby-box/user.rb
|
153
154
|
- lib/ruby-box/web_link.rb
|
154
155
|
- ruby-box.gemspec
|