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,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,13 @@
1
+ # Utilizza questo file per configurare l'engine
2
+ KonoMailup.setup do |config|
3
+
4
+ ##
5
+ # MAILUP_CLIENT_ID
6
+ config.mailup_client_id = Rails.application.secrets.kono_mailup[:mailup_client_id]
7
+
8
+ ##
9
+ # MAILUP_CLIENT_SECRET
10
+ config.mailup_client_secret = Rails.application.secrets.kono_mailup[:mailup_client_secret]
11
+
12
+
13
+ end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Preserve the timezone of the receiver when calling to `to_time`.
4
+ # Ruby 2.4 will change the behavior of `to_time` to preserve the timezone
5
+ # when converting to an instance of `Time` instead of the previous behavior
6
+ # of converting to the local system timezone.
7
+ #
8
+ # Rails 5.0 introduced this config option so that apps made with earlier
9
+ # versions of Rails are not affected when upgrading.
10
+ ActiveSupport.to_time_preserves_timezone = true
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,31 @@
1
+ de:
2
+ alchemy:
3
+
4
+ # Translations for page layout names
5
+ page_layout_names:
6
+ index: Startseite
7
+
8
+ # Translations for element names
9
+ element_names:
10
+ article: Artikel
11
+
12
+ # Translations for content names
13
+ content_names:
14
+ headline: Überschrift
15
+ text: Text
16
+ picture: Bild
17
+
18
+ # Default texts for new contents created
19
+ default_content_texts:
20
+ article_headline: "Willkommen auf Ihrer Alchemy Seite"
21
+ article_text: '<p>Als erstes sollte man sich mit der Struktur von Alchemy vertraut machen. <a class="external" href="http://guides.alchemy-cms.com/stable/alchemy_approach.html" target="_blank" data-link-target="blank">Mehr dazu in den Guidelines</a>.</p><p>Die wichtigsten beiden Dinge die man über Alchemy wissen muss sind Elemente und Seitentypen.</p><p><span style="text-decoration: underline;"><strong>Elemente:</strong></span></p><p>Mit Alchemy kann man eine Seite in Inhaltsbereiche aufteilen, Elemente. Diese Elemente werden aus verschiedenen Grundtypen (Essenzen) zusammengesetzt. Die Essenzen sind:</p><ul><li>EssenceText - <em>Eine Zeile Text</em></li><li>EssenceRichtext - <em>Ein TinyMCE basierter formatierter Textblock</em></li><li>EssencePicture - <em>Ein Verweis auf ein Bild</em></li><li>EssenceHtml - <em>HTML Code</em></li><li>EssenceSelect - <em>Eine Auswahl an Werten</em></li><li>EssenceBoolean - <em>Eine Checkbox</em></li></ul><p>Elemente werden in einer YAML Datei definiert: <strong>config/alchemy/elements.yml</strong></p><p><a class="external" href="http://guides.alchemy-cms.com/stable/elements.html" target="_blank" data-link-target="blank">Mehr über Elemente und wie sie definiert werden, kann in den Guidelines nachgelesen werden.</a></p><p><span style="text-decoration: underline;"><strong>Seitentypen:</strong></span></p><p>Es können verschiedene Seitentypen definiert werden. Diesen können Elemente zugewiesen und ihr Verhalten definiert werden.</p><p>Seitentypen werden ein einer YAML Datei definiert: <strong>config/alchemy/page_layouts.yml</strong></p><p><a class="external" href="http://guides.alchemy-cms.com/stable/page_layouts.html" target="_blank" data-link-target="blank">Mehr über das Erstellen von Seitentypen kann in den Guidelines nachgelesen werden.</a></p>'
22
+
23
+ # Hint texts for elements
24
+ element_hints:
25
+ article: "Dies ist ein Hinweistext für das Artikel Element. Dieser Text kann in der `config/locales/alchemy.de.yml` Datei angepasst werden."
26
+
27
+ # Hint texts for contents
28
+ content_hints:
29
+ headline: "Dies ist ein einzeiliger unformatierter Text"
30
+ picture: "Bilder werden in der Bibliothek gespeichert. Ein Bild kann mehrfach einem Element zugewiesen werden. Auch ein Bildauswahlwerkzeug ist in Alchemy integriert."
31
+ text: "Dies ist ein formatierbarer Textblock. Die Einstellungen des Editors können angepasst werden. Siehe http://guides.alchemy-cms.com/stable/customize_tinymce.html"
@@ -0,0 +1,31 @@
1
+ en:
2
+ alchemy:
3
+
4
+ # Translations for page layout names
5
+ page_layout_names:
6
+ index: Homepage
7
+
8
+ # Translations for element names
9
+ element_names:
10
+ article: Article
11
+
12
+ # Translations for content names
13
+ content_names:
14
+ headline: Headline
15
+ text: Text
16
+ picture: Picture
17
+
18
+ # Default texts for new contents created
19
+ default_content_texts:
20
+ article_headline: "Welcome to your first Alchemy CMS page"
21
+ article_text: '<p><strong>How to get started.</strong></p><p>First of all you should read about Alchemy and its architecture in the <a class="external" href="http://guides.alchemy-cms.com/stable/alchemy_approach.html" target="_blank" data-link-target="blank">guidelines</a>.</p><p>The most important things to know about Alchemy are elements and page layouts.</p><p><span style="text-decoration: underline;"><strong>Elements:</strong></span></p><p>With Alchemy you can split pages into content parts, elements. These elements can be defined out of several base content types: essences. The basic essences are:</p><ul><li>EssenceText - <em>A single line of text</em></li><li>EssenceRichtext - <em>A TinyMCE powered formatted text block</em></li><li>EssencePicture - <em>A reference to an image</em></li><li>EssenceHtml - <em>HTML embed code</em></li><li>EssenceSelect - <em>A selection of values</em></li><li>EssenceBoolean - <em>A checkbox</em></li></ul><p>Elements get defined in a YAML file <strong>config/alchemy/elements.yml</strong></p><p><a class="external" href="http://guides.alchemy-cms.com/stable/elements.html" target="_blank" data-link-target="blank">Read more about elements and how to define them in the guidelines.</a></p><p><span style="text-decoration: underline;"><strong>Page types:</strong></span></p><p>You can define several types of pages, called page layouts. You can assign elements to page layouts and control how elements and the page of a certain layout behave.</p><p>Page layouts get defined in a YAML file <strong>config/alchemy/page_layouts.yml</strong></p><p><a class="external" href="http://guides.alchemy-cms.com/stable/page_layouts.html" target="_blank" data-link-target="blank">Read more about defining page layouts in the guidelines.</a></p>'
22
+
23
+ # Hint texts for elements
24
+ element_hints:
25
+ article: "This is a hint text for the article element. You can change this text in `config/locales/alchemy.en.yml`. Feel free to change it as you like, it's yours."
26
+
27
+ # Hint texts for contents
28
+ content_hints:
29
+ headline: "This is a single line of unformatable Text"
30
+ picture: "Pictures are stored in the library. You can assign a picture multiple times throughout your site. Alchemy has an image cropper build right in."
31
+ text: "This is a rich text block powered by TinyMCE editor. You can change the configuration of the editor. See http://guides.alchemy-cms.com/stable/customize_tinymce.html"
@@ -0,0 +1,31 @@
1
+ es:
2
+ alchemy:
3
+
4
+ # Translations for page layout names
5
+ page_layout_names:
6
+ index: Inicio
7
+
8
+ # Translations for element names
9
+ element_names:
10
+ article: Artículo
11
+
12
+ # Translations for content names
13
+ content_names:
14
+ headline: Titular
15
+ text: Texto
16
+ picture: Imagen
17
+
18
+ # Default texts for new contents created
19
+ default_content_texts:
20
+ article_headline: "Bienvenido a tu primera página de Alchemy CMS"
21
+ article_text: '<p><strong>Como empezar.</strong></p><p>Lo primero de todo deberías leer sobre Alchemy y su arquitectura en las <a class="external" href="http://guides.alchemy-cms.com/stable/alchemy_approach.html" target="_blank" data-link-target="blank">guías</a>.</p><p>Las cosas más importantes que debes saber sobre Alchemy son elementos (<i>elements</i>) y disposiciones de página (<i>page layouts</i>).</p><p><span style="text-decoration: underline;"><strong>Elementos:</strong></span></p><p>Con Alchemy puedes dividir las páginas en partes de contenido, elementos. Estos elementos se pueden definir mediante varios tipos de contenido básicos: esencias (<i>essences</i>). Las esencias básicas son:</p><ul><li>EssenceText - <em>Un única línea de texto</em></li><li>EssenceRichtext - <em>Un bloque de texto formateado mediante TinyMCE</em></li><li>EssencePicture - <em>Una referencia a una imagen</em></li><li>EssenceHtml - <em>Código HTML empotrado</em></li><li>EssenceSelect - <em>Una selección de valores</em></li><li>EssenceBoolean - <em>Una casilla de verificación</em></li></ul><p>Los elementos se definen en el fichero YAML <strong>config/alchemy/elements.yml</strong></p><p><a class="external" href="http://guides.alchemy-cms.com/stable/elements.html" target="_blank" data-link-target="blank">Lee más sobre elementos y cómo definirlos en las guías.</a></p><p><span style="text-decoration: underline;"><strong>Tipos de página:</strong></span></p><p>Puedes definir varios tipos de páginas, llamados disposiciones de páginas (<i>page layouts</i>). Puedes asignar elementos a las disposiciones de páginas y controlar cómo se comportan los elementos y una página con una disposición concreta.</p><p>Las disposiciones de páginas se definen en el fichero YAML <strong>config/alchemy/page_layouts.yml</strong></p><p><a class="external" href="http://guides.alchemy-cms.com/stable/page_layouts.html" target="_blank" data-link-target="blank">Lee más sobre definir disposiciones de páginas en las guías.</a></p>'
22
+
23
+ # Hint texts for elements
24
+ element_hints:
25
+ article: "Este es el texto de ayuda del elemento artículo. Puedes cambiar este texto en `config/locales/alchemy.en.yml`. Siéntete libre de cambiarlo a tu gusto, es tuyo."
26
+
27
+ # Hint texts for contents
28
+ content_hints:
29
+ headline: "Esta es una sencilla linea de texto sin formato"
30
+ picture: "Las imágenes se almacenan en la librería. Puedes asignar una imagen varias veces en tu sitio. Alchemy tiene una herramienta de recorte de imagen integrada."
31
+ text: "Este es un bloque de texto enriquecido mediante el editor TinyMCE. Puedes cambiar la configuración del editor. Ver http://guides.alchemy-cms.com/stable/customize_tinymce.html"
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,9 @@
1
+ Rails.application.routes.draw do
2
+
3
+ resources :mailup_subscription_forms
4
+
5
+
6
+ mount AlchemyKonoMailup::Engine => "/"
7
+ mount Alchemy::Engine => '/'
8
+
9
+ end
@@ -0,0 +1,24 @@
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 `rake 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
+ development:
14
+ secret_key_base: f6512bbb928218c0cc531ceb03ad8ec8fa63c26280f5b5dc06a156be309986f60f06a31c8708211df0ba7b27c92369055b15de44391d77f4f429224b1a2519aa
15
+ kono_mailup:
16
+ mailup_client_id: ''
17
+ mailup_client_secret: ''
18
+ test:
19
+ secret_key_base: b67f62a3cedeb84909634db02811ad8c173581137c9d26044c6d8ba1cad28d558d438dffb058cb86c7e206a93b9973b3b13ffdf6514631f0e464ff4c1ce16bae
20
+
21
+ # Do not keep production secrets in the repository,
22
+ # instead read values from the environment.
23
+ production:
24
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,36 @@
1
+ # This migration comes from acts_as_taggable_on_engine (originally 1)
2
+ if ActiveRecord.gem_version >= Gem::Version.new('5.0')
3
+ class ActsAsTaggableOnMigration < ActiveRecord::Migration[4.2]; end
4
+ else
5
+ class ActsAsTaggableOnMigration < ActiveRecord::Migration; end
6
+ end
7
+ ActsAsTaggableOnMigration.class_eval do
8
+ def self.up
9
+ create_table :tags do |t|
10
+ t.string :name
11
+ end
12
+
13
+ create_table :taggings do |t|
14
+ t.references :tag
15
+
16
+ # You should make sure that the column created is
17
+ # long enough to store the required class names.
18
+ t.references :taggable, polymorphic: true
19
+ t.references :tagger, polymorphic: true
20
+
21
+ # Limit is created to prevent MySQL error on index
22
+ # length for MyISAM table type: http://bit.ly/vgW2Ql
23
+ t.string :context, limit: 128
24
+
25
+ t.datetime :created_at
26
+ end
27
+
28
+ add_index :taggings, :tag_id
29
+ add_index :taggings, [:taggable_id, :taggable_type, :context]
30
+ end
31
+
32
+ def self.down
33
+ drop_table :taggings
34
+ drop_table :tags
35
+ end
36
+ end
@@ -0,0 +1,26 @@
1
+ # This migration comes from acts_as_taggable_on_engine (originally 2)
2
+ if ActiveRecord.gem_version >= Gem::Version.new('5.0')
3
+ class AddMissingUniqueIndices < ActiveRecord::Migration[4.2]; end
4
+ else
5
+ class AddMissingUniqueIndices < ActiveRecord::Migration; end
6
+ end
7
+ AddMissingUniqueIndices.class_eval do
8
+ def self.up
9
+ add_index :tags, :name, unique: true
10
+
11
+ remove_index :taggings, :tag_id if index_exists?(:taggings, :tag_id)
12
+ remove_index :taggings, [:taggable_id, :taggable_type, :context]
13
+ add_index :taggings,
14
+ [:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
15
+ unique: true, name: 'taggings_idx'
16
+ end
17
+
18
+ def self.down
19
+ remove_index :tags, :name
20
+
21
+ remove_index :taggings, name: 'taggings_idx'
22
+
23
+ add_index :taggings, :tag_id unless index_exists?(:taggings, :tag_id)
24
+ add_index :taggings, [:taggable_id, :taggable_type, :context]
25
+ end
26
+ end
@@ -0,0 +1,20 @@
1
+ # This migration comes from acts_as_taggable_on_engine (originally 3)
2
+ if ActiveRecord.gem_version >= Gem::Version.new('5.0')
3
+ class AddTaggingsCounterCacheToTags < ActiveRecord::Migration[4.2]; end
4
+ else
5
+ class AddTaggingsCounterCacheToTags < ActiveRecord::Migration; end
6
+ end
7
+ AddTaggingsCounterCacheToTags.class_eval do
8
+ def self.up
9
+ add_column :tags, :taggings_count, :integer, default: 0
10
+
11
+ ActsAsTaggableOn::Tag.reset_column_information
12
+ ActsAsTaggableOn::Tag.find_each do |tag|
13
+ ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings)
14
+ end
15
+ end
16
+
17
+ def self.down
18
+ remove_column :tags, :taggings_count
19
+ end
20
+ end
@@ -0,0 +1,15 @@
1
+ # This migration comes from acts_as_taggable_on_engine (originally 4)
2
+ if ActiveRecord.gem_version >= Gem::Version.new('5.0')
3
+ class AddMissingTaggableIndex < ActiveRecord::Migration[4.2]; end
4
+ else
5
+ class AddMissingTaggableIndex < ActiveRecord::Migration; end
6
+ end
7
+ AddMissingTaggableIndex.class_eval do
8
+ def self.up
9
+ add_index :taggings, [:taggable_id, :taggable_type, :context]
10
+ end
11
+
12
+ def self.down
13
+ remove_index :taggings, [:taggable_id, :taggable_type, :context]
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # This migration comes from acts_as_taggable_on_engine (originally 5)
2
+ # This migration is added to circumvent issue #623 and have special characters
3
+ # work properly
4
+ if ActiveRecord.gem_version >= Gem::Version.new('5.0')
5
+ class ChangeCollationForTagNames < ActiveRecord::Migration[4.2]; end
6
+ else
7
+ class ChangeCollationForTagNames < ActiveRecord::Migration; end
8
+ end
9
+ ChangeCollationForTagNames.class_eval do
10
+ def up
11
+ if ActsAsTaggableOn::Utils.using_mysql?
12
+ execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;")
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,23 @@
1
+ # This migration comes from acts_as_taggable_on_engine (originally 6)
2
+ if ActiveRecord.gem_version >= Gem::Version.new('5.0')
3
+ class AddMissingIndexesOnTaggings < ActiveRecord::Migration[4.2]; end
4
+ else
5
+ class AddMissingIndexesOnTaggings < ActiveRecord::Migration; end
6
+ end
7
+ AddMissingIndexesOnTaggings.class_eval do
8
+ def change
9
+ add_index :taggings, :tag_id unless index_exists? :taggings, :tag_id
10
+ add_index :taggings, :taggable_id unless index_exists? :taggings, :taggable_id
11
+ add_index :taggings, :taggable_type unless index_exists? :taggings, :taggable_type
12
+ add_index :taggings, :tagger_id unless index_exists? :taggings, :tagger_id
13
+ add_index :taggings, :context unless index_exists? :taggings, :context
14
+
15
+ unless index_exists? :taggings, [:tagger_id, :tagger_type]
16
+ add_index :taggings, [:tagger_id, :tagger_type]
17
+ end
18
+
19
+ unless index_exists? :taggings, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy'
20
+ add_index :taggings, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy'
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,379 @@
1
+ # This migration comes from alchemy (originally 20130827094554)
2
+ # This is a compressed migration for creating all Alchemy 2.6 tables at once.
3
+ #
4
+ # === Notice
5
+ #
6
+ # In order to upgrade from an old version of Alchemy, you have to run all migrations from
7
+ # each version you missed up to the version you want to upgrade to, before running this migration.
8
+ #
9
+ class AlchemyTwoPointSix < ActiveRecord::Migration[4.2]
10
+ def up
11
+ unless table_exists?('alchemy_attachments')
12
+ create_table "alchemy_attachments" do |t|
13
+ t.string "name"
14
+ t.string "file_name"
15
+ t.string "file_mime_type"
16
+ t.integer "file_size"
17
+ t.integer "creator_id"
18
+ t.integer "updater_id"
19
+ t.datetime "created_at", null: false
20
+ t.datetime "updated_at", null: false
21
+ t.text "cached_tag_list"
22
+ t.string "file_uid"
23
+ end
24
+ add_index "alchemy_attachments", ["file_uid"], name: "index_alchemy_attachments_on_file_uid"
25
+ end
26
+
27
+ unless table_exists?('alchemy_cells')
28
+ create_table "alchemy_cells" do |t|
29
+ t.integer "page_id"
30
+ t.string "name"
31
+ t.datetime "created_at", null: false
32
+ t.datetime "updated_at", null: false
33
+ end
34
+ end
35
+
36
+ unless table_exists?('alchemy_contents')
37
+ create_table "alchemy_contents" do |t|
38
+ t.string "name"
39
+ t.string "essence_type"
40
+ t.integer "essence_id"
41
+ t.integer "element_id"
42
+ t.integer "position"
43
+ t.datetime "created_at", null: false
44
+ t.datetime "updated_at", null: false
45
+ t.integer "creator_id"
46
+ t.integer "updater_id"
47
+ end
48
+ add_index "alchemy_contents", ["element_id", "position"], name: "index_contents_on_element_id_and_position"
49
+ end
50
+
51
+ unless table_exists?('alchemy_elements')
52
+ create_table "alchemy_elements" do |t|
53
+ t.string "name"
54
+ t.integer "position"
55
+ t.integer "page_id"
56
+ t.boolean "public", default: true
57
+ t.boolean "folded", default: false
58
+ t.boolean "unique", default: false
59
+ t.datetime "created_at", null: false
60
+ t.datetime "updated_at", null: false
61
+ t.integer "creator_id"
62
+ t.integer "updater_id"
63
+ t.integer "cell_id"
64
+ t.text "cached_tag_list"
65
+ end
66
+ add_index "alchemy_elements", ["page_id", "position"], name: "index_elements_on_page_id_and_position"
67
+ end
68
+
69
+ unless table_exists?('alchemy_elements_alchemy_pages')
70
+ create_table "alchemy_elements_alchemy_pages", id: false do |t|
71
+ t.integer "element_id"
72
+ t.integer "page_id"
73
+ end
74
+ end
75
+
76
+ unless table_exists?('alchemy_essence_booleans')
77
+ create_table "alchemy_essence_booleans" do |t|
78
+ t.boolean "value"
79
+ t.datetime "created_at", null: false
80
+ t.datetime "updated_at", null: false
81
+ t.integer "creator_id"
82
+ t.integer "updater_id"
83
+ end
84
+ add_index "alchemy_essence_booleans", ["value"], name: "index_alchemy_essence_booleans_on_value"
85
+ end
86
+
87
+ unless table_exists?('alchemy_essence_dates')
88
+ create_table "alchemy_essence_dates" do |t|
89
+ t.datetime "date"
90
+ t.integer "creator_id"
91
+ t.integer "updater_id"
92
+ t.datetime "created_at", null: false
93
+ t.datetime "updated_at", null: false
94
+ end
95
+ end
96
+
97
+ unless table_exists?('alchemy_essence_files')
98
+ create_table "alchemy_essence_files" do |t|
99
+ t.integer "attachment_id"
100
+ t.string "title"
101
+ t.string "css_class"
102
+ t.integer "creator_id"
103
+ t.integer "updater_id"
104
+ t.datetime "created_at", null: false
105
+ t.datetime "updated_at", null: false
106
+ end
107
+ end
108
+
109
+ unless table_exists?('alchemy_essence_htmls')
110
+ create_table "alchemy_essence_htmls" do |t|
111
+ t.text "source"
112
+ t.integer "creator_id"
113
+ t.integer "updater_id"
114
+ t.datetime "created_at", null: false
115
+ t.datetime "updated_at", null: false
116
+ end
117
+ end
118
+
119
+ unless table_exists?('alchemy_essence_links')
120
+ create_table "alchemy_essence_links" do |t|
121
+ t.string "link"
122
+ t.string "link_title"
123
+ t.string "link_target"
124
+ t.string "link_class_name"
125
+ t.datetime "created_at", null: false
126
+ t.datetime "updated_at", null: false
127
+ t.integer "creator_id"
128
+ t.integer "updater_id"
129
+ end
130
+ end
131
+
132
+ unless table_exists?('alchemy_essence_pictures')
133
+ create_table "alchemy_essence_pictures" do |t|
134
+ t.integer "picture_id"
135
+ t.string "caption"
136
+ t.string "title"
137
+ t.string "alt_tag"
138
+ t.string "link"
139
+ t.string "link_class_name"
140
+ t.string "link_title"
141
+ t.string "css_class"
142
+ t.string "link_target"
143
+ t.integer "creator_id"
144
+ t.integer "updater_id"
145
+ t.datetime "created_at", null: false
146
+ t.datetime "updated_at", null: false
147
+ t.string "crop_from"
148
+ t.string "crop_size"
149
+ t.string "render_size"
150
+ end
151
+ end
152
+
153
+ unless table_exists?('alchemy_essence_richtexts')
154
+ create_table "alchemy_essence_richtexts" do |t|
155
+ t.text "body"
156
+ t.text "stripped_body"
157
+ t.boolean "do_not_index", default: false
158
+ t.boolean "public"
159
+ t.integer "creator_id"
160
+ t.integer "updater_id"
161
+ t.datetime "created_at", null: false
162
+ t.datetime "updated_at", null: false
163
+ end
164
+ end
165
+
166
+ unless table_exists?('alchemy_essence_selects')
167
+ create_table "alchemy_essence_selects" do |t|
168
+ t.string "value"
169
+ t.datetime "created_at", null: false
170
+ t.datetime "updated_at", null: false
171
+ t.integer "creator_id"
172
+ t.integer "updater_id"
173
+ end
174
+ add_index "alchemy_essence_selects", ["value"], name: "index_alchemy_essence_selects_on_value"
175
+ end
176
+
177
+ unless table_exists?('alchemy_essence_texts')
178
+ create_table "alchemy_essence_texts" do |t|
179
+ t.text "body"
180
+ t.string "link"
181
+ t.string "link_title"
182
+ t.string "link_class_name"
183
+ t.boolean "public", default: false
184
+ t.boolean "do_not_index", default: false
185
+ t.string "link_target"
186
+ t.integer "creator_id"
187
+ t.integer "updater_id"
188
+ t.datetime "created_at", null: false
189
+ t.datetime "updated_at", null: false
190
+ end
191
+ end
192
+
193
+ unless table_exists?('alchemy_folded_pages')
194
+ create_table "alchemy_folded_pages" do |t|
195
+ t.integer "page_id"
196
+ t.integer "user_id"
197
+ t.boolean "folded", default: false
198
+ end
199
+ end
200
+
201
+ unless table_exists?('alchemy_languages')
202
+ create_table "alchemy_languages" do |t|
203
+ t.string "name"
204
+ t.string "language_code"
205
+ t.string "frontpage_name"
206
+ t.string "page_layout", default: "intro"
207
+ t.boolean "public", default: false
208
+ t.datetime "created_at", null: false
209
+ t.datetime "updated_at", null: false
210
+ t.integer "creator_id"
211
+ t.integer "updater_id"
212
+ t.boolean "default", default: false
213
+ t.string "country_code", default: "", null: false
214
+ t.integer "site_id"
215
+ end
216
+ add_index "alchemy_languages", ["language_code", "country_code"], name: "index_alchemy_languages_on_language_code_and_country_code"
217
+ add_index "alchemy_languages", ["language_code"], name: "index_alchemy_languages_on_language_code"
218
+ add_index "alchemy_languages", ["site_id"], name: "index_alchemy_languages_on_site_id"
219
+ end
220
+
221
+ unless table_exists?('alchemy_legacy_page_urls')
222
+ create_table "alchemy_legacy_page_urls" do |t|
223
+ t.string "urlname", null: false
224
+ t.integer "page_id", null: false
225
+ t.datetime "created_at", null: false
226
+ t.datetime "updated_at", null: false
227
+ end
228
+ add_index "alchemy_legacy_page_urls", ["urlname"], name: "index_alchemy_legacy_page_urls_on_urlname"
229
+ end
230
+
231
+ unless table_exists?('alchemy_pages')
232
+ create_table "alchemy_pages" do |t|
233
+ t.string "name"
234
+ t.string "urlname"
235
+ t.string "title"
236
+ t.string "language_code"
237
+ t.boolean "language_root"
238
+ t.string "page_layout"
239
+ t.text "meta_keywords"
240
+ t.text "meta_description"
241
+ t.integer "lft"
242
+ t.integer "rgt"
243
+ t.integer "parent_id"
244
+ t.integer "depth"
245
+ t.boolean "visible", default: false
246
+ t.boolean "public", default: false
247
+ t.boolean "locked", default: false
248
+ t.integer "locked_by"
249
+ t.boolean "restricted", default: false
250
+ t.boolean "robot_index", default: true
251
+ t.boolean "robot_follow", default: true
252
+ t.boolean "sitemap", default: true
253
+ t.boolean "layoutpage", default: false
254
+ t.datetime "created_at", null: false
255
+ t.datetime "updated_at", null: false
256
+ t.integer "creator_id"
257
+ t.integer "updater_id"
258
+ t.integer "language_id"
259
+ t.text "cached_tag_list"
260
+ end
261
+ add_index "alchemy_pages", ["language_id"], name: "index_pages_on_language_id"
262
+ add_index "alchemy_pages", ["parent_id", "lft"], name: "index_pages_on_parent_id_and_lft"
263
+ add_index "alchemy_pages", ["urlname"], name: "index_pages_on_urlname"
264
+ end
265
+
266
+ unless table_exists?('alchemy_pictures')
267
+ create_table "alchemy_pictures" do |t|
268
+ t.string "name"
269
+ t.string "image_file_name"
270
+ t.integer "image_file_width"
271
+ t.integer "image_file_height"
272
+ t.datetime "created_at", null: false
273
+ t.datetime "updated_at", null: false
274
+ t.integer "creator_id"
275
+ t.integer "updater_id"
276
+ t.string "upload_hash"
277
+ t.text "cached_tag_list"
278
+ t.string "image_file_uid"
279
+ t.integer "image_file_size"
280
+ end
281
+ end
282
+
283
+ unless table_exists?('alchemy_sites')
284
+ create_table "alchemy_sites" do |t|
285
+ t.string "host"
286
+ t.string "name"
287
+ t.datetime "created_at", null: false
288
+ t.datetime "updated_at", null: false
289
+ t.boolean "public", default: false
290
+ t.text "aliases"
291
+ t.boolean "redirect_to_primary_host"
292
+ end
293
+ add_index "alchemy_sites", ["host", "public"], name: "alchemy_sites_public_hosts_idx"
294
+ add_index "alchemy_sites", ["host"], name: "index_alchemy_sites_on_host"
295
+ end
296
+ end
297
+
298
+ def down
299
+ if table_exists?('alchemy_attachments')
300
+ drop_table "alchemy_attachments"
301
+ end
302
+
303
+ if table_exists?('alchemy_cells')
304
+ drop_table "alchemy_cells"
305
+ end
306
+
307
+ if table_exists?('alchemy_contents')
308
+ drop_table "alchemy_contents"
309
+ end
310
+
311
+ if table_exists?('alchemy_elements')
312
+ drop_table "alchemy_elements"
313
+ end
314
+
315
+ if table_exists?('alchemy_elements_alchemy_pages')
316
+ drop_table "alchemy_elements_alchemy_pages"
317
+ end
318
+
319
+ if table_exists?('alchemy_essence_booleans')
320
+ drop_table "alchemy_essence_booleans"
321
+ end
322
+
323
+ if table_exists?('alchemy_essence_dates')
324
+ drop_table "alchemy_essence_dates"
325
+ end
326
+
327
+ if table_exists?('alchemy_essence_files')
328
+ drop_table "alchemy_essence_files"
329
+ end
330
+
331
+ if table_exists?('alchemy_essence_htmls')
332
+ drop_table "alchemy_essence_htmls"
333
+ end
334
+
335
+ if table_exists?('alchemy_essence_links')
336
+ drop_table "alchemy_essence_links"
337
+ end
338
+
339
+ if table_exists?('alchemy_essence_pictures')
340
+ drop_table "alchemy_essence_pictures"
341
+ end
342
+
343
+ if table_exists?('alchemy_essence_richtexts')
344
+ drop_table "alchemy_essence_richtexts"
345
+ end
346
+
347
+ if table_exists?('alchemy_essence_selects')
348
+ drop_table "alchemy_essence_selects"
349
+ end
350
+
351
+ if table_exists?('alchemy_essence_texts')
352
+ drop_table "alchemy_essence_texts"
353
+ end
354
+
355
+ if table_exists?('alchemy_folded_pages')
356
+ drop_table "alchemy_folded_pages"
357
+ end
358
+
359
+ if table_exists?('alchemy_languages')
360
+ drop_table "alchemy_languages"
361
+ end
362
+
363
+ if table_exists?('alchemy_legacy_page_urls')
364
+ drop_table "alchemy_legacy_page_urls"
365
+ end
366
+
367
+ if table_exists?('alchemy_pages')
368
+ drop_table "alchemy_pages"
369
+ end
370
+
371
+ if table_exists?('alchemy_pictures')
372
+ drop_table "alchemy_pictures"
373
+ end
374
+
375
+ if table_exists?('alchemy_sites')
376
+ drop_table "alchemy_sites"
377
+ end
378
+ end
379
+ end