Merge branch 'stable' into develop
This commit is contained in:
commit
642c4597e1
5 changed files with 29 additions and 25 deletions
|
|
@ -36,6 +36,7 @@ Ruby 2.0 is no longer officially supported.
|
||||||
* Fix closing account from mobile view [#5913](https://github.com/diaspora/diaspora/pull/5913)
|
* Fix closing account from mobile view [#5913](https://github.com/diaspora/diaspora/pull/5913)
|
||||||
* Allow using common custom template for desktop & mobile landing page [#5915](https://github.com/diaspora/diaspora/pull/5915)
|
* Allow using common custom template for desktop & mobile landing page [#5915](https://github.com/diaspora/diaspora/pull/5915)
|
||||||
* Use correct branding in Atom feed [#5929](https://github.com/diaspora/diaspora/pull/5929)
|
* Use correct branding in Atom feed [#5929](https://github.com/diaspora/diaspora/pull/5929)
|
||||||
|
* Update the configurate gem to avoid issues by missed missing settings keys [#5934](https://github.com/diaspora/diaspora/pull/5934)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
* Hide post title of limited post in comment notification email [#5843](https://github.com/diaspora/diaspora/pull/5843)
|
* Hide post title of limited post in comment notification email [#5843](https://github.com/diaspora/diaspora/pull/5843)
|
||||||
|
|
|
||||||
2
Gemfile
2
Gemfile
|
|
@ -45,7 +45,7 @@ gem "uglifier", "2.7.1"
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
gem "configurate", "0.2.0"
|
gem "configurate", "0.3.1"
|
||||||
|
|
||||||
# Cross-origin resource sharing
|
# Cross-origin resource sharing
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ GEM
|
||||||
compass (~> 1.0.0)
|
compass (~> 1.0.0)
|
||||||
sass-rails (<= 5.0.1)
|
sass-rails (<= 5.0.1)
|
||||||
sprockets (< 2.13)
|
sprockets (< 2.13)
|
||||||
configurate (0.2.0)
|
configurate (0.3.1)
|
||||||
connection_pool (2.2.0)
|
connection_pool (2.2.0)
|
||||||
crack (0.4.2)
|
crack (0.4.2)
|
||||||
safe_yaml (~> 1.0.0)
|
safe_yaml (~> 1.0.0)
|
||||||
|
|
@ -717,7 +717,7 @@ DEPENDENCIES
|
||||||
capybara (= 2.4.4)
|
capybara (= 2.4.4)
|
||||||
carrierwave (= 0.10.0)
|
carrierwave (= 0.10.0)
|
||||||
compass-rails (= 2.0.4)
|
compass-rails (= 2.0.4)
|
||||||
configurate (= 0.2.0)
|
configurate (= 0.3.1)
|
||||||
cucumber-rails (= 1.4.2)
|
cucumber-rails (= 1.4.2)
|
||||||
database_cleaner (= 1.4.1)
|
database_cleaner (= 1.4.1)
|
||||||
devise (= 3.4.1)
|
devise (= 3.4.1)
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ defaults:
|
||||||
paypal_hosted_button_id:
|
paypal_hosted_button_id:
|
||||||
paypal_unhosted_button_encrypted:
|
paypal_unhosted_button_encrypted:
|
||||||
bitcoin_address:
|
bitcoin_address:
|
||||||
|
bitcoin_wallet_id: # DEPRECATED: Remove with 0.6
|
||||||
community_spotlight:
|
community_spotlight:
|
||||||
enable: false
|
enable: false
|
||||||
suggest_email:
|
suggest_email:
|
||||||
|
|
@ -176,6 +177,8 @@ defaults:
|
||||||
admins:
|
admins:
|
||||||
account:
|
account:
|
||||||
podmin_email:
|
podmin_email:
|
||||||
|
# List valid environment variables
|
||||||
|
redistogo_url:
|
||||||
|
|
||||||
development:
|
development:
|
||||||
environment:
|
environment:
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
require 'pathname'
|
require "pathname"
|
||||||
require 'bundler/setup'
|
require "bundler/setup"
|
||||||
require 'configurate'
|
require "configurate"
|
||||||
|
|
||||||
rails_env = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
|
rails_env = ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"
|
||||||
|
|
||||||
module Rails
|
module Rails
|
||||||
def self.root
|
def self.root
|
||||||
@__root ||= Pathname.new File.expand_path('../../', __FILE__)
|
@__root ||= Pathname.new File.expand_path("../../", __FILE__)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
require Rails.root.join 'lib', 'configuration_methods'
|
require Rails.root.join "lib", "configuration_methods"
|
||||||
|
|
||||||
config_dir = Rails.root.join('config').to_s
|
|
||||||
|
|
||||||
|
config_dir = Rails.root.join("config").to_s
|
||||||
|
|
||||||
AppConfig ||= Configurate::Settings.create do
|
AppConfig ||= Configurate::Settings.create do
|
||||||
add_provider Configurate::Provider::Dynamic
|
add_provider Configurate::Provider::Dynamic
|
||||||
add_provider Configurate::Provider::Env
|
add_provider Configurate::Provider::Env
|
||||||
|
|
||||||
unless heroku? || rails_env == "test" || File.exists?(File.join(config_dir, 'diaspora.yml'))
|
unless heroku? || rails_env == "test" || File.exist?(File.join(config_dir, "diaspora.yml"))
|
||||||
$stderr.puts "FATAL: Configuration not found. Copy over diaspora.yml.example"
|
warn "FATAL: Configuration not found. Copy over diaspora.yml.example"
|
||||||
$stderr.puts " to diaspora.yml and edit it to your needs."
|
warn " to diaspora.yml and edit it to your needs."
|
||||||
exit!
|
exit!
|
||||||
end
|
end
|
||||||
|
|
||||||
add_provider Configurate::Provider::YAML,
|
add_provider Configurate::Provider::YAML,
|
||||||
File.join(config_dir, 'diaspora.yml'),
|
File.join(config_dir, "diaspora.yml"),
|
||||||
namespace: rails_env, required: false unless rails_env == 'test'
|
namespace: rails_env, required: false unless rails_env == "test"
|
||||||
add_provider Configurate::Provider::YAML,
|
add_provider Configurate::Provider::YAML,
|
||||||
File.join(config_dir, 'diaspora.yml'),
|
File.join(config_dir, "diaspora.yml"),
|
||||||
namespace: "configuration", required: false
|
namespace: "configuration", required: false
|
||||||
add_provider Configurate::Provider::YAML,
|
add_provider Configurate::Provider::YAML,
|
||||||
File.join(config_dir, 'defaults.yml'),
|
File.join(config_dir, "defaults.yml"),
|
||||||
namespace: rails_env
|
namespace: rails_env
|
||||||
add_provider Configurate::Provider::YAML,
|
add_provider Configurate::Provider::YAML,
|
||||||
File.join(config_dir, 'defaults.yml'),
|
File.join(config_dir, "defaults.yml"),
|
||||||
namespace: "defaults"
|
namespace: "defaults", raise_on_missing: true
|
||||||
|
|
||||||
extend Configuration::Methods
|
extend Configuration::Methods
|
||||||
|
|
||||||
if rails_env == "production" &&
|
if rails_env == "production" &&
|
||||||
(environment.certificate_authorities.nil? ||
|
(environment.certificate_authorities.nil? ||
|
||||||
environment.certificate_authorities.empty? ||
|
environment.certificate_authorities.empty? ||
|
||||||
!File.file?(environment.certificate_authorities.get))
|
!File.file?(environment.certificate_authorities.get))
|
||||||
$stderr.puts "FATAL: Diaspora doesn't know where your certificate authorities are. Please ensure they are set to a valid path in diaspora.yml"
|
warn "FATAL: Diaspora doesn't know where your certificate authorities are." \
|
||||||
|
" Please ensure they are set to a valid path in diaspora.yml"
|
||||||
exit!
|
exit!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue