decidim 0.10.1 → 0.11.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +8 -7
- data/Rakefile +17 -31
- data/docs/add_authenticable_action.md +12 -5
- data/docs/adding_fixtures_aka_dummy_content.md +4 -2
- data/docs/advanced/components.md +60 -0
- data/docs/advanced/content_processors.md +20 -0
- data/docs/advanced/followers.md +2 -2
- data/docs/advanced/view_models_aka_cells.md +91 -0
- data/docs/checklist.md +47 -0
- data/docs/customization/code.md +5 -3
- data/docs/customization/gemfile.md +2 -2
- data/docs/customization/javascript.md +1 -1
- data/docs/customization/oauth.md +23 -0
- data/docs/customization/styles.md +3 -7
- data/docs/data-picker.md +10 -3
- data/docs/getting_started.md +60 -25
- data/docs/services/analytics.md +1 -1
- data/docs/services/geocoding.md +4 -4
- data/docs/services/social_providers.md +26 -26
- data/lib/decidim.rb +2 -0
- data/lib/decidim/{component_manager.rb → gem_manager.rb} +49 -4
- data/lib/decidim/version.rb +1 -1
- metadata +82 -55
- data/Gemfile +0 -26
- data/Gemfile.lock +0 -606
- data/bin/decidim +0 -6
- data/docs/advanced/features.md +0 -60
- data/lib/generators/decidim/app_generator.rb +0 -159
- data/lib/generators/decidim/install_generator.rb +0 -138
- data/lib/generators/decidim/templates/Dockerfile.erb +0 -1
- data/lib/generators/decidim/templates/README.md.erb +0 -22
- data/lib/generators/decidim/templates/cable.yml.erb +0 -9
- data/lib/generators/decidim/templates/carrierwave.rb +0 -28
- data/lib/generators/decidim/templates/database.yml.erb +0 -87
- data/lib/generators/decidim/templates/decidim.scss.erb +0 -3
- data/lib/generators/decidim/templates/decidim_controller.rb.erb +0 -5
- data/lib/generators/decidim/templates/docker-compose.yml.erb +0 -26
- data/lib/generators/decidim/templates/example_authorization_handler.rb +0 -55
- data/lib/generators/decidim/templates/initializer.rb +0 -47
- data/lib/generators/decidim/templates/secrets.yml.erb +0 -61
- data/lib/generators/decidim/templates/social_share_button.rb +0 -8
@@ -1,26 +0,0 @@
|
|
1
|
-
version: '3'
|
2
|
-
services:
|
3
|
-
app:
|
4
|
-
image: decidim/decidim:<%= Decidim.version %>
|
5
|
-
volumes:
|
6
|
-
- .:/app
|
7
|
-
- bundle:/usr/local/bundle
|
8
|
-
- node_modules:/app/node_modules
|
9
|
-
environment:
|
10
|
-
- PORT=3000
|
11
|
-
- DATABASE_HOST=pg
|
12
|
-
- DATABASE_USERNAME=postgres
|
13
|
-
- RAILS_ENV=development
|
14
|
-
ports:
|
15
|
-
- 3000:3000
|
16
|
-
links:
|
17
|
-
- pg
|
18
|
-
command: bundle exec puma
|
19
|
-
pg:
|
20
|
-
image: postgres
|
21
|
-
volumes:
|
22
|
-
- pg-data:/var/lib/postgresql/data
|
23
|
-
volumes:
|
24
|
-
node_modules: {}
|
25
|
-
bundle: {}
|
26
|
-
pg-data: {}
|
@@ -1,55 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# An example authorization handler used so that users can be verified against
|
4
|
-
# third party systems.
|
5
|
-
#
|
6
|
-
# You should probably rename this class and file to match your needs.
|
7
|
-
#
|
8
|
-
# If you need a custom form to be rendered, you can create a file matching the
|
9
|
-
# class name named "_form".
|
10
|
-
#
|
11
|
-
# Example:
|
12
|
-
#
|
13
|
-
# A handler named Decidim::CensusHandler would look for its partial in:
|
14
|
-
# decidim/census/form
|
15
|
-
#
|
16
|
-
# When testing your authorization handler, add this line to be sure it has a
|
17
|
-
# valid public api:
|
18
|
-
#
|
19
|
-
# it_behaves_like "an authorization handler"
|
20
|
-
#
|
21
|
-
# See Decidim::AuthorizationHandler for more documentation.
|
22
|
-
class ExampleAuthorizationHandler < Decidim::AuthorizationHandler
|
23
|
-
# Define the attributes you need for this authorization handler. Attributes
|
24
|
-
# are defined using Virtus.
|
25
|
-
#
|
26
|
-
# Example:
|
27
|
-
# attribute :document_number, String
|
28
|
-
# attribute :birthday, Date
|
29
|
-
#
|
30
|
-
# You can (and should) also define validations on each attribute:
|
31
|
-
#
|
32
|
-
# validates :document_number, presence: true
|
33
|
-
# validate :custom_method_to_validate_an_attribute
|
34
|
-
|
35
|
-
# The only method that needs to be implemented for an authorization handler.
|
36
|
-
# Here you can add your business logic to check if the authorization should
|
37
|
-
# be created or not, you should return a Boolean value.
|
38
|
-
#
|
39
|
-
# Note that if you set some validations and overwrite this method, then the
|
40
|
-
# validations will not run, so it's easier to remove this method and rewrite
|
41
|
-
# your logic using ActiveModel validations.
|
42
|
-
def valid?
|
43
|
-
raise NotImplementedError
|
44
|
-
end
|
45
|
-
|
46
|
-
# If you need to store any of the defined attributes in the authorization you
|
47
|
-
# can do it here.
|
48
|
-
#
|
49
|
-
# You must return a Hash that will be serialized to the authorization when
|
50
|
-
# it's created, and available though authorization.metadata
|
51
|
-
#
|
52
|
-
# def metadata
|
53
|
-
# {}
|
54
|
-
# end
|
55
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Decidim.configure do |config|
|
4
|
-
config.application_name = "My Application Name"
|
5
|
-
config.mailer_sender = "change-me@domain.org"
|
6
|
-
|
7
|
-
# Change these lines to set your preferred locales
|
8
|
-
config.default_locale = :en
|
9
|
-
config.available_locales = [:en, :ca, :es]
|
10
|
-
|
11
|
-
# Geocoder configuration
|
12
|
-
# config.geocoder = {
|
13
|
-
# static_map_url: "https://image.maps.cit.api.here.com/mia/1.6/mapview",
|
14
|
-
# here_app_id: Rails.application.secrets.geocoder[:here_app_id],
|
15
|
-
# here_app_code: Rails.application.secrets.geocoder[:here_app_code]
|
16
|
-
# }
|
17
|
-
|
18
|
-
# Custom resource reference generator method
|
19
|
-
# config.reference_generator = lambda do |resource, feature|
|
20
|
-
# # Implement your custom method to generate resources references
|
21
|
-
# "1234-#{resource.id}"
|
22
|
-
# end
|
23
|
-
|
24
|
-
# Currency unit
|
25
|
-
# config.currency_unit = "€"
|
26
|
-
|
27
|
-
# The number of reports which an object can receive before hiding it
|
28
|
-
# config.max_reports_before_hiding = 3
|
29
|
-
|
30
|
-
# Custom HTML Header snippets
|
31
|
-
#
|
32
|
-
# The most common use is to integrate third-party services that require some
|
33
|
-
# extra JavaScript or CSS. Also, you can use it to add extra meta tags to the
|
34
|
-
# HTML. Note that this will only be rendered in public pages, not in the admin
|
35
|
-
# section.
|
36
|
-
#
|
37
|
-
# Before enabling this you should ensure that any tracking that might be done
|
38
|
-
# is in accordance with the rules and regulations that apply to your
|
39
|
-
# environment and usage scenarios. This feature also comes with the risk
|
40
|
-
# that an organization's administrator injects malicious scripts to spy on or
|
41
|
-
# take over user accounts.
|
42
|
-
#
|
43
|
-
config.enable_html_header_snippets = false
|
44
|
-
end
|
45
|
-
|
46
|
-
Rails.application.config.i18n.available_locales = Decidim.available_locales
|
47
|
-
Rails.application.config.i18n.default_locale = Decidim.default_locale
|
@@ -1,61 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rails secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure the secrets in this file are kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
|
13
|
-
default: &default
|
14
|
-
omniauth:
|
15
|
-
facebook:
|
16
|
-
# It must be a boolean. Remember ENV variables doesn't support booleans.
|
17
|
-
enabled: false
|
18
|
-
app_id: <%%= ENV["OMNIAUTH_FACEBOOK_APP_ID"] %>
|
19
|
-
app_secret: <%%= ENV["OMNIAUTH_FACEBOOK_APP_SECRET"] %>
|
20
|
-
twitter:
|
21
|
-
enabled: false
|
22
|
-
api_key: <%%= ENV["OMNIAUTH_TWITTER_API_KEY"] %>
|
23
|
-
api_secret: <%%= ENV["OMNIAUTH_TWITTER_API_SECRET"] %>
|
24
|
-
google_oauth2:
|
25
|
-
enabled: false
|
26
|
-
client_id: <%%= ENV["OMNIAUTH_GOOGLE_CLIENT_ID"] %>
|
27
|
-
client_secret: <%%= ENV["OMNIAUTH_GOOGLE_CLIENT_SECRET"] %>
|
28
|
-
geocoder:
|
29
|
-
here_app_id: <%%= ENV["GEOCODER_LOOKUP_APP_ID"] %>
|
30
|
-
here_app_code: <%%= ENV["GEOCODER_LOOKUP_APP_CODE"] %>
|
31
|
-
|
32
|
-
development:
|
33
|
-
<<: *default
|
34
|
-
secret_key_base: <%= SecureRandom.hex(64) %>
|
35
|
-
omniauth:
|
36
|
-
developer:
|
37
|
-
enabled: true
|
38
|
-
|
39
|
-
test:
|
40
|
-
<<: *default
|
41
|
-
secret_key_base: <%= SecureRandom.hex(64) %>
|
42
|
-
omniauth:
|
43
|
-
facebook:
|
44
|
-
enabled: true
|
45
|
-
twitter:
|
46
|
-
enabled: true
|
47
|
-
google_oauth2:
|
48
|
-
enabled: true
|
49
|
-
|
50
|
-
# Do not keep production secrets in the repository,
|
51
|
-
# instead read values from the environment.
|
52
|
-
production:
|
53
|
-
<<: *default
|
54
|
-
secret_key_base: <%%= ENV["SECRET_KEY_BASE"] %>
|
55
|
-
smtp_username: <%%= ENV["SMTP_USERNAME"] %>
|
56
|
-
smtp_password: <%%= ENV["SMTP_PASSWORD"] %>
|
57
|
-
smtp_address: <%%= ENV["SMTP_ADDRESS"] %>
|
58
|
-
smtp_domain: <%%= ENV["SMTP_DOMAIN"] %>
|
59
|
-
smtp_port: "587"
|
60
|
-
smtp_starttls_auto: true
|
61
|
-
smtp_authentication: "plain"
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Further information on how to configure the SocialShareButton gem can be
|
4
|
-
# found here: https://github.com/huacnlee/social-share-button#configure
|
5
|
-
#
|
6
|
-
SocialShareButton.configure do |config|
|
7
|
-
config.allow_sites = %w(twitter facebook google_plus)
|
8
|
-
end
|