diff --git a/app/logical/twitter_service.rb b/app/logical/twitter_service.rb index 17f98b19f..fa73cf93a 100644 --- a/app/logical/twitter_service.rb +++ b/app/logical/twitter_service.rb @@ -35,7 +35,7 @@ class TwitterService end end urls.uniq - # rescue - # [] + rescue => e + [] end end diff --git a/test/controllers/user_upgrades_controller_test.rb b/test/controllers/user_upgrades_controller_test.rb deleted file mode 100644 index cb2115382..000000000 --- a/test/controllers/user_upgrades_controller_test.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'test_helper' - -class UserUpgradesControllerTest < ActionController::TestCase - if Danbooru.config.coinbase_secret - setup do - @admin = FactoryGirl.create(:admin_user) - @user = FactoryGirl.create(:user) - end - - context "#create" do - setup do - @encrypted = ActiveSupport::MessageEncryptor.new(Danbooru.config.coinbase_secret).encrypt_and_sign("#{@user.id},#{User::Levels::GOLD}") - end - - context "for basic -> gold" do - should "promote the account" do - post :create, {:order => {:status => "completed", :custom => @encrypted}} - assert_response :success - @user.reload - assert_equal(User::Levels::GOLD, @user.level) - end - end - end - - context "#new" do - setup do - Coinbase::Client.any_instance.stubs(:create_button).returns(OpenStruct.new) - end - - should "render" do - get :new, {}, {:user_id => @user.id} - assert_response :success - end - end - end -end diff --git a/test/fixtures/vcr_cassettes/functional/upload/twitter.yml b/test/fixtures/vcr_cassettes/functional/upload/twitter.yml index 4e1f41bd9..b941fac47 100644 --- a/test/fixtures/vcr_cassettes/functional/upload/twitter.yml +++ b/test/fixtures/vcr_cassettes/functional/upload/twitter.yml @@ -10,7 +10,7 @@ http_interactions: Accept: - "*/*" User-Agent: - - TwitterRubyGem/5.13.0 + - TwitterRubyGem/5.14.0 Content-Type: - application/x-www-form-urlencoded; charset=UTF-8 Accept-Encoding: @@ -29,36 +29,36 @@ http_interactions: Content-Type: - application/json;charset=utf-8 Date: - - Fri, 12 Jun 2015 04:57:34 GMT + - Wed, 23 Sep 2015 19:54:41 GMT Expires: - Tue, 31 Mar 1981 05:00:00 GMT Last-Modified: - - Fri, 12 Jun 2015 04:57:34 GMT + - Wed, 23 Sep 2015 19:54:41 GMT Ml: - A Pragma: - no-cache Server: - - tsa_b + - tsa_a Set-Cookie: - - guest_id=v1%3A143408505467055919; Domain=.twitter.com; Path=/; Expires=Sun, - 11-Jun-2017 04:57:34 UTC + - guest_id=v1%3A144303808161214524; Domain=.twitter.com; Path=/; Expires=Fri, + 22-Sep-2017 19:54:41 UTC Status: - 200 OK Strict-Transport-Security: - max-age=631138519 X-Connection-Hash: - - 93143bc0b586b17b5a859c69ca8f0998 + - d4d13b153ac4e91339bcab814f1eacda X-Content-Type-Options: - nosniff X-Frame-Options: - SAMEORIGIN X-Response-Time: - - '8' + - '113' X-Transaction: - - 6d8adb7da07e9173 + - 7c35d25a0d1a8440 X-Tsa-Request-Body-Time: - - '2' + - '0' X-Twitter-Response-Tags: - BouncerCompliant X-Ua-Compatible: @@ -69,7 +69,7 @@ http_interactions: encoding: UTF-8 string: '{"token_type":"bearer","access_token":"AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5"}' http_version: - recorded_at: Fri, 12 Jun 2015 04:57:34 GMT + recorded_at: Wed, 23 Sep 2015 19:54:50 GMT - request: method: get uri: https://api.twitter.com/1.1/statuses/show/567054278486151168.json @@ -80,7 +80,7 @@ http_interactions: Accept: - application/json User-Agent: - - TwitterRubyGem/5.13.0 + - TwitterRubyGem/5.14.0 Authorization: - Bearer AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5 Accept-Encoding: @@ -95,22 +95,22 @@ http_interactions: Content-Disposition: - attachment; filename=json.json Content-Length: - - '1312' + - '1317' Content-Type: - application/json;charset=utf-8 Date: - - Fri, 12 Jun 2015 04:57:35 GMT + - Wed, 23 Sep 2015 19:54:42 GMT Expires: - Tue, 31 Mar 1981 05:00:00 GMT Last-Modified: - - Fri, 12 Jun 2015 04:57:35 GMT + - Wed, 23 Sep 2015 19:54:42 GMT Pragma: - no-cache Server: - - tsa_b + - tsa_a Set-Cookie: - - guest_id=v1%3A143408505504851045; Domain=.twitter.com; Path=/; Expires=Sun, - 11-Jun-2017 04:57:35 UTC + - guest_id=v1%3A144303808232303587; Domain=.twitter.com; Path=/; Expires=Fri, + 22-Sep-2017 19:54:42 UTC Status: - 200 OK Strict-Transport-Security: @@ -118,7 +118,7 @@ http_interactions: X-Access-Level: - read X-Connection-Hash: - - ca28ace74b013f3f9df6d0649e16d568 + - ee0e5dbf46dc8f91d6e5aad782a2d4ad X-Content-Type-Options: - nosniff X-Frame-Options: @@ -126,13 +126,13 @@ http_interactions: X-Rate-Limit-Limit: - '180' X-Rate-Limit-Remaining: - - '176' + - '179' X-Rate-Limit-Reset: - - '1434085564' + - '1443038982' X-Response-Time: - - '19' + - '35' X-Transaction: - - bfbf726353356118 + - 75e9fe3cef0b6fbb X-Twitter-Response-Tags: - BouncerCompliant X-Xss-Protection: @@ -143,10 +143,10 @@ http_interactions: are the same person. #CrossAnge http:\/\/t.co\/zX5p4AOUoA","source":"\u003ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003eTwitter Web Client\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":68692042,"id_str":"68692042","name":"lvlln","screen_name":"lvlln","location":"Arlington, MA","description":"Just a quant who enjoys anime and video games and ultimate. - Blogs on Metanorn. I help to run http:\/\/t.co\/ilgVSv62tc","url":"http:\/\/t.co\/NXLDfpT1OT","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/NXLDfpT1OT","expanded_url":"http:\/\/metanorn.net","display_url":"metanorn.net","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/ilgVSv62tc","expanded_url":"http:\/\/mirroredanimescreenshots.tumblr.com","display_url":"mirroredanimescreenshots.tumblr.com","indices":[93,115]}]}},"protected":false,"followers_count":1047,"friends_count":814,"listed_count":47,"created_at":"Tue - Aug 25 13:28:39 +0000 2009","favourites_count":7690,"utc_offset":null,"time_zone":null,"geo_enabled":true,"verified":false,"statuses_count":59165,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/68692042\/1399737095","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":30,"favorite_count":23,"entities":{"hashtags":[{"text":"CrossAnge","indices":[27,37]}],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}},{"id":567054271989182465,"id_str":"567054271989182465","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' + Blogs on Metanorn. I help to run http:\/\/t.co\/ilgVSv62tc","url":"http:\/\/t.co\/NXLDfpT1OT","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/NXLDfpT1OT","expanded_url":"http:\/\/metanorn.net","display_url":"metanorn.net","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/ilgVSv62tc","expanded_url":"http:\/\/mirroredanimescreenshots.tumblr.com","display_url":"mirroredanimescreenshots.tumblr.com","indices":[93,115]}]}},"protected":false,"followers_count":1056,"friends_count":907,"listed_count":55,"created_at":"Tue + Aug 25 13:28:39 +0000 2009","favourites_count":8975,"utc_offset":null,"time_zone":null,"geo_enabled":true,"verified":false,"statuses_count":64408,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/68692042\/1399737095","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":29,"favorite_count":23,"entities":{"hashtags":[{"text":"CrossAnge","indices":[27,37]}],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}},{"id":567054271989182465,"id_str":"567054271989182465","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' http_version: - recorded_at: Fri, 12 Jun 2015 04:57:35 GMT + recorded_at: Wed, 23 Sep 2015 19:54:51 GMT - request: method: post uri: https://SENSITIVE:SENSITIVE@api.twitter.com/oauth2/token @@ -157,7 +157,7 @@ http_interactions: Accept: - "*/*" User-Agent: - - TwitterRubyGem/5.13.0 + - TwitterRubyGem/5.14.0 Content-Type: - application/x-www-form-urlencoded; charset=UTF-8 Accept-Encoding: @@ -176,34 +176,34 @@ http_interactions: Content-Type: - application/json;charset=utf-8 Date: - - Fri, 12 Jun 2015 04:57:35 GMT + - Wed, 23 Sep 2015 19:54:44 GMT Expires: - Tue, 31 Mar 1981 05:00:00 GMT Last-Modified: - - Fri, 12 Jun 2015 04:57:35 GMT + - Wed, 23 Sep 2015 19:54:44 GMT Ml: - - A + - S Pragma: - no-cache Server: - - tsa_b + - tsa_a Set-Cookie: - - guest_id=v1%3A143408505550836729; Domain=.twitter.com; Path=/; Expires=Sun, - 11-Jun-2017 04:57:35 UTC + - guest_id=v1%3A144303808465101280; Domain=.twitter.com; Path=/; Expires=Fri, + 22-Sep-2017 19:54:44 UTC Status: - 200 OK Strict-Transport-Security: - max-age=631138519 X-Connection-Hash: - - eafe2c6429da14de24575e57c9fafe6e + - 3278aaa93e366e3bff7e5d5d8558b751 X-Content-Type-Options: - nosniff X-Frame-Options: - SAMEORIGIN X-Response-Time: - - '9' + - '221' X-Transaction: - - 1d1a45728a60d6fd + - 2ac9f7318c4f82f1 X-Tsa-Request-Body-Time: - '1' X-Twitter-Response-Tags: @@ -216,7 +216,7 @@ http_interactions: encoding: UTF-8 string: '{"token_type":"bearer","access_token":"AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5"}' http_version: - recorded_at: Fri, 12 Jun 2015 04:57:35 GMT + recorded_at: Wed, 23 Sep 2015 19:54:53 GMT - request: method: get uri: https://api.twitter.com/1.1/statuses/show/567054278486151168.json @@ -227,7 +227,7 @@ http_interactions: Accept: - application/json User-Agent: - - TwitterRubyGem/5.13.0 + - TwitterRubyGem/5.14.0 Authorization: - Bearer AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5 Accept-Encoding: @@ -242,22 +242,22 @@ http_interactions: Content-Disposition: - attachment; filename=json.json Content-Length: - - '1312' + - '1317' Content-Type: - application/json;charset=utf-8 Date: - - Fri, 12 Jun 2015 04:57:35 GMT + - Wed, 23 Sep 2015 19:54:45 GMT Expires: - Tue, 31 Mar 1981 05:00:00 GMT Last-Modified: - - Fri, 12 Jun 2015 04:57:35 GMT + - Wed, 23 Sep 2015 19:54:45 GMT Pragma: - no-cache Server: - - tsa_b + - tsa_a Set-Cookie: - - guest_id=v1%3A143408505587151668; Domain=.twitter.com; Path=/; Expires=Sun, - 11-Jun-2017 04:57:35 UTC + - guest_id=v1%3A144303808555360888; Domain=.twitter.com; Path=/; Expires=Fri, + 22-Sep-2017 19:54:45 UTC Status: - 200 OK Strict-Transport-Security: @@ -265,7 +265,7 @@ http_interactions: X-Access-Level: - read X-Connection-Hash: - - 3a8fda9324f4fb2f6894385826ebc510 + - 52df8d4390323869734a818f9bb71479 X-Content-Type-Options: - nosniff X-Frame-Options: @@ -273,13 +273,13 @@ http_interactions: X-Rate-Limit-Limit: - '180' X-Rate-Limit-Remaining: - - '175' + - '178' X-Rate-Limit-Reset: - - '1434085564' + - '1443038982' X-Response-Time: - - '21' + - '20' X-Transaction: - - 846bd6c43d56fc48 + - b41f66c73aecaa8b X-Twitter-Response-Tags: - BouncerCompliant X-Xss-Protection: @@ -290,8 +290,155 @@ http_interactions: are the same person. #CrossAnge http:\/\/t.co\/zX5p4AOUoA","source":"\u003ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003eTwitter Web Client\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":68692042,"id_str":"68692042","name":"lvlln","screen_name":"lvlln","location":"Arlington, MA","description":"Just a quant who enjoys anime and video games and ultimate. - Blogs on Metanorn. I help to run http:\/\/t.co\/ilgVSv62tc","url":"http:\/\/t.co\/NXLDfpT1OT","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/NXLDfpT1OT","expanded_url":"http:\/\/metanorn.net","display_url":"metanorn.net","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/ilgVSv62tc","expanded_url":"http:\/\/mirroredanimescreenshots.tumblr.com","display_url":"mirroredanimescreenshots.tumblr.com","indices":[93,115]}]}},"protected":false,"followers_count":1047,"friends_count":814,"listed_count":47,"created_at":"Tue - Aug 25 13:28:39 +0000 2009","favourites_count":7690,"utc_offset":null,"time_zone":null,"geo_enabled":true,"verified":false,"statuses_count":59165,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/68692042\/1399737095","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":30,"favorite_count":23,"entities":{"hashtags":[{"text":"CrossAnge","indices":[27,37]}],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}},{"id":567054271989182465,"id_str":"567054271989182465","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' + Blogs on Metanorn. I help to run http:\/\/t.co\/ilgVSv62tc","url":"http:\/\/t.co\/NXLDfpT1OT","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/NXLDfpT1OT","expanded_url":"http:\/\/metanorn.net","display_url":"metanorn.net","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/ilgVSv62tc","expanded_url":"http:\/\/mirroredanimescreenshots.tumblr.com","display_url":"mirroredanimescreenshots.tumblr.com","indices":[93,115]}]}},"protected":false,"followers_count":1056,"friends_count":907,"listed_count":55,"created_at":"Tue + Aug 25 13:28:39 +0000 2009","favourites_count":8975,"utc_offset":null,"time_zone":null,"geo_enabled":true,"verified":false,"statuses_count":64408,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/68692042\/1399737095","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":29,"favorite_count":23,"entities":{"hashtags":[{"text":"CrossAnge","indices":[27,37]}],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}},{"id":567054271989182465,"id_str":"567054271989182465","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' http_version: - recorded_at: Fri, 12 Jun 2015 04:57:35 GMT -recorded_with: VCR 2.9.0 + recorded_at: Wed, 23 Sep 2015 19:54:54 GMT +- request: + method: post + uri: https://SENSITIVE:SENSITIVE@api.twitter.com/oauth2/token + body: + encoding: UTF-8 + string: grant_type=client_credentials + headers: + Accept: + - "*/*" + User-Agent: + - TwitterRubyGem/5.14.0 + Content-Type: + - application/x-www-form-urlencoded; charset=UTF-8 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '151' + Content-Type: + - application/json;charset=utf-8 + Date: + - Wed, 23 Sep 2015 19:54:47 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Wed, 23 Sep 2015 19:54:47 GMT + Ml: + - A + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A144303808788655072; Domain=.twitter.com; Path=/; Expires=Fri, + 22-Sep-2017 19:54:47 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Connection-Hash: + - 9976db03f4ac11eb778fa861ce3a0d07 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Response-Time: + - '78' + X-Transaction: + - 0aa025dad69964d4 + X-Tsa-Request-Body-Time: + - '1' + X-Twitter-Response-Tags: + - BouncerCompliant + X-Ua-Compatible: + - IE=edge,chrome=1 + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"token_type":"bearer","access_token":"AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5"}' + http_version: + recorded_at: Wed, 23 Sep 2015 19:54:56 GMT +- request: + method: get + uri: https://api.twitter.com/1.1/statuses/show/567054278486151168.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - TwitterRubyGem/5.14.0 + Authorization: + - Bearer AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '1317' + Content-Type: + - application/json;charset=utf-8 + Date: + - Wed, 23 Sep 2015 19:54:48 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Wed, 23 Sep 2015 19:54:48 GMT + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A144303808856855961; Domain=.twitter.com; Path=/; Expires=Fri, + 22-Sep-2017 19:54:48 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Access-Level: + - read + X-Connection-Hash: + - 9109c3531d53a770516a3c3e14b7dd7b + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Rate-Limit-Limit: + - '180' + X-Rate-Limit-Remaining: + - '177' + X-Rate-Limit-Reset: + - '1443038982' + X-Response-Time: + - '25' + X-Transaction: + - 8a24041ccecd76ed + X-Twitter-Response-Tags: + - BouncerCompliant + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"created_at":"Sun Feb 15 20:14:10 +0000 2015","id":567054278486151168,"id_str":"567054278486151168","text":"Those + are the same person. #CrossAnge http:\/\/t.co\/zX5p4AOUoA","source":"\u003ca + href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003eTwitter Web Client\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":68692042,"id_str":"68692042","name":"lvlln","screen_name":"lvlln","location":"Arlington, + MA","description":"Just a quant who enjoys anime and video games and ultimate. + Blogs on Metanorn. I help to run http:\/\/t.co\/ilgVSv62tc","url":"http:\/\/t.co\/NXLDfpT1OT","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/NXLDfpT1OT","expanded_url":"http:\/\/metanorn.net","display_url":"metanorn.net","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/ilgVSv62tc","expanded_url":"http:\/\/mirroredanimescreenshots.tumblr.com","display_url":"mirroredanimescreenshots.tumblr.com","indices":[93,115]}]}},"protected":false,"followers_count":1056,"friends_count":907,"listed_count":55,"created_at":"Tue + Aug 25 13:28:39 +0000 2009","favourites_count":8975,"utc_offset":null,"time_zone":null,"geo_enabled":true,"verified":false,"statuses_count":64408,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/68692042\/1399737095","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":29,"favorite_count":23,"entities":{"hashtags":[{"text":"CrossAnge","indices":[27,37]}],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}},{"id":567054271989182465,"id_str":"567054271989182465","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' + http_version: + recorded_at: Wed, 23 Sep 2015 19:54:57 GMT +recorded_with: VCR 2.9.3 diff --git a/test/fixtures/vcr_cassettes/upload-new-twitter.yml b/test/fixtures/vcr_cassettes/upload-new-twitter.yml index 612bd5e80..1bfb23138 100644 --- a/test/fixtures/vcr_cassettes/upload-new-twitter.yml +++ b/test/fixtures/vcr_cassettes/upload-new-twitter.yml @@ -10,7 +10,7 @@ http_interactions: Accept: - "*/*" User-Agent: - - TwitterRubyGem/5.13.0 + - TwitterRubyGem/5.14.0 Content-Type: - application/x-www-form-urlencoded; charset=UTF-8 Accept-Encoding: @@ -29,36 +29,36 @@ http_interactions: Content-Type: - application/json;charset=utf-8 Date: - - Fri, 12 Jun 2015 04:51:04 GMT + - Wed, 23 Sep 2015 19:55:09 GMT Expires: - Tue, 31 Mar 1981 05:00:00 GMT Last-Modified: - - Fri, 12 Jun 2015 04:51:04 GMT + - Wed, 23 Sep 2015 19:55:09 GMT Ml: - - S + - A Pragma: - no-cache Server: - - tsa_b + - tsa_a Set-Cookie: - - guest_id=v1%3A143408466430438117; Domain=.twitter.com; Path=/; Expires=Sun, - 11-Jun-2017 04:51:04 UTC + - guest_id=v1%3A144303810955204626; Domain=.twitter.com; Path=/; Expires=Fri, + 22-Sep-2017 19:55:09 UTC Status: - 200 OK Strict-Transport-Security: - max-age=631138519 X-Connection-Hash: - - cec49fc98954d6be2b882737bf836056 + - 03af226397d6561731744535edbe78d9 X-Content-Type-Options: - nosniff X-Frame-Options: - SAMEORIGIN X-Response-Time: - - '106' + - '81' X-Transaction: - - 9b4a10e04933fdf2 + - ce96dbe274e0a1f7 X-Tsa-Request-Body-Time: - - '2' + - '1' X-Twitter-Response-Tags: - BouncerCompliant X-Ua-Compatible: @@ -69,7 +69,7 @@ http_interactions: encoding: UTF-8 string: '{"token_type":"bearer","access_token":"AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5"}' http_version: - recorded_at: Fri, 12 Jun 2015 04:51:04 GMT + recorded_at: Wed, 23 Sep 2015 19:55:18 GMT - request: method: get uri: https://api.twitter.com/1.1/statuses/show/566030116182949888.json @@ -80,7 +80,7 @@ http_interactions: Accept: - application/json User-Agent: - - TwitterRubyGem/5.13.0 + - TwitterRubyGem/5.14.0 Authorization: - Bearer AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5 Accept-Encoding: @@ -99,18 +99,18 @@ http_interactions: Content-Type: - application/json;charset=utf-8 Date: - - Fri, 12 Jun 2015 04:51:04 GMT + - Wed, 23 Sep 2015 19:55:10 GMT Expires: - Tue, 31 Mar 1981 05:00:00 GMT Last-Modified: - - Fri, 12 Jun 2015 04:51:04 GMT + - Wed, 23 Sep 2015 19:55:10 GMT Pragma: - no-cache Server: - - tsa_b + - tsa_a Set-Cookie: - - guest_id=v1%3A143408466476813785; Domain=.twitter.com; Path=/; Expires=Sun, - 11-Jun-2017 04:51:04 UTC + - guest_id=v1%3A144303811023217554; Domain=.twitter.com; Path=/; Expires=Fri, + 22-Sep-2017 19:55:10 UTC Status: - 200 OK Strict-Transport-Security: @@ -118,7 +118,7 @@ http_interactions: X-Access-Level: - read X-Connection-Hash: - - e2d4cf83697658035172a98c60ac1baf + - 69953ba3def1548c935890bc852a6449 X-Content-Type-Options: - nosniff X-Frame-Options: @@ -126,13 +126,13 @@ http_interactions: X-Rate-Limit-Limit: - '180' X-Rate-Limit-Remaining: - - '179' + - '176' X-Rate-Limit-Reset: - - '1434085564' + - '1443038982' X-Response-Time: - '20' X-Transaction: - - 033e4b0bf5892168 + - 2bea16bc972fb555 X-Twitter-Response-Tags: - BouncerCompliant X-Xss-Protection: @@ -143,11 +143,159 @@ http_interactions: do you give the Caramel Frappuccino that already has everything? The gift of mocha drizzle. http:\/\/t.co\/2MWtXbYhf0","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":127566622,"id_str":"127566622","name":"Frappuccino","screen_name":"frappuccino","location":"Seattle, - WA","description":"Le yum. #FanFlavors","url":"http:\/\/t.co\/0o8bfJcGJW","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/0o8bfJcGJW","expanded_url":"http:\/\/sbux.co\/FanFlavors","display_url":"sbux.co\/FanFlavors","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":183232,"friends_count":68060,"listed_count":719,"created_at":"Mon - Mar 29 16:30:39 +0000 2010","favourites_count":3731,"utc_offset":-25200,"time_zone":"Pacific - Time (US & Canada)","geo_enabled":true,"verified":true,"statuses_count":12141,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"9AE4E8","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/486908690591535104\/roRpLqRU.jpeg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/486908690591535104\/roRpLqRU.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/593460960020402176\/B_NNVW9D_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/593460960020402176\/B_NNVW9D_normal.png","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/127566622\/1420826895","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":632,"favorite_count":2379,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":566030112210972672,"id_str":"566030112210972672","indices":[97,119],"media_url":"http:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","url":"http:\/\/t.co\/2MWtXbYhf0","display_url":"pic.twitter.com\/2MWtXbYhf0","expanded_url":"http:\/\/twitter.com\/frappuccino\/status\/566030116182949888\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":566030112210972672,"id_str":"566030112210972672","indices":[97,119],"media_url":"http:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","url":"http:\/\/t.co\/2MWtXbYhf0","display_url":"pic.twitter.com\/2MWtXbYhf0","expanded_url":"http:\/\/twitter.com\/frappuccino\/status\/566030116182949888\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' + WA","description":"Le yum. #FanFlavors","url":"http:\/\/t.co\/0o8bfJcGJW","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/0o8bfJcGJW","expanded_url":"http:\/\/sbux.co\/FanFlavors","display_url":"sbux.co\/FanFlavors","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":196975,"friends_count":67409,"listed_count":719,"created_at":"Mon + Mar 29 16:30:39 +0000 2010","favourites_count":3988,"utc_offset":-25200,"time_zone":"Pacific + Time (US & Canada)","geo_enabled":true,"verified":true,"statuses_count":13091,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"9AE4E8","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/486908690591535104\/roRpLqRU.jpeg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/486908690591535104\/roRpLqRU.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/641346383606235136\/XLhN-zvk_normal.jpg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/641346383606235136\/XLhN-zvk_normal.jpg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/127566622\/1442503143","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":624,"favorite_count":2355,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":566030112210972672,"id_str":"566030112210972672","indices":[97,119],"media_url":"http:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","url":"http:\/\/t.co\/2MWtXbYhf0","display_url":"pic.twitter.com\/2MWtXbYhf0","expanded_url":"http:\/\/twitter.com\/frappuccino\/status\/566030116182949888\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":566030112210972672,"id_str":"566030112210972672","indices":[97,119],"media_url":"http:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","url":"http:\/\/t.co\/2MWtXbYhf0","display_url":"pic.twitter.com\/2MWtXbYhf0","expanded_url":"http:\/\/twitter.com\/frappuccino\/status\/566030116182949888\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' http_version: - recorded_at: Fri, 12 Jun 2015 04:51:04 GMT + recorded_at: Wed, 23 Sep 2015 19:55:19 GMT +- request: + method: post + uri: https://SENSITIVE:SENSITIVE@api.twitter.com/oauth2/token + body: + encoding: UTF-8 + string: grant_type=client_credentials + headers: + Accept: + - "*/*" + User-Agent: + - TwitterRubyGem/5.14.0 + Content-Type: + - application/x-www-form-urlencoded; charset=UTF-8 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '151' + Content-Type: + - application/json;charset=utf-8 + Date: + - Wed, 23 Sep 2015 19:55:10 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Wed, 23 Sep 2015 19:55:10 GMT + Ml: + - S + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A144303811085205023; Domain=.twitter.com; Path=/; Expires=Fri, + 22-Sep-2017 19:55:10 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Connection-Hash: + - 3875cc9112ff6e3b96e154ba494e9509 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Response-Time: + - '21' + X-Transaction: + - 7d4210c9d7fa8fae + X-Tsa-Request-Body-Time: + - '0' + X-Twitter-Response-Tags: + - BouncerCompliant + X-Ua-Compatible: + - IE=edge,chrome=1 + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"token_type":"bearer","access_token":"AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5"}' + http_version: + recorded_at: Wed, 23 Sep 2015 19:55:19 GMT +- request: + method: get + uri: https://api.twitter.com/1.1/statuses/show/566030116182949888.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - TwitterRubyGem/5.14.0 + Authorization: + - Bearer AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '1254' + Content-Type: + - application/json;charset=utf-8 + Date: + - Wed, 23 Sep 2015 19:55:11 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Wed, 23 Sep 2015 19:55:11 GMT + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A144303811147161960; Domain=.twitter.com; Path=/; Expires=Fri, + 22-Sep-2017 19:55:11 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Access-Level: + - read + X-Connection-Hash: + - 90db8e3148d9f5ad80ed90f1f3fffdfc + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Rate-Limit-Limit: + - '180' + X-Rate-Limit-Remaining: + - '175' + X-Rate-Limit-Reset: + - '1443038982' + X-Response-Time: + - '22' + X-Transaction: + - 5f8edf822cba1bad + X-Twitter-Response-Tags: + - BouncerCompliant + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"created_at":"Fri Feb 13 00:24:30 +0000 2015","id":566030116182949888,"id_str":"566030116182949888","text":"What + do you give the Caramel Frappuccino that already has everything? The gift + of mocha drizzle. http:\/\/t.co\/2MWtXbYhf0","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" + rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":127566622,"id_str":"127566622","name":"Frappuccino","screen_name":"frappuccino","location":"Seattle, + WA","description":"Le yum. #FanFlavors","url":"http:\/\/t.co\/0o8bfJcGJW","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/0o8bfJcGJW","expanded_url":"http:\/\/sbux.co\/FanFlavors","display_url":"sbux.co\/FanFlavors","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":196975,"friends_count":67409,"listed_count":719,"created_at":"Mon + Mar 29 16:30:39 +0000 2010","favourites_count":3988,"utc_offset":-25200,"time_zone":"Pacific + Time (US & Canada)","geo_enabled":true,"verified":true,"statuses_count":13091,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"9AE4E8","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/486908690591535104\/roRpLqRU.jpeg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/486908690591535104\/roRpLqRU.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/641346383606235136\/XLhN-zvk_normal.jpg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/641346383606235136\/XLhN-zvk_normal.jpg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/127566622\/1442503143","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":624,"favorite_count":2355,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":566030112210972672,"id_str":"566030112210972672","indices":[97,119],"media_url":"http:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","url":"http:\/\/t.co\/2MWtXbYhf0","display_url":"pic.twitter.com\/2MWtXbYhf0","expanded_url":"http:\/\/twitter.com\/frappuccino\/status\/566030116182949888\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":566030112210972672,"id_str":"566030112210972672","indices":[97,119],"media_url":"http:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","url":"http:\/\/t.co\/2MWtXbYhf0","display_url":"pic.twitter.com\/2MWtXbYhf0","expanded_url":"http:\/\/twitter.com\/frappuccino\/status\/566030116182949888\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":337,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' + http_version: + recorded_at: Wed, 23 Sep 2015 19:55:20 GMT - request: method: head uri: http://pbs.twimg.com/media/B9rxY1qCcAAbeo0.jpg:orig @@ -156,7 +304,7 @@ http_interactions: string: '' headers: User-Agent: - - Danbooru/2.81.1 + - dior/2.93.0 Accept: - "*/*" response: @@ -173,17 +321,17 @@ http_interactions: Last-Modified: - Fri, 13 Feb 2015 00:24:29 GMT Server: - - tsa_a + - tsa_b X-Connection-Hash: - - 0ed4d1e87aacad7f1ed6ae7e719cf566 + - 7a103ccdc1846ff9152a98f9f9040e92 X-Response-Time: - - '32' + - '35' Content-Length: - '56808' Accept-Ranges: - bytes Date: - - Fri, 12 Jun 2015 04:51:06 GMT + - Wed, 23 Sep 2015 19:55:12 GMT Via: - 1.1 varnish Age: @@ -191,18 +339,20 @@ http_interactions: Connection: - keep-alive X-Served-By: - - cache-tw-sjc1-cr1-12-TWSJC1 + - cache-tw-iad2-cr1-1-TWIAD2 X-Cache: - MISS X-Cache-Hits: - '0' + Vary: + - Origin Expires: - - Sat, 27 Jun 2015 04:51:06 GMT + - Thu, 08 Oct 2015 19:55:12 GMT X-Content-Type-Options: - nosniff body: encoding: UTF-8 string: '' http_version: - recorded_at: Fri, 12 Jun 2015 04:51:06 GMT -recorded_with: VCR 2.9.0 + recorded_at: Wed, 23 Sep 2015 19:55:21 GMT +recorded_with: VCR 2.9.3 diff --git a/test/functional/uploads_controller_test.rb b/test/functional/uploads_controller_test.rb index 2ba5c8bba..5f0668fc3 100644 --- a/test/functional/uploads_controller_test.rb +++ b/test/functional/uploads_controller_test.rb @@ -20,7 +20,7 @@ class UploadsControllerTest < ActionController::TestCase context "batch action" do context "for twitter galleries" do - should "render" do + should "1234 render" do VCR.use_cassette("functional/upload/twitter", :record => :once) do get :batch, {:url => "https://twitter.com/lvlln/status/567054278486151168"}, {:user_id => @user.id} end