ruby-box 1.12.1 → 1.12.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f8433a7ebad739882d2edb3928678512c70eaf7c
4
+ data.tar.gz: cfad2e9815486989edb7f3dc0983f1c4c1da5f74
5
+ SHA512:
6
+ metadata.gz: c2476b48ea8e7d3dfea2a98f51c5f82ababa80b80eeb7a43cac9fb024c10211aceddb313900195d40c28e5a3720c188b00ad1973364092d9aef28f3b675490ed
7
+ data.tar.gz: a68d72e04903989535314b5b96b3e36b197950a8d4ad60e2e59ad9097253bfc7614f7e52d0fde5aab78748153e6c88aa47a8b5a54a5548a87a0369d7bb5d2e2e
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.12.1
1
+ 1.12.2
@@ -86,7 +86,7 @@ module RubyBox
86
86
  end
87
87
 
88
88
  items(item_limit, offset, fields).select do |item|
89
- item.kind_of? type and (name.nil? or item.name == name)
89
+ item.kind_of? type and (name.nil? or item.name.casecmp(name) == 0)
90
90
  end
91
91
 
92
92
  end
@@ -2,14 +2,15 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: ruby-box 1.12.2 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
8
  s.name = "ruby-box"
8
- s.version = "1.12.1"
9
+ s.version = "1.12.2"
9
10
 
10
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
12
  s.authors = ["Attachments.me"]
12
- s.date = "2013-12-02"
13
+ s.date = "2013-12-26"
13
14
  s.description = "ruby gem for box.com 2.0 api"
14
15
  s.email = "ben@attachments.me"
15
16
  s.extra_rdoc_files = [
@@ -60,11 +61,11 @@ Gem::Specification.new do |s|
60
61
  s.homepage = "http://github.com/attachmentsme/ruby-box"
61
62
  s.licenses = ["MIT"]
62
63
  s.require_paths = ["lib"]
63
- s.rubygems_version = "1.8.24"
64
+ s.rubygems_version = "2.1.11"
64
65
  s.summary = "ruby gem for box.com 2.0 api"
65
66
 
66
67
  if s.respond_to? :specification_version then
67
- s.specification_version = 3
68
+ s.specification_version = 4
68
69
 
69
70
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
70
71
  s.add_runtime_dependency(%q<multipart-post>, [">= 0"])
@@ -30,6 +30,22 @@ describe RubyBox::Folder do
30
30
  root.created_at.year.should == 2012
31
31
  end
32
32
 
33
+ describe "#find_by_type" do
34
+ it "compares name in a case insensitive manner" do
35
+ items = [
36
+ JSON.parse('{ "total_count": 4, "entries": [ { "type": "folder", "id": "409047867", "sequence_id": "1", "etag": "1", "name": "Here\'s your folder" }, { "type": "file", "id": "409042867", "sequence_id": "1", "etag": "1", "name": "A choice file" } ], "offset": "0", "limit": "2"}'),
37
+ JSON.parse('{ "total_count": 4, "entries": [ { "type": "folder", "id": "409047868", "sequence_id": "1", "etag": "1", "name": "Here\'s another folder" }, { "type": "file", "id": "409042810", "sequence_id": "1", "etag": "1", "name": "A choice file" } ], "offset": "2", "limit": "2"}')
38
+ ]
39
+
40
+ RubyBox::Session.any_instance.stub(:request) { items.pop }
41
+ session = RubyBox::Session.new
42
+
43
+ # should return one file.
44
+ files = RubyBox::Folder.new(session, {'id' => 1}).files('A CHOICE file')
45
+ files.count.should == 1
46
+ end
47
+ end
48
+
33
49
  describe '#items' do
34
50
  it "should return a folder object for folder items" do
35
51
  item = JSON.parse('{ "id": "0000001", "total_count": 1, "entries": [ { "type": "folder", "id": "409047867", "sequence_id": "1", "etag": "1", "name": "Here\'s your folder" } ], "offset": "0", "limit": "1"}')
@@ -99,7 +115,6 @@ describe RubyBox::Folder do
99
115
  files = RubyBox::Folder.new(session, {'id' => 1}).files('foobar')
100
116
  files.count.should == 0
101
117
  end
102
-
103
118
  end
104
119
 
105
120
  describe '#discussions' do
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-box
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.1
5
- prerelease:
4
+ version: 1.12.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Attachments.me
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-12-02 00:00:00.000000000 Z
11
+ date: 2013-12-26 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: multipart-post
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: oauth2
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: json
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: addressable
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ! '>='
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ! '>='
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: bundler
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ! '>='
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ! '>='
108
95
  - !ruby/object:Gem::Version
@@ -110,7 +97,6 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: jeweler
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ~>
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ~>
124
109
  - !ruby/object:Gem::Version
@@ -126,7 +111,6 @@ dependencies:
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: webmock
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
115
  - - ! '>='
132
116
  - !ruby/object:Gem::Version
@@ -134,7 +118,6 @@ dependencies:
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
122
  - - ! '>='
140
123
  - !ruby/object:Gem::Version
@@ -189,27 +172,25 @@ files:
189
172
  homepage: http://github.com/attachmentsme/ruby-box
190
173
  licenses:
191
174
  - MIT
175
+ metadata: {}
192
176
  post_install_message:
193
177
  rdoc_options: []
194
178
  require_paths:
195
179
  - lib
196
180
  required_ruby_version: !ruby/object:Gem::Requirement
197
- none: false
198
181
  requirements:
199
182
  - - ! '>='
200
183
  - !ruby/object:Gem::Version
201
184
  version: '0'
202
185
  required_rubygems_version: !ruby/object:Gem::Requirement
203
- none: false
204
186
  requirements:
205
187
  - - ! '>='
206
188
  - !ruby/object:Gem::Version
207
189
  version: '0'
208
190
  requirements: []
209
191
  rubyforge_project:
210
- rubygems_version: 1.8.24
192
+ rubygems_version: 2.1.11
211
193
  signing_key:
212
- specification_version: 3
194
+ specification_version: 4
213
195
  summary: ruby gem for box.com 2.0 api
214
196
  test_files: []
215
- has_rdoc: