From 01ba59f0ae2f21db79c76628889a4c396ec47624 Mon Sep 17 00:00:00 2001 From: Adam Wead Date: Fri, 3 May 2019 10:59:47 -0400 Subject: [PATCH 1/2] Updating to Ruby 2.6.3 Includes changes to upload_and_delete_spec.rb Dropbox is no longer supported and the Ruby update was breaking this test. Instead of fixing a test for an unsupported endpoint, the test was updated to work against Box. --- .rubocop_todo.yml | 18 +- .ruby-version | 2 +- .travis.yml | 2 +- .../generic_work/upload_and_delete_spec.rb | 63 +- spec/fixtures/vcr_cassettes/box.yml | 400 +++++++++++++ spec/fixtures/vcr_cassettes/dropbox.yml | 563 ------------------ 6 files changed, 457 insertions(+), 591 deletions(-) create mode 100644 spec/fixtures/vcr_cassettes/box.yml delete mode 100644 spec/fixtures/vcr_cassettes/dropbox.yml diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 820def942..cbee4d87f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2019-02-25 13:39:08 -0500 using RuboCop version 0.62.0. +# on 2019-05-07 14:00:27 -0400 using RuboCop version 0.62.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -17,17 +17,17 @@ Lint/UriEscapeUnescape: - 'app/actors/sufia/create_with_remote_files_actor.rb' - 'spec/features/authentication_spec.rb' -# Offense count: 224 +# Offense count: 227 # Configuration parameters: CountComments, ExcludedMethods. # ExcludedMethods: refine Metrics/BlockLength: - Max: 222 + Max: 231 # Offense count: 1 Metrics/CyclomaticComplexity: Max: 7 -# Offense count: 308 +# Offense count: 307 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https Metrics/LineLength: @@ -37,11 +37,11 @@ Metrics/LineLength: Metrics/PerceivedComplexity: Max: 9 -# Offense count: 47 +# Offense count: 48 RSpec/AnyInstance: Enabled: false -# Offense count: 137 +# Offense count: 138 # Configuration parameters: Prefixes. # Prefixes: when, with, without RSpec/ContextWording: @@ -66,13 +66,13 @@ RSpec/ExpectInHook: - 'spec/features/file_set/analytics_spec.rb' - 'spec/models/user_spec.rb' -# Offense count: 160 +# Offense count: 166 # Configuration parameters: EnforcedStyle. # SupportedStyles: have_received, receive RSpec/MessageSpies: Enabled: false -# Offense count: 291 +# Offense count: 298 # Configuration parameters: AggregateFailuresByDefault. RSpec/MultipleExpectations: Max: 58 @@ -131,7 +131,7 @@ Rails/DynamicFindBy: - 'app/services/permissions_change_service.rb' - 'spec/views/curations_concerns/base/_form_relationships.html.erb_spec.rb' -# Offense count: 35 +# Offense count: 36 # Configuration parameters: EnforcedStyle. # SupportedStyles: slashes, arguments Rails/FilePath: diff --git a/.ruby-version b/.ruby-version index 0bee604df..ec1cf33c3 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.3.3 +2.6.3 diff --git a/.travis.yml b/.travis.yml index 3c8f461d0..294deae17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ cache: bundler_args: --without development debug sudo: false rvm: - - 2.3.3 + - 2.6.3 jdk: - oraclejdk8 env: diff --git a/spec/features/generic_work/upload_and_delete_spec.rb b/spec/features/generic_work/upload_and_delete_spec.rb index dfa9fe06e..87359c96f 100644 --- a/spec/features/generic_work/upload_and_delete_spec.rb +++ b/spec/features/generic_work/upload_and_delete_spec.rb @@ -39,10 +39,32 @@ context 'cloud providers' do before do - allow(BrowseEverything).to receive(:config) { { 'dropbox' => { app_key: 'fakekey189274942347', app_secret: 'fakesecret489289472347298', max_upload_file_size: 20 * 1024 } } } - allow(Sufia.config).to receive(:browse_everything).and_return('dropbox' => { app_key: 'fakekey189274942347', app_secret: 'fakesecret489289472347298' }) - allow_any_instance_of(BrowseEverything::Driver::Dropbox).to receive(:authorized?).and_return(true) - allow_any_instance_of(BrowseEverything::Driver::Dropbox).to receive(:token).and_return('FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321') + allow(BrowseEverything).to receive(:config) do + { + 'box' => { + client_id: 'fake-box-client-id', + client_secret: 'fake-box-client-secret', + max_upload_file_size: 25 * 1024 + } + } + end + + allow(Sufia.config).to receive(:browse_everything) .and_return( + 'dropbox' => { + client_id: 'fake-box-client-id', + client_secret: 'fake-box-client-secret' + } + ) + + allow_any_instance_of(BrowseEverything::Driver::Box) + .to receive(:box_token) + .and_return('FAKEBOXTOKEN') + + allow_any_instance_of(BrowseEverything::Driver::Box) + .to receive(:box_refresh_token) + .and_return('FAKEBOXREFRESHTOKEN') + + allow_any_instance_of(BrowseEverything::Driver::Box).to receive(:authorized?).and_return(true) allow_any_instance_of(GenericWork).to receive(:share_notified?).and_return(false) WebMock.enable! end @@ -53,32 +75,39 @@ specify 'I can click on cloud providers' do expect(ShareNotifyJob).to receive(:perform_later) - VCR.use_cassette('dropbox', record: :none) do + VCR.use_cassette('box', record: :none) do click_link 'Files' expect(page).to have_content 'Add cloud files' click_on 'Add cloud files' expect(page).to have_css '#provider-select' - select 'Dropbox', from: 'provider-select' + + # Choose Box and view the files + select 'Box', from: 'provider-select' sleep(1.second) - expect(page).to have_content 'Getting Started.pdf' - click_on('Writer') + expect(page).to have_content 'My Box Notes' + expect(page).to have_content 'Box-upload-test.boxnote' + expect(page).to have_content 'creators.m4v' + + # Files above the size limit are not clickable + expect(page).not_to have_css 'a', text: 'creators.m4v' + + # Upload file into the queue + click_on('Box-upload-test.boxnote') sleep(1.second) - expect(page).to have_content 'Writer FAQ.txt' - expect(page).not_to have_css 'a', text: 'Writer FAQ.txt' - expect(page).to have_content 'Markdown Test.txt' - check('writer-markdown-test-txt') expect(page).to have_content '1 file selected' click_on('Submit') within 'tr.template-download' do - expect(page).to have_content 'Markdown Test.txt' + expect(page).to have_content 'Box-upload-test.boxnote' end within('#savewidget') do choose 'generic_work_visibility_authenticated' end sleep(1.second) + + # Fill in the rest of the metadata and create the work check 'agreement' click_on 'Metadata' - fill_in 'generic_work_title', with: 'Markdown Test' + fill_in 'generic_work_title', with: 'Box Upload Test' fill_in 'generic_work_keyword', with: 'keyword' fill_in 'generic_work[creators][0][given_name]', with: 'creator' select 'Attribution-NonCommercial-NoDerivatives 4.0 International', from: 'generic_work_rights' @@ -88,11 +117,11 @@ click_on 'Save' expect(page).to have_content 'Your files are being processed' within('#activity_log') do - expect(page).to have_content("User #{current_user.display_name} has deposited Markdown Test") + expect(page).to have_content("User #{current_user.display_name} has deposited Box Upload Test") end - expect(page).to have_css('h1', text: 'Markdown Test') + expect(page).to have_css('h1', text: 'Box Upload Test') click_on 'Notifications' - expect(page).to have_content 'The file (Markdown Test.txt) was successfully imported' + expect(page).to have_content 'The file (Box-upload-test.boxnote) was successfully imported' end end end diff --git a/spec/fixtures/vcr_cassettes/box.yml b/spec/fixtures/vcr_cassettes/box.yml new file mode 100644 index 000000000..178017660 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/box.yml @@ -0,0 +1,400 @@ +--- +http_interactions: +- request: + method: post + uri: https://www.box.com/api/oauth2/token + body: + encoding: UTF-8 + string: client_id=fake-box-client-id&client_secret=fake-box-client-secret&grant_type=refresh_token&refresh_token=FAKEBOXREFRESHTOKEN + headers: + User-Agent: + - Faraday v0.12.2 + Content-Type: + - application/x-www-form-urlencoded + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Date: + - Tue, 07 May 2019 15:56:04 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Vary: + - Accept-Encoding + Cache-Control: + - no-store + Strict-Transport-Security: + - max-age=31536000 + Set-Cookie: + - box_visitor_id=5cd1aa944ee7b2.31242640; expires=Thu, 07-May-2020 15:56:04 + GMT; Max-Age=31622400; path=/; domain=.box.com; secure + - bv=OPS-43023; expires=Tue, 14-May-2019 15:56:04 GMT; Max-Age=604800; path=/; + domain=.app.box.com; secure + - cn=55; expires=Thu, 07-May-2020 15:56:04 GMT; Max-Age=31622400; path=/; domain=.app.box.com; + secure + - site_preference=desktop; path=/; domain=.box.com; secure + Age: + - '0' + body: + encoding: ASCII-8BIT + string: '{"access_token":"AW4jn84oi5E1O0gT3wNBiNG8IZy89yER","expires_in":3783,"restricted_to":[],"refresh_token":"bjRhgSFAcKLwWu7QixC8QKYPdHsS49NqumlgolZK2iF1LAaENvOZIiOnZ8VPQCBj","token_type":"bearer"}' + http_version: + recorded_at: Tue, 07 May 2019 15:56:04 GMT +- request: + method: get + uri: https://api.box.com/2.0/folders/0 + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + Authorization: + - Bearer FAKEBOXTOKEN + response: + status: + code: 200 + message: OK + headers: + Date: + - Tue, 07 May 2019 15:56:07 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Strict-Transport-Security: + - max-age=31536000 + Cache-Control: + - no-cache, no-store + Vary: + - Accept-Encoding + Box-Request-Id: + - 07lr4tn06p9h5fplvm54cjn3iue + Age: + - '3' + body: + encoding: ASCII-8BIT + string: '{"type":"folder","id":"0","sequence_id":null,"etag":null,"name":"All + Files","created_at":null,"modified_at":null,"description":"","size":52540194,"path_collection":{"total_count":0,"entries":[]},"created_by":{"type":"user","id":"","name":"","login":""},"modified_by":{"type":"user","id":"225383863","name":"Sample + User","login":"xyz123@psu.edu"},"trashed_at":null,"purged_at":null,"content_created_at":null,"content_modified_at":null,"owned_by":{"type":"user","id":"225383863","name":"Sample + User","login":"xyz123@psu.edu"},"shared_link":null,"folder_upload_email":null,"parent":null,"item_status":"active","item_collection":{"total_count":33,"entries":[{"type":"folder","id":"20375782799","sequence_id":"0","etag":"0","name":"A + very looooooooooooong box folder, why so loooooooong Lets make it even longer + to show how far it gets sent to the side"},{"type":"folder","id":"2571160559","sequence_id":"0","etag":"0","name":"Apps + Team - Shared"},{"type":"folder","id":"37937618450","sequence_id":"0","etag":"0","name":"ArchiveSphere"},{"type":"folder","id":"30310516791","sequence_id":"0","etag":"0","name":"archivesphere + reports"},{"type":"folder","id":"72674091692","sequence_id":"0","etag":"0","name":"b-dsrd"},{"type":"folder","id":"33216728142","sequence_id":"3","etag":"3","name":"CHO"},{"type":"folder","id":"8564586477","sequence_id":"3","etag":"3","name":"Collections"},{"type":"folder","id":"20194542723","sequence_id":"1","etag":"1","name":"DSRD + - W Pattee 3"},{"type":"folder","id":"48267457558","sequence_id":"0","etag":"0","name":"LDAP_agw13"},{"type":"folder","id":"2459961273","sequence_id":"1","etag":"1","name":"Libraries + - DSRD Team"},{"type":"folder","id":"32357013200","sequence_id":"0","etag":"0","name":"Montana + State Visit"},{"type":"folder","id":"20284062015","sequence_id":"0","etag":"0","name":"My + Box Notes"},{"type":"folder","id":"11305958926","sequence_id":"0","etag":"0","name":"PCDM-Sufia"},{"type":"folder","id":"4227519189","sequence_id":"0","etag":"0","name":"refactor"},{"type":"folder","id":"69906298884","sequence_id":"1","etag":"1","name":"Research + Data Management Librarian - STEM"},{"type":"folder","id":"3399219062","sequence_id":"0","etag":"0","name":"Scholarsphere + - Migration"},{"type":"folder","id":"1168461187","sequence_id":"0","etag":"0","name":"test"},{"type":"folder","id":"3055812547","sequence_id":"0","etag":"0","name":"UX + Artifacts"},{"type":"folder","id":"24012535214","sequence_id":"0","etag":"0","name":"Warning + Room"},{"type":"file","id":"249254196166","file_version":{"type":"file_version","id":"262863976646","sha1":"1cbe92e0bb0adb547cf46fa4b930679cd6159777"},"sequence_id":"1","etag":"1","sha1":"1cbe92e0bb0adb547cf46fa4b930679cd6159777","name":"creators-404.m4v"},{"type":"file","id":"249252122960","file_version":{"type":"file_version","id":"262861776208","sha1":"06dce12bce3af49ba88b84cff810c32e3d57b20b"},"sequence_id":"1","etag":"1","sha1":"06dce12bce3af49ba88b84cff810c32e3d57b20b","name":"creators.m4v"},{"type":"file","id":"25581309763","file_version":{"type":"file_version","id":"23869158869","sha1":"4604bbe44fdcdd4afef3c666cf582e3773960954"},"sequence_id":"1","etag":"1","sha1":"4604bbe44fdcdd4afef3c666cf582e3773960954","name":"failed.tar.gz"},{"type":"file","id":"427142361509","file_version":{"type":"file_version","id":"451564981350","sha1":"61f611cc9ef6f9e71d9f5a358446988a7ff62f1c"},"sequence_id":"24","etag":"24","sha1":"61f611cc9ef6f9e71d9f5a358446988a7ff62f1c","name":"Box-upload-test.boxnote"},{"type":"file","id":"25588823531","file_version":{"type":"file_version","id":"23877641673","sha1":"abd18ce0a685a27b464fb05f27af5a84f9ec9be7"},"sequence_id":"1","etag":"1","sha1":"abd18ce0a685a27b464fb05f27af5a84f9ec9be7","name":"scholarsphere_5712md360.xml"},{"type":"file","id":"113711622968","file_version":{"type":"file_version","id":"122136107320","sha1":"da39a3ee5e6b4b0d3255bfef95601890afd80709"},"sequence_id":"0","etag":"0","sha1":"da39a3ee5e6b4b0d3255bfef95601890afd80709","name":"test.txt"},{"type":"file","id":"183158243461","file_version":{"type":"file_version","id":"194140042161","sha1":"c797a80d7883c65576e326fe90b0bdcb9351c3b8"},"sequence_id":"11","etag":"11","sha1":"c797a80d7883c65576e326fe90b0bdcb9351c3b8","name":"Communication + QA.boxnote"},{"type":"file","id":"238552473711","file_version":{"type":"file_version","id":"251713389852","sha1":"2e3fde3c712457b27bf3c2c5f2b9722e1992d1dd"},"sequence_id":"84","etag":"84","sha1":"2e3fde3c712457b27bf3c2c5f2b9722e1992d1dd","name":"Tomcat-Fedora-Modshape + configuration testing.boxnote"},{"type":"file","id":"242357374998","file_version":{"type":"file_version","id":"261636917405","sha1":"c450cdfdd5312554acda88236d6415f2caee70de"},"sequence_id":"81","etag":"81","sha1":"c450cdfdd5312554acda88236d6415f2caee70de","name":"Work + Type Creation Workflow.boxnote"},{"type":"file","id":"242359451500","file_version":{"type":"file_version","id":"261631547999","sha1":"1cd11395cd63cbc57a84db4fcaf39303f7ef1c82"},"sequence_id":"26","etag":"26","sha1":"1cd11395cd63cbc57a84db4fcaf39303f7ef1c82","name":"Ruth-- + Collection Creation Workflow.boxnote"},{"type":"file","id":"270243120124","file_version":{"type":"file_version","id":"285865431480","sha1":"76422f5730239ef3414cb20ef6ed52c0734a555b"},"sequence_id":"8","etag":"8","sha1":"76422f5730239ef3414cb20ef6ed52c0734a555b","name":"Rails + Form Resources.boxnote"},{"type":"file","id":"271643093014","file_version":{"type":"file_version","id":"286602549822","sha1":"2177dfcd74805a87ce468d9ecfb58f5ab747e810"},"sequence_id":"32","etag":"32","sha1":"2177dfcd74805a87ce468d9ecfb58f5ab747e810","name":"Nested + Forms in Rails - Learnz.boxnote"},{"type":"file","id":"272967630295","file_version":{"type":"file_version","id":"287292361768","sha1":"2ee59b703d71d56c6d0b8824344fe8418546b11a"},"sequence_id":"22","etag":"22","sha1":"2ee59b703d71d56c6d0b8824344fe8418546b11a","name":"Form + Objects and Reform \u2013 Learnz.boxnote"},{"type":"file","id":"306931330278","file_version":{"type":"file_version","id":"323293527051","sha1":"87b661bcf1ddaa18e463b936e9292a6b61b41bec"},"sequence_id":"29","etag":"29","sha1":"87b661bcf1ddaa18e463b936e9292a6b61b41bec","name":"Selenium + Notes 2018-07-24 10.04.27.boxnote"}],"offset":0,"limit":100,"order":[{"by":"type","direction":"ASC"},{"by":"name","direction":"ASC"}]}}' + http_version: + recorded_at: Tue, 07 May 2019 15:56:07 GMT +- request: + method: get + uri: https://api.box.com/2.0/folders/0/items?fields=name,size,created_at&limit=99999&offset=0 + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + Authorization: + - Bearer FAKEBOXTOKEN + response: + status: + code: 200 + message: OK + headers: + Date: + - Tue, 07 May 2019 15:56:08 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Strict-Transport-Security: + - max-age=31536000 + Cache-Control: + - no-cache, no-store + Vary: + - Accept-Encoding + Box-Request-Id: + - 1m292i518u5lv96hsikccfbqiff + Age: + - '1' + body: + encoding: ASCII-8BIT + string: '{"total_count":33,"entries":[{"type":"folder","id":"20375782799","etag":"0","name":"A + very looooooooooooong box folder, why so loooooooong Lets make it even longer + to show how far it gets sent to the side","size":0,"created_at":"2017-03-01T04:15:15-08:00"},{"type":"folder","id":"2571160559","etag":"0","name":"Apps + Team - Shared","size":0,"created_at":"2014-10-15T13:00:29-07:00"},{"type":"folder","id":"37937618450","etag":"0","name":"ArchiveSphere","size":174064683,"created_at":"2017-09-13T12:43:06-07:00"},{"type":"folder","id":"30310516791","etag":"0","name":"archivesphere + reports","size":19299022,"created_at":"2017-06-22T06:23:28-07:00"},{"type":"folder","id":"72674091692","etag":"0","name":"b-dsrd","size":0,"created_at":"2019-04-09T12:36:27-07:00"},{"type":"folder","id":"33216728142","etag":"3","name":"CHO","size":6561170038,"created_at":"2017-07-24T07:33:56-07:00"},{"type":"folder","id":"8564586477","etag":"3","name":"Collections","size":122390294,"created_at":"2016-06-24T12:38:35-07:00"},{"type":"folder","id":"20194542723","etag":"1","name":"DSRD + - W Pattee 3","size":2952796,"created_at":"2017-02-27T08:17:21-08:00"},{"type":"folder","id":"48267457558","etag":"0","name":"LDAP_agw13","size":3101,"created_at":"2018-03-29T11:21:09-07:00"},{"type":"folder","id":"2459961273","etag":"1","name":"Libraries + - DSRD Team","size":244904193,"created_at":"2014-09-17T13:39:31-07:00"},{"type":"folder","id":"32357013200","etag":"0","name":"Montana + State Visit","size":275395371,"created_at":"2017-07-17T07:05:08-07:00"},{"type":"folder","id":"20284062015","etag":"0","name":"My + Box Notes","size":1613140,"created_at":"2017-02-28T08:52:26-08:00"},{"type":"folder","id":"11305958926","etag":"0","name":"PCDM-Sufia","size":1086318,"created_at":"2016-09-14T09:14:25-07:00"},{"type":"folder","id":"4227519189","etag":"0","name":"refactor","size":8766,"created_at":"2015-08-14T07:53:56-07:00"},{"type":"folder","id":"69906298884","etag":"1","name":"Research + Data Management Librarian - STEM","size":1148198,"created_at":"2019-03-12T08:21:19-07:00"},{"type":"folder","id":"3399219062","etag":"0","name":"Scholarsphere + - Migration","size":270984,"created_at":"2015-04-07T13:17:51-07:00"},{"type":"folder","id":"1168461187","etag":"0","name":"test","size":20625445557,"created_at":"2013-09-19T12:57:59-07:00"},{"type":"folder","id":"3055812547","etag":"0","name":"UX + Artifacts","size":3801994,"created_at":"2015-02-04T08:21:16-08:00"},{"type":"folder","id":"24012535214","etag":"0","name":"Warning + Room","size":71823753,"created_at":"2017-04-12T12:30:40-07:00"},{"type":"file","id":"249254196166","etag":"1","name":"creators-404.m4v","size":10468852,"created_at":"2017-11-21T09:51:21-08:00"},{"type":"file","id":"249252122960","etag":"1","name":"creators.m4v","size":11306258,"created_at":"2017-11-21T09:43:03-08:00"},{"type":"file","id":"25581309763","etag":"1","name":"failed.tar.gz","size":28650839,"created_at":"2015-01-29T05:18:43-08:00"},{"type":"file","id":"427142361509","etag":"24","name":"Box-upload-test.boxnote","size":22384,"created_at":"2019-03-24T18:46:36-07:00"},{"type":"file","id":"25588823531","etag":"1","name":"scholarsphere_5712md360.xml","size":97038,"created_at":"2015-01-29T08:38:44-08:00"},{"type":"file","id":"113711622968","etag":"0","name":"test.txt","size":0,"created_at":"2016-12-20T07:50:30-08:00"},{"type":"file","id":"183158243461","etag":"11","name":"Communication + QA.boxnote","size":3031,"created_at":"2017-06-09T04:05:45-07:00"},{"type":"file","id":"238552473711","etag":"84","name":"Tomcat-Fedora-Modshape + configuration testing.boxnote","size":6464,"created_at":"2017-10-17T07:23:34-07:00"},{"type":"file","id":"242357374998","etag":"81","name":"Work + Type Creation Workflow.boxnote","size":6201,"created_at":"2017-10-30T10:25:56-07:00"},{"type":"file","id":"242359451500","etag":"26","name":"Ruth-- + Collection Creation Workflow.boxnote","size":2968,"created_at":"2017-10-30T10:26:28-07:00"},{"type":"file","id":"270243120124","etag":"8","name":"Rails + Form Resources.boxnote","size":6541,"created_at":"2018-01-26T07:43:55-08:00"},{"type":"file","id":"271643093014","etag":"32","name":"Nested + Forms in Rails - Learnz.boxnote","size":4145,"created_at":"2018-01-30T08:29:49-08:00"},{"type":"file","id":"272967630295","etag":"22","name":"Form + Objects and Reform \u2013 Learnz.boxnote","size":4692,"created_at":"2018-02-02T04:45:04-08:00"},{"type":"file","id":"306931330278","etag":"29","name":"Selenium + Notes 2018-07-24 10.04.27.boxnote","size":4343,"created_at":"2018-07-24T07:04:27-07:00"}],"offset":0,"limit":1000,"order":[{"by":"type","direction":"ASC"},{"by":"name","direction":"ASC"}]}' + http_version: + recorded_at: Tue, 07 May 2019 15:56:08 GMT +- request: + method: get + uri: https://api.box.com/2.0/files/427142361509 + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + Authorization: + - Bearer FAKEBOXTOKEN + response: + status: + code: 200 + message: OK + headers: + Date: + - Tue, 07 May 2019 15:56:10 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Strict-Transport-Security: + - max-age=31536000 + Cache-Control: + - no-cache, no-store + Etag: + - '"24"' + Vary: + - Accept-Encoding + Box-Request-Id: + - 0hlfh0jg2au61sitljn1bh9b052 + Age: + - '0' + body: + encoding: ASCII-8BIT + string: '{"type":"file","id":"427142361509","file_version":{"type":"file_version","id":"451564981350","sha1":"61f611cc9ef6f9e71d9f5a358446988a7ff62f1c"},"sequence_id":"24","etag":"24","sha1":"61f611cc9ef6f9e71d9f5a358446988a7ff62f1c","name":"Box-upload-test.boxnote","description":"","size":22384,"path_collection":{"total_count":1,"entries":[{"type":"folder","id":"0","sequence_id":null,"etag":null,"name":"All + Files"}]},"created_at":"2019-03-24T18:46:36-07:00","modified_at":"2019-03-24T19:03:37-07:00","trashed_at":null,"purged_at":null,"content_created_at":"2019-03-24T18:46:36-07:00","content_modified_at":"2019-03-24T19:03:06-07:00","created_by":{"type":"user","id":"225383863","name":"Sample + User","login":"xyz123@psu.edu"},"modified_by":{"type":"user","id":"225383863","name":"Sample + User","login":"xyz123@psu.edu"},"owned_by":{"type":"user","id":"225383863","name":"Sample + User","login":"xyz123@psu.edu"},"shared_link":null,"parent":{"type":"folder","id":"0","sequence_id":null,"etag":null,"name":"All + Files"},"item_status":"active"}' + http_version: + recorded_at: Tue, 07 May 2019 15:56:10 GMT +- request: + method: get + uri: https://api.box.com/2.0/files/427142361509/content + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + Authorization: + - Bearer FAKEBOXTOKEN + response: + status: + code: 302 + message: Found + headers: + Date: + - Tue, 07 May 2019 15:56:11 GMT + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Strict-Transport-Security: + - max-age=31536000 + Cache-Control: + - no-cache, no-store + Box-Request-Id: + - 1sos203m6iao0g94p3vj11e3btk + Location: + - https://dl.boxcloud.com/d/1/b1!1Yion0r0JN3Vv9IKmsdgV_dubSzIzoX0uOdkrmZrgy2bMhX56j16TMFVAcZKjkBEGLmKRBZaJ8MbjNpc7989v2OKRiXAOJrc6MqEYYE8KDUG-I8X1R00PWH0GqR3tIhDbAhncczyhN1G_s0SZ0R5o7Rze7GQGG-oH9Mn86Tk0GlNOXD2rrZS4Ay6FbixTqch0QENs7aKfosOhQmnr91m7D2NeSUt_XhhA77VvsNmYN4nkMnUgO56EfCRHIP_ejeqVDX9IgCcn505wGAUtTCmsr7YZOPYjokJjrf76bvwwydS_mk59RdKeOAYoUEOwY9wr6co4VwxSwekDJ92y10HBw-ljHPqhm18A832jYotGhgYnPmDPxiv97lHCbwiCKjfwVNpd1MBXDhuOEPJQw8XJA0OKtUeD4gbMUilDSxUwSB0Z1TDqegFfiAZQ4HzxCW7C2pxWLvy781B_NcL3GZ2X0xARExs98ow7jItgvftUw_D9uwgTeUZGQakHz7AI2SRTsNH9nqUop2UwEGOGAqIN3QWKRiz9JpFu2-KfU7b4rh0IhYBtcacUrYFPLcib9Nu9denZT-NGRFQbu36voRZExLcgEelrGULMDOHRPtE8sdKt5gbvl7rJuyFcQlaOwn-4KWbzqHtvNjNmLImHeubnTRNjCv1eQBPhB5osIezJbeehVgLTJMXQtE8VuV64scOhowMluHhOHgghdEeO04adAJJaNlqGYTz_bRQje44yrjx3fwVFTACBK-d7KPgrL_zGCh0LWAMObL--pxgl9i3pnTFizwGEjN5paSvJj-sVTEcVIezgCWpczFNk3nvi5TuzKEgV8jt4hpwSufkyH1sUqvKW-16AbwD6klEo3zXomK3jSlv0CW5WK1a3QGWFlcOMGQoAem7ns9XpS9F7Ubnex3MJgkiErZovku8ySo8aHC80-vy2-e3lhuiLIBpmGsOwItldfuUJDUG8S-cO-xzBX_UL0q1b7YHUHyJtpOMDL1lGoMDGj3D80QZDjqQ9jsRzcJ-ChPJ1-KDBaO2q4Yl--GW4QWFq3C2kBUt2KUH6Ih0pLPKQBYgWlUh_fh6CLS13oddxdn__fLd1zg896RFHw3zk6YTV0pvVOebU7JKpKv6uOnQOKifL6Z-V925lxmFR238G0e38YLj1QeiqftprfC6J7zHDLHmdcs_wI93ucVgWF0h9_HUoN5JGxZKTJZJZj-K3U5IIWXCr8S6t-nRB_I76jR6QF3k6AwlZmWk4_jKRziv3Vhmt8BCtQwIdCuV8v9dm9w./download + Age: + - '0' + body: + encoding: UTF-8 + string: '' + http_version: + recorded_at: Tue, 07 May 2019 15:56:11 GMT +- request: + method: head + uri: https://dl.boxcloud.com/d/1/b1!1Yion0r0JN3Vv9IKmsdgV_dubSzIzoX0uOdkrmZrgy2bMhX56j16TMFVAcZKjkBEGLmKRBZaJ8MbjNpc7989v2OKRiXAOJrc6MqEYYE8KDUG-I8X1R00PWH0GqR3tIhDbAhncczyhN1G_s0SZ0R5o7Rze7GQGG-oH9Mn86Tk0GlNOXD2rrZS4Ay6FbixTqch0QENs7aKfosOhQmnr91m7D2NeSUt_XhhA77VvsNmYN4nkMnUgO56EfCRHIP_ejeqVDX9IgCcn505wGAUtTCmsr7YZOPYjokJjrf76bvwwydS_mk59RdKeOAYoUEOwY9wr6co4VwxSwekDJ92y10HBw-ljHPqhm18A832jYotGhgYnPmDPxiv97lHCbwiCKjfwVNpd1MBXDhuOEPJQw8XJA0OKtUeD4gbMUilDSxUwSB0Z1TDqegFfiAZQ4HzxCW7C2pxWLvy781B_NcL3GZ2X0xARExs98ow7jItgvftUw_D9uwgTeUZGQakHz7AI2SRTsNH9nqUop2UwEGOGAqIN3QWKRiz9JpFu2-KfU7b4rh0IhYBtcacUrYFPLcib9Nu9denZT-NGRFQbu36voRZExLcgEelrGULMDOHRPtE8sdKt5gbvl7rJuyFcQlaOwn-4KWbzqHtvNjNmLImHeubnTRNjCv1eQBPhB5osIezJbeehVgLTJMXQtE8VuV64scOhowMluHhOHgghdEeO04adAJJaNlqGYTz_bRQje44yrjx3fwVFTACBK-d7KPgrL_zGCh0LWAMObL--pxgl9i3pnTFizwGEjN5paSvJj-sVTEcVIezgCWpczFNk3nvi5TuzKEgV8jt4hpwSufkyH1sUqvKW-16AbwD6klEo3zXomK3jSlv0CW5WK1a3QGWFlcOMGQoAem7ns9XpS9F7Ubnex3MJgkiErZovku8ySo8aHC80-vy2-e3lhuiLIBpmGsOwItldfuUJDUG8S-cO-xzBX_UL0q1b7YHUHyJtpOMDL1lGoMDGj3D80QZDjqQ9jsRzcJ-ChPJ1-KDBaO2q4Yl--GW4QWFq3C2kBUt2KUH6Ih0pLPKQBYgWlUh_fh6CLS13oddxdn__fLd1zg896RFHw3zk6YTV0pvVOebU7JKpKv6uOnQOKifL6Z-V925lxmFR238G0e38YLj1QeiqftprfC6J7zHDLHmdcs_wI93ucVgWF0h9_HUoN5JGxZKTJZJZj-K3U5IIWXCr8S6t-nRB_I76jR6QF3k6AwlZmWk4_jKRziv3Vhmt8BCtQwIdCuV8v9dm9w./download + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Date: + - Tue, 07 May 2019 15:56:17 GMT + Content-Type: + - text/html + Content-Length: + - '22384' + Connection: + - keep-alive + Accept-Ranges: + - bytes + Cache-Control: + - private + Content-Disposition: + - attachment;filename="Box-upload-test.boxnote";filename*=UTF-8''Box-upload-test.boxnote + X-Robots-Tag: + - noindex, nofollow + Encryption-Policy-Id: + - '0' + X-Content-Type-Options: + - nosniff + Age: + - '0' + Strict-Transport-Security: + - max-age=31536000 + body: + encoding: UTF-8 + string: '' + http_version: + recorded_at: Tue, 07 May 2019 15:56:17 GMT +- request: + method: head + uri: https://dl.boxcloud.com/d/1/b1!1Yion0r0JN3Vv9IKmsdgV_dubSzIzoX0uOdkrmZrgy2bMhX56j16TMFVAcZKjkBEGLmKRBZaJ8MbjNpc7989v2OKRiXAOJrc6MqEYYE8KDUG-I8X1R00PWH0GqR3tIhDbAhncczyhN1G_s0SZ0R5o7Rze7GQGG-oH9Mn86Tk0GlNOXD2rrZS4Ay6FbixTqch0QENs7aKfosOhQmnr91m7D2NeSUt_XhhA77VvsNmYN4nkMnUgO56EfCRHIP_ejeqVDX9IgCcn505wGAUtTCmsr7YZOPYjokJjrf76bvwwydS_mk59RdKeOAYoUEOwY9wr6co4VwxSwekDJ92y10HBw-ljHPqhm18A832jYotGhgYnPmDPxiv97lHCbwiCKjfwVNpd1MBXDhuOEPJQw8XJA0OKtUeD4gbMUilDSxUwSB0Z1TDqegFfiAZQ4HzxCW7C2pxWLvy781B_NcL3GZ2X0xARExs98ow7jItgvftUw_D9uwgTeUZGQakHz7AI2SRTsNH9nqUop2UwEGOGAqIN3QWKRiz9JpFu2-KfU7b4rh0IhYBtcacUrYFPLcib9Nu9denZT-NGRFQbu36voRZExLcgEelrGULMDOHRPtE8sdKt5gbvl7rJuyFcQlaOwn-4KWbzqHtvNjNmLImHeubnTRNjCv1eQBPhB5osIezJbeehVgLTJMXQtE8VuV64scOhowMluHhOHgghdEeO04adAJJaNlqGYTz_bRQje44yrjx3fwVFTACBK-d7KPgrL_zGCh0LWAMObL--pxgl9i3pnTFizwGEjN5paSvJj-sVTEcVIezgCWpczFNk3nvi5TuzKEgV8jt4hpwSufkyH1sUqvKW-16AbwD6klEo3zXomK3jSlv0CW5WK1a3QGWFlcOMGQoAem7ns9XpS9F7Ubnex3MJgkiErZovku8ySo8aHC80-vy2-e3lhuiLIBpmGsOwItldfuUJDUG8S-cO-xzBX_UL0q1b7YHUHyJtpOMDL1lGoMDGj3D80QZDjqQ9jsRzcJ-ChPJ1-KDBaO2q4Yl--GW4QWFq3C2kBUt2KUH6Ih0pLPKQBYgWlUh_fh6CLS13oddxdn__fLd1zg896RFHw3zk6YTV0pvVOebU7JKpKv6uOnQOKifL6Z-V925lxmFR238G0e38YLj1QeiqftprfC6J7zHDLHmdcs_wI93ucVgWF0h9_HUoN5JGxZKTJZJZj-K3U5IIWXCr8S6t-nRB_I76jR6QF3k6AwlZmWk4_jKRziv3Vhmt8BCtQwIdCuV8v9dm9w./download + body: + encoding: US-ASCII + string: '' + headers: {} + response: + status: + code: 200 + message: OK + headers: + Date: + - Tue, 07 May 2019 15:56:17 GMT + Content-Type: + - text/html + Content-Length: + - '22384' + Connection: + - keep-alive + Accept-Ranges: + - bytes + Cache-Control: + - private + Content-Disposition: + - attachment;filename="Box-upload-test.boxnote";filename*=UTF-8''Box-upload-test.boxnote + X-Robots-Tag: + - noindex, nofollow + Encryption-Policy-Id: + - '0' + X-Content-Type-Options: + - nosniff + Age: + - '0' + Strict-Transport-Security: + - max-age=31536000 + body: + encoding: UTF-8 + string: '' + http_version: + recorded_at: Tue, 07 May 2019 15:56:17 GMT +- request: + method: get + uri: https://dl.boxcloud.com/d/1/b1!1Yion0r0JN3Vv9IKmsdgV_dubSzIzoX0uOdkrmZrgy2bMhX56j16TMFVAcZKjkBEGLmKRBZaJ8MbjNpc7989v2OKRiXAOJrc6MqEYYE8KDUG-I8X1R00PWH0GqR3tIhDbAhncczyhN1G_s0SZ0R5o7Rze7GQGG-oH9Mn86Tk0GlNOXD2rrZS4Ay6FbixTqch0QENs7aKfosOhQmnr91m7D2NeSUt_XhhA77VvsNmYN4nkMnUgO56EfCRHIP_ejeqVDX9IgCcn505wGAUtTCmsr7YZOPYjokJjrf76bvwwydS_mk59RdKeOAYoUEOwY9wr6co4VwxSwekDJ92y10HBw-ljHPqhm18A832jYotGhgYnPmDPxiv97lHCbwiCKjfwVNpd1MBXDhuOEPJQw8XJA0OKtUeD4gbMUilDSxUwSB0Z1TDqegFfiAZQ4HzxCW7C2pxWLvy781B_NcL3GZ2X0xARExs98ow7jItgvftUw_D9uwgTeUZGQakHz7AI2SRTsNH9nqUop2UwEGOGAqIN3QWKRiz9JpFu2-KfU7b4rh0IhYBtcacUrYFPLcib9Nu9denZT-NGRFQbu36voRZExLcgEelrGULMDOHRPtE8sdKt5gbvl7rJuyFcQlaOwn-4KWbzqHtvNjNmLImHeubnTRNjCv1eQBPhB5osIezJbeehVgLTJMXQtE8VuV64scOhowMluHhOHgghdEeO04adAJJaNlqGYTz_bRQje44yrjx3fwVFTACBK-d7KPgrL_zGCh0LWAMObL--pxgl9i3pnTFizwGEjN5paSvJj-sVTEcVIezgCWpczFNk3nvi5TuzKEgV8jt4hpwSufkyH1sUqvKW-16AbwD6klEo3zXomK3jSlv0CW5WK1a3QGWFlcOMGQoAem7ns9XpS9F7Ubnex3MJgkiErZovku8ySo8aHC80-vy2-e3lhuiLIBpmGsOwItldfuUJDUG8S-cO-xzBX_UL0q1b7YHUHyJtpOMDL1lGoMDGj3D80QZDjqQ9jsRzcJ-ChPJ1-KDBaO2q4Yl--GW4QWFq3C2kBUt2KUH6Ih0pLPKQBYgWlUh_fh6CLS13oddxdn__fLd1zg896RFHw3zk6YTV0pvVOebU7JKpKv6uOnQOKifL6Z-V925lxmFR238G0e38YLj1QeiqftprfC6J7zHDLHmdcs_wI93ucVgWF0h9_HUoN5JGxZKTJZJZj-K3U5IIWXCr8S6t-nRB_I76jR6QF3k6AwlZmWk4_jKRziv3Vhmt8BCtQwIdCuV8v9dm9w./download + body: + encoding: US-ASCII + string: '' + headers: {} + response: + status: + code: 200 + message: OK + headers: + Date: + - Tue, 07 May 2019 15:56:18 GMT + Content-Type: + - text/html + Content-Length: + - '22384' + Connection: + - keep-alive + Accept-Ranges: + - bytes + Cache-Control: + - private + Content-Disposition: + - attachment;filename="Box-upload-test.boxnote";filename*=UTF-8''Box-upload-test.boxnote + X-Robots-Tag: + - noindex, nofollow + Encryption-Policy-Id: + - '0' + X-Content-Type-Options: + - nosniff + Age: + - '0' + Strict-Transport-Security: + - max-age=31536000 + body: + encoding: ASCII-8BIT + string: !binary |- + 0000000000000000 + http_version: + recorded_at: Tue, 07 May 2019 15:56:18 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/vcr_cassettes/dropbox.yml b/spec/fixtures/vcr_cassettes/dropbox.yml deleted file mode 100644 index 0f420739c..000000000 --- a/spec/fixtures/vcr_cassettes/dropbox.yml +++ /dev/null @@ -1,563 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: https://DropBoxAppKey:DropBoxAppSecret@api.dropbox.com/1/oauth2/token - body: - encoding: UTF-8 - string: grant_type=authorization_code&code=FakeDropboxAuthorizationCodeABCDEFG&redirect_uri=http%3A%2F%2Fbrowse.example.edu%2Fbrowse%2Fconnect - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Content-Type: application/x-www-form-urlencoded - Connection: close - Host: api.dropbox.com - Content-Length: '140' - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:38:46 GMT - Content-Type: text/javascript - Transfer-Encoding: chunked - Connection: close - x-server-response-time: '92' - x-dropbox-request-id: adb756ec7f02c3a142c9d43c479c2033 - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: 9a70a92424860e2700a2f741b4d0dc6f - body: - encoding: UTF-8 - string: ! '{"access_token": "FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321", - "token_type": "bearer", "uid": "1234567"}' - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:38:46 GMT -- request: - method: get - uri: https://api.dropbox.com/1/metadata/auto/Writer?file_limit=25000&include_deleted=false&include_media_info=false&list=true - body: - encoding: UTF-8 - string: '' - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Authorization: Bearer FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321 - Connection: close - Host: api.dropbox.com - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:38:55 GMT - Content-Type: text/javascript - Transfer-Encoding: chunked - Connection: close - set-cookie: ! 'gvc=Njg4MTEzOTAzNjIxMzA3Mzg0Nzk4ODMwMjc3ODE5Mjk1OTIyMjY%3D; expires=Wed, - 19 Sep 2018 15:38:55 - - GMT; Path=/; httponly' - x-server-response-time: '64' - x-dropbox-request-id: 349e4a2b10c59d22f4e686ddbd608b69 - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: 83bc363934d5a5457cbcbd0fab8b4cfb - body: - encoding: UTF-8 - string: ! '{ "hash": "c4a067b0bfef9feefca072bb14d9be93", "revision": 2636, "rev": "a4c00cbb190", - "thumb_exists": false, "bytes": 0, "modified": "Thu, 23 Sep 2010 06:30:15 +0000", - "path": "/Writer", "is_dir": true, "icon": "folder", "root": "dropbox", "contents": - [ { "revision": 4011, "rev": "fab00cbb190", "thumb_exists": false, "bytes": 11642, - "modified": "Sat, 09 Apr 2011 18:54:55 +0000", "client_mtime": "Sat, 09 Apr 2011 - 18:54:55 +0000", "path": "/Writer/About Writer.txt", "is_dir": false, "icon": "page_white_text", - "root": "dropbox", "mime_type": "text/plain", "size": "11.4 KB" }, { "revision": - 2754, "rev": "ac200cbb190", "thumb_exists": false, "bytes": 988, "modified": "Thu, - 14 Oct 2010 08:32:20 +0000", "client_mtime": "Thu, 14 Oct 2010 08:32:20 +0000", - "path": "/Writer/Markdown Test.txt", "is_dir": false, "icon": "page_white_text", - "root": "dropbox", "mime_type": "text/plain", "size": "988 bytes" }, { "revision": - 4009, "rev": "fa900cbb190", "thumb_exists": false, "bytes": 20904, "modified": "Sat, - 09 Apr 2011 18:54:54 +0000", "client_mtime": "Sat, 09 Apr 2011 18:54:54 +0000", - "path": "/Writer/Writer FAQ.txt", "is_dir": false, "icon": "page_white_text", "root": - "dropbox", "mime_type": "text/plain", "size": "20.4 KB" } ], "size": "0 bytes" }' - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:38:55 GMT -- request: - method: get - uri: https://api.dropbox.com/1/metadata/auto/?file_limit=25000&include_deleted=false&include_media_info=false&list=true - body: - encoding: UTF-8 - string: '' - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Authorization: Bearer FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321 - Connection: close - Host: api.dropbox.com - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:38:48 GMT - Content-Type: text/javascript - Transfer-Encoding: chunked - Connection: close - set-cookie: ! 'gvc=MjMzNzg4MzEzNTQ2Mzk1MzQ0NjcxNzY2ODI2MDkzODUzNzI5NTYw; expires=Wed, - 19 Sep 2018 15:38:48 - - GMT; Path=/; httponly' - x-server-response-time: '50' - x-dropbox-request-id: da19c8c6ca44a67e6c2db3f0254058d1 - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: 057f2caf7291c8f9684a0626480afb30 - body: - encoding: UTF-8 - string: ! '{ "hash": "60657d5728ee9c36971c0c8269a1c5e8", "thumb_exists": false, "bytes": - 0, "path": "/", "is_dir": true, "size": "0 bytes", "root": "dropbox", "contents": - [ { "revision": 8743, "rev": "222700cbb190", "thumb_exists": false, "bytes": 0, - "modified": "Sun, 09 Dec 2012 20:30:45 +0000", "path": "/Apps", "is_dir": true, - "icon": "folder", "root": "dropbox", "size": "0 bytes" }, { "revision": 6944, "rev": - "1b2000cbb190", "thumb_exists": false, "bytes": 0, "modified": "Sun, 25 Mar 2012 - 00:36:39 +0000", "path": "/Books", "is_dir": true, "icon": "folder", "root": "dropbox", - "size": "0 bytes" }, { "revision": 14, "rev": "e00cbb190", "thumb_exists": false, - "bytes": 0, "modified": "Mon, 28 Jun 2010 16:53:48 +0000", "path": "/Documents", - "is_dir": true, "icon": "folder", "root": "dropbox", "size": "0 bytes" }, { "revision": - 9, "rev": "900cbb190", "thumb_exists": false, "bytes": 127748, "modified": "Mon, - 28 Jun 2010 16:49:18 +0000", "client_mtime": "Mon, 28 Jun 2010 16:49:19 +0000", - "path": "/Getting Started.pdf", "is_dir": false, "icon": "page_white_acrobat", "root": - "dropbox", "mime_type": "application/pdf", "size": "124.8 KB" }, { "revision": 1975, - "rev": "7b700cbb190", "thumb_exists": false, "bytes": 208218, "modified": "Mon, - 28 Jun 2010 17:28:47 +0000", "client_mtime": "Mon, 28 Jun 2010 17:28:47 +0000", - "path": "/iPad intro.pdf", "is_dir": false, "icon": "page_white_acrobat", "root": - "dropbox", "mime_type": "application/pdf", "size": "203.3 KB" }, { "revision": 1973, - "rev": "7b500cbb190", "thumb_exists": false, "bytes": 315187, "modified": "Mon, - 28 Jun 2010 17:27:11 +0000", "client_mtime": "Mon, 28 Jun 2010 17:27:11 +0000", - "path": "/iPhone intro.pdf", "is_dir": false, "icon": "page_white_acrobat", "root": - "dropbox", "mime_type": "application/pdf", "size": "307.8 KB" }, { "revision": 2636, - "rev": "a4c00cbb190", "thumb_exists": false, "bytes": 0, "modified": "Thu, 23 Sep - 2010 06:30:15 +0000", "path": "/Writer", "is_dir": true, "icon": "folder", "root": - "dropbox", "size": "0 bytes" } ], "icon": "folder" }' - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:38:48 GMT -- request: - method: get - uri: https://api.dropbox.com/1/metadata/auto/?file_limit=25000&include_deleted=false&include_media_info=false&list=true - body: - encoding: UTF-8 - string: '' - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Authorization: Bearer FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321 - Connection: close - Host: api.dropbox.com - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:38:48 GMT - Content-Type: text/javascript - Transfer-Encoding: chunked - Connection: close - set-cookie: ! 'gvc=MjMzNzg4MzEzNTQ2Mzk1MzQ0NjcxNzY2ODI2MDkzODUzNzI5NTYw; expires=Wed, - 19 Sep 2018 15:38:48 - - GMT; Path=/; httponly' - x-server-response-time: '50' - x-dropbox-request-id: da19c8c6ca44a67e6c2db3f0254058d1 - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: 057f2caf7291c8f9684a0626480afb30 - body: - encoding: UTF-8 - string: ! '{ "hash": "60657d5728ee9c36971c0c8269a1c5e8", "thumb_exists": false, "bytes": - 0, "path": "/", "is_dir": true, "size": "0 bytes", "root": "dropbox", "contents": - [ { "revision": 8743, "rev": "222700cbb190", "thumb_exists": false, "bytes": 0, - "modified": "Sun, 09 Dec 2012 20:30:45 +0000", "path": "/Apps", "is_dir": true, - "icon": "folder", "root": "dropbox", "size": "0 bytes" }, { "revision": 6944, "rev": - "1b2000cbb190", "thumb_exists": false, "bytes": 0, "modified": "Sun, 25 Mar 2012 - 00:36:39 +0000", "path": "/Books", "is_dir": true, "icon": "folder", "root": "dropbox", - "size": "0 bytes" }, { "revision": 14, "rev": "e00cbb190", "thumb_exists": false, - "bytes": 0, "modified": "Mon, 28 Jun 2010 16:53:48 +0000", "path": "/Documents", - "is_dir": true, "icon": "folder", "root": "dropbox", "size": "0 bytes" }, { "revision": - 9, "rev": "900cbb190", "thumb_exists": false, "bytes": 127748, "modified": "Mon, - 28 Jun 2010 16:49:18 +0000", "client_mtime": "Mon, 28 Jun 2010 16:49:19 +0000", - "path": "/Getting Started.pdf", "is_dir": false, "icon": "page_white_acrobat", "root": - "dropbox", "mime_type": "application/pdf", "size": "124.8 KB" }, { "revision": 1975, - "rev": "7b700cbb190", "thumb_exists": false, "bytes": 208218, "modified": "Mon, - 28 Jun 2010 17:28:47 +0000", "client_mtime": "Mon, 28 Jun 2010 17:28:47 +0000", - "path": "/iPad intro.pdf", "is_dir": false, "icon": "page_white_acrobat", "root": - "dropbox", "mime_type": "application/pdf", "size": "203.3 KB" }, { "revision": 1973, - "rev": "7b500cbb190", "thumb_exists": false, "bytes": 315187, "modified": "Mon, - 28 Jun 2010 17:27:11 +0000", "client_mtime": "Mon, 28 Jun 2010 17:27:11 +0000", - "path": "/iPhone intro.pdf", "is_dir": false, "icon": "page_white_acrobat", "root": - "dropbox", "mime_type": "application/pdf", "size": "307.8 KB" }, { "revision": 2636, - "rev": "a4c00cbb190", "thumb_exists": false, "bytes": 0, "modified": "Thu, 23 Sep - 2010 06:30:15 +0000", "path": "/Writer", "is_dir": true, "icon": "folder", "root": - "dropbox", "size": "0 bytes" } ], "icon": "folder" }' - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:38:48 GMT -- request: - method: get - uri: https://api.dropbox.com/1/media/auto/Writer/Writer%20FAQ.txt? - body: - encoding: UTF-8 - string: '' - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Authorization: Bearer FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321 - Connection: close - Host: api.dropbox.com - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:39:01 GMT - Content-Type: text/javascript - Transfer-Encoding: chunked - Connection: close - set-cookie: ! 'gvc=MjEyNTM5NjUyNDAyMDIwODUzNTU0MTY0NzA0ODU4MzczNTU0NDI%3D; expires=Wed, - 19 Sep 2018 15:39:01 - - GMT; Path=/; httponly' - x-server-response-time: '68' - x-dropbox-request-id: d8dbc2e2080168d6e34d85165aa69c0e - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: e03a6c0ded5f7088ba59ecd9e97234a6 - body: - encoding: UTF-8 - string: ! '{"url": "https://dl.dropboxusercontent.com/1/view/FakeDropboxAccessPath/Writer/Writer%20FAQ.txt", - "expires": "Fri, 20 Sep 2013 19:39:01 +0000"}' - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:39:01 GMT -- request: - method: get - uri: https://api.dropbox.com/1/media/auto/Writer/Writer%20FAQ.txt - body: - encoding: UTF-8 - string: '' - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Authorization: Bearer FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321 - Connection: close - Host: api.dropbox.com - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:39:01 GMT - Content-Type: text/javascript - Transfer-Encoding: chunked - Connection: close - set-cookie: ! 'gvc=MjEyNTM5NjUyNDAyMDIwODUzNTU0MTY0NzA0ODU4MzczNTU0NDI%3D; expires=Wed, - 19 Sep 2018 15:39:01 - - GMT; Path=/; httponly' - x-server-response-time: '68' - x-dropbox-request-id: d8dbc2e2080168d6e34d85165aa69c0e - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: e03a6c0ded5f7088ba59ecd9e97234a6 - body: - encoding: UTF-8 - string: ! '{"url": "https://dl.dropboxusercontent.com/1/view/FakeDropboxAccessPath/Writer/Writer%20FAQ.txt", - "expires": "Fri, 20 Sep 2013 19:39:01 +0000"}' - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:39:01 GMT -- request: - method: get - uri: https://api.dropbox.com/1/media/auto/Writer/Markdown%20Test.txt? - body: - encoding: UTF-8 - string: '' - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Authorization: Bearer FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321 - Connection: close - Host: api.dropbox.com - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:39:02 GMT - Content-Type: text/javascript - Transfer-Encoding: chunked - Connection: close - set-cookie: ! 'gvc=NjgwODYwOTI2NTA5OTAyNzE3NzE4MDU3MzY0NTQ3NTYyNTYyNDE%3D; expires=Wed, - 19 Sep 2018 15:39:02 - - GMT; Path=/; httponly' - x-server-response-time: '78' - x-dropbox-request-id: b6fd9a3c039d2aea3def25f8f2f5ac3a - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: 30d2c0cf0122795ebce9bd5f26ce0c60 - body: - encoding: UTF-8 - string: ! '{"url": "https://dl.dropboxusercontent.com/1/view/FakeDropboxAccessPath/Writer/Markdown%20Test.txt", - "expires": "Fri, 20 Sep 2013 19:39:02 +0000"}' - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:39:02 GMT -- request: - method: get - uri: https://api.dropbox.com/1/media/auto/Writer/Markdown%20Test.txt - body: - encoding: UTF-8 - string: '' - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Authorization: Bearer FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321 - Connection: close - Host: api.dropbox.com - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:39:02 GMT - Content-Type: text/javascript - Transfer-Encoding: chunked - Connection: close - set-cookie: ! 'gvc=NjgwODYwOTI2NTA5OTAyNzE3NzE4MDU3MzY0NTQ3NTYyNTYyNDE%3D; expires=Wed, - 19 Sep 2018 15:39:02 - - GMT; Path=/; httponly' - x-server-response-time: '78' - x-dropbox-request-id: b6fd9a3c039d2aea3def25f8f2f5ac3a - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: 30d2c0cf0122795ebce9bd5f26ce0c60 - body: - encoding: UTF-8 - string: ! '{"url": "https://dl.dropboxusercontent.com/1/view/FakeDropboxAccessPath/Writer/Writer%20FAQ.txt", - "expires": "Fri, 20 Sep 2013 19:39:02 +0000"}' - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:39:02 GMT -- request: - method: get - uri: https://api.dropbox.com/1/media/auto/Writer/Markdown%20Test.txt - body: - encoding: UTF-8 - string: '' - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Authorization: Bearer FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321 - Connection: close - Host: api.dropbox.com - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:39:02 GMT - Content-Type: text/javascript - Transfer-Encoding: chunked - Connection: close - set-cookie: ! 'gvc=NjgwODYwOTI2NTA5OTAyNzE3NzE4MDU3MzY0NTQ3NTYyNTYyNDE%3D; expires=Wed, - 19 Sep 2018 15:39:02 - - GMT; Path=/; httponly' - x-server-response-time: '78' - x-dropbox-request-id: b6fd9a3c039d2aea3def25f8f2f5ac3a - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: 30d2c0cf0122795ebce9bd5f26ce0c60 - body: - encoding: UTF-8 - string: ! 'test file data' - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:39:02 GMT -- request: - method: head - uri: https://dl.dropboxusercontent.com/1/view/FakeDropboxAccessPath/Writer/Writer%20FAQ.txt - body: - encoding: UTF-8 - string: '' - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Authorization: Bearer FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321 - Connection: close - Host: api.dropbox.com - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:39:02 GMT - Content-Type: text/javascript - Transfer-Encoding: chunked - Connection: close - set-cookie: ! 'gvc=NjgwODYwOTI2NTA5OTAyNzE3NzE4MDU3MzY0NTQ3NTYyNTYyNDE%3D; expires=Wed, - 19 Sep 2018 15:39:02 - - GMT; Path=/; httponly' - x-server-response-time: '78' - x-dropbox-request-id: b6fd9a3c039d2aea3def25f8f2f5ac3a - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: 30d2c0cf0122795ebce9bd5f26ce0c60 - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:39:02 GMT -- request: - method: head - uri: https://dl.dropboxusercontent.com/1/view/FakeDropboxAccessPath/Writer/Writer%20FAQ.txt - body: - encoding: UTF-8 - string: '' - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Authorization: Bearer FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321 - Connection: close - Host: api.dropbox.com - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:39:02 GMT - Content-Type: text/javascript - Content-Length: '140' - Transfer-Encoding: chunked - Connection: close - set-cookie: ! 'gvc=NjgwODYwOTI2NTA5OTAyNzE3NzE4MDU3MzY0NTQ3NTYyNTYyNDE%3D; expires=Wed, - 19 Sep 2018 15:39:02 - - GMT; Path=/; httponly' - x-server-response-time: '78' - x-dropbox-request-id: b6fd9a3c039d2aea3def25f8f2f5ac3a - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: 30d2c0cf0122795ebce9bd5f26ce0c60 - body: - encoding: UTF-8 - string: ! 'test markdown file data' - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:39:02 GMT -- request: - method: get - uri: https://dl.dropboxusercontent.com/1/view/FakeDropboxAccessPath/Writer/Writer%20FAQ.txt - body: - encoding: UTF-8 - string: '' - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Authorization: Bearer FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321 - Connection: close - Host: api.dropbox.com - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:39:02 GMT - Content-Type: text/javascript - Transfer-Encoding: chunked - Connection: close - set-cookie: ! 'gvc=NjgwODYwOTI2NTA5OTAyNzE3NzE4MDU3MzY0NTQ3NTYyNTYyNDE%3D; expires=Wed, - 19 Sep 2018 15:39:02 - - GMT; Path=/; httponly' - x-server-response-time: '78' - x-dropbox-request-id: b6fd9a3c039d2aea3def25f8f2f5ac3a - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: 30d2c0cf0122795ebce9bd5f26ce0c60 - body: - encoding: UTF-8 - string: ! 'test markdown file data' - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:39:02 GMT -- request: - method: get - uri: https://api.dropbox.com/1/metadata/auto/Writer/Markdown%20Test.txt?file_limit=25000&include_deleted=false&include_media_info=false&list=true - body: - encoding: UTF-8 - string: '' - headers: - Accept: ! '*/*' - User-Agent: OfficialDropboxRubySDK/1.6.1 - Authorization: Bearer FakeDropboxAccessToken01234567890ABCDEF_AAAAAAA987654321 - Connection: close - Host: api.dropbox.com - response: - status: - code: '200' - message: OK - headers: - Server: nginx - Date: Fri, 20 Sep 2013 15:38:55 GMT - Content-Type: text/javascript - Transfer-Encoding: chunked - Connection: close - set-cookie: ! 'gvc=Njg4MTEzOTAzNjIxMzA3Mzg0Nzk4ODMwMjc3ODE5Mjk1OTIyMjY%3D; expires=Wed, - 19 Sep 2018 15:38:55 - - GMT; Path=/; httponly' - x-server-response-time: '64' - x-dropbox-request-id: 349e4a2b10c59d22f4e686ddbd608b69 - pragma: no-cache - cache-control: no-cache - x-dropbox-http-protocol: None - x-frame-options: SAMEORIGIN - X-RequestId: 83bc363934d5a5457cbcbd0fab8b4cfb - body: - encoding: UTF-8 - string: ! '{ "revision": 2754, "rev": "ac200cbb190", "thumb_exists": false, - "bytes": 988, "modified": "Thu, 14 Oct 2010 08:32:20 +0000", - "client_mtime": "Thu, 14 Oct 2010 08:32:20 +0000", - "path": "/Writer/Markdown Test.txt", "is_dir": false, "icon": "page_white_text", - "root": "dropbox", "mime_type": "text/plain", "size": "988 bytes" }' - http_version: '1.1' - recorded_at: Fri, 20 Sep 2013 15:38:55 GMT -recorded_with: Charles Proxy From 09ac79315efee461e1a285c8874122ad444fecb8 Mon Sep 17 00:00:00 2001 From: Adam Wead Date: Tue, 7 May 2019 23:48:42 -0400 Subject: [PATCH 2/2] Install bundler Override the existing install_bundler task from the capistrano-rbenv-install gem to install the version of bundler that is used in the application. This avoids issues with incompatibilities between Ruby versions and versions of the bundler gem. --- config/deploy.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/deploy.rb b/config/deploy.rb index 90dfdcba6..0d0cacbd4 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -101,6 +101,17 @@ end end +namespace :rbenv do + desc 'Overrides task in capistrano-rbenv-install to install the correct version of the bundler gem' + task install_bundler: ['rbenv:map_bins'] do + on roles fetch(:rbenv_roles) do + next if test :gem, :query, "--quiet --installed --name-matches ^bundler (#{Bundler::VERSION})$" + + execute :gem, :install, :bundler, "--quiet --no-document --version #{Bundler::VERSION}" + end + end +end + namespace :deploy do desc 'Verify yaml configuration files are present and contain the correct keys' task :check_configs do