comfy_blog 0.1.8 → 1.0.0

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/.gitignore +16 -0
  3. data/.travis.yml +11 -0
  4. data/Gemfile +8 -6
  5. data/LICENSE +2 -2
  6. data/README.md +22 -56
  7. data/Rakefile +19 -16
  8. data/app/controllers/admin/blog/base_controller.rb +11 -2
  9. data/app/controllers/admin/blog/blogs_controller.rb +51 -0
  10. data/app/controllers/admin/blog/comments_controller.rb +16 -17
  11. data/app/controllers/admin/blog/posts_controller.rb +26 -26
  12. data/app/controllers/blog/base_controller.rb +31 -0
  13. data/app/controllers/blog/comments_controller.rb +25 -27
  14. data/app/controllers/blog/posts_controller.rb +36 -29
  15. data/app/models/blog/blog.rb +29 -0
  16. data/app/models/blog/comment.rb +7 -9
  17. data/app/models/blog/post.rb +17 -55
  18. data/app/views/admin/blog/blogs/_form.html.haml +11 -0
  19. data/app/views/admin/blog/blogs/edit.html.haml +5 -0
  20. data/app/views/admin/blog/blogs/index.html.haml +26 -0
  21. data/app/views/admin/blog/blogs/new.html.haml +5 -0
  22. data/app/views/admin/blog/comments/_comment.html.haml +17 -0
  23. data/app/views/admin/blog/comments/index.html.haml +17 -0
  24. data/app/views/admin/blog/comments/toggle_publish.js.erb +1 -0
  25. data/app/views/admin/blog/partials/_navigation.html.haml +6 -0
  26. data/app/views/admin/blog/posts/_form.html.haml +13 -0
  27. data/app/views/admin/blog/posts/edit.html.haml +5 -0
  28. data/app/views/admin/blog/posts/index.html.haml +32 -0
  29. data/app/views/admin/blog/posts/new.html.haml +5 -0
  30. data/app/views/blog/comments/_form.html.haml +10 -0
  31. data/app/views/blog/posts/index.html.haml +13 -0
  32. data/app/views/blog/posts/index.rss.builder +7 -5
  33. data/app/views/blog/posts/show.html.haml +18 -0
  34. data/app/views/layouts/blog/application.html.haml +7 -0
  35. data/comfy_blog.gemspec +16 -128
  36. data/config.ru +1 -1
  37. data/config/application.rb +6 -26
  38. data/config/blog_routes.rb +6 -0
  39. data/config/boot.rb +1 -2
  40. data/config/database.yml +2 -16
  41. data/config/environments/development.rb +10 -16
  42. data/config/environments/test.rb +14 -20
  43. data/config/initializers/comfy_blog.rb +1 -16
  44. data/config/initializers/secret_token.rb +14 -2
  45. data/db/migrate/00_create_cms.rb +137 -0
  46. data/db/migrate/01_create_blog.rb +52 -0
  47. data/lib/comfy_blog.rb +14 -17
  48. data/lib/comfy_blog/configuration.rb +1 -35
  49. data/lib/comfy_blog/engine.rb +17 -11
  50. data/lib/comfy_blog/routing.rb +38 -0
  51. data/lib/comfy_blog/version.rb +3 -0
  52. data/lib/generators/comfy/blog/README +7 -7
  53. data/lib/generators/comfy/blog/blog_generator.rb +24 -10
  54. data/script/rails +1 -1
  55. data/test/controllers/admin/blog/blogs_controller_test.rb +94 -0
  56. data/test/controllers/admin/blog/comments_controller_test.rb +57 -0
  57. data/test/{functional → controllers}/admin/blog/posts_controller_test.rb +31 -31
  58. data/test/controllers/blog/comments_controller_test.rb +36 -0
  59. data/test/controllers/blog/posts_controller_test.rb +80 -0
  60. data/test/fixtures/blog/blogs.yml +7 -0
  61. data/test/fixtures/blog/posts.yml +1 -0
  62. data/test/fixtures/cms/sites.yml +4 -0
  63. data/test/fixtures/generators/blog/routes.rb +6 -0
  64. data/test/generators/blog_generator_test.rb +19 -0
  65. data/test/lib/configuration_test.rb +16 -0
  66. data/test/models/blog/blog_test.rb +59 -0
  67. data/test/{unit/comment_test.rb → models/blog/comments_test.rb} +4 -5
  68. data/test/models/blog/posts_test.rb +88 -0
  69. data/test/test_helper.rb +80 -27
  70. metadata +53 -111
  71. data/VERSION +0 -1
  72. data/app/assets/images/rails.png +0 -0
  73. data/app/assets/javascripts/application.js +0 -8
  74. data/app/controllers/admin/blog/tags_controller.rb +0 -56
  75. data/app/controllers/application_controller.rb +0 -5
  76. data/app/helpers/blog/application_helper.rb +0 -23
  77. data/app/models/.gitkeep +0 -0
  78. data/app/models/blog/tag.rb +0 -25
  79. data/app/models/blog/tagging.rb +0 -22
  80. data/app/views/admin/blog/_navigation.html.erb +0 -1
  81. data/app/views/admin/blog/comments/_comment.html.erb +0 -22
  82. data/app/views/admin/blog/comments/destroy.js.erb +0 -3
  83. data/app/views/admin/blog/comments/index.html.erb +0 -12
  84. data/app/views/admin/blog/comments/publish.js.erb +0 -1
  85. data/app/views/admin/blog/posts/_form.html.erb +0 -37
  86. data/app/views/admin/blog/posts/_post.html.erb +0 -29
  87. data/app/views/admin/blog/posts/edit.html.erb +0 -5
  88. data/app/views/admin/blog/posts/index.html.erb +0 -15
  89. data/app/views/admin/blog/posts/new.html.erb +0 -5
  90. data/app/views/admin/blog/tags/_form.html.erb +0 -20
  91. data/app/views/admin/blog/tags/_tag.html.erb +0 -16
  92. data/app/views/admin/blog/tags/edit.html.erb +0 -5
  93. data/app/views/admin/blog/tags/index.html.erb +0 -9
  94. data/app/views/admin/blog/tags/new.html.erb +0 -5
  95. data/app/views/blog/comments/_comment.html.erb +0 -4
  96. data/app/views/blog/comments/_disqus.html.erb +0 -14
  97. data/app/views/blog/comments/_form.html.erb +0 -6
  98. data/app/views/blog/comments/create.js.erb +0 -6
  99. data/app/views/blog/posts/_post.html.erb +0 -8
  100. data/app/views/blog/posts/index.html.erb +0 -9
  101. data/app/views/blog/posts/show.html.erb +0 -13
  102. data/app/views/layouts/application.html.erb +0 -17
  103. data/config/locales/en.yml +0 -5
  104. data/config/routes.rb +0 -37
  105. data/db/migrate/01_create_comfy_blog.rb +0 -55
  106. data/db/schema.rb +0 -63
  107. data/db/seeds.rb +0 -7
  108. data/lib/comfy_blog/core_ext/string.rb +0 -8
  109. data/lib/comfy_blog/form_builder.rb +0 -50
  110. data/lib/tasks/comfy_blog.rake +0 -4
  111. data/test/fixtures/.gitkeep +0 -0
  112. data/test/fixtures/blog/taggings.yml +0 -7
  113. data/test/fixtures/blog/tags.yml +0 -14
  114. data/test/functional/.gitkeep +0 -0
  115. data/test/functional/admin/blog/comments_controller_test.rb +0 -38
  116. data/test/functional/admin/blog/tags_controller_test.rb +0 -88
  117. data/test/functional/blog/comments_controller_test.rb +0 -78
  118. data/test/functional/blog/posts_controller_test.rb +0 -110
  119. data/test/integration/routing_test.rb +0 -26
  120. data/test/unit/.gitkeep +0 -0
  121. data/test/unit/configuration_test.rb +0 -29
  122. data/test/unit/helpers/blog/application_helper_test.rb +0 -10
  123. data/test/unit/post_test.rb +0 -147
  124. data/test/unit/tag_test.rb +0 -45
  125. data/test/unit/tagging_test.rb +0 -30
@@ -0,0 +1,5 @@
1
+ .page-header
2
+ %h2 New Blog Post
3
+
4
+ = comfy_form_for @post, :as => :post, :url => {:action => :create} do |form|
5
+ = render form
@@ -0,0 +1,10 @@
1
+ = formatted_form_for @comment, :url => blog_comments_path(@cms_site.path, @blog.path, @post.slug) do |form|
2
+
3
+ -# don't need this when installed into your app
4
+ = form.hidden_field :authenticity_token, :value => form_authenticity_token
5
+
6
+ = form.text_field :author
7
+ = form.text_field :email
8
+ = form.text_area :content
9
+
10
+ = form.submit 'Submit'
@@ -0,0 +1,13 @@
1
+ %h1 Blog Posts
2
+
3
+ - @posts.each do |post|
4
+
5
+ %h1= link_to post.title, blog_post_path(@cms_site.path, @blog.path, post.slug)
6
+ .author
7
+ = post.author
8
+ .date
9
+ = post.published_at.to_s(:db)
10
+ .content
11
+ = post.content.html_safe
12
+
13
+ = paginate @posts
@@ -1,17 +1,19 @@
1
1
  xml.instruct! :xml, :version => '1.0'
2
2
  xml.rss :version => '2.0' do
3
3
  xml.channel do
4
- xml.title ComfyBlog.config.title
5
- xml.description ComfyBlog.config.description
6
- xml.link request.url
4
+ xml.title @blog.label
5
+ xml.description @blog.description
6
+ xml.link blog_posts_url(@cms_site.path, @blog.path)
7
7
 
8
8
  @posts.each do |post|
9
+ url = blog_post_url(@cms_site.path, @blog.path, post.slug)
10
+
9
11
  xml.item do
10
12
  xml.title post.title
11
13
  xml.description post.content
12
14
  xml.pubDate post.created_at.to_s(:rfc822)
13
- xml.link blog_post_url(post)
14
- xml.guid blog_post_url(post)
15
+ xml.link url
16
+ xml.guid url
15
17
  end
16
18
  end
17
19
  end
@@ -0,0 +1,18 @@
1
+ %h1 Blog Post
2
+
3
+ %h1= @post.title
4
+
5
+ .author
6
+ = @post.author
7
+ .date
8
+ = @post.published_at.to_s(:db)
9
+ .content
10
+ = @post.content.html_safe
11
+
12
+ .comments
13
+ - @post.comments.published.each do |comment|
14
+ .comment
15
+ .author= comment.author
16
+ .content= comment.content
17
+
18
+ = render :partial => 'blog/comments/form'
@@ -0,0 +1,7 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title Comfy Blog
5
+ %body
6
+ = yield
7
+
@@ -1,133 +1,21 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
1
+ $:.push File.expand_path("../lib", __FILE__)
5
2
 
6
- Gem::Specification.new do |s|
7
- s.name = "comfy_blog"
8
- s.version = "0.1.8"
3
+ require 'comfy_blog/version'
9
4
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Oleg Khabarov", "The Working Group Inc."]
12
- s.date = "2012-05-09"
13
- s.description = ""
14
- s.email = "oleg@twg.ca"
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.md"
18
- ]
19
- s.files = [
20
- "Gemfile",
21
- "LICENSE",
22
- "README.md",
23
- "Rakefile",
24
- "VERSION",
25
- "app/assets/images/rails.png",
26
- "app/assets/javascripts/application.js",
27
- "app/controllers/admin/blog/base_controller.rb",
28
- "app/controllers/admin/blog/comments_controller.rb",
29
- "app/controllers/admin/blog/posts_controller.rb",
30
- "app/controllers/admin/blog/tags_controller.rb",
31
- "app/controllers/application_controller.rb",
32
- "app/controllers/blog/comments_controller.rb",
33
- "app/controllers/blog/posts_controller.rb",
34
- "app/helpers/blog/application_helper.rb",
35
- "app/models/.gitkeep",
36
- "app/models/blog/comment.rb",
37
- "app/models/blog/post.rb",
38
- "app/models/blog/tag.rb",
39
- "app/models/blog/tagging.rb",
40
- "app/views/admin/blog/_navigation.html.erb",
41
- "app/views/admin/blog/comments/_comment.html.erb",
42
- "app/views/admin/blog/comments/destroy.js.erb",
43
- "app/views/admin/blog/comments/index.html.erb",
44
- "app/views/admin/blog/comments/publish.js.erb",
45
- "app/views/admin/blog/posts/_form.html.erb",
46
- "app/views/admin/blog/posts/_post.html.erb",
47
- "app/views/admin/blog/posts/edit.html.erb",
48
- "app/views/admin/blog/posts/index.html.erb",
49
- "app/views/admin/blog/posts/new.html.erb",
50
- "app/views/admin/blog/tags/_form.html.erb",
51
- "app/views/admin/blog/tags/_tag.html.erb",
52
- "app/views/admin/blog/tags/edit.html.erb",
53
- "app/views/admin/blog/tags/index.html.erb",
54
- "app/views/admin/blog/tags/new.html.erb",
55
- "app/views/blog/comments/_comment.html.erb",
56
- "app/views/blog/comments/_disqus.html.erb",
57
- "app/views/blog/comments/_form.html.erb",
58
- "app/views/blog/comments/create.js.erb",
59
- "app/views/blog/posts/_post.html.erb",
60
- "app/views/blog/posts/index.html.erb",
61
- "app/views/blog/posts/index.rss.builder",
62
- "app/views/blog/posts/show.html.erb",
63
- "app/views/layouts/application.html.erb",
64
- "comfy_blog.gemspec",
65
- "config.ru",
66
- "config/application.rb",
67
- "config/boot.rb",
68
- "config/database.yml",
69
- "config/environment.rb",
70
- "config/environments/development.rb",
71
- "config/environments/test.rb",
72
- "config/initializers/comfy_blog.rb",
73
- "config/initializers/secret_token.rb",
74
- "config/locales/en.yml",
75
- "config/routes.rb",
76
- "db/migrate/01_create_comfy_blog.rb",
77
- "db/schema.rb",
78
- "db/seeds.rb",
79
- "lib/comfy_blog.rb",
80
- "lib/comfy_blog/configuration.rb",
81
- "lib/comfy_blog/core_ext/string.rb",
82
- "lib/comfy_blog/engine.rb",
83
- "lib/comfy_blog/form_builder.rb",
84
- "lib/generators/comfy/blog/README",
85
- "lib/generators/comfy/blog/blog_generator.rb",
86
- "lib/tasks/comfy_blog.rake",
87
- "script/rails",
88
- "test/fixtures/.gitkeep",
89
- "test/fixtures/blog/comments.yml",
90
- "test/fixtures/blog/posts.yml",
91
- "test/fixtures/blog/taggings.yml",
92
- "test/fixtures/blog/tags.yml",
93
- "test/functional/.gitkeep",
94
- "test/functional/admin/blog/comments_controller_test.rb",
95
- "test/functional/admin/blog/posts_controller_test.rb",
96
- "test/functional/admin/blog/tags_controller_test.rb",
97
- "test/functional/blog/comments_controller_test.rb",
98
- "test/functional/blog/posts_controller_test.rb",
99
- "test/integration/routing_test.rb",
100
- "test/test_helper.rb",
101
- "test/unit/.gitkeep",
102
- "test/unit/comment_test.rb",
103
- "test/unit/configuration_test.rb",
104
- "test/unit/helpers/blog/application_helper_test.rb",
105
- "test/unit/post_test.rb",
106
- "test/unit/tag_test.rb",
107
- "test/unit/tagging_test.rb"
108
- ]
109
- s.homepage = "http://github.com/comfy/comfy-blog"
110
- s.licenses = ["MIT"]
111
- s.require_paths = ["lib"]
112
- s.rubygems_version = "1.8.21"
113
- s.summary = "ComfyBlog is a blog engine for Rails 3.1 apps (and ComfortableMexicanSofa)"
5
+ # Describe your gem and declare its dependencies:
6
+ Gem::Specification.new do |s|
7
+ s.name = 'comfy_blog'
8
+ s.version = ComfyBlog::VERSION
9
+ s.authors = ["Oleg Khabarov", "The Working Group Inc"]
10
+ s.email = ["oleg@khabarov.ca"]
11
+ s.homepage = "http://github.com/comfy/comfy-blog"
12
+ s.summary = "Simple Blog Engine for ComfortableMexicanSofa"
13
+ s.description = "Simple Blog Engine for ComfortableMexicanSofa"
14
+ s.license = 'MIT'
114
15
 
115
- if s.respond_to? :specification_version then
116
- s.specification_version = 3
16
+ s.files = `git ls-files`.split("\n")
17
+ s.platform = Gem::Platform::RUBY
18
+ s.require_paths = ['lib']
117
19
 
118
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
119
- s.add_runtime_dependency(%q<rails>, [">= 3.1.0"])
120
- s.add_runtime_dependency(%q<rails_autolink>, [">= 1.0.4"])
121
- s.add_runtime_dependency(%q<jquery-rails>, [">= 1.0.0"])
122
- else
123
- s.add_dependency(%q<rails>, [">= 3.1.0"])
124
- s.add_dependency(%q<rails_autolink>, [">= 1.0.4"])
125
- s.add_dependency(%q<jquery-rails>, [">= 1.0.0"])
126
- end
127
- else
128
- s.add_dependency(%q<rails>, [">= 3.1.0"])
129
- s.add_dependency(%q<rails_autolink>, [">= 1.0.4"])
130
- s.add_dependency(%q<jquery-rails>, [">= 1.0.0"])
131
- end
20
+ s.add_dependency 'comfortable_mexican_sofa', '>= 1.10.0'
132
21
  end
133
-
data/config.ru CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
3
  require ::File.expand_path('../config/environment', __FILE__)
4
- run ComfyBlog::Application
4
+ run ComfyBlog::Application
@@ -2,32 +2,18 @@ require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require 'rails/all'
4
4
 
5
- if defined?(Bundler)
6
- # If you precompile assets before deploying to production, use this line
7
- Bundler.require *Rails.groups(:assets => %w(development test))
8
- # If you want your assets lazily compiled in production, use this line
9
- # Bundler.require(:default, :assets, Rails.env)
10
- end
5
+ # Assets should be precompiled for production (so we don't need the gems loaded then)
6
+ Bundler.require(*Rails.groups(assets: %w(development test)))
11
7
 
12
8
  module ComfyBlog
13
9
  class Application < Rails::Application
14
10
 
15
- require 'comfy_blog'
11
+ require_relative '../lib/comfy_blog'
16
12
 
17
13
  # Settings in config/environments/* take precedence over those specified here.
18
14
  # Application configuration should go into files in config/initializers
19
15
  # -- all .rb files in that directory are automatically loaded.
20
16
 
21
- # Custom directories with classes and modules you want to be autoloadable.
22
- # config.autoload_paths += %W(#{config.root}/extras)
23
-
24
- # Only load the plugins named here, in the order given (default is alphabetical).
25
- # :all can be used as a placeholder for all plugins not explicitly named.
26
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
27
-
28
- # Activate observers that should always be running.
29
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
30
-
31
17
  # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
32
18
  # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
33
19
  # config.time_zone = 'Central Time (US & Canada)'
@@ -35,14 +21,8 @@ module ComfyBlog
35
21
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
36
22
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
37
23
  # config.i18n.default_locale = :de
38
-
39
- # Configure the default encoding used in templates for Ruby 1.9.
40
- config.encoding = "utf-8"
41
-
42
- # Configure sensitive parameters which will be filtered from the log file.
43
- config.filter_parameters += [:password]
44
-
45
- # Enable the asset pipeline
46
- config.assets.enabled = true
24
+
25
+ # Making sure we don't load our dev routes as part of the engine
26
+ config.paths['config/routes.rb'] << 'config/blog_routes.rb'
47
27
  end
48
28
  end
@@ -0,0 +1,6 @@
1
+ ComfyBlog::Application.routes.draw do
2
+ ComfortableMexicanSofa::Routing.admin
3
+ ComfyBlog::Routing.admin
4
+ ComfyBlog::Routing.content
5
+ ComfortableMexicanSofa::Routing.content :sitemap => true
6
+ end
@@ -1,6 +1,5 @@
1
- require 'rubygems'
2
-
3
1
  # Set up gems listed in the Gemfile.
4
2
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
3
 
6
4
  require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
5
+ File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -1,25 +1,11 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
1
  development:
7
2
  adapter: sqlite3
8
3
  database: db/development.sqlite3
9
4
  pool: 5
10
- timeout: 5000
5
+ timeout: 10000
11
6
 
12
- # Warning: The database defined as "test" will be erased and
13
- # re-generated from your development database when you run "rake".
14
- # Do not set this db to the same as development or production.
15
7
  test:
16
8
  adapter: sqlite3
17
9
  database: db/test.sqlite3
18
10
  pool: 5
19
- timeout: 5000
20
-
21
- production:
22
- adapter: sqlite3
23
- database: db/production.sqlite3
24
- pool: 5
25
- timeout: 5000
11
+ timeout: 10000
@@ -1,33 +1,27 @@
1
1
  defined?(ComfyBlog::Application) && ComfyBlog::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
5
+ # every request. This slows down response time but is perfect for development
6
6
  # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
11
 
12
- # Show full error reports and disable caching
12
+ # Show full error reports and disable caching.
13
13
  config.consider_all_requests_local = true
14
14
  config.action_controller.perform_caching = false
15
15
 
16
- # Don't care if the mailer can't send
16
+ # Don't care if the mailer can't send.
17
17
  config.action_mailer.raise_delivery_errors = false
18
18
 
19
- # Print deprecation notices to the Rails logger
19
+ # Print deprecation notices to the Rails logger.
20
20
  config.active_support.deprecation = :log
21
21
 
22
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
22
+ # Raise an error on page load if there are pending migrations
23
+ config.active_record.migration_error = :page_load
24
24
 
25
- # Do not compress assets
26
- config.assets.compress = false
27
-
28
- # Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
29
- config.assets.allow_debugging = true
30
-
31
- # Expands the lines which load the assets
25
+ # Debug mode disables concatenation and preprocessing of assets.
32
26
  config.assets.debug = true
33
27
  end
@@ -1,42 +1,36 @@
1
1
  defined?(ComfyBlog::Application) && ComfyBlog::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
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
5
+ # test suite. You never need to work with it otherwise. Remember that
6
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!
7
+ # and recreated between test runs. Don't rely on the data there!
8
8
  config.cache_classes = true
9
9
 
10
- # Configure static asset server for tests with Cache-Control for performance
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 asset server for tests with Cache-Control for performance.
11
16
  config.serve_static_assets = true
12
17
  config.static_cache_control = "public, max-age=3600"
13
18
 
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
16
-
17
- # Show full error reports and disable caching
19
+ # Show full error reports and disable caching.
18
20
  config.consider_all_requests_local = true
19
21
  config.action_controller.perform_caching = false
20
22
 
21
- # Raise exceptions instead of rendering exception templates
23
+ # Raise exceptions instead of rendering exception templates.
22
24
  config.action_dispatch.show_exceptions = false
23
25
 
24
- # Disable request forgery protection in test environment
25
- config.action_controller.allow_forgery_protection = false
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
26
28
 
27
29
  # Tell Action Mailer not to deliver emails to the real world.
28
30
  # The :test delivery method accumulates sent emails in the
29
31
  # ActionMailer::Base.deliveries array.
30
32
  config.action_mailer.delivery_method = :test
31
33
 
32
- # Use SQL instead of Active Record's schema dumper when creating the test database.
33
- # This is necessary if your schema can't be completely dumped by the schema dumper,
34
- # like if you have constraints or database-specific column types
35
- # config.active_record.schema_format = :sql
36
-
37
- # Print deprecation notices to the stderr
34
+ # Print deprecation notices to the stderr.
38
35
  config.active_support.deprecation = :stderr
39
-
40
- # Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
41
- config.assets.allow_debugging = true
42
36
  end
@@ -1,20 +1,5 @@
1
1
  ComfyBlog.configure do |config|
2
2
 
3
- # set the cms admin path if you have changed it for CMS
4
- # config.admin_route_prefix = 'admin'
5
-
6
- # Controller that should be used for admin area
7
- # config.admin_controller = 'ApplicationController'
8
-
9
- # Form builder
10
- # config.form_builder = 'ComfyBlog::FormBuilder'
11
-
12
- # Set the public path if you have changed it
13
- # config.public_route_prefix = ''
14
-
15
- # Layout used for public posts/comments
16
- # config.public_layout = 'application'
17
-
18
3
  # Number of posts per page. Default is 10
19
4
  # config.posts_per_page = 10
20
5
 
@@ -22,4 +7,4 @@ ComfyBlog.configure do |config|
22
7
  # Default is false.
23
8
  # config.auto_publish_comments = false
24
9
 
25
- end
10
+ end