diff --git a/Gemfile b/Gemfile index 24d694d4b..0b19184cf 100644 --- a/Gemfile +++ b/Gemfile @@ -19,12 +19,12 @@ gem 'json', '1.8.1' # Authentication -gem 'devise', '3.2.4' +gem 'devise', '3.3.0' gem 'devise_lastseenable', '0.0.4' # Captcha -gem 'simple_captcha2', '0.2.1', :require => 'simple_captcha' +gem 'simple_captcha2', '0.3.2', :require => 'simple_captcha' # Background processing @@ -33,7 +33,7 @@ gem 'sinatra', '1.3.3' # Compression -gem 'uglifier', '2.5.0' +gem 'uglifier', '2.5.3' # Configuration @@ -62,8 +62,8 @@ gem 'foreigner', '1.6.1' # File uploading gem 'carrierwave', '0.10.0' -gem 'fog', '1.22.1' -gem 'mini_magick', '3.7.0' +gem 'fog', '1.23.0' +gem 'mini_magick', '3.8.0' gem 'remotipart', '1.2.1' # GUID generation @@ -81,7 +81,7 @@ gem 'jquery-rails', '3.0.4' # Localization -gem 'http_accept_language', '1.0.2' +gem 'http_accept_language', '2.0.2' gem 'i18n-inflector-rails', '1.0.7' gem 'rails-i18n', '4.0.2' @@ -93,10 +93,10 @@ gem 'messagebus_ruby_api', '1.0.3' # Parsing gem 'nokogiri', '1.6.1' -gem 'rails_autolink', '1.1.5' +gem 'rails_autolink', '1.1.6' gem 'redcarpet', '3.1.2' gem 'roxml', '3.1.6' -gem 'ruby-oembed', '0.8.9' +gem 'ruby-oembed', '0.8.10' gem 'opengraph_parser', '0.2.3' @@ -111,22 +111,22 @@ gem 'omniauth-wordpress','0.2.1' # Tags -gem 'acts-as-taggable-on', '3.2.6' +gem 'acts-as-taggable-on', '3.3.0' # URIs and HTTP gem 'addressable', '2.3.6', :require => 'addressable/uri' -gem 'faraday', '0.8.9' -gem 'faraday_middleware', '0.9.0' -gem 'typhoeus', '0.6.8' +gem 'faraday', '0.9.0' +gem 'faraday_middleware', '0.9.1' +gem 'typhoeus', '0.6.9' # Views -gem 'gon', '5.0.4' +gem 'gon', '5.1.2' gem 'haml', '4.0.5' gem 'mobile-fu', '1.3.1' -gem 'will_paginate', '3.0.5' -gem 'rails-timeago', '2.4.0' +gem 'will_paginate', '3.0.7' +gem 'rails-timeago', '2.11.0' # Workarounds # https://github.com/rubyzip/rubyzip#important-note @@ -144,12 +144,12 @@ group :production do # we don't install these on travis to speed up test runs # Administration - gem 'rails_admin', '0.6.2' + gem 'rails_admin', '0.6.3' # Analytics - gem 'rack-google-analytics', '0.14.0', :require => 'rack/google-analytics' - gem 'rack-piwik', '0.2.2', :require => 'rack/piwik' + gem 'rack-google-analytics', '1.2.0' + gem 'rack-piwik', '0.3.0', :require => 'rack/piwik' # Click-jacking protection @@ -166,15 +166,15 @@ group :production do # we don't install these on travis to speed up test runs # Third party asset hosting - gem 'asset_sync', '1.0.0', :require => false + gem 'asset_sync', '1.1.0', :require => false end group :development do # Automatic test runs gem 'guard-cucumber', '1.4.1' - gem 'guard-rspec', '4.2.9' + gem 'guard-rspec', '4.3.1' gem 'rb-fsevent', '0.9.4', :require => false - gem 'rb-inotify', '0.9.4', :require => false + gem 'rb-inotify', '0.9.5', :require => false # Preloading environment @@ -187,8 +187,8 @@ group :test do gem 'fixture_builder', '0.3.6' gem 'fuubar', '1.3.3' - gem 'rspec-instafail', '0.2.4', :require => false - gem 'test_after_commit', '0.2.3' + gem 'rspec-instafail', '0.2.5', :require => false + gem 'test_after_commit', '0.2.5' # Cucumber (integration tests) @@ -214,5 +214,5 @@ group :development, :test do # Jasmine (client side application tests (JS)) gem 'jasmine', '2.0.2' gem 'jasmine-jquery-rails', '2.0.3' - gem 'sinon-rails', '1.9.0' + gem 'sinon-rails', '1.10.3' end diff --git a/Gemfile.lock b/Gemfile.lock index dfa113a28..f0f96ccfd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -37,7 +37,7 @@ GEM minitest (~> 5.1) thread_safe (~> 0.1) tzinfo (~> 1.1) - acts-as-taggable-on (3.2.6) + acts-as-taggable-on (3.3.0) activerecord (>= 3, < 5) acts_as_api (0.4.2) activemodel (>= 3.0.0) @@ -45,9 +45,10 @@ GEM rack (>= 1.1.0) addressable (2.3.6) arel (5.0.1.20140414130214) - asset_sync (1.0.0) + asset_sync (1.1.0) activemodel fog (>= 1.8.0) + unf backbone-on-rails (1.1.1.0) actionmailer actionpack @@ -81,10 +82,10 @@ GEM coffee-rails (4.0.1) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.0) - coffee-script (2.2.0) + coffee-script (2.3.0) coffee-script-source execjs - coffee-script-source (1.6.3) + coffee-script-source (1.7.1) compass (0.12.7) chunky_png (~> 1.2) fssm (>= 0.2.7) @@ -92,7 +93,7 @@ GEM compass-rails (2.0.0) compass (>= 0.12.2) configurate (0.0.8) - connection_pool (1.2.0) + connection_pool (2.0.0) crack (0.4.2) safe_yaml (~> 1.0.0) cucumber (1.3.16) @@ -108,7 +109,7 @@ GEM nokogiri (~> 1.5) rails (>= 3, < 5) database_cleaner (1.3.0) - devise (3.2.4) + devise (3.3.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 3.2.6, < 5) @@ -133,29 +134,29 @@ GEM erubis (2.7.0) ethon (0.7.1) ffi (>= 1.3.0) - excon (0.39.0) - execjs (1.4.0) - multi_json (~> 1.0) + excon (0.39.5) + execjs (2.2.1) factory_girl (4.4.0) activesupport (>= 3.0.0) factory_girl_rails (4.4.1) factory_girl (~> 4.4.0) railties (>= 3.0.0) - faraday (0.8.9) - multipart-post (~> 1.2.0) - faraday_middleware (0.9.0) - faraday (>= 0.7.4, < 0.9) + faraday (0.9.0) + multipart-post (>= 1.2, < 3) + faraday_middleware (0.9.1) + faraday (>= 0.7.4, < 0.10) ffi (1.9.3) fixture_builder (0.3.6) activerecord (>= 2) activesupport (>= 2) - fog (1.22.1) + fog (1.23.0) fog-brightbox - fog-core (~> 1.22) + fog-core (~> 1.23) fog-json + fog-softlayer ipaddress (~> 0.5) nokogiri (~> 1.5, >= 1.5.11) - fog-brightbox (0.1.1) + fog-brightbox (0.3.0) fog-core (~> 1.22) fog-json inflecto @@ -168,7 +169,10 @@ GEM net-ssh (>= 2.1.3) fog-json (1.0.0) multi_json (~> 1.0) - font-awesome-rails (4.0.3.1) + fog-softlayer (0.3.15) + fog-core + fog-json + font-awesome-rails (4.1.0.0) railties (>= 3.2, < 5.0) foreigner (1.6.1) activerecord (>= 3.0.0) @@ -181,19 +185,21 @@ GEM ruby-progressbar (~> 1.4) gherkin (2.12.2) multi_json (~> 1.3) - gon (5.0.4) + gon (5.1.2) actionpack (>= 2.3.0) json - guard (2.2.5) + multi_json + request_store (>= 1.0.5) + guard (2.6.1) formatador (>= 0.2.4) - listen (~> 2.1) + listen (~> 2.7) lumberjack (~> 1.0) pry (>= 0.9.12) thor (>= 0.18.1) guard-cucumber (1.4.1) cucumber (>= 1.2.0) guard (>= 1.1.0) - guard-rspec (4.2.9) + guard-rspec (4.3.1) guard (~> 2.1) rspec (>= 2.14, < 4.0) guard-spork (1.5.1) @@ -208,8 +214,7 @@ GEM tilt hashie (2.1.2) hike (1.2.3) - http_accept_language (1.0.2) - httpauth (0.2.0) + http_accept_language (2.0.2) i18n (0.6.11) i18n-inflector (2.6.7) i18n (>= 0.4.1) @@ -224,25 +229,24 @@ GEM phantomjs rack (>= 1.2.1) rake - jasmine-core (2.0.0) + jasmine-core (2.0.2) jasmine-jquery-rails (2.0.3) jquery-rails (3.0.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (4.2.0) + jquery-ui-rails (4.2.1) railties (>= 3.2.16) json (1.8.1) - jwt (0.1.10) - multi_json (>= 1.5) - kaminari (0.15.1) + jwt (1.0.0) + kaminari (0.16.1) actionpack (>= 3.0.0) activesupport (>= 3.0.0) kgio (2.9.2) - listen (2.4.0) + listen (2.7.9) celluloid (>= 0.15.2) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) - lumberjack (1.0.4) + lumberjack (1.0.9) macaddr (1.7.1) systemu (~> 2.6.2) mail (2.5.4) @@ -253,7 +257,7 @@ GEM messagebus_ruby_api (1.0.3) method_source (0.8.2) mime-types (1.25.1) - mini_magick (3.7.0) + mini_magick (3.8.0) subexec (~> 0.2.1) mini_portile (0.5.3) minitest (5.4.0) @@ -262,7 +266,8 @@ GEM rails multi_json (1.10.1) multi_test (0.1.1) - multipart-post (1.2.0) + multi_xml (0.5.5) + multipart-post (2.0.0) mysql2 (0.3.16) nested_form (0.3.2) net-scp (1.2.1) @@ -271,11 +276,11 @@ GEM nokogiri (1.6.1) mini_portile (~> 0.5.0) oauth (0.4.7) - oauth2 (0.8.1) - faraday (~> 0.8) - httpauth (~> 0.1) - jwt (~> 0.1.4) - multi_json (~> 1.0) + oauth2 (0.9.4) + faraday (>= 0.8, < 0.10) + jwt (~> 1.0) + multi_json (~> 1.3) + multi_xml (~> 0.5) rack (~> 1.2) omniauth (1.2.1) hashie (>= 1.2, < 3) @@ -285,9 +290,11 @@ GEM omniauth-oauth (1.0.1) oauth omniauth (~> 1.0) - omniauth-oauth2 (1.1.1) - oauth2 (~> 0.8.0) - omniauth (~> 1.0) + omniauth-oauth2 (1.1.2) + faraday (>= 0.8, < 0.10) + multi_json (~> 1.3) + oauth2 (~> 0.9.3) + omniauth (~> 1.2) omniauth-tumblr (1.1) omniauth-oauth (~> 1.0) omniauth-twitter (1.0.1) @@ -301,21 +308,21 @@ GEM orm_adapter (0.5.0) phantomjs (1.9.7.1) polyglot (0.3.5) - pry (0.9.12.4) - coderay (~> 1.0) - method_source (~> 0.8) + pry (0.10.1) + coderay (~> 1.1.0) + method_source (~> 0.8.1) slop (~> 3.4) rack (1.5.2) rack-cors (0.2.9) - rack-google-analytics (0.14.0) + rack-google-analytics (1.2.0) actionpack activesupport rack-mobile-detect (0.4.0) rack - rack-piwik (0.2.2) - rack-pjax (0.7.0) + rack-piwik (0.3.0) + rack-pjax (0.8.0) nokogiri (~> 1.5) - rack (~> 1.3) + rack (~> 1.1) rack-protection (1.2.0) rack rack-rewrite (1.5.0) @@ -338,10 +345,10 @@ GEM rails (>= 4.0) rails-observers (0.1.2) activemodel (~> 4.0) - rails-timeago (2.4.0) + rails-timeago (2.11.0) actionpack (>= 3.1) activesupport (>= 3.1) - rails_admin (0.6.2) + rails_admin (0.6.3) builder (~> 3.1) coffee-rails (~> 4.0) font-awesome-rails (>= 3.0) @@ -355,7 +362,7 @@ GEM remotipart (~> 1.0) safe_yaml (~> 1.0) sass-rails (~> 4.0) - rails_autolink (1.1.5) + rails_autolink (1.1.6) rails (> 3.1) railties (4.1.5) actionpack (= 4.1.5) @@ -365,13 +372,14 @@ GEM raindrops (0.13.0) rake (10.3.2) rb-fsevent (0.9.4) - rb-inotify (0.9.4) + rb-inotify (0.9.5) ffi (>= 0.5.0) redcarpet (3.1.2) redis (3.1.0) redis-namespace (1.5.1) redis (~> 3.0, >= 3.0.4) remotipart (1.2.1) + request_store (1.1.0) roxml (3.1.6) activesupport (>= 2.3.0) nokogiri (>= 1.3.3) @@ -382,7 +390,8 @@ GEM rspec-core (2.14.8) rspec-expectations (2.14.5) diff-lcs (>= 1.1.3, < 2.0) - rspec-instafail (0.2.4) + rspec-instafail (0.2.5) + rspec rspec-mocks (2.14.6) rspec-rails (2.14.2) actionpack (>= 3.0) @@ -392,9 +401,9 @@ GEM rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) rspec-mocks (~> 2.14.0) - ruby-oembed (0.8.9) + ruby-oembed (0.8.10) ruby-progressbar (1.5.1) - rubyzip (1.1.4) + rubyzip (1.1.6) safe_yaml (1.0.3) sass (3.2.19) sass-rails (4.0.3) @@ -413,16 +422,16 @@ GEM json redis (>= 3.0.6) redis-namespace (>= 1.3.1) - simple_captcha2 (0.2.1) - rails (>= 3.1) + simple_captcha2 (0.3.2) + rails (>= 4.1) simple_oauth (0.2.0) sinatra (1.3.3) rack (~> 1.3, >= 1.3.6) rack-protection (~> 1.2) tilt (~> 1.3, >= 1.3.3) - sinon-rails (1.9.0) + sinon-rails (1.10.3) railties (>= 3.1) - slop (3.4.7) + slop (3.6.0) spork (1.0.0rc4) sprockets (2.11.0) hike (~> 1.2) @@ -435,7 +444,8 @@ GEM sprockets (~> 2.8) subexec (0.2.3) systemu (2.6.4) - test_after_commit (0.2.3) + test_after_commit (0.2.5) + activerecord (>= 3.2) thor (0.19.1) thread_safe (0.3.4) tilt (1.4.1) @@ -448,13 +458,16 @@ GEM faraday (~> 0.8, < 0.10) multi_json (~> 1.0) simple_oauth (~> 0.2) - typhoeus (0.6.8) - ethon (>= 0.7.0) + typhoeus (0.6.9) + ethon (>= 0.7.1) tzinfo (1.2.2) thread_safe (~> 0.1) - uglifier (2.5.0) + uglifier (2.5.3) execjs (>= 0.3.0) json (>= 1.8.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.6) unicorn (4.8.3) kgio (~> 2.6) rack @@ -467,10 +480,10 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) websocket (1.0.7) - will_paginate (3.0.5) + will_paginate (3.0.7) xpath (2.0.0) nokogiri (~> 1.3) - zip-zip (0.2) + zip-zip (0.3) rubyzip (>= 1.0.0) PLATFORMS @@ -480,10 +493,10 @@ DEPENDENCIES actionpack-action_caching actionpack-page_caching activerecord-import (= 0.5.0) - acts-as-taggable-on (= 3.2.6) + acts-as-taggable-on (= 3.3.0) acts_as_api (= 0.4.2) addressable (= 2.3.6) - asset_sync (= 1.0.0) + asset_sync (= 1.1.0) backbone-on-rails (= 1.1.1) bootstrap-sass (= 2.3.2.2) capybara (= 2.4.1) @@ -492,24 +505,24 @@ DEPENDENCIES configurate (= 0.0.8) cucumber-rails (= 1.4.1) database_cleaner (= 1.3.0) - devise (= 3.2.4) + devise (= 3.3.0) devise_lastseenable (= 0.0.4) entypo-rails (= 2.2.2) factory_girl_rails (= 4.4.1) - faraday (= 0.8.9) - faraday_middleware (= 0.9.0) + faraday (= 0.9.0) + faraday_middleware (= 0.9.1) fixture_builder (= 0.3.6) - fog (= 1.22.1) + fog (= 1.23.0) foreigner (= 1.6.1) foreman (= 0.62) fuubar (= 1.3.3) - gon (= 5.0.4) + gon (= 5.1.2) guard-cucumber (= 1.4.1) - guard-rspec (= 4.2.9) + guard-rspec (= 4.3.1) guard-spork (= 1.5.1) haml (= 4.0.5) handlebars_assets (= 0.12.0) - http_accept_language (= 1.0.2) + http_accept_language (= 2.0.2) i18n-inflector-rails (= 1.0.7) jasmine (= 2.0.2) jasmine-jquery-rails (= 2.0.3) @@ -517,7 +530,7 @@ DEPENDENCIES json (= 1.8.1) markerb (= 1.0.2) messagebus_ruby_api (= 1.0.3) - mini_magick (= 3.7.0) + mini_magick (= 3.8.0) mobile-fu (= 1.3.1) mysql2 (= 0.3.16) nokogiri (= 1.6.1) @@ -528,38 +541,38 @@ DEPENDENCIES omniauth-wordpress (= 0.2.1) opengraph_parser (= 0.2.3) rack-cors (= 0.2.9) - rack-google-analytics (= 0.14.0) - rack-piwik (= 0.2.2) + rack-google-analytics (= 1.2.0) + rack-piwik (= 0.3.0) rack-protection (= 1.2) rack-rewrite (= 1.5.0) rack-ssl (= 1.4.1) rails (= 4.1.5) rails-i18n (= 4.0.2) - rails-timeago (= 2.4.0) - rails_admin (= 0.6.2) - rails_autolink (= 1.1.5) + rails-timeago (= 2.11.0) + rails_admin (= 0.6.3) + rails_autolink (= 1.1.6) rb-fsevent (= 0.9.4) - rb-inotify (= 0.9.4) + rb-inotify (= 0.9.5) redcarpet (= 3.1.2) remotipart (= 1.2.1) roxml (= 3.1.6) - rspec-instafail (= 0.2.4) + rspec-instafail (= 0.2.5) rspec-rails (= 2.14.2) - ruby-oembed (= 0.8.9) + ruby-oembed (= 0.8.10) sass-rails (= 4.0.3) selenium-webdriver (= 2.42.0) sidekiq (= 2.17.7) - simple_captcha2 (= 0.2.1) + simple_captcha2 (= 0.3.2) sinatra (= 1.3.3) - sinon-rails (= 1.9.0) + sinon-rails (= 1.10.3) spork (= 1.0.0rc4) - test_after_commit (= 0.2.3) + test_after_commit (= 0.2.5) timecop (= 0.7.1) twitter (= 4.8.1) - typhoeus (= 0.6.8) - uglifier (= 2.5.0) + typhoeus (= 0.6.9) + uglifier (= 2.5.3) unicorn (= 4.8.3) uuid (= 2.3.7) webmock (= 1.18.0) - will_paginate (= 3.0.5) + will_paginate (= 3.0.7) zip-zip diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 73a3a35cf..f95636f60 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -80,8 +80,7 @@ class ApplicationController < ActionController::Base if user_signed_in? I18n.locale = current_user.language else - locale = request.preferred_language_from AVAILABLE_LANGUAGE_CODES - locale ||= request.compatible_language_from AVAILABLE_LANGUAGE_CODES + locale = http_accept_language.language_region_compatible_from AVAILABLE_LANGUAGE_CODES locale ||= DEFAULT_LANGUAGE I18n.locale = locale end diff --git a/config/initializers/faraday.rb b/config/initializers/faraday.rb index 274a998b5..ad1384f6d 100644 --- a/config/initializers/faraday.rb +++ b/config/initializers/faraday.rb @@ -2,7 +2,9 @@ # licensed under the Affero General Public License version 3 or later. See # the COPYRIGHT file. options = { - timeout: 25, + request: { + timeout: 25 + }, ssl: { ca_file: AppConfig.environment.certificate_authorities.get } diff --git a/lib/diaspora/fetcher/public.rb b/lib/diaspora/fetcher/public.rb index a849a9071..241928246 100644 --- a/lib/diaspora/fetcher/public.rb +++ b/lib/diaspora/fetcher/public.rb @@ -76,8 +76,8 @@ module Diaspora; module Fetcher; class Public FEDERATION_LOGGER.info "fetching public posts for #{@person.diaspora_handle}" resp = Faraday.get("#{@person.url}people/#{@person.guid}") do |req| - req.headers[:accept] = 'application/json' - req.headers[:user_agent] = 'diaspora-fetcher' + req.headers['Accept'] = 'application/json' + req.headers['User-Agent'] = 'diaspora-fetcher' end FEDERATION_LOGGER.debug resp.body.to_s[0..250] diff --git a/spec/javascripts/app/views/aspects_dropdown_view_spec.js b/spec/javascripts/app/views/aspects_dropdown_view_spec.js index 6c017ccd5..326d6a583 100644 --- a/spec/javascripts/app/views/aspects_dropdown_view_spec.js +++ b/spec/javascripts/app/views/aspects_dropdown_view_spec.js @@ -1,6 +1,10 @@ describe("app.views.AspectsDropdown", function(){ beforeEach(function() { spec.loadFixture("bookmarklet"); + Diaspora.I18n.load({ + 'aspect_dropdown': { + 'select_aspects': "Select aspects" + }); this.view = new app.views.AspectsDropdown({el: $('.aspect_dropdown')}); }); @@ -69,7 +73,7 @@ describe("app.views.AspectsDropdown", function(){ expect(this.view.$('li.aspect_selector:eq(1)').hasClass('selected')).toBeTruthy(); }); }); - + context('_updateButton', function() { beforeEach(function() { this.view.$('li.selected').removeClass('selected');