Currently we have some license issues. We are working on it.

Commit e160f3e3 authored by dmorley's avatar dmorley
Browse files

Merge remote-tracking branch 'upstream/next-minor'

parents fa09ae10 0fcd1663
name: CI
on:
push:
branches:
- develop
- next-minor
- main
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- 2.6
- 2.5
db:
- mysql
- postgresql
kind:
- cucumber
- other
env:
DB: ${{ matrix.db }}
RAILS_ENV: test
BUNDLE_WITH: ${{ matrix.db }}
BUNDLE_WITHOUT: development
BUNDLE_FROZEN: true
BUNDLE_DISABLE_SHARED_GEMS: true
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Install system dependencies
run: sudo apt-get install -y build-essential curl git gsfonts imagemagick libcurl4-openssl-dev libidn11-dev libmagickwand-dev libssl-dev libxml2-dev libxslt1-dev
- name: Start MySQL
run: sudo systemctl start mysql.service
if: matrix.db == 'mysql'
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Prepare
run: script/ci/prepare.sh
- name: Run tests
run: bin/rake --trace ci:${{ matrix.kind }}
- name: Run Jasmine
run: bin/rake jasmine:ci
timeout-minutes: 2
if: matrix.kind == 'other'
......@@ -9,6 +9,7 @@ app/views/terms/terms.*
app/assets/images/custom/
# Configuration files
config/diaspora.toml
config/diaspora.yml
config/initializers/secret_token.rb
.bundle
......
require: rubocop-rails
AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 2.6
NewCops: enable
Exclude:
- "bin/**/*"
- "db/schema.rb"
......
# 0.7.15.0
## Refactor
* Replaced some `http://` links in the UI with their `https://` counterparts [#8207](https://github.com/diaspora/diaspora/pull/8207)
* Testing: Replaced phantomjs with headless Chrome/Chromium [#8234](https://github.com/diaspora/diaspora/pull/8234)
## Bug fixes
* Update comment counter when weleting a comment in the Single Post View [#7938](https://github.com/diaspora/diaspora/pull/7938)
* Link diaspora only poduptime list [#8174](https://github.com/diaspora/diaspora/pull/8174)
* Delete a user's invitation code during account deletion [#8202](https://github.com/diaspora/diaspora/pull/8202)
* Bump mimemagic [#8231](https://github.com/diaspora/diaspora/pull/8231)
* Removed support for defunct Uni Heidelberg OSM tile server, Mapbox is now required if you want to show maps [#8215](https://github.com/diaspora/diaspora/pull/8215)
* Render only two fractional digits in the posts per user/day admin statistics [#8227](https://github.com/diaspora/diaspora/pull/8227)
* Make aspect dropdowns scrollable [#8213](https://github.com/diaspora/diaspora/pull/8213)
* Fix `Photo#ownserhip_of_status_message` validation [#8214](https://github.com/diaspora/diaspora/pull/8214)
## Features
* Support and recommend TOML as configuration format [#8132](https://github.com/diaspora/diaspora/pull/8132)
# 0.7.14.0
## Refactor
......
......@@ -3,11 +3,11 @@
source "https://rubygems.org"
gem "sitemap_generator", "~> 5.1"
gem "rails", "5.2.4.3"
gem "rails", "5.2.5"
# Legacy Rails features, remove me!
# responders (class level)
gem "responders", "2.4.1"
gem "responders", "3.0.1"
# Appserver
......@@ -27,8 +27,8 @@ gem "json-schema", "2.8.1"
# Authentication
gem "devise", "4.7.1"
gem "devise-two-factor", "3.0.3"
gem "devise", "4.7.3"
gem "devise-two-factor", "4.0.0"
gem "devise_lastseenable", "0.0.6"
gem "rqrcode", "1.1.2"
......@@ -38,12 +38,12 @@ gem "simple_captcha2", "0.5.0", require: "simple_captcha"
# Background processing
gem "redis", "3.3.5" # Pinned to 3.3.x because of https://github.com/antirez/redis/issues/4272
gem "sidekiq", "5.2.8"
gem "redis", "4.2.5"
gem "sidekiq", "6.2.1"
# Scheduled processing
gem "sidekiq-cron", "1.1.0"
gem "sidekiq-cron", "1.2.0"
# Compression
......@@ -51,7 +51,8 @@ gem "uglifier", "4.2.0"
# Configuration
gem "configurate", "0.3.1"
gem "configurate", "0.5.0"
gem "toml-rb", "2.0.1"
# Cross-origin resource sharing
......@@ -59,9 +60,9 @@ gem "rack-cors", "1.1.1", require: "rack/cors"
# CSS
gem "autoprefixer-rails", "8.6.5"
gem "autoprefixer-rails", "10.2.4.0"
gem "bootstrap-sass", "3.4.1"
gem "bootstrap-switch-rails", "3.3.3" # 3.3.4 is broken, see https://github.com/Bttstrp/bootstrap-switch/issues/691
gem "bootstrap-switch-rails", "3.3.3" # 3.3.4 and 3.3.5 is broken, see https://github.com/Bttstrp/bootstrap-switch/issues/691
gem "compass-rails", "3.1.0"
gem "sass-rails", "5.0.7"
gem "sprockets-rails", "3.2.1"
......@@ -80,7 +81,7 @@ gem "activerecord-import", "1.0.4"
# File uploading
gem "carrierwave", "1.3.1"
gem "carrierwave", "1.3.2"
gem "fog-aws", "3.5.2"
gem "mini_magick", "4.10.1"
......@@ -143,9 +144,9 @@ gem "leaflet-rails", "1.6.0"
# Parsing
gem "nokogiri", "1.10.9"
gem "open_graph_reader", "0.7.0" # also update User-Agent in features/support/webmock.rb
gem "redcarpet", "3.5.0"
gem "nokogiri", "1.11.3"
gem "open_graph_reader", "0.7.1" # also update User-Agent in features/support/webmock.rb and open_graph_cache_spec.rb
gem "redcarpet", "3.5.1"
gem "ruby-oembed", "0.12.0"
gem "twitter-text", "1.14.7"
......@@ -155,7 +156,7 @@ gem "string-direction", "1.2.2"
# Security Headers
gem "secure_headers", "6.3.0"
gem "secure_headers", "6.3.2"
# Services
......@@ -186,12 +187,12 @@ gem "addressable", "2.7.0", require: "addressable/uri"
gem "faraday", "0.15.4"
gem "faraday_middleware", "0.13.1"
gem "faraday-cookie_jar", "0.0.6"
gem "typhoeus", "1.3.1"
gem "typhoeus", "1.4.0"
# Views
gem "gon", "6.3.2"
gem "hamlit", "2.11.0"
gem "hamlit", "2.14.6"
gem "mobile-fu", "1.4.0"
gem "rails-timeago", "2.18.0"
gem "will_paginate", "3.3.0"
......@@ -202,7 +203,7 @@ gem "logging-rails", "0.6.0", require: "logging/rails"
# Reading and writing zip files
gem "rubyzip", "1.3.0", require: "zip"
gem "rubyzip", "2.3.0", require: "zip"
# Prevent occasions where minitest is not bundled in
# packaged versions of ruby. See following issues/prs:
......@@ -241,77 +242,64 @@ group :production do # we don"t install these on travis to speed up test runs
end
group :development do
# Automatic test runs
gem "guard", "2.16.1", require: false
gem "guard-rspec", "4.7.3", require: false
gem "guard-rubocop", "1.3.0", require: false
gem "rb-fsevent", "0.10.3", require: false
gem "rb-inotify", "0.10.1", require: false
# Linters
gem "haml_lint", "0.35.0", require: false
gem "pronto", "0.10.0", require: false
gem "pronto-eslint", "0.10.0", require: false
gem "pronto-haml", "0.10.0", require: false
gem "pronto-rubocop", "0.10.0", require: false
gem "pronto-scss", "0.10.0", require: false
gem "rubocop", "0.80.1", require: false
gem "rubocop-rails", "2.4.1", require: false
# Preloading environment
gem "spring", "2.1.0"
gem "spring-commands-rspec", "1.0.4"
gem "spring-commands-cucumber", "1.0.1"
gem "haml_lint", "0.37.0", require: false
gem "pronto", "0.11.0", require: false
gem "pronto-eslint", "0.11.0", require: false
gem "pronto-haml", "0.11.0", require: false
gem "pronto-rubocop", "0.11.1", require: false
gem "pronto-scss", "0.11.0", require: false
gem "rubocop", "0.93.1", require: false
gem "rubocop-rails", "2.9.1", require: false
# Debugging
gem "pry"
gem "pry-byebug"
# test coverage
gem "simplecov", "0.16.1", require: false
gem "simplecov", "0.21.2", require: false
gem "turbo_dev_assets", "0.0.2"
gem "listen", "3.5.1"
end
group :test do
# RSpec (unit tests, some integration tests)
gem "fixture_builder", "0.5.2"
gem "fuubar", "2.5.0"
gem "fuubar", "2.5.1"
gem "json-schema-rspec", "0.0.4"
gem "rspec-json_expectations", "~> 2.1"
# Cucumber (integration tests)
gem "capybara", "3.15.0"
gem "database_cleaner", "1.8.3"
gem "poltergeist", "1.18.1"
gem "apparition", "0.6.0"
gem "capybara", "3.35.3"
gem "database_cleaner-active_record", "1.8.0"
gem "cucumber-api-steps", "0.14", require: false
# General helpers
gem "factory_girl_rails", "4.9.0"
gem "shoulda-matchers", "4.0.1"
gem "timecop", "0.9.1"
gem "webmock", "3.8.3", require: false
gem "shoulda-matchers", "4.5.1"
gem "timecop", "0.9.4"
gem "webmock", "3.12.2", require: false
gem "diaspora_federation-test", "0.2.6"
# Coverage
gem "coveralls", "0.8.23", require: false
end
group :development, :test do
# RSpec (unit tests, some integration tests)
gem "rspec-rails", "3.9.1"
gem "rspec-rails", "5.0.1"
# Cucumber (integration tests)
gem "cucumber-rails", "2.0.0", require: false
gem "cucumber-rails", "2.3.0", require: false
# Jasmine (client side application tests (JS))
gem "jasmine", "3.5.1"
gem "chrome_remote", "0.3.0"
gem "jasmine", "3.7.0"
gem "jasmine-jquery-rails", "2.0.3"
gem "rails-assets-jasmine-ajax", "4.0.0", source: "https://gems.diasporafoundation.org"
gem "sinon-rails", "1.15.0"
......
This diff is collapsed.
# frozen_string_literal: true
guard :rspec, cmd: "bin/spring rspec", all_on_start: false, all_after_pass: false do
watch(/^spec\/.+_spec\.rb$/)
watch(/^lib\/(.+)\.rb$/) {|m| "spec/lib/#{m[1]}_spec.rb" }
watch(/spec\/spec_helper.rb/) { "spec" }
# Rails example
watch(/^spec\/.+_spec\.rb$/)
watch(/^app\/(.+)\.rb$/) {|m| "spec/#{m[1]}_spec.rb" }
watch(/^lib\/(.+)\.rb$/) {|m| "spec/lib/#{m[1]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) {|m|
["spec/routing/#{m[1]}_routing_spec.rb",
"spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb",
"spec/acceptance/#{m[1]}_spec.rb"]
}
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
watch("spec/spec_helper.rb") { "spec" }
watch("config/routes.rb") { "spec/routing" }
watch("app/controllers/application_controller.rb") { "spec/controllers" }
# Capybara request specs
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) {|m| "spec/requests/#{m[1]}_spec.rb" }
end
guard :rubocop, all_on_start: false, keep_failed: false do
watch(/(?:app|config|db|lib|features|spec)\/.+\.rb$/)
watch(/(config.ru|Gemfile|Guardfile|Rakefile)$/)
end
# diaspora\*
### A privacy-aware, distributed, open source social network
**master:** [![Build Status master](https://secure.travis-ci.org/diaspora/diaspora.svg?branch=master)](http://travis-ci.org/diaspora/diaspora)
**next-minor:** [![Build Status next-minor](https://secure.travis-ci.org/diaspora/diaspora.svg?branch=next-minor)](http://travis-ci.org/diaspora/diaspora)
[![Coverage Status next-minor](https://coveralls.io/repos/github/diaspora/diaspora/badge.svg?branch=next-minor)](https://coveralls.io/github/diaspora/diaspora?branch=next-minor)|
**develop:** [![Build Status develop](https://secure.travis-ci.org/diaspora/diaspora.svg?branch=develop)](http://travis-ci.org/diaspora/diaspora)
[![Coverage Status develop](https://coveralls.io/repos/github/diaspora/diaspora/badge.svg?branch=develop)](https://coveralls.io/github/diaspora/diaspora?branch=develop) |
[![Code Climate](https://codeclimate.com/github/diaspora/diaspora/badges/gpa.svg)](https://codeclimate.com/github/diaspora/diaspora)
[Project site](https://diasporafoundation.org) |
[Wiki](https://wiki.diasporafoundation.org) |
[Bugtracker](https://github.com/diaspora/diaspora/issues) |
......@@ -17,7 +10,7 @@
## Installation
You don't have to install diaspora\* to use the network. There are many servers connected to diaspora\*s network which are open to anyone, and you can create an account on one of these servers. Have a look at our [tips for finding a home](https://wiki.diasporafoundation.org/Choosing_a_pod), or you can just go straight to the [list of open servers](http://podupti.me) to sign up.
You don't have to install diaspora\* to use the network. There are many servers connected to diaspora\*s network which are open to anyone, and you can create an account on one of these servers. Have a look at our [tips for finding a home](https://wiki.diasporafoundation.org/Choosing_a_pod), or you can just go straight to the [list of open servers](https://diaspora.podupti.me) to sign up.
Want to own your data and install diaspora\*? Whether you just want to try it out, want to install it on your server or want to contribute and need a development setup, our [installation guides](https://wiki.diasporafoundation.org/Installation) will get you started!
......
(function() {
app.helpers.locations = {
getTiles: function() {
// If the mapbox option is enabled in the diaspora.yml, the mapbox tiles with the podmin's credentials are used.
// If the mapbox option is enabled in the diaspora.toml, the mapbox tiles with the podmin's credentials are used.
if (gon.appConfig.map.mapbox.enabled) {
return L.tileLayer("https://api.mapbox.com/styles/v1/{style}/tiles/256/{z}/{x}/{y}?access_token={accessToken}", {
accessToken: gon.appConfig.map.mapbox.access_token,
style: gon.appConfig.map.mapbox.style,
attribution: "Map data &copy; <a href='http://openstreetmap.org'>OpenStreetMap</a> contributors, " +
"<a href='http://creativecommons.org/licenses/by-sa/2.0/''>CC-BY-SA</a>, " +
"Imagery © <a href='https://www.mapbox.com'>Mapbox</a>",
maxZoom: 18
});
return L.tileLayer(
"https://api.mapbox.com/styles/v1/{style}/tiles/256/{z}/{x}/{y}?access_token={accessToken}",
{
accessToken: gon.appConfig.map.mapbox.access_token,
style: gon.appConfig.map.mapbox.style,
attribution:
"Map data &copy; <a href='https://openstreetmap.org'>OpenStreetMap</a> contributors, " +
"<a href='http://opendatacommons.org/licenses/dbcl/1.0/'>Open Database License, ODbL 1.0</a>, " +
"Imagery © <a href='https://www.mapbox.com'>Mapbox</a>",
maxZoom: 18,
tileSize: 512,
zoomOffset: -1
}
);
}
// maptiles from the Heidelberg University are used by default.
return L.tileLayer("http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}", {
attribution: "Map data &copy; <a href='http://openstreetmap.org'>OpenStreetMap</a> contributors, " +
"rendering <a href='http://giscience.uni-hd.de/'>" +
"GIScience Research Group @ Heidelberg University</a>",
maxZoom: 18
});
}
};
})();
......@@ -85,6 +85,10 @@ app.models.Post.Interactions = Backbone.Model.extend({
});
},
removedComment: function() {
this.set({"comments_count": this.get("comments_count") - 1});
},
reshare : function(){
var interactions = this;
......
......@@ -16,10 +16,8 @@ app.views.AspectMembership = app.views.Base.extend({
},
events: {
"click ul.aspect_membership.dropdown-menu > li.aspect_selector"
: "_clickHandler",
"keypress ul.aspect_membership.dropdown-menu > li.aspect_selector"
: "_clickHandler"
"click ul.aspect-membership.dropdown-menu > li.aspect_selector": "_clickHandler",
"keypress ul.aspect-membership.dropdown-menu > li.aspect_selector": "_clickHandler"
},
initialize: function(opts) {
......
......@@ -135,7 +135,10 @@ app.views.CommentStream = app.views.Base.extend({
},
removeComment: function(comment) {
this.$("#" + comment.get("guid")).closest(".comment.media").remove();
var result = this.$("#" + comment.get("guid")).closest(".comment.media").remove();
if (result.hasClass("deleting")) {
this.model.interactions.removedComment();
}
},
expandComments: function(evt){
......
......@@ -13,9 +13,10 @@ app.views.Help = app.views.StaticContentView.extend({
"click .faq-link-chat": "chat"
},
/* eslint-disable camelcase */
initialize : function() {
this.GETTING_HELP_SUBS = {
getting_started_a: {tutorial_series: this.linkHtml("http://diasporafoundation.org/getting_started/sign_up", Diaspora.I18n.t("getting_started_tutorial"))},
getting_started_a: {tutorial_series: this.linkHtml("https://diasporafoundation.org/getting_started/sign_up", Diaspora.I18n.t("getting_started_tutorial"))},
get_support_a_website: {link: this.linkHtml("https://diasporafoundation.org/", Diaspora.I18n.t("foundation_website"))},
get_support_a_tutorials: {tutorials: this.linkHtml("https://diasporafoundation.org/tutorials", Diaspora.I18n.t("tutorials"))},
get_support_a_wiki: {link: this.linkHtml("https://wiki.diasporafoundation.org/Special:Search", Diaspora.I18n.t("wiki"))},
......@@ -28,10 +29,11 @@ app.views.Help = app.views.StaticContentView.extend({
this.POSTS_AND_POSTING_SUBS = {
post_report_a: {community_guidelines: this.linkHtml("https://diasporafoundation.org/community_guidelines", Diaspora.I18n.t("community_guidelines"))},
format_text_a: {
markdown: this.linkHtml("http://diasporafoundation.org/formatting", Diaspora.I18n.t( 'markdown' )),
here: this.linkHtml("http://daringfireball.net/projects/markdown/syntax", Diaspora.I18n.t( 'here' ))
markdown: this.linkHtml("https://diasporafoundation.org/formatting", Diaspora.I18n.t("markdown")),
here: this.linkHtml("https://daringfireball.net/projects/markdown/syntax", Diaspora.I18n.t("here"))
}
};
/* eslint-enable camelcase */
this.TAGS_SUBS = {
filter_tags_a: {
......
......@@ -36,8 +36,9 @@ app.views.SinglePostContent = app.views.Base.extend({
var map = L.map(mapContainer[0]).setView([location.lat, location.lng], 14);
var tiles = app.helpers.locations.getTiles();
tiles.addTo(map);
if (tiles) {
tiles.addTo(map);
}
// put marker on map
L.marker(location).addTo(map);
......
......@@ -21,3 +21,7 @@
}
}
}
.aspect-membership {
max-height: 300px;
overflow: auto;
}
......@@ -145,14 +145,6 @@
}
}
#email-form{
padding: 0;
.form-group{
margin-left: 0;
margin-right: 0;
}
}
#birth-date{
text-align: center;
select{
......
......@@ -13,7 +13,7 @@
<span class="caret" />
</button>
<ul class="dropdown-menu aspect_membership pull-right" unselectable="on">
<ul class="dropdown-menu aspect-membership pull-right" unselectable="on">
{{#each aspects}}
<li
{{#if membership}}
......
<li class="hoverable">
<a class="selectable toggle_selector" href="#">
<a class="selectable toggle_selector aspect-membership" href="#">
{{ t "aspect_navigation.select_all" }}
</a>
</li>
......
......@@ -5,7 +5,7 @@ module MetaDataHelper
include ActionView::Helpers::TagHelper
def og_prefix
'og: http://ogp.me/ns# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#'
"og: https://ogp.me/ns# article: https://ogp.me/ns/article# profile: https://ogp.me/ns/profile#"
end
def site_url
......
......@@ -68,11 +68,9 @@ class Photo < ApplicationRecord
def ownership_of_status_message
message = StatusMessage.find_by_guid(self.status_message_guid)
if self.status_message_guid && message
self.diaspora_handle == message.diaspora_handle
else
true
end
return unless status_message_guid && message && diaspora_handle != message.diaspora_handle
errors.add(:base, "Photo must have the same owner as status message")
end
def self.diaspora_initialize(params={})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment