Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagemaru committed Aug 5, 2024
1 parent 3c33d05 commit 9d8bc2c
Show file tree
Hide file tree
Showing 8 changed files with 698 additions and 78 deletions.
29 changes: 29 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# vim: et:ts=2:sw=2:tw=0:wm=0:fdm=marker:ft=bash

strict_env

PATH_add "./bin"
PATH_add "./scripts"

[[ ! -f .dev.env ]] && echo -e "\nIt seems you don't have a dev.env file locally. We need this to run.\n"

case "${STLU_ENV:-dev}" in
dev*)
echo "Loading .dev.env"
dotenv_if_exists "./.dev.env"
;;
int*)
echo "Loading .int.env"
dotenv_if_exists "./.int.env"
;;
prod*)
echo "Loading .prod.env"
dotenv_if_exists "./.prod.env"
;;
esac

# Add your local changes into the .envrc.local, which is a full blown .envrc file
# You can find the available commands here: https://direnv.net/man/direnv-stdlib.1.html
echo "Loading .envrc.local"
dotenv_if_exists "./.envrc.local"

5 changes: 5 additions & 0 deletions .envrc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# vim: et:ts=2:sw=2:tw=0:wm=0:fdm=marker:ft=bash

export RAILS_ALLOWED_HOSTS="test.dialogluzern.local,dialogluzern.local,test.deinklima.local,deinklima.local,test.impulskoeniz.local,impulskoeniz.local"
export CUSTOMIZATION_OUTPUT=false
export RAILS_ENV=development
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ public/uploads
# Ignore local gems
/vendor/bundle/

# Ignore .envrc
.envrc
# Ignore .envrc.local
.envrc.local

# Ignore local environment variables file
/.env.local
/*.env
!/dev.env

# Ignore editor specific files
*.code-workspace
Expand All @@ -67,4 +69,4 @@ yarn-debug.log*
.bash_history
.viminfo
.local
.npm
.npm
43 changes: 43 additions & 0 deletions config/initializers/decidim.old.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# frozen_string_literal: true

# Inform Decidim about the assets folder
if Decidim.respond_to?(:register_assets_path)
Decidim.register_assets_path File.expand_path('app/packs', Rails.application.root)
end

Decidim.configure do |config| # rubocop:disable Metric/BlockLength
config.maps = {
provider: :osm,
api_key: false, # Rails.application.secrets.maps[:api_key],
dynamic: {
tile_layer: {
url: 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png',
api_key: false,
attribution: %(
<a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap</a> contributors
).strip
# Translatable attribution:
# attribution: -> { I18n.t("tile_layer_attribution") }
}
},
# static: { url: "https://staticmap.example.org/" }, # optional
geocoding: { host: 'nominatim.openstreetmap.org', use_https: true },
autocomplete: {
url: 'https://photon.komoot.io/api?lat=47.378&lon=8.540&bbox=8.43,47.312,8.64,47.442'
}
}

# Geocoder configuration
config.geocoder = {
static_map_url: 'https://image.maps.cit.api.here.com/mia/1.6/mapview'
}

config.sms_gateway_service = 'DecidimZuerich::Verifications::Sms::AspsmsGateway'

config.enable_machine_translations = true
config.machine_translation_service = 'DecidimZuerich::MicrosoftTranslator'
config.machine_translation_delay = 0.seconds
end

Rails.application.config.i18n.available_locales = Decidim.available_locales
Rails.application.config.i18n.default_locale = Decidim.default_locale
Loading

0 comments on commit 9d8bc2c

Please sign in to comment.