Merge branch 'next-minor' into develop
This commit is contained in:
commit
f4f0e724c6
8 changed files with 18 additions and 1135 deletions
|
|
@ -21,11 +21,13 @@
|
||||||
# 0.6.6.0
|
# 0.6.6.0
|
||||||
|
|
||||||
## Refactor
|
## Refactor
|
||||||
|
* Remove rails\_admin [#7440](https://github.com/diaspora/diaspora/pull/7440)
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
* Make photo upload button hover text translatable [#7429](https://github.com/diaspora/diaspora/pull/7429)
|
* Make photo upload button hover text translatable [#7429](https://github.com/diaspora/diaspora/pull/7429)
|
||||||
* Fix first comment in mobile view with french locale [#7441](https://github.com/diaspora/diaspora/pull/7441)
|
* Fix first comment in mobile view with french locale [#7441](https://github.com/diaspora/diaspora/pull/7441)
|
||||||
* Use post page title and post author in atom feed [#7420](https://github.com/diaspora/diaspora/pull/7420)
|
* Use post page title and post author in atom feed [#7420](https://github.com/diaspora/diaspora/pull/7420)
|
||||||
|
* Handle broken public keys when receiving posts [#7448](https://github.com/diaspora/diaspora/pull/7448)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|
|
||||||
4
Gemfile
4
Gemfile
|
|
@ -217,10 +217,6 @@ gem "thor", "0.19.1"
|
||||||
# gem "therubyracer", :platform => :ruby
|
# gem "therubyracer", :platform => :ruby
|
||||||
|
|
||||||
group :production do # we don"t install these on travis to speed up test runs
|
group :production do # we don"t install these on travis to speed up test runs
|
||||||
# Administration
|
|
||||||
|
|
||||||
gem "rails_admin", "0.8.1"
|
|
||||||
|
|
||||||
# Analytics
|
# Analytics
|
||||||
|
|
||||||
gem "rack-google-analytics", "1.2.0"
|
gem "rack-google-analytics", "1.2.0"
|
||||||
|
|
|
||||||
32
Gemfile.lock
32
Gemfile.lock
|
|
@ -104,13 +104,6 @@ GEM
|
||||||
chunky_png (1.3.8)
|
chunky_png (1.3.8)
|
||||||
cliver (0.3.2)
|
cliver (0.3.2)
|
||||||
coderay (1.1.1)
|
coderay (1.1.1)
|
||||||
coffee-rails (4.2.1)
|
|
||||||
coffee-script (>= 2.2.0)
|
|
||||||
railties (>= 4.0.0, < 5.2.x)
|
|
||||||
coffee-script (2.4.1)
|
|
||||||
coffee-script-source
|
|
||||||
execjs
|
|
||||||
coffee-script-source (1.12.2)
|
|
||||||
compass (1.0.3)
|
compass (1.0.3)
|
||||||
chunky_png (~> 1.2)
|
chunky_png (~> 1.2)
|
||||||
compass-core (~> 1.0.2)
|
compass-core (~> 1.0.2)
|
||||||
|
|
@ -236,8 +229,6 @@ GEM
|
||||||
fog-xml (0.1.2)
|
fog-xml (0.1.2)
|
||||||
fog-core
|
fog-core
|
||||||
nokogiri (~> 1.5, >= 1.5.11)
|
nokogiri (~> 1.5, >= 1.5.11)
|
||||||
font-awesome-rails (4.7.0.1)
|
|
||||||
railties (>= 3.2, < 5.1)
|
|
||||||
formatador (0.2.5)
|
formatador (0.2.5)
|
||||||
fuubar (2.2.0)
|
fuubar (2.2.0)
|
||||||
rspec-core (~> 3.0)
|
rspec-core (~> 3.0)
|
||||||
|
|
@ -347,9 +338,6 @@ GEM
|
||||||
jsonpath (0.5.8)
|
jsonpath (0.5.8)
|
||||||
multi_json
|
multi_json
|
||||||
jwt (1.5.6)
|
jwt (1.5.6)
|
||||||
kaminari (0.17.0)
|
|
||||||
actionpack (>= 3.0.0)
|
|
||||||
activesupport (>= 3.0.0)
|
|
||||||
kgio (2.11.0)
|
kgio (2.11.0)
|
||||||
leaflet-rails (0.7.7)
|
leaflet-rails (0.7.7)
|
||||||
listen (3.1.5)
|
listen (3.1.5)
|
||||||
|
|
@ -390,7 +378,6 @@ GEM
|
||||||
mysql2 (0.4.5)
|
mysql2 (0.4.5)
|
||||||
naught (1.1.0)
|
naught (1.1.0)
|
||||||
nenv (0.3.0)
|
nenv (0.3.0)
|
||||||
nested_form (0.3.2)
|
|
||||||
nio4r (2.0.0)
|
nio4r (2.0.0)
|
||||||
nokogiri (1.7.1)
|
nokogiri (1.7.1)
|
||||||
mini_portile2 (~> 2.1.0)
|
mini_portile2 (~> 2.1.0)
|
||||||
|
|
@ -492,9 +479,6 @@ GEM
|
||||||
multi_json (>= 1.3.6)
|
multi_json (>= 1.3.6)
|
||||||
rack (>= 1.1)
|
rack (>= 1.1)
|
||||||
rack-piwik (0.3.0)
|
rack-piwik (0.3.0)
|
||||||
rack-pjax (0.8.0)
|
|
||||||
nokogiri (~> 1.5)
|
|
||||||
rack (~> 1.1)
|
|
||||||
rack-protection (1.5.3)
|
rack-protection (1.5.3)
|
||||||
rack
|
rack
|
||||||
rack-rewrite (1.5.1)
|
rack-rewrite (1.5.1)
|
||||||
|
|
@ -571,20 +555,6 @@ GEM
|
||||||
rails-timeago (2.16.0)
|
rails-timeago (2.16.0)
|
||||||
actionpack (>= 3.1)
|
actionpack (>= 3.1)
|
||||||
activesupport (>= 3.1)
|
activesupport (>= 3.1)
|
||||||
rails_admin (0.8.1)
|
|
||||||
builder (~> 3.1)
|
|
||||||
coffee-rails (~> 4.0)
|
|
||||||
font-awesome-rails (>= 3.0, < 5)
|
|
||||||
haml (~> 4.0)
|
|
||||||
jquery-rails (>= 3.0, < 5)
|
|
||||||
jquery-ui-rails (~> 5.0)
|
|
||||||
kaminari (~> 0.14)
|
|
||||||
nested_form (~> 0.3)
|
|
||||||
rack-pjax (~> 0.7)
|
|
||||||
rails (~> 4.0)
|
|
||||||
remotipart (~> 1.0)
|
|
||||||
safe_yaml (~> 1.0)
|
|
||||||
sass-rails (>= 4.0, < 6)
|
|
||||||
railties (4.2.8)
|
railties (4.2.8)
|
||||||
actionpack (= 4.2.8)
|
actionpack (= 4.2.8)
|
||||||
activesupport (= 4.2.8)
|
activesupport (= 4.2.8)
|
||||||
|
|
@ -600,7 +570,6 @@ GEM
|
||||||
redis (3.3.3)
|
redis (3.3.3)
|
||||||
redis-namespace (1.5.3)
|
redis-namespace (1.5.3)
|
||||||
redis (~> 3.0, >= 3.0.4)
|
redis (~> 3.0, >= 3.0.4)
|
||||||
remotipart (1.3.1)
|
|
||||||
request_store (1.3.2)
|
request_store (1.3.2)
|
||||||
responders (2.3.0)
|
responders (2.3.0)
|
||||||
railties (>= 4.2.0, < 5.1)
|
railties (>= 4.2.0, < 5.1)
|
||||||
|
|
@ -887,7 +856,6 @@ DEPENDENCIES
|
||||||
rails-assets-perfect-scrollbar (= 0.6.16)!
|
rails-assets-perfect-scrollbar (= 0.6.16)!
|
||||||
rails-i18n (= 4.0.8)
|
rails-i18n (= 4.0.8)
|
||||||
rails-timeago (= 2.16.0)
|
rails-timeago (= 2.16.0)
|
||||||
rails_admin (= 0.8.1)
|
|
||||||
rb-fsevent (= 0.9.8)
|
rb-fsevent (= 0.9.8)
|
||||||
rb-inotify (= 0.9.8)
|
rb-inotify (= 0.9.8)
|
||||||
redcarpet (= 3.4.0)
|
redcarpet (= 3.4.0)
|
||||||
|
|
|
||||||
|
|
@ -295,6 +295,8 @@ class Person < ActiveRecord::Base
|
||||||
|
|
||||||
def public_key
|
def public_key
|
||||||
OpenSSL::PKey::RSA.new(serialized_public_key)
|
OpenSSL::PKey::RSA.new(serialized_public_key)
|
||||||
|
rescue OpenSSL::PKey::RSAError
|
||||||
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def exported_key
|
def exported_key
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,7 @@ DiasporaFederation.configure do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
on :fetch_public_key do |diaspora_id|
|
on :fetch_public_key do |diaspora_id|
|
||||||
key = Person.find_or_fetch_by_identifier(diaspora_id).serialized_public_key
|
Person.find_or_fetch_by_identifier(diaspora_id).public_key
|
||||||
OpenSSL::PKey::RSA.new(key) unless key.nil?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
on :fetch_related_entity do |entity_type, guid|
|
on :fetch_related_entity do |entity_type, guid|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -10,10 +10,6 @@ Diaspora::Application.routes.draw do
|
||||||
|
|
||||||
resources :report, except: %i(edit new show)
|
resources :report, except: %i(edit new show)
|
||||||
|
|
||||||
if Rails.env.production?
|
|
||||||
mount RailsAdmin::Engine => '/admin_panel', :as => 'rails_admin'
|
|
||||||
end
|
|
||||||
|
|
||||||
constraints ->(req) { req.env["warden"].authenticate?(scope: :user) &&
|
constraints ->(req) { req.env["warden"].authenticate?(scope: :user) &&
|
||||||
req.env['warden'].user.admin? } do
|
req.env['warden'].user.admin? } do
|
||||||
mount Sidekiq::Web => '/sidekiq', :as => 'sidekiq'
|
mount Sidekiq::Web => '/sidekiq', :as => 'sidekiq'
|
||||||
|
|
|
||||||
|
|
@ -560,6 +560,19 @@ describe Person, :type => :model do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "#public_key" do
|
||||||
|
it "returns the public key for the person" do
|
||||||
|
key = @person.public_key
|
||||||
|
expect(key).to be_a(OpenSSL::PKey::RSA)
|
||||||
|
expect(key.to_s).to eq(@person.serialized_public_key)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "handles broken keys and returns nil" do
|
||||||
|
@person.update_attributes(serialized_public_key: "broken")
|
||||||
|
expect(@person.public_key).to be_nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'people finders for webfinger' do
|
context 'people finders for webfinger' do
|
||||||
let(:user) { FactoryGirl.create(:user) }
|
let(:user) { FactoryGirl.create(:user) }
|
||||||
let(:person) { FactoryGirl.create(:person) }
|
let(:person) { FactoryGirl.create(:person) }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue