redbooth-ruby 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +237 -20
- data/lib/redbooth-ruby.rb +10 -0
- data/lib/redbooth-ruby/base.rb +1 -1
- data/lib/redbooth-ruby/client.rb +9 -2
- data/lib/redbooth-ruby/client_operations/metadata.rb +32 -0
- data/lib/redbooth-ruby/client_operations/search.rb +32 -0
- data/lib/redbooth-ruby/comment.rb +34 -0
- data/lib/redbooth-ruby/file.rb +68 -0
- data/lib/redbooth-ruby/note.rb +25 -0
- data/lib/redbooth-ruby/operations/create.rb +1 -1
- data/lib/redbooth-ruby/operations/index.rb +0 -12
- data/lib/redbooth-ruby/operations/meta.rb +33 -2
- data/lib/redbooth-ruby/operations/show.rb +1 -1
- data/lib/redbooth-ruby/request/collection.rb +37 -5
- data/lib/redbooth-ruby/request/connection.rb +14 -8
- data/lib/redbooth-ruby/request/validator.rb +32 -4
- data/lib/redbooth-ruby/subtask.rb +18 -0
- data/lib/redbooth-ruby/task.rb +1 -1
- data/lib/redbooth-ruby/version.rb +1 -1
- data/redbooth-ruby.gemspec +1 -0
- data/spec/cassettes/RedboothRuby_ClientOperations_Metadata/_metadata/.yml +55 -0
- data/spec/cassettes/RedboothRuby_ClientOperations_Metadata/_metadata/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_notes_collection.yml +55 -0
- data/spec/cassettes/RedboothRuby_ClientOperations_Search/_index/.yml +271 -0
- data/spec/cassettes/RedboothRuby_ClientOperations_Search/_index/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_notes_collection.yml +271 -0
- data/spec/cassettes/RedboothRuby_Comment/_create/.yml +47 -0
- data/spec/cassettes/RedboothRuby_Comment/_create/makes_a_new_POST_request_using_the_correct_API_endpoint_to_create_a_specific_comment.yml +47 -0
- data/spec/cassettes/RedboothRuby_Comment/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_comment.yml +84 -0
- data/spec/cassettes/RedboothRuby_Comment/_index/.yml +94 -0
- data/spec/cassettes/RedboothRuby_Comment/_index/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_comments_collection.yml +94 -0
- data/spec/cassettes/RedboothRuby_Comment/_initialize/.yml +65 -0
- data/spec/cassettes/RedboothRuby_Comment/_show/.yml +65 -0
- data/spec/cassettes/RedboothRuby_Comment/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_comment.yml +65 -0
- data/spec/cassettes/RedboothRuby_Comment/_update/.yml +47 -0
- data/spec/cassettes/RedboothRuby_Comment/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_comment.yml +47 -0
- data/spec/cassettes/RedboothRuby_File/_create/.yml +65 -0
- data/spec/cassettes/RedboothRuby_File/_create/makes_a_new_POST_request_using_the_correct_API_endpoint_to_create_a_specific_file.yml +65 -0
- data/spec/cassettes/RedboothRuby_File/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_comment.yml +102 -0
- data/spec/cassettes/RedboothRuby_File/_index/.yml +58 -0
- data/spec/cassettes/RedboothRuby_File/_index/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_comments_collection.yml +58 -0
- data/spec/cassettes/RedboothRuby_File/_initialize/.yml +44 -0
- data/spec/cassettes/RedboothRuby_File/_show/.yml +44 -0
- data/spec/cassettes/RedboothRuby_File/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_file.yml +44 -0
- data/spec/cassettes/RedboothRuby_File/_update/.yml +46 -0
- data/spec/cassettes/RedboothRuby_File/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_file.yml +46 -0
- data/spec/cassettes/RedboothRuby_Note/_create/.yml +47 -0
- data/spec/cassettes/RedboothRuby_Note/_create/makes_a_new_POST_request_using_the_correct_API_endpoint_to_create_a_specific_note.yml +47 -0
- data/spec/cassettes/RedboothRuby_Note/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_note.yml +84 -0
- data/spec/cassettes/RedboothRuby_Note/_index/.yml +193 -0
- data/spec/cassettes/RedboothRuby_Note/_index/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_notes_collection.yml +193 -0
- data/spec/cassettes/RedboothRuby_Note/_initialize/.yml +109 -0
- data/spec/cassettes/RedboothRuby_Note/_show/.yml +109 -0
- data/spec/cassettes/RedboothRuby_Note/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_note.yml +109 -0
- data/spec/cassettes/RedboothRuby_Note/_update/.yml +73 -0
- data/spec/cassettes/RedboothRuby_Note/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_note.yml +73 -0
- data/spec/cassettes/RedboothRuby_Subtask/_create/.yml +47 -0
- data/spec/cassettes/RedboothRuby_Subtask/_create/makes_a_new_POST_request_using_the_correct_API_endpoint_to_create_a_specific_subtask.yml +47 -0
- data/spec/cassettes/RedboothRuby_Subtask/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_subtask.yml +84 -0
- data/spec/cassettes/RedboothRuby_Subtask/_index/.yml +99 -0
- data/spec/cassettes/RedboothRuby_Subtask/_index/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_subtasks_collection.yml +99 -0
- data/spec/cassettes/RedboothRuby_Subtask/_initialize/.yml +45 -0
- data/spec/cassettes/RedboothRuby_Subtask/_show/.yml +45 -0
- data/spec/cassettes/RedboothRuby_Subtask/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_subtask.yml +45 -0
- data/spec/cassettes/RedboothRuby_Subtask/_update/.yml +47 -0
- data/spec/cassettes/RedboothRuby_Subtask/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_subtask.yml +47 -0
- data/spec/cassettes/RedboothRuby_Task/_medatada/.yml +88 -0
- data/spec/cassettes/RedboothRuby_Task/_medatada/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_task.yml +88 -0
- data/spec/cassettes/RedboothRuby_Task/_medatada_/.yml +90 -0
- data/spec/cassettes/RedboothRuby_Task/_medatada_/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_task.yml +90 -0
- data/spec/cassettes/RedboothRuby_Task/_metadata_merge/.yml +133 -0
- data/spec/cassettes/RedboothRuby_Task/_metadata_merge/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_task.yml +133 -0
- data/spec/redbooth-ruby/client_operations/metadata_spec.rb +24 -0
- data/spec/redbooth-ruby/client_operations/search_spec.rb +24 -0
- data/spec/redbooth-ruby/comment_spec.rb +87 -0
- data/spec/redbooth-ruby/file_spec.rb +89 -0
- data/spec/redbooth-ruby/note_spec.rb +84 -0
- data/spec/redbooth-ruby/subtaks_spec.rb +83 -0
- data/spec/redbooth-ruby/task_spec.rb +41 -0
- data/spec/spec_helper.rb +2 -0
- metadata +134 -2
@@ -0,0 +1,65 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3000/api/3/comments/1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer _frank_access_token_
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- '*/*'
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge,chrome=1
|
27
|
+
Etag:
|
28
|
+
- '"c66264eb8a9549e3b85036a161a72c09"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
X-Request-Id:
|
32
|
+
- 41f9c423e1fd0fd7419e5de1ee3a31bb
|
33
|
+
X-Runtime:
|
34
|
+
- '0.245654'
|
35
|
+
Connection:
|
36
|
+
- close
|
37
|
+
Server:
|
38
|
+
- thin 1.6.1 codename Death Proof
|
39
|
+
body:
|
40
|
+
encoding: ASCII-8BIT
|
41
|
+
string: !binary |-
|
42
|
+
eyJ0eXBlIjoiQ29tbWVudCIsImNyZWF0ZWRfYXQiOjE0MTU2MjIwMzAsInVw
|
43
|
+
ZGF0ZWRfYXQiOjE0MTU2Mjk1OTMsImlkIjoxLCJib2R5IjoiSGV5IGd1eXMu
|
44
|
+
IEnigJltIGxvb2tpbmcgZm9yd2FyZCB0byB3b3JraW5nIHdpdGggeW91IGFs
|
45
|
+
bCBhZ2Fpbi4gSeKAmW0gYWxzbyBwbGVhc2VkIHRvIGJlIHdvcmtpbmcgd2l0
|
46
|
+
aCBteSBmcmllbmQgYW5kIHlvZ2EgaW5zdHJ1Y3RvciBNYXJjbyBGaXp6dWxv
|
47
|
+
LiBUaGlzIHNob3VsZCBiZSBzdHJhaWdodGZvcndhcmQgcHJvamVjdCBhbmQg
|
48
|
+
SSBjYW7igJl0IHdhaXQgdG8gc2VlIHdoYXQgd2UgcHV0IHRvZ2V0aGVyLiIs
|
49
|
+
ImJvZHlfaHRtbCI6IjxwPkhleSBndXlzLiBJ4oCZbSBsb29raW5nIGZvcndh
|
50
|
+
cmQgdG8gd29ya2luZyB3aXRoIHlvdSBhbGwgYWdhaW4uIEnigJltIGFsc28g
|
51
|
+
cGxlYXNlZCB0byBiZSB3b3JraW5nIHdpdGggbXkgZnJpZW5kIGFuZCB5b2dh
|
52
|
+
IGluc3RydWN0b3IgTWFyY28gRml6enVsby4gVGhpcyBzaG91bGQgYmUgc3Ry
|
53
|
+
YWlnaHRmb3J3YXJkIHByb2plY3QgYW5kIEkgY2Fu4oCZdCB3YWl0IHRvIHNl
|
54
|
+
ZSB3aGF0IHdlIHB1dCB0b2dldGhlci48L3A+IiwidXNlcl9pZCI6MSwicHJv
|
55
|
+
amVjdF9pZCI6MiwidGFyZ2V0X2lkIjoxLCJ0YXJnZXRfdHlwZSI6IkNvbnZl
|
56
|
+
cnNhdGlvbiIsIm1pbnV0ZXMiOm51bGwsImFzc2lnbmVkX2lkIjpudWxsLCJw
|
57
|
+
cmV2aW91c19hc3NpZ25lZF9pZCI6bnVsbCwiZHVlX29uIjpudWxsLCJwcmV2
|
58
|
+
aW91c19kdWVfb24iOm51bGwsImlzX3ByaXZhdGUiOmZhbHNlLCJwcmV2aW91
|
59
|
+
c19pc19wcml2YXRlIjpudWxsLCJ1cmdlbnQiOmZhbHNlLCJwcmV2aW91c191
|
60
|
+
cmdlbnQiOmZhbHNlLCJlbWFpbF9pZCI6bnVsbCwidGltZV90cmFja2luZ19v
|
61
|
+
biI6IjIwMTQtMTEtMTAiLCJzdGF0dXMiOiJuZXciLCJwcmV2aW91c19zdGF0
|
62
|
+
dXMiOiJuZXcifQ==
|
63
|
+
http_version:
|
64
|
+
recorded_at: Wed, 12 Nov 2014 10:06:28 GMT
|
65
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://localhost:3000/api/3/comments/24
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: body=new+test+body
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer _frank_access_token_
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- '*/*'
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- '"e6e472aaa91286393142ec131b49e319"'
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Request-Id:
|
34
|
+
- 523933a9ebc70f347ac060bb42d60acb
|
35
|
+
X-Runtime:
|
36
|
+
- '0.380083'
|
37
|
+
Connection:
|
38
|
+
- close
|
39
|
+
Server:
|
40
|
+
- thin 1.6.1 codename Death Proof
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: '{"type":"Comment","created_at":1415629596,"updated_at":1415786789,"id":24,"body":"new
|
44
|
+
test body","body_html":"<p>new test body</p>","user_id":1,"project_id":2,"target_id":2,"target_type":"Task","minutes":null,"assigned_id":null,"previous_assigned_id":null,"due_on":null,"previous_due_on":null,"is_private":false,"previous_is_private":null,"urgent":false,"previous_urgent":false,"email_id":null,"time_tracking_on":"2014-11-10","status":"new","previous_status":"new"}'
|
45
|
+
http_version:
|
46
|
+
recorded_at: Wed, 12 Nov 2014 10:06:29 GMT
|
47
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://localhost:3000/api/3/comments/24
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: body=new+test+body
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer _frank_access_token_
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- '*/*'
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- '"e6e472aaa91286393142ec131b49e319"'
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Request-Id:
|
34
|
+
- 29b89ced2d9e87aedd0748cfc2105d91
|
35
|
+
X-Runtime:
|
36
|
+
- '0.883452'
|
37
|
+
Connection:
|
38
|
+
- close
|
39
|
+
Server:
|
40
|
+
- thin 1.6.1 codename Death Proof
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: '{"type":"Comment","created_at":1415629596,"updated_at":1415786789,"id":24,"body":"new
|
44
|
+
test body","body_html":"<p>new test body</p>","user_id":1,"project_id":2,"target_id":2,"target_type":"Task","minutes":null,"assigned_id":null,"previous_assigned_id":null,"due_on":null,"previous_due_on":null,"is_private":false,"previous_is_private":null,"urgent":false,"previous_urgent":false,"email_id":null,"time_tracking_on":"2014-11-10","status":"new","previous_status":"new"}'
|
45
|
+
http_version:
|
46
|
+
recorded_at: Wed, 12 Nov 2014 10:06:29 GMT
|
47
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,65 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:3000/api/3/files
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "-------------RubyMultipartPost\r\nContent-Disposition: form-data; name=\"project_id\"\r\n\r\n2\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
9
|
+
form-data; name=\"backend\"\r\n\r\nredbooth\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
10
|
+
form-data; name=\"asset\"\r\n\r\n#<File:0x007fb08525b150>\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
11
|
+
form-data; name=\"asset_attrs\"\r\n\r\n{:name=>\"hola.txt\", :local_path=>\"/Users/andresbravog/Documents/ProyectosTeambox/teambox/SRC/redbooth-ruby/spec/redbooth-ruby/../fixtures/hola.txt\"}\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
12
|
+
form-data; name=\"asset\"; filename=\"hola.txt\"\r\nContent-Length: 905\r\nContent-Type:
|
13
|
+
application/octet-stream\r\nContent-Transfer-Encoding: binary\r\n\r\nloremp
|
14
|
+
ipsum dolor loremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
15
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
16
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
17
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
18
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
19
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
20
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
21
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
22
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
23
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
24
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
25
|
+
dolor...\n\r\n-------------RubyMultipartPost--\r\n\r\n"
|
26
|
+
headers:
|
27
|
+
Accept-Encoding:
|
28
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
29
|
+
Accept:
|
30
|
+
- '*/*'
|
31
|
+
User-Agent:
|
32
|
+
- Ruby
|
33
|
+
Content-Type:
|
34
|
+
- multipart/form-data; boundary=-----------RubyMultipartPost
|
35
|
+
Content-Length:
|
36
|
+
- '1662'
|
37
|
+
Authorization:
|
38
|
+
- Bearer _frank_access_token_
|
39
|
+
response:
|
40
|
+
status:
|
41
|
+
code: 201
|
42
|
+
message: Created
|
43
|
+
headers:
|
44
|
+
Content-Type:
|
45
|
+
- text/plain; charset=utf-8
|
46
|
+
X-Ua-Compatible:
|
47
|
+
- IE=Edge,chrome=1
|
48
|
+
Etag:
|
49
|
+
- '"5b09ebcab86a30fb42b43a33cfa82fd6"'
|
50
|
+
Cache-Control:
|
51
|
+
- max-age=0, private, must-revalidate
|
52
|
+
X-Request-Id:
|
53
|
+
- 6cfc9cc3f1df4c2fc3c371dd8181a461
|
54
|
+
X-Runtime:
|
55
|
+
- '0.780737'
|
56
|
+
Connection:
|
57
|
+
- close
|
58
|
+
Server:
|
59
|
+
- thin 1.6.1 codename Death Proof
|
60
|
+
body:
|
61
|
+
encoding: UTF-8
|
62
|
+
string: '{"created_at":1415799245,"updated_at":1415799245,"id":12,"name":"hola.txt","backend":"redbooth","project_id":2,"parent_id":null,"backend_id":"9","is_dir":false,"is_downloadable":true,"is_previewable":false,"is_private":false,"mime_type":"application/octet-stream","public_token":null,"pinned":false,"size":905,"user_id":1,"can_be_moved":true,"can_be_deleted":true,"type":"file"}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Wed, 12 Nov 2014 13:34:05 GMT
|
65
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,65 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:3000/api/3/files
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "-------------RubyMultipartPost\r\nContent-Disposition: form-data; name=\"project_id\"\r\n\r\n2\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
9
|
+
form-data; name=\"backend\"\r\n\r\nredbooth\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
10
|
+
form-data; name=\"asset\"\r\n\r\n#<File:0x007f8fe1cd4470>\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
11
|
+
form-data; name=\"asset_attrs\"\r\n\r\n{:name=>\"hola.txt\", :local_path=>\"/Users/andresbravog/Documents/ProyectosTeambox/teambox/SRC/redbooth-ruby/spec/redbooth-ruby/../fixtures/hola.txt\"}\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
12
|
+
form-data; name=\"asset\"; filename=\"hola.txt\"\r\nContent-Length: 905\r\nContent-Type:
|
13
|
+
application/octet-stream\r\nContent-Transfer-Encoding: binary\r\n\r\nloremp
|
14
|
+
ipsum dolor loremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
15
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
16
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
17
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
18
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
19
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
20
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
21
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
22
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
23
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
24
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
25
|
+
dolor...\n\r\n-------------RubyMultipartPost--\r\n\r\n"
|
26
|
+
headers:
|
27
|
+
Accept-Encoding:
|
28
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
29
|
+
Accept:
|
30
|
+
- '*/*'
|
31
|
+
User-Agent:
|
32
|
+
- Ruby
|
33
|
+
Content-Type:
|
34
|
+
- multipart/form-data; boundary=-----------RubyMultipartPost
|
35
|
+
Content-Length:
|
36
|
+
- '1662'
|
37
|
+
Authorization:
|
38
|
+
- Bearer _frank_access_token_
|
39
|
+
response:
|
40
|
+
status:
|
41
|
+
code: 201
|
42
|
+
message: Created
|
43
|
+
headers:
|
44
|
+
Content-Type:
|
45
|
+
- text/plain; charset=utf-8
|
46
|
+
X-Ua-Compatible:
|
47
|
+
- IE=Edge,chrome=1
|
48
|
+
Etag:
|
49
|
+
- '"92c58399a32ae81889c7fed1c5877618"'
|
50
|
+
Cache-Control:
|
51
|
+
- max-age=0, private, must-revalidate
|
52
|
+
X-Request-Id:
|
53
|
+
- 9f9c992f8579bd5971fd55ced9d28870
|
54
|
+
X-Runtime:
|
55
|
+
- '0.751280'
|
56
|
+
Connection:
|
57
|
+
- close
|
58
|
+
Server:
|
59
|
+
- thin 1.6.1 codename Death Proof
|
60
|
+
body:
|
61
|
+
encoding: UTF-8
|
62
|
+
string: '{"created_at":1415818054,"updated_at":1415818054,"id":13,"name":"hola-t1th1.txt","backend":"redbooth","project_id":2,"parent_id":null,"backend_id":"10","is_dir":false,"is_downloadable":true,"is_previewable":false,"is_private":false,"mime_type":"application/octet-stream","public_token":null,"pinned":false,"size":905,"user_id":1,"can_be_moved":true,"can_be_deleted":true,"type":"file"}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Wed, 12 Nov 2014 18:47:34 GMT
|
65
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,102 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:3000/api/3/files
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "-------------RubyMultipartPost\r\nContent-Disposition: form-data; name=\"project_id\"\r\n\r\n2\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
9
|
+
form-data; name=\"backend\"\r\n\r\nredbooth\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
10
|
+
form-data; name=\"asset\"\r\n\r\n#<File:0x007fa42d85e160>\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
11
|
+
form-data; name=\"asset_attrs\"\r\n\r\n{:name=>\"hola.txt\", :local_path=>\"/Users/andresbravog/Documents/ProyectosTeambox/teambox/SRC/redbooth-ruby/spec/redbooth-ruby/../fixtures/hola.txt\"}\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
12
|
+
form-data; name=\"asset\"; filename=\"hola.txt\"\r\nContent-Length: 905\r\nContent-Type:
|
13
|
+
application/octet-stream\r\nContent-Transfer-Encoding: binary\r\n\r\nloremp
|
14
|
+
ipsum dolor loremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
15
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
16
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
17
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
18
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
19
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
20
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
21
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
22
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
23
|
+
dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp
|
24
|
+
ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum dolorloremp ipsum
|
25
|
+
dolor...\n\r\n-------------RubyMultipartPost--\r\n\r\n"
|
26
|
+
headers:
|
27
|
+
Accept-Encoding:
|
28
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
29
|
+
Accept:
|
30
|
+
- '*/*'
|
31
|
+
User-Agent:
|
32
|
+
- Ruby
|
33
|
+
Content-Type:
|
34
|
+
- multipart/form-data; boundary=-----------RubyMultipartPost
|
35
|
+
Content-Length:
|
36
|
+
- '1662'
|
37
|
+
Authorization:
|
38
|
+
- Bearer _frank_access_token_
|
39
|
+
response:
|
40
|
+
status:
|
41
|
+
code: 201
|
42
|
+
message: Created
|
43
|
+
headers:
|
44
|
+
Content-Type:
|
45
|
+
- text/plain; charset=utf-8
|
46
|
+
X-Ua-Compatible:
|
47
|
+
- IE=Edge,chrome=1
|
48
|
+
Etag:
|
49
|
+
- '"4447a5ce11731ce0ba4e9af9a4e559e8"'
|
50
|
+
Cache-Control:
|
51
|
+
- max-age=0, private, must-revalidate
|
52
|
+
X-Request-Id:
|
53
|
+
- d46db97bdbdaa39c0f72dc005c80fd85
|
54
|
+
X-Runtime:
|
55
|
+
- '0.407117'
|
56
|
+
Connection:
|
57
|
+
- close
|
58
|
+
Server:
|
59
|
+
- thin 1.6.1 codename Death Proof
|
60
|
+
body:
|
61
|
+
encoding: UTF-8
|
62
|
+
string: '{"created_at":1415818250,"updated_at":1415818250,"id":14,"name":"hola-3ms80.txt","backend":"redbooth","project_id":2,"parent_id":null,"backend_id":"11","is_dir":false,"is_downloadable":true,"is_previewable":false,"is_private":false,"mime_type":"application/octet-stream","public_token":null,"pinned":false,"size":905,"user_id":1,"can_be_moved":true,"can_be_deleted":true,"type":"file"}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Wed, 12 Nov 2014 18:50:51 GMT
|
65
|
+
- request:
|
66
|
+
method: delete
|
67
|
+
uri: http://localhost:3000/api/3/files/14
|
68
|
+
body:
|
69
|
+
encoding: US-ASCII
|
70
|
+
string: ''
|
71
|
+
headers:
|
72
|
+
User-Agent:
|
73
|
+
- Faraday v0.9.0
|
74
|
+
Authorization:
|
75
|
+
- Bearer _frank_access_token_
|
76
|
+
Accept-Encoding:
|
77
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
78
|
+
Accept:
|
79
|
+
- '*/*'
|
80
|
+
response:
|
81
|
+
status:
|
82
|
+
code: 204
|
83
|
+
message: No Content
|
84
|
+
headers:
|
85
|
+
X-Ua-Compatible:
|
86
|
+
- IE=Edge,chrome=1
|
87
|
+
Cache-Control:
|
88
|
+
- no-cache
|
89
|
+
X-Request-Id:
|
90
|
+
- 5787648ef4baa51888ce2062fdebe091
|
91
|
+
X-Runtime:
|
92
|
+
- '0.244298'
|
93
|
+
Connection:
|
94
|
+
- close
|
95
|
+
Server:
|
96
|
+
- thin 1.6.1 codename Death Proof
|
97
|
+
body:
|
98
|
+
encoding: UTF-8
|
99
|
+
string: ''
|
100
|
+
http_version:
|
101
|
+
recorded_at: Wed, 12 Nov 2014 18:50:51 GMT
|
102
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,58 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3000/api/3/files?project_id=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer _frank_access_token_
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- '*/*'
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Last-Modified:
|
24
|
+
- Wed, 12 Nov 2014 12:16:35 GMT
|
25
|
+
X-Redbooth-Updated-At:
|
26
|
+
- '1415794595910'
|
27
|
+
X-Redbooth-From-Cache:
|
28
|
+
- 'true'
|
29
|
+
Paginationlinks:
|
30
|
+
- <http://localhost:3000/api/3/files?page=1&project_id=1>; rel="last">
|
31
|
+
Paginationtotalpages:
|
32
|
+
- '1'
|
33
|
+
Paginationperpage:
|
34
|
+
- '30'
|
35
|
+
Paginationcurrentpage:
|
36
|
+
- '1'
|
37
|
+
Paginationtotalobjects:
|
38
|
+
- '0'
|
39
|
+
Content-Type:
|
40
|
+
- application/json; charset=utf-8
|
41
|
+
Cache-Control:
|
42
|
+
- max-age=0, private, must-revalidate
|
43
|
+
X-Ua-Compatible:
|
44
|
+
- IE=Edge,chrome=1
|
45
|
+
X-Request-Id:
|
46
|
+
- f737ca30f9fdb5a39814f059cfcd658a
|
47
|
+
X-Runtime:
|
48
|
+
- '0.097873'
|
49
|
+
Connection:
|
50
|
+
- close
|
51
|
+
Server:
|
52
|
+
- thin 1.6.1 codename Death Proof
|
53
|
+
body:
|
54
|
+
encoding: UTF-8
|
55
|
+
string: '[]'
|
56
|
+
http_version:
|
57
|
+
recorded_at: Wed, 12 Nov 2014 12:16:36 GMT
|
58
|
+
recorded_with: VCR 2.9.3
|