EtsComfyBlog 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/.github/issue_template.md +22 -0
  3. data/.github/pull_request_template.md +6 -0
  4. data/.gitignore +16 -0
  5. data/.rubocop.yml +96 -0
  6. data/.travis.yml +21 -0
  7. data/CONTRIBUTING.md +32 -0
  8. data/Gemfile +27 -0
  9. data/LICENSE +20 -0
  10. data/README.md +42 -0
  11. data/Rakefile +5 -0
  12. data/app/controllers/comfy/admin/blog/posts_controller.rb +84 -0
  13. data/app/controllers/comfy/admin/blog/revisions/post_controller.rb +30 -0
  14. data/app/controllers/comfy/blog/posts_controller.rb +50 -0
  15. data/app/models/comfy/blog/post.rb +55 -0
  16. data/app/views/comfy/admin/blog/partials/_navigation.html.haml +4 -0
  17. data/app/views/comfy/admin/blog/posts/_form.html.haml +22 -0
  18. data/app/views/comfy/admin/blog/posts/edit.html.haml +9 -0
  19. data/app/views/comfy/admin/blog/posts/index.html.haml +37 -0
  20. data/app/views/comfy/admin/blog/posts/new.html.haml +5 -0
  21. data/app/views/comfy/blog/posts/index.html.haml +28 -0
  22. data/app/views/comfy/blog/posts/index.rss.builder +22 -0
  23. data/app/views/comfy/blog/posts/show.html.haml +8 -0
  24. data/app/views/layouts/comfy/blog/application.html.erb +22 -0
  25. data/bin/bundle +3 -0
  26. data/bin/rails +4 -0
  27. data/bin/rake +4 -0
  28. data/bin/setup +36 -0
  29. data/bin/update +31 -0
  30. data/bin/yarn +11 -0
  31. data/comfy_blog.gemspec +28 -0
  32. data/config.ru +6 -0
  33. data/config/application.rb +39 -0
  34. data/config/blog_routes.rb +8 -0
  35. data/config/boot.rb +7 -0
  36. data/config/database.yml +11 -0
  37. data/config/environment.rb +7 -0
  38. data/config/environments/development.rb +64 -0
  39. data/config/environments/test.rb +51 -0
  40. data/config/initializers/comfy_blog.rb +9 -0
  41. data/config/locales/ca.yml +38 -0
  42. data/config/locales/cs.yml +38 -0
  43. data/config/locales/da.yml +38 -0
  44. data/config/locales/de.yml +38 -0
  45. data/config/locales/en.yml +38 -0
  46. data/config/locales/es.yml +38 -0
  47. data/config/locales/fi.yml +38 -0
  48. data/config/locales/fr.yml +38 -0
  49. data/config/locales/gr.yml +38 -0
  50. data/config/locales/it.yml +38 -0
  51. data/config/locales/ja.yml +38 -0
  52. data/config/locales/nb.yml +38 -0
  53. data/config/locales/nl.yml +38 -0
  54. data/config/locales/pl.yml +38 -0
  55. data/config/locales/pt-BR.yml +38 -0
  56. data/config/locales/ru.yml +38 -0
  57. data/config/locales/sv.yml +38 -0
  58. data/config/locales/tr.yml +38 -0
  59. data/config/locales/uk.yml +38 -0
  60. data/config/locales/zh-CN.yml +38 -0
  61. data/config/locales/zh-TW.yml +38 -0
  62. data/config/storage.yml +35 -0
  63. data/db/migrate/00_create_cms.rb +167 -0
  64. data/db/migrate/01_create_blog.rb +24 -0
  65. data/lib/comfy_blog.rb +29 -0
  66. data/lib/comfy_blog/configuration.rb +24 -0
  67. data/lib/comfy_blog/engine.rb +32 -0
  68. data/lib/comfy_blog/routes/blog.rb +21 -0
  69. data/lib/comfy_blog/routes/blog_admin.rb +23 -0
  70. data/lib/comfy_blog/routing.rb +4 -0
  71. data/lib/comfy_blog/version.rb +7 -0
  72. data/lib/generators/comfy/blog/README +10 -0
  73. data/lib/generators/comfy/blog/blog_generator.rb +53 -0
  74. metadata +129 -0
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ defined?(ComfyBlog::Application) && ComfyBlog::Application.configure do
4
+ # Settings specified here will take precedence over those in config/application.rb.
5
+
6
+ # In the development environment your application's code is reloaded on
7
+ # every request. This slows down response time but is perfect for development
8
+ # since you don't have to restart the web server when you make code changes.
9
+ config.cache_classes = false
10
+
11
+ # Do not eager load code on boot.
12
+ config.eager_load = false
13
+
14
+ # Show full error reports.
15
+ config.consider_all_requests_local = true
16
+
17
+ # Enable/disable caching. By default caching is disabled.
18
+ # Run rails dev:cache to toggle caching.
19
+ if Rails.root.join("tmp/caching-dev.txt").exist?
20
+ config.action_controller.perform_caching = true
21
+
22
+ config.cache_store = :memory_store
23
+ config.public_file_server.headers = {
24
+ "Cache-Control" => "public, max-age=#{2.days.to_i}"
25
+ }
26
+ else
27
+ config.action_controller.perform_caching = false
28
+
29
+ config.cache_store = :null_store
30
+ end
31
+
32
+ # Store uploaded files on the local file system (see config/storage.yml for options)
33
+ config.active_storage.service = :local
34
+
35
+ # Don't care if the mailer can't send.
36
+ config.action_mailer.raise_delivery_errors = false
37
+
38
+ config.action_mailer.perform_caching = false
39
+
40
+ # Print deprecation notices to the Rails logger.
41
+ config.active_support.deprecation = :log
42
+
43
+ # Raise an error on page load if there are pending migrations.
44
+ config.active_record.migration_error = :page_load
45
+
46
+ # Debug mode disables concatenation and preprocessing of assets.
47
+ # This option may cause significant delays in view rendering with a large
48
+ # number of complex assets.
49
+ config.assets.debug = true
50
+
51
+ # Suppress logger output for asset requests.
52
+ config.assets.quiet = true
53
+
54
+ # Raises error for missing translations
55
+ # config.action_view.raise_on_missing_translations = true
56
+
57
+ # Use an evented file watcher to asynchronously detect changes in source code,
58
+ # routes, locales, etc. This feature depends on the listen gem.
59
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
60
+
61
+ config.active_job.queue_adapter = :inline
62
+
63
+ config.action_view.raise_on_missing_translations = true
64
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ defined?(ComfyBlog::Application) && ComfyBlog::Application.configure do
4
+ # Settings specified here will take precedence over those in config/application.rb.
5
+
6
+ # The test environment is used exclusively to run your application's
7
+ # test suite. You never need to work with it otherwise. Remember that
8
+ # your test database is "scratch space" for the test suite and is wiped
9
+ # and recreated between test runs. Don't rely on the data there!
10
+ config.cache_classes = true
11
+
12
+ # Do not eager load code on boot. This avoids loading your whole application
13
+ # just for the purpose of running a single test. If you are using a tool that
14
+ # preloads Rails for running tests, you may have to set it to true.
15
+ config.eager_load = false
16
+
17
+ # Configure public file server for tests with Cache-Control for performance.
18
+ config.public_file_server.enabled = true
19
+ config.public_file_server.headers = {
20
+ "Cache-Control" => "public, max-age=#{1.hour.to_i}"
21
+ }
22
+
23
+ # Show full error reports and disable caching.
24
+ config.consider_all_requests_local = true
25
+ config.action_controller.perform_caching = false
26
+
27
+ # Raise exceptions instead of rendering exception templates.
28
+ config.action_dispatch.show_exceptions = false
29
+
30
+ # Disable request forgery protection in test environment.
31
+ config.action_controller.allow_forgery_protection = false
32
+
33
+ # Store uploaded files on the local file system in a temporary directory
34
+ config.active_storage.service = :test
35
+ config.action_mailer.perform_caching = false
36
+
37
+ # Tell Action Mailer not to deliver emails to the real world.
38
+ # The :test delivery method accumulates sent emails in the
39
+ # ActionMailer::Base.deliveries array.
40
+ config.action_mailer.delivery_method = :test
41
+
42
+ # Print deprecation notices to the stderr.
43
+ config.active_support.deprecation = :stderr
44
+
45
+ # Raises error for missing translations
46
+ # config.action_view.raise_on_missing_translations = true
47
+
48
+ config.active_job.queue_adapter = :inline
49
+
50
+ config.action_view.raise_on_missing_translations = true
51
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ ComfyBlog.configure do |config|
4
+ # application layout to be used to index blog posts
5
+ # config.app_layout = 'comfy/blog/application'
6
+
7
+ # Number of posts per page. Default is 10
8
+ # config.posts_per_page = 10
9
+ end
@@ -0,0 +1,38 @@
1
+ ca:
2
+ activerecord:
3
+ models:
4
+ comfy/blog/post: Entrada
5
+ attributes:
6
+ comfy/blog/post:
7
+ title: Títol
8
+ slug: Ruta
9
+ published_at: Publicat
10
+ is_published: Publicada
11
+
12
+ comfy:
13
+ admin:
14
+ cms:
15
+ base:
16
+ posts: Entrada del blog
17
+ blog:
18
+ posts:
19
+ created: S'ha creat l'entrada del blog
20
+ create_failure: No s'ha pogut crear l'entrada del blog
21
+ updated: S'ha actualitzat l'entrada del blog
22
+ update_failure: No s'ha pogut actualitzar l'entrada del blog
23
+ deleted: S'ha esborrat l'entrada del blog
24
+ not_found: L'entrada del blog no s'ha pogut trobar
25
+ index:
26
+ title: Entrada del blog
27
+ new_link: S'ha creat una nova entrada al blog
28
+ edit: Edita
29
+ delete: Esborra
30
+ are_you_sure: Esteu segur de que voleu esborrar aquesta entrada?
31
+ new:
32
+ title: Nova entrada del blog
33
+ edit:
34
+ title: Edita l'entrada del blog
35
+ form:
36
+ create: Crea una entrada
37
+ update: Actualitza una entrada
38
+ cancel: Cancel.la
@@ -0,0 +1,38 @@
1
+ cs:
2
+ activerecord:
3
+ models:
4
+ comfy/blog/post: Post
5
+ attributes:
6
+ comfy/blog/post:
7
+ title: Title
8
+ slug: Slug
9
+ published_at: Published at
10
+ is_published: Is Published
11
+
12
+ comfy:
13
+ admin:
14
+ cms:
15
+ base:
16
+ posts: Blog Posts
17
+ blog:
18
+ posts:
19
+ created: Blog Post created
20
+ create_failure: Failed to create Blog Post
21
+ updated: Blog Post updated
22
+ update_failure: Failed to update Blog Post
23
+ deleted: Blog Post removed
24
+ not_found: Blog Post not found
25
+ index:
26
+ title: Blog Posts
27
+ new_link: New Blog Post
28
+ edit: Edit
29
+ delete: Delete
30
+ are_you_sure: Are you sure?
31
+ new:
32
+ title: New Blog Post
33
+ edit:
34
+ title: Edit Blog Post
35
+ form:
36
+ create: Create Post
37
+ update: Update Post
38
+ cancel: Cancel
@@ -0,0 +1,38 @@
1
+ da:
2
+ activerecord:
3
+ models:
4
+ comfy/blog/post: Post
5
+ attributes:
6
+ comfy/blog/post:
7
+ title: Title
8
+ slug: Slug
9
+ published_at: Published at
10
+ is_published: Is Published
11
+
12
+ comfy:
13
+ admin:
14
+ cms:
15
+ base:
16
+ posts: Blog Posts
17
+ blog:
18
+ posts:
19
+ created: Blog Post created
20
+ create_failure: Failed to create Blog Post
21
+ updated: Blog Post updated
22
+ update_failure: Failed to update Blog Post
23
+ deleted: Blog Post removed
24
+ not_found: Blog Post not found
25
+ index:
26
+ title: Blog Posts
27
+ new_link: New Blog Post
28
+ edit: Edit
29
+ delete: Delete
30
+ are_you_sure: Are you sure?
31
+ new:
32
+ title: New Blog Post
33
+ edit:
34
+ title: Edit Blog Post
35
+ form:
36
+ create: Create Post
37
+ update: Update Post
38
+ cancel: Cancel
@@ -0,0 +1,38 @@
1
+ de:
2
+ activerecord:
3
+ models:
4
+ comfy/blog/post: Beitrag
5
+ attributes:
6
+ comfy/blog/post:
7
+ title: Titel
8
+ slug: URL-Teil
9
+ published_at: Veröffentlicht am
10
+ is_published: Ist veröffentlicht
11
+
12
+ comfy:
13
+ admin:
14
+ cms:
15
+ base:
16
+ posts: Beiträge
17
+ blog:
18
+ posts:
19
+ created: Blogbeitrag erstellt
20
+ create_failure: Erstellung des Blogbeitrags fehlgeschlagen
21
+ updated: Blogbeitrag aktualisiert
22
+ update_failure: Aktualisierung des Blogbeitrags fehlgeschlagen
23
+ deleted: Blogbeitrag gelöscht
24
+ not_found: Blogbeitrag nicht gefunden
25
+ index:
26
+ title: Blogbeiträge
27
+ new_link: Neuer Blogbeitrag
28
+ edit: Ändern
29
+ delete: Löschen
30
+ are_you_sure: Sind Sie sicher?
31
+ new:
32
+ title: Neuer Blogbeitrag
33
+ edit:
34
+ title: Blogbeitrag ändern
35
+ form:
36
+ create: Create Post
37
+ update: Update Post
38
+ cancel: Abbrechen
@@ -0,0 +1,38 @@
1
+ en:
2
+ activerecord:
3
+ models:
4
+ comfy/blog/post: Post
5
+ attributes:
6
+ comfy/blog/post:
7
+ title: Title
8
+ slug: Slug
9
+ published_at: Published at
10
+ is_published: Is Published
11
+
12
+ comfy:
13
+ admin:
14
+ cms:
15
+ base:
16
+ posts: Blog Posts
17
+ blog:
18
+ posts:
19
+ created: Blog Post created
20
+ create_failure: Failed to create Blog Post
21
+ updated: Blog Post updated
22
+ update_failure: Failed to update Blog Post
23
+ deleted: Blog Post removed
24
+ not_found: Blog Post not found
25
+ index:
26
+ title: Blog Posts
27
+ new_link: New Blog Post
28
+ edit: Edit
29
+ delete: Delete
30
+ are_you_sure: Are you sure?
31
+ new:
32
+ title: New Blog Post
33
+ edit:
34
+ title: Edit Blog Post
35
+ form:
36
+ create: Create Post
37
+ update: Update Post
38
+ cancel: Cancel
@@ -0,0 +1,38 @@
1
+ es:
2
+ activerecord:
3
+ models:
4
+ comfy/blog/post: Entrada
5
+ attributes:
6
+ comfy/blog/post:
7
+ title: Título
8
+ slug: Slug
9
+ published_at: Publicada en
10
+ is_published: Publicada
11
+
12
+ comfy:
13
+ admin:
14
+ cms:
15
+ base:
16
+ posts: Entradas
17
+ blog:
18
+ posts:
19
+ created: Entrada creada
20
+ create_failure: La Entrada no ha podido ser creada
21
+ updated: Entrada actualizada
22
+ update_failure: La Entrada no ha podido ser actualizada
23
+ deleted: Entrada borrada
24
+ not_found: Entrada no encontrada
25
+ index:
26
+ title: Entradas
27
+ new_link: Nueva Entrada
28
+ edit: Editar
29
+ delete: Borrar
30
+ are_you_sure: ¿Está seguro?
31
+ new:
32
+ title: Nueva Entrada
33
+ edit:
34
+ title: Editar Entrada
35
+ form:
36
+ create: Crear Entrada
37
+ update: Actualizar Entrada
38
+ cancel: Cancelar
@@ -0,0 +1,38 @@
1
+ fi:
2
+ activerecord:
3
+ models:
4
+ comfy/blog/post: Artikkeli
5
+ attributes:
6
+ comfy/blog/post:
7
+ title: Otsikko
8
+ slug: URL-osa
9
+ published_at: Julkaistu
10
+ is_published: On julkaistu
11
+
12
+ comfy:
13
+ admin:
14
+ cms:
15
+ base:
16
+ posts: Artikkelit
17
+ blog:
18
+ posts:
19
+ created: Blogiartikkeli luotu
20
+ create_failure: Blogiartikkelia ei voitu luoda
21
+ updated: Blogiartikkeli päivitetty
22
+ update_failure: Blogiartikkelia ei voitu päivittää
23
+ deleted: Blogiartikkeli poistettu
24
+ not_found: Blogiartikkelia ei löydy
25
+ index:
26
+ title: Blogiartikkelit
27
+ new_link: Uusi blogiartikkeli
28
+ edit: Muokkaa
29
+ delete: Poista
30
+ are_you_sure: Oletko varma?
31
+ new:
32
+ title: Uusi blogiartikkeli
33
+ edit:
34
+ title: Muokkaa blogiartikkelia
35
+ form:
36
+ create: Luo artikkeli
37
+ update: Päivitä artikkeli
38
+ cancel: Peru
@@ -0,0 +1,38 @@
1
+ fr:
2
+ activerecord:
3
+ models:
4
+ comfy/blog/post: Article
5
+ attributes:
6
+ comfy/blog/post:
7
+ title: Titre
8
+ slug: Identifiant
9
+ published_at: Publié le
10
+ is_published: Publié
11
+
12
+ comfy:
13
+ admin:
14
+ cms:
15
+ base:
16
+ posts: Articles de Blog
17
+ blog:
18
+ posts:
19
+ created: Article de Blog créé
20
+ create_failure: Échec de la création de l'Article de Blog
21
+ updated: Article de Blog modifié
22
+ update_failure: Échec de la modification de l'Article de Blog
23
+ deleted: Article de Blog supprimé
24
+ not_found: Article de Blog introuvable
25
+ index:
26
+ title: Articles de Blog
27
+ new_link: Nouvel Article de Blog
28
+ edit: Modifier
29
+ delete: Supprimer
30
+ are_you_sure: Êtes-vous sûr ?
31
+ new:
32
+ title: Nouvel Article de Blog
33
+ edit:
34
+ title: Modifier l'Article de Blog
35
+ form:
36
+ create: Créer l'Article
37
+ update: Modifier l'Article
38
+ cancel: Annuler
@@ -0,0 +1,38 @@
1
+ gr:
2
+ activerecord:
3
+ models:
4
+ comfy/blog/post: Δημοσίευση
5
+ attributes:
6
+ comfy/blog/post:
7
+ title: Τίτλος
8
+ slug: Slug
9
+ published_at: Δημοσιεύθηκε στο
10
+ is_published: Έχει Δημοσιευθεί
11
+
12
+ comfy:
13
+ admin:
14
+ cms:
15
+ base:
16
+ posts: Δημοσιεύσεις του Blog
17
+ blog:
18
+ posts:
19
+ created: Η Δημοσιεύση δημιουργήθηκε
20
+ create_failure: Αποτυχία δημιουργίας της δημοσίευσης
21
+ updated: Η Δημοσίευση ενημερώθηκε
22
+ update_failure: Αποτυχία ενημέρωσης της δημοσίευσης
23
+ deleted: Η Δημοσίεση διαγράφηκε
24
+ not_found: Η Δημοσίευση δεν βρέθηκε
25
+ index:
26
+ title: Δημοσιεύσεις του Blog
27
+ new_link: Νέα Δημοσίευση
28
+ edit: Επεξεργασία
29
+ delete: Διαγραφή
30
+ are_you_sure: Είστε σίγουροι;
31
+ new:
32
+ title: Νέα Δημοσίευση στο Blog
33
+ edit:
34
+ title: Επεξεργασία στο Blog
35
+ form:
36
+ create: Δημιουργία Δημοσίευσης
37
+ update: Ενημέρωση Δημοσίευσης
38
+ cancel: Ακύρωση