alchemy_kono_mailup 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +26 -0
  5. data/app/assets/images/alchemy_kono_mailup/.keep +0 -0
  6. data/app/assets/javascripts/alchemy_kono_mailup/application.js +13 -0
  7. data/app/assets/stylesheets/alchemy_kono_mailup/application.css +15 -0
  8. data/app/controllers/alchemy/admin/essence_mailup_lists_controller.rb +22 -0
  9. data/app/controllers/alchemy_kono_mailup/admin/base_controller.rb +5 -0
  10. data/app/controllers/alchemy_kono_mailup/admin/mailup_configs_controller.rb +13 -0
  11. data/app/controllers/alchemy_kono_mailup/admin/tokens_controller.rb +16 -0
  12. data/app/helpers/alchemy_kono_mailup/application_helper.rb +22 -0
  13. data/app/models/alchemy/essence_mailup_list.rb +4 -0
  14. data/app/models/alchemy_kono_mailup/base_subscription_form.rb +11 -0
  15. data/app/models/alchemy_kono_mailup/mailup_config.rb +6 -0
  16. data/app/views/alchemy/essences/_essence_mailup_list_editor.html.erb +11 -0
  17. data/app/views/alchemy/essences/_essence_mailup_list_view.html.erb +3 -0
  18. data/app/views/alchemy_kono_mailup/admin/mailup_configs/main.html.erb +19 -0
  19. data/app/views/layouts/alchemy_kono_mailup/application.html.erb +14 -0
  20. data/config/initializers/alchemy.rb +26 -0
  21. data/config/initializers/kono_mailup.rb +9 -0
  22. data/config/routes.rb +21 -0
  23. data/db/migrate/20171127105007_create_alchemy_kono_mailup_alchemy_essence_mailup_lists.rb +13 -0
  24. data/lib/alchemy_kono_mailup.rb +21 -0
  25. data/lib/alchemy_kono_mailup/ability.rb +58 -0
  26. data/lib/alchemy_kono_mailup/engine.rb +22 -0
  27. data/lib/alchemy_kono_mailup/version.rb +3 -0
  28. data/lib/generators/alchemy_kono_mailup/install/USAGE +9 -0
  29. data/lib/generators/alchemy_kono_mailup/install/install_generator.rb +20 -0
  30. data/lib/generators/alchemy_kono_mailup/install/templates/initializers.rb +4 -0
  31. data/lib/generators/alchemy_kono_mailup/subscription_form/USAGE +7 -0
  32. data/lib/generators/alchemy_kono_mailup/subscription_form/subscription_form_generator.rb +75 -0
  33. data/lib/generators/alchemy_kono_mailup/subscription_form/templates/form_controller.rb.erb +70 -0
  34. data/lib/generators/alchemy_kono_mailup/subscription_form/templates/form_model.rb.erb +5 -0
  35. data/lib/generators/alchemy_kono_mailup/subscription_form/templates/form_view.html.erb +29 -0
  36. data/lib/tasks/alchemy_kono_mailup_tasks.rake +4 -0
  37. data/spec/dummy/README.rdoc +28 -0
  38. data/spec/dummy/Rakefile +6 -0
  39. data/spec/dummy/app/assets/images/.keep +0 -0
  40. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  41. data/spec/dummy/app/assets/stylesheets/alchemy/elements/article.scss +30 -0
  42. data/spec/dummy/app/assets/stylesheets/application.css +16 -0
  43. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  44. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  45. data/spec/dummy/app/controllers/mailup_subscription_forms_controller.rb +73 -0
  46. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  47. data/spec/dummy/app/mailers/.keep +0 -0
  48. data/spec/dummy/app/models/.keep +0 -0
  49. data/spec/dummy/app/models/concerns/.keep +0 -0
  50. data/spec/dummy/app/models/mailup_subscription_form.rb +7 -0
  51. data/spec/dummy/app/views/alchemy/elements/_article_editor.html.erb +5 -0
  52. data/spec/dummy/app/views/alchemy/elements/_article_view.html.erb +7 -0
  53. data/spec/dummy/app/views/alchemy/elements/_mailup_subscription_editor.html.erb +3 -0
  54. data/spec/dummy/app/views/alchemy/elements/_mailup_subscription_view.html.erb +27 -0
  55. data/spec/dummy/app/views/alchemy/page_layouts/_standard.html.erb +1 -0
  56. data/spec/dummy/app/views/layouts/application.html.erb +16 -0
  57. data/spec/dummy/bin/bundle +3 -0
  58. data/spec/dummy/bin/rails +4 -0
  59. data/spec/dummy/bin/rake +4 -0
  60. data/spec/dummy/bin/setup +29 -0
  61. data/spec/dummy/config.ru +4 -0
  62. data/spec/dummy/config/alchemy/config.yml +194 -0
  63. data/spec/dummy/config/alchemy/elements.yml +27 -0
  64. data/spec/dummy/config/alchemy/page_layouts.yml +8 -0
  65. data/spec/dummy/config/application.rb +32 -0
  66. data/spec/dummy/config/boot.rb +5 -0
  67. data/spec/dummy/config/database.yml +25 -0
  68. data/spec/dummy/config/environment.rb +5 -0
  69. data/spec/dummy/config/environments/development.rb +41 -0
  70. data/spec/dummy/config/environments/production.rb +79 -0
  71. data/spec/dummy/config/environments/test.rb +42 -0
  72. data/spec/dummy/config/initializers/assets.rb +11 -0
  73. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  74. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  75. data/spec/dummy/config/initializers/devise.rb +265 -0
  76. data/spec/dummy/config/initializers/dragonfly.rb +35 -0
  77. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  78. data/spec/dummy/config/initializers/inflections.rb +16 -0
  79. data/spec/dummy/config/initializers/kono_mailup.rb +13 -0
  80. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  81. data/spec/dummy/config/initializers/session_store.rb +3 -0
  82. data/spec/dummy/config/initializers/to_time_preserves_timezone.rb +10 -0
  83. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  84. data/spec/dummy/config/locales/alchemy.de.yml +31 -0
  85. data/spec/dummy/config/locales/alchemy.en.yml +31 -0
  86. data/spec/dummy/config/locales/alchemy.es.yml +31 -0
  87. data/spec/dummy/config/locales/en.yml +23 -0
  88. data/spec/dummy/config/routes.rb +9 -0
  89. data/spec/dummy/config/secrets_example.yml +24 -0
  90. data/spec/dummy/db/migrate/20171124145455_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +36 -0
  91. data/spec/dummy/db/migrate/20171124145456_add_missing_unique_indices.acts_as_taggable_on_engine.rb +26 -0
  92. data/spec/dummy/db/migrate/20171124145457_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +20 -0
  93. data/spec/dummy/db/migrate/20171124145458_add_missing_taggable_index.acts_as_taggable_on_engine.rb +15 -0
  94. data/spec/dummy/db/migrate/20171124145459_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +15 -0
  95. data/spec/dummy/db/migrate/20171124145460_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb +23 -0
  96. data/spec/dummy/db/migrate/20171124145461_alchemy_two_point_six.alchemy.rb +379 -0
  97. data/spec/dummy/db/migrate/20171124145462_remove_do_not_index_from_alchemy_essence_texts.alchemy.rb +6 -0
  98. data/spec/dummy/db/migrate/20171124145463_remove_do_not_index_from_alchemy_essence_richtexts.alchemy.rb +6 -0
  99. data/spec/dummy/db/migrate/20171124145464_add_published_at_to_alchemy_pages.alchemy.rb +6 -0
  100. data/spec/dummy/db/migrate/20171124145465_add_parent_element_id_to_alchemy_elements.alchemy.rb +7 -0
  101. data/spec/dummy/db/migrate/20171124145466_add_link_text_to_alchemy_essence_files.alchemy.rb +6 -0
  102. data/spec/dummy/db/migrate/20171124145467_add_locale_to_alchemy_languages.alchemy.rb +8 -0
  103. data/spec/dummy/db/migrate/20171124145468_add_timebased_publishing_columns_to_pages.alchemy.rb +33 -0
  104. data/spec/dummy/db/migrate/20171124145469_add_image_file_format_to_alchemy_pictures.alchemy.rb +10 -0
  105. data/spec/dummy/db/migrate/20171124145470_change_alchemy_pages_locked_to_locked_at.alchemy.rb +23 -0
  106. data/spec/dummy/db/migrate/20171124145471_add_index_to_alchemy_pages_rgt.alchemy.rb +10 -0
  107. data/spec/dummy/db/migrate/20171124145472_add_foreign_key_indices_and_null_constraints.alchemy.rb +21 -0
  108. data/spec/dummy/db/migrate/20171124145473_add_foreign_keys.alchemy.rb +28 -0
  109. data/spec/dummy/db/migrate/20171124145474_create_alchemy_users.alchemy_devise.rb +34 -0
  110. data/spec/dummy/db/migrate/20171124145475_add_alchemy_roles_to_alchemy_users.alchemy_devise.rb +23 -0
  111. data/spec/dummy/db/migrate/20171124145476_add_indexes_to_alchemy_users.alchemy_devise.rb +12 -0
  112. data/spec/dummy/db/migrate/20171124145629_create_settings.kono_mailup.rb +18 -0
  113. data/spec/dummy/db/migrate/20171127115017_create_alchemy_kono_mailup_alchemy_essence_mailup_lists.alchemy_kono_mailup.rb +14 -0
  114. data/spec/dummy/db/schema.rb +351 -0
  115. data/spec/dummy/db/seeds.rb +1 -0
  116. data/spec/dummy/lib/assets/.keep +0 -0
  117. data/spec/dummy/log/.keep +0 -0
  118. data/spec/dummy/public/404.html +67 -0
  119. data/spec/dummy/public/422.html +67 -0
  120. data/spec/dummy/public/500.html +66 -0
  121. data/spec/dummy/public/favicon.ico +0 -0
  122. data/spec/dummy/vendor/assets/javascripts/alchemy/admin/all.js +11 -0
  123. data/spec/dummy/vendor/assets/stylesheets/alchemy/admin/all.css +12 -0
  124. data/spec/models/alchemy_kono_mailup/alchemy/essence_mailup_list_spec.rb +7 -0
  125. metadata +393 -0
@@ -0,0 +1,79 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like
20
+ # NGINX, varnish or squid.
21
+ # config.action_dispatch.rack_cache = true
22
+
23
+ # Disable serving static files from the `/public` folder by default since
24
+ # Apache or NGINX already handles this.
25
+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
26
+
27
+ # Compress JavaScripts and CSS.
28
+ config.assets.js_compressor = :uglifier
29
+ # config.assets.css_compressor = :sass
30
+
31
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
32
+ config.assets.compile = false
33
+
34
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
+ # yet still be able to expire them through the digest params.
36
+ config.assets.digest = true
37
+
38
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
39
+
40
+ # Specifies the header that your server uses for sending files.
41
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
43
+
44
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45
+ # config.force_ssl = true
46
+
47
+ # Use the lowest log level to ensure availability of diagnostic information
48
+ # when problems arise.
49
+ config.log_level = :debug
50
+
51
+ # Prepend all log lines with the following tags.
52
+ # config.log_tags = [ :subdomain, :uuid ]
53
+
54
+ # Use a different logger for distributed setups.
55
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
56
+
57
+ # Use a different cache store in production.
58
+ # config.cache_store = :mem_cache_store
59
+
60
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
+ # config.action_controller.asset_host = 'http://assets.example.com'
62
+
63
+ # Ignore bad email addresses and do not raise email delivery errors.
64
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65
+ # config.action_mailer.raise_delivery_errors = false
66
+
67
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68
+ # the I18n.default_locale when a translation cannot be found).
69
+ config.i18n.fallbacks = true
70
+
71
+ # Send deprecation notices to registered listeners.
72
+ config.active_support.deprecation = :notify
73
+
74
+ # Use default logging formatter so that PID and timestamp are not suppressed.
75
+ config.log_formatter = ::Logger::Formatter.new
76
+
77
+ # Do not dump schema after migrations.
78
+ config.active_record.dump_schema_after_migration = false
79
+ end
@@ -0,0 +1,42 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
+ config.static_cache_control = 'public, max-age=3600'
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Randomize the order test cases are executed.
35
+ config.active_support.test_order = :random
36
+
37
+ # Print deprecation notices to the stderr.
38
+ config.active_support.deprecation = :stderr
39
+
40
+ # Raises error for missing translations
41
+ # config.action_view.raise_on_missing_translations = true
42
+ end
@@ -0,0 +1,11 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Add additional assets to the asset load path
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+
9
+ # Precompile additional assets.
10
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,265 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ Devise.setup do |config|
4
+ # The secret key used by Devise. Devise uses this key to generate
5
+ # random tokens. Changing this key will render invalid all existing
6
+ # confirmation, reset password and unlock tokens in the database.
7
+
8
+ # By default, Devise will use your Application's secret_key_base as its
9
+ # secret_key. You can override it here by uncommenting the following
10
+ # line. Remember to keep this file out of source control if you do that.
11
+ # config.secret_key = "22cdce4188a3bd881e207e37e81c05626a1e560858956489cfab6e6aaecf653c113c0bf4ea0903a8a2d69fa995b88d37a8fe"
12
+
13
+ # ==> Mailer Configuration
14
+ # Configure the e-mail address which will be shown in Devise::Mailer,
15
+ # note that it will be overwritten if you use your own mailer class
16
+ # with default "from" parameter.
17
+ config.mailer_sender = Alchemy::Config.get(:mailer)['mail_from']
18
+
19
+ # Configure the class responsible to send e-mails.
20
+ config.mailer = "Alchemy::Notifications"
21
+
22
+ # ==> ORM configuration
23
+ # Load and configure the ORM. Supports :active_record (default) and
24
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
25
+ # available as additional gems.
26
+ require 'devise/orm/active_record'
27
+
28
+ config.parent_controller = "Alchemy::BaseController"
29
+
30
+ # ==> Configuration for any authentication mechanism
31
+ # Configure which keys are used when authenticating a user. The default is
32
+ # just :email. You can configure it to use [:username, :subdomain], so for
33
+ # authenticating a user, both parameters are required. Remember that those
34
+ # parameters are used only when authenticating and not when retrieving from
35
+ # session. If you need permissions, you should implement that in a before filter.
36
+ # You can also supply a hash where the value is a boolean determining whether
37
+ # or not authentication should be aborted when the value is not present.
38
+ config.authentication_keys = [:login]
39
+
40
+ # Configure parameters from the request object used for authentication. Each entry
41
+ # given should be a request method and it will automatically be passed to the
42
+ # find_for_authentication method and considered in your model lookup. For instance,
43
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
44
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
45
+ # config.request_keys = []
46
+
47
+ # Configure which authentication keys should be case-insensitive.
48
+ # These keys will be downcased upon creating or modifying a user and when used
49
+ # to authenticate or find a user. Default is :email.
50
+ config.case_insensitive_keys = [:login]
51
+
52
+ # Configure which authentication keys should have whitespace stripped.
53
+ # These keys will have whitespace before and after removed upon creating or
54
+ # modifying a user and when used to authenticate or find a user. Default is :email.
55
+ config.strip_whitespace_keys = [:login]
56
+
57
+ # Tell if authentication through request.params is enabled. True by default.
58
+ # It can be set to an array that will enable params authentication only for the
59
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
60
+ # enable it only for database (email + password) authentication.
61
+ # config.params_authenticatable = true
62
+
63
+ # Tell if authentication through HTTP Auth is enabled. False by default.
64
+ # It can be set to an array that will enable http authentication only for the
65
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
66
+ # enable it only for database authentication. The supported strategies are:
67
+ # :database = Support basic authentication with authentication key + password
68
+ config.http_authenticatable = true
69
+
70
+ # If 401 status code should be returned for AJAX requests. True by default.
71
+ config.http_authenticatable_on_xhr = true
72
+
73
+ # The realm used in Http Basic Authentication. 'Application' by default.
74
+ config.http_authentication_realm = 'Alchemy CMS'
75
+
76
+ # It will change confirmation, password recovery and other workflows
77
+ # to behave the same regardless if the e-mail provided was right or wrong.
78
+ # Does not affect registerable.
79
+ # config.paranoid = true
80
+
81
+ # By default Devise will store the user in session. You can skip storage for
82
+ # particular strategies by setting this option.
83
+ # Notice that if you are skipping storage for all authentication paths, you
84
+ # may want to disable generating routes to Devise's sessions controller by
85
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
86
+ config.skip_session_storage = [:http_auth]
87
+
88
+ # By default, Devise cleans up the CSRF token on authentication to
89
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
90
+ # requests for sign in and sign up, you need to get a new CSRF token
91
+ # from the server. You can disable this option at your own risk.
92
+ # config.clean_up_csrf_token_on_authentication = true
93
+
94
+ # ==> Configuration for :database_authenticatable
95
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
96
+ # using other encryptors, it sets how many times you want the password re-encrypted.
97
+ #
98
+ # Limiting the stretches to just one in testing will increase the performance of
99
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
100
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
101
+ # encryptor), the cost increases exponentially with the number of stretches (e.g.
102
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
103
+ config.stretches = Rails.env.test? ? 1 : 10
104
+
105
+ # Setup a pepper to generate the encrypted password.
106
+ # config.pepper = "fb9217255b8deb9f459881cac2faaa6e9518a6394429ebf7be309475e4155bcf4d0136270a2b33f2a2abd69a7d95fc9a5d42"
107
+
108
+ # ==> Configuration for :confirmable
109
+ # A period that the user is allowed to access the website even without
110
+ # confirming their account. For instance, if set to 2.days, the user will be
111
+ # able to access the website for two days without confirming their account,
112
+ # access will be blocked just in the third day. Default is 0.days, meaning
113
+ # the user cannot access the website without confirming their account.
114
+ # config.allow_unconfirmed_access_for = 2.days
115
+
116
+ # A period that the user is allowed to confirm their account before their
117
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
118
+ # their account within 3 days after the mail was sent, but on the fourth day
119
+ # their account can't be confirmed with the token any more.
120
+ # Default is nil, meaning there is no restriction on how long a user can take
121
+ # before confirming their account.
122
+ # config.confirm_within = 3.days
123
+
124
+ # If true, requires any email changes to be confirmed (exactly the same way as
125
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
126
+ # db field (see migrations). Until confirmed, new email is stored in
127
+ # unconfirmed_email column, and copied to email column on successful confirmation.
128
+ config.reconfirmable = false
129
+
130
+ # Defines which key will be used when confirming an account
131
+ # config.confirmation_keys = [ :email ]
132
+
133
+ # ==> Configuration for :rememberable
134
+ # The time the user will be remembered without asking for credentials again.
135
+ # config.remember_for = 2.weeks
136
+
137
+ # Invalidates all the remember me tokens when the user signs out.
138
+ config.expire_all_remember_me_on_sign_out = true
139
+
140
+ # If true, extends the user's remember period when remembered via cookie.
141
+ # config.extend_remember_period = false
142
+
143
+ # Options to be passed to the created cookie. For instance, you can set
144
+ # secure: true in order to force SSL only cookies.
145
+ # config.rememberable_options = {}
146
+
147
+ # ==> Configuration for :validatable
148
+ # Range for password length.
149
+ config.password_length = 6..128
150
+
151
+ # Email regex used to validate email formats. It simply asserts that
152
+ # one (and only one) @ exists in the given string. This is mainly
153
+ # to give user feedback and not to assert the e-mail validity.
154
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
155
+
156
+ # ==> Configuration for :timeoutable
157
+ # The time you want to timeout the user session without activity. After this
158
+ # time the user will be asked for credentials again. Default is 30 minutes.
159
+ config.timeout_in = Rails.env.development? ? nil : Alchemy::Config.get(:auto_logout_time).minutes
160
+
161
+ # If true, expires auth token on session timeout.
162
+ # config.expire_auth_token_on_timeout = false
163
+
164
+ # ==> Configuration for :lockable
165
+ # Defines which strategy will be used to lock an account.
166
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
167
+ # :none = No lock strategy. You should handle locking by yourself.
168
+ # config.lock_strategy = :failed_attempts
169
+
170
+ # Defines which key will be used when locking and unlocking an account
171
+ # config.unlock_keys = [ :email ]
172
+
173
+ # Defines which strategy will be used to unlock an account.
174
+ # :email = Sends an unlock link to the user email
175
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
176
+ # :both = Enables both strategies
177
+ # :none = No unlock strategy. You should handle unlocking by yourself.
178
+ # config.unlock_strategy = :both
179
+
180
+ # Number of authentication tries before locking an account if lock_strategy
181
+ # is failed attempts.
182
+ # config.maximum_attempts = 20
183
+
184
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
185
+ # config.unlock_in = 1.hour
186
+
187
+ # Warn on the last attempt before the account is locked.
188
+ config.last_attempt_warning = true
189
+
190
+ # ==> Configuration for :recoverable
191
+ #
192
+ # Defines which key will be used when recovering the password for an account
193
+ # config.reset_password_keys = [ :email ]
194
+
195
+ # Time interval you can reset your password with a reset password key.
196
+ # Don't put a too small interval or your users won't have the time to
197
+ # change their passwords.
198
+ config.reset_password_within = 6.hours
199
+
200
+ # ==> Configuration for :encryptable
201
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
202
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
203
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
204
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
205
+ # REST_AUTH_SITE_KEY to pepper).
206
+ #
207
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
208
+ # config.encryptor = :sha512
209
+
210
+ # ==> Scopes configuration
211
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
212
+ # "users/sessions/new". It's turned off by default because it's slower if you
213
+ # are using only default views.
214
+ # config.scoped_views = false
215
+
216
+ # Configure the default scope given to Warden. By default it's the first
217
+ # devise role declared in your routes (usually :user).
218
+ # config.default_scope = :user
219
+
220
+ # Set this configuration to false if you want /users/sign_out to sign out
221
+ # only the current scope. By default, Devise signs out all scopes.
222
+ # config.sign_out_all_scopes = true
223
+
224
+ # ==> Navigation configuration
225
+ # Lists the formats that should be treated as navigational. Formats like
226
+ # :html, should redirect to the sign in page when the user does not have
227
+ # access, but formats like :xml or :json, should return 401.
228
+ #
229
+ # If you have any extra navigational formats, like :iphone or :mobile, you
230
+ # should add them to the navigational formats lists.
231
+ #
232
+ # The "*/*" below is required to match Internet Explorer requests.
233
+ # config.navigational_formats = ['*/*', :html]
234
+
235
+ # The default HTTP method used to sign out a resource. Default is :delete.
236
+ config.sign_out_via = :delete
237
+
238
+ # ==> OmniAuth
239
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
240
+ # up on your models and hooks.
241
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
242
+
243
+ # ==> Warden configuration
244
+ # If you want to use other strategies, that are not supported by Devise, or
245
+ # change the failure app, you can configure them inside the config.warden block.
246
+ #
247
+ # config.warden do |manager|
248
+ # manager.intercept_401 = false
249
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
250
+ # end
251
+
252
+ # ==> Mountable engine configurations
253
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
254
+ # is mountable, there are some extra configurations to be taken into account.
255
+ # The following options are available, assuming the engine is mounted as:
256
+ #
257
+ # mount MyEngine, at: '/my_engine'
258
+ #
259
+ # The router that invoked `devise_for`, in the example above, would be:
260
+ # config.router_name = :my_engine
261
+ #
262
+ # When using omniauth, Devise cannot automatically set Omniauth path,
263
+ # so you need to do it manually. For the users scope, it would be:
264
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
265
+ end
@@ -0,0 +1,35 @@
1
+ # AlchemyCMS Dragonfly configuration.
2
+ #
3
+ # Consider using some kind of caching solution for image processing.
4
+ # For small projects, we have good experience with Rack::Cache.
5
+ #
6
+ # Larger installations should consider using a CDN, start reading
7
+ # http://markevans.github.io/dragonfly/cache/
8
+ #
9
+ # A complete reference can be found at
10
+ # http://markevans.github.io/dragonfly/configuration/
11
+ #
12
+ # Pictures
13
+ #
14
+ Dragonfly.app(:alchemy_pictures).configure do
15
+ dragonfly_url nil
16
+ plugin :imagemagick
17
+ plugin :svg
18
+ secret '1a532ecaa00f9e02b908c1bf5e3d6bfcb18bf3a64c88391d09f4f145a6b94048'
19
+ url_format '/pictures/:job/:name.:ext'
20
+
21
+ datastore :file,
22
+ root_path: Rails.root.join('uploads/pictures').to_s,
23
+ server_root: Rails.root.join('public'),
24
+ store_meta: false
25
+ end
26
+
27
+ # Mount as middleware
28
+ Rails.application.middleware.use Dragonfly::Middleware, :alchemy_pictures
29
+
30
+ # Attachments
31
+ Dragonfly.app(:alchemy_attachments).configure do
32
+ datastore :file,
33
+ root_path: Rails.root.join('uploads/attachments').to_s,
34
+ store_meta: false
35
+ end