blogit 1.0.0.rc1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +28 -31
- data/Rakefile +6 -2
- data/app/assets/stylesheets/blogit/themes/default.css +4 -0
- data/app/assets/stylesheets/blogit/themes/default.css.map +7 -0
- data/app/assets/stylesheets/blogit/themes/default.min.css +2 -0
- data/app/assets/stylesheets/blogit/themes/default.min.css.map +7 -0
- data/app/assets/stylesheets/blogit/themes/default.sass +2 -0
- data/app/assets/stylesheets/blogit/themes/default/base/_colors.sass +1 -0
- data/app/assets/stylesheets/blogit/themes/default/base/_typography.sass +1 -0
- data/app/assets/stylesheets/blogit/themes/default/blocks/_archives.sass +18 -0
- data/app/assets/stylesheets/blogit/themes/default/blocks/_comments.sass +7 -0
- data/app/assets/stylesheets/blogit/themes/default/blocks/_forms.sass +9 -0
- data/app/assets/stylesheets/blogit/themes/default/blocks/_headers.sass +4 -0
- data/app/assets/stylesheets/blogit/themes/default/blocks/_posts.sass +8 -0
- data/app/assets/stylesheets/blogit/themes/default/blocks/_related_posts_list.sass +3 -0
- data/app/assets/stylesheets/blogit/themes/default/blocks/_share_bars.sass +7 -0
- data/app/{views/blogit/posts/_no_comments.html.erb → assets/stylesheets/blogit/themes/default/blocks/_tag_list.sass} +0 -0
- data/app/assets/stylesheets/blogit/themes/default/blocks/_tags.sass +4 -0
- data/app/controllers/blogit/application_controller.rb +15 -31
- data/app/controllers/blogit/comments_controller.rb +48 -30
- data/app/controllers/blogit/posts_controller.rb +52 -86
- data/app/helpers/blogit/application_helper.rb +59 -69
- data/app/helpers/blogit/comments_helper.rb +20 -0
- data/app/helpers/blogit/layout_helper.rb +33 -0
- data/app/helpers/blogit/posts_helper.rb +36 -34
- data/app/models/blogit/post.rb +55 -6
- data/app/views/blogit/archive/_list.html.erb +5 -0
- data/app/views/blogit/archive/_month.html.erb +9 -0
- data/app/views/blogit/archive/_year.html.erb +7 -0
- data/app/views/blogit/{posts → comments}/_active_record_comments.html.erb +2 -1
- data/app/views/blogit/comments/_comment.html.erb +10 -14
- data/app/views/blogit/comments/_comments_count.html.erb +8 -0
- data/app/views/blogit/{posts → comments}/_disqus_comments.html.erb +0 -0
- data/app/views/blogit/comments/_form.html.erb +25 -18
- data/app/views/blogit/comments/_no_comments.html.erb +0 -0
- data/app/views/blogit/comments/create.js.erb +2 -2
- data/app/views/blogit/posts/_archiveable.html.erb +3 -0
- data/app/views/blogit/posts/_blog_post_spacer.html.erb +1 -1
- data/app/views/blogit/posts/_blogger_information.html.erb +9 -4
- data/app/views/blogit/posts/_meta_tags.html.erb +32 -0
- data/app/views/blogit/posts/_post.html.erb +6 -9
- data/app/views/blogit/posts/_post_footer.html.erb +1 -0
- data/app/views/blogit/posts/_post_head.html.erb +3 -2
- data/app/views/blogit/posts/_related.html.erb +7 -16
- data/app/views/blogit/posts/_related_post.html.erb +4 -0
- data/app/views/blogit/posts/_share_bar.html.erb +5 -6
- data/app/views/blogit/posts/_tags.html.erb +8 -0
- data/app/views/blogit/posts/index.html.erb +16 -11
- data/app/views/blogit/posts/show.html.erb +28 -4
- data/app/views/blogit/tags/_tag.html.erb +3 -0
- data/config/locales/en.yml +3 -2
- data/config/spring.rb +1 -0
- data/db/migrate/20150618184415_add_description_to_posts.rb +5 -0
- data/lib/blogit.rb +4 -5
- data/lib/blogit/archive.rb +8 -0
- data/lib/blogit/archive/archive_error.rb +3 -0
- data/lib/blogit/archive/archiveable.rb +20 -0
- data/lib/blogit/archive/list.rb +52 -0
- data/lib/blogit/archive/month.rb +34 -0
- data/lib/blogit/archive/year.rb +40 -0
- data/lib/blogit/blogs.rb +11 -5
- data/lib/blogit/configuration.rb +157 -147
- data/lib/blogit/parsers/html_parser.rb +6 -3
- data/lib/blogit/parsers/markdown_parser.rb +30 -5
- data/lib/blogit/parsers/textile_parser.rb +18 -8
- data/lib/blogit/renderers/html_with_albino.rb +1 -1
- data/lib/blogit/version.rb +1 -1
- data/lib/generators/templates/blogit.rb +23 -57
- data/lib/tasks/blogit.rake +42 -0
- data/lib/tasks/blogit/css.rake +22 -0
- data/lib/tasks/blogit/doc.rake +21 -0
- data/lib/tasks/seed_blog_posts.yml +95 -0
- data/lib/validators/absence_validator.rb +2 -2
- data/spec/blogit_spec.rb +3 -3
- data/spec/controllers/blogit/comments_controller_spec.rb +31 -86
- data/spec/controllers/blogit/posts_controller_spec.rb +33 -344
- data/spec/dummy/Rakefile +1 -1
- data/spec/dummy/app/assets/stylesheets/application.sass +7 -0
- data/spec/dummy/app/assets/stylesheets/base.sass +1 -0
- data/spec/dummy/app/assets/stylesheets/base/_html.sass +15 -0
- data/spec/dummy/app/assets/stylesheets/blocks.sass +1 -0
- data/spec/dummy/app/assets/stylesheets/blocks/_layout.sass +21 -0
- data/spec/dummy/app/views/layouts/application.html.erb +21 -18
- data/spec/dummy/app/views/layouts/custom.html.erb +2 -1
- data/spec/dummy/config.ru +0 -1
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/config/database.yml +5 -3
- data/spec/dummy/config/environments/production.rb +7 -2
- data/spec/dummy/config/environments/test.rb +6 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/{20140511174024_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb → 20150619080551_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb} +0 -0
- data/spec/dummy/db/migrate/{20140511174025_add_missing_unique_indices.acts_as_taggable_on_engine.rb → 20150619080552_add_missing_unique_indices.acts_as_taggable_on_engine.rb} +0 -0
- data/spec/dummy/db/migrate/{20140511174026_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb → 20150619080553_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb} +0 -0
- data/spec/dummy/db/migrate/20150619080554_add_missing_taggable_index.acts_as_taggable_on_engine.rb +10 -0
- data/spec/dummy/db/migrate/20150619080555_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +10 -0
- data/spec/dummy/db/schema.rb +9 -7
- data/spec/dummy/db/seeds.rb +17 -0
- data/spec/dummy/lib/tasks/dummy.rake +29 -0
- data/spec/dummy/log/development.log +22286 -1489
- data/spec/dummy/log/test.log +4608 -11518
- data/spec/factories.rb +10 -5
- data/spec/helpers/blogit/application_helper_spec.rb +10 -73
- data/spec/helpers/blogit/posts_helper_spec.rb +8 -63
- data/spec/injectables/dummy_archiveable.rb +6 -0
- data/spec/lib/archive/list_spec.rb +60 -0
- data/spec/lib/archive/month_spec.rb +17 -0
- data/spec/lib/archive/year_spec.rb +38 -0
- data/spec/lib/blogit/parsers/html_parser_spec.rb +1 -1
- data/spec/lib/blogit/parsers/markdown_parser_spec.rb +7 -6
- data/spec/lib/blogit/parsers/textile_parser_spec.rb +1 -1
- data/spec/lib/blogs_spec.rb +2 -2
- data/spec/lib/configuration_spec.rb +21 -49
- data/spec/models/blogit/comment_spec.rb +19 -19
- data/spec/models/blogit/post_spec.rb +63 -28
- data/spec/rails_helper.rb +28 -0
- data/spec/spec_helper.rb +2 -11
- data/spec/support/helpers/css_matchers.rb +42 -0
- metadata +193 -124
- data/app/assets/stylesheets/blogit/index.css +0 -84
- data/app/views/blogit/comments/_admin_links.html.erb +0 -3
- data/app/views/blogit/posts/_comments_count.html.erb +0 -5
- data/app/views/blogit/posts/_form.html.erb +0 -49
- data/app/views/blogit/posts/_post_body.html.erb +0 -1
- data/app/views/blogit/posts/_post_links.html.erb +0 -6
- data/app/views/blogit/posts/edit.html.erb +0 -3
- data/app/views/blogit/posts/new.html.erb +0 -3
- data/lib/tasks/blog_tasks.rake +0 -4
- data/spec/dummy/app/assets/stylesheets/application.css +0 -21
- data/spec/dummy/config/initializers/blogit.rb +0 -88
- data/spec/dummy/db/migrate/20140511174028_create_blogit_posts.blogit.rb +0 -16
- data/spec/dummy/db/migrate/20140511174029_create_blogit_comments.blogit.rb +0 -16
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/tmp/cache/assets/CB5/DD0/sprockets%2F346324d2a51df58457807bee661c449c +0 -0
- data/spec/dummy/tmp/cache/assets/CB6/ED0/sprockets%2F4390d06699f3ad4262e342be530f9f91 +0 -0
- data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/CE7/230/sprockets%2F6f493a817d97133a8dbf674bcd322670 +0 -0
- data/spec/dummy/tmp/cache/assets/CEA/490/sprockets%2F9697d4fb1ed26d80f3c715611c8d4373 +0 -0
- data/spec/dummy/tmp/cache/assets/CEE/310/sprockets%2F89642af8492e579dcd7162a0e2b7f155 +0 -0
- data/spec/dummy/tmp/cache/assets/D01/8C0/sprockets%2F332d5a9ce3e800c6c4a7a99058023ba2 +0 -0
- data/spec/dummy/tmp/cache/assets/D11/CC0/sprockets%2F3a12dfa6665b5318fa99d097203ac7e7 +0 -0
- data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/D3D/1E0/sprockets%2Ffbaabd57fa2c9d426f0c318156705667 +0 -0
- data/spec/dummy/tmp/cache/assets/D3E/920/sprockets%2F3efa8d0fc958c223647cb704183b65ca +0 -0
- data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/D61/6F0/sprockets%2F02da53eeca228bcef0c49278517111fe +0 -0
- data/spec/dummy/tmp/cache/assets/DCA/9B0/sprockets%2Fdf0e8f8a85e5d4056b3fe1cec3b7131a +0 -0
- data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/E02/A60/sprockets%2Fb32faeede196f7a933c3a2794e7ed0bd +0 -0
- data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/02da53eeca228bcef0c49278517111fe +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2ff93f9f5ed9970021c7704ff93237c8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/332d5a9ce3e800c6c4a7a99058023ba2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/346324d2a51df58457807bee661c449c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3a12dfa6665b5318fa99d097203ac7e7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3ed52366904e135bd833590814b6ac6d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4390d06699f3ad4262e342be530f9f91 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6f493a817d97133a8dbf674bcd322670 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/89642af8492e579dcd7162a0e2b7f155 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/89dc196c51ae83634b664c0c33052008 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8dd8236b00c868ba248fe30cd9c14c2a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9239a04d094a872c1cf77ac391072ea8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b3ffb6bd243399012806331ce393ae4f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d53accc3e58037ee4005e41221b8846b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/df0e8f8a85e5d4056b3fe1cec3b7131a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/routing/post_routing_spec.rb +0 -49
@@ -1,84 +0,0 @@
|
|
1
|
-
article.blog_post {
|
2
|
-
width: 600px;
|
3
|
-
margin: 0 auto;
|
4
|
-
}
|
5
|
-
.blog_post header h1 a{
|
6
|
-
text-decoration: none;
|
7
|
-
color: #55D;
|
8
|
-
}
|
9
|
-
.blog_post p{
|
10
|
-
line-height: 1.6em;
|
11
|
-
}
|
12
|
-
.blog_post_comments_count{
|
13
|
-
margin: 1em 0;
|
14
|
-
text-align: right;
|
15
|
-
}
|
16
|
-
.blog_post_spacer{
|
17
|
-
width: 80%;
|
18
|
-
margin: 1em auto;
|
19
|
-
border-color: thin solid silver;
|
20
|
-
border-top: none;
|
21
|
-
}
|
22
|
-
.blog_post_footer, footer{
|
23
|
-
font-size: 0.8em;
|
24
|
-
font-style: italic;
|
25
|
-
color: silver;
|
26
|
-
}
|
27
|
-
|
28
|
-
#new_blogit_post_link{
|
29
|
-
text-align: right;
|
30
|
-
}
|
31
|
-
#new_blogit_post, .edit_blogit_post{
|
32
|
-
width: 100%;
|
33
|
-
}
|
34
|
-
#post_title, #post_body{
|
35
|
-
width: 100%;
|
36
|
-
}
|
37
|
-
.new_blog_post fieldset{
|
38
|
-
border: none;
|
39
|
-
padding: 0;
|
40
|
-
margin: 0;
|
41
|
-
}
|
42
|
-
.new_blog_post input,.new_blog_post textarea{
|
43
|
-
font-size: 17px;
|
44
|
-
}
|
45
|
-
.new_blog_post .blog_post_tip{
|
46
|
-
margin: 0;
|
47
|
-
float: right;
|
48
|
-
width: 55%;
|
49
|
-
text-align: right;
|
50
|
-
color: #333;
|
51
|
-
font-style: italic;
|
52
|
-
}
|
53
|
-
#new_blog_post_tag_field{
|
54
|
-
float: left;
|
55
|
-
width: 40%;
|
56
|
-
}
|
57
|
-
.new_blog_post .actions{
|
58
|
-
margin: 1em 0;
|
59
|
-
}
|
60
|
-
#new_blog_comment{
|
61
|
-
width: 600px;
|
62
|
-
margin: 0 auto;
|
63
|
-
}
|
64
|
-
#new_blog_comment .hidden {
|
65
|
-
display: none;
|
66
|
-
}
|
67
|
-
.blog_comment{
|
68
|
-
width: 600px;
|
69
|
-
margin: 1em auto;
|
70
|
-
padding: 0 0 1em;
|
71
|
-
border-bottom: thin solid silver;
|
72
|
-
}
|
73
|
-
.blog_comment .actions, .blog_post .actions{
|
74
|
-
text-align: right;
|
75
|
-
}
|
76
|
-
|
77
|
-
#blog_share_bar {
|
78
|
-
width: 600px;
|
79
|
-
margin: 0.5em auto;
|
80
|
-
}
|
81
|
-
|
82
|
-
.social_button {
|
83
|
-
display: inline-block;
|
84
|
-
}
|
@@ -1,49 +0,0 @@
|
|
1
|
-
<%= form_for(@post, html: {class: "new_blog_post", id: "new_blog_post"}) do |f| %>
|
2
|
-
|
3
|
-
<% if @post.errors.any? %>
|
4
|
-
<div id="error_explanation">
|
5
|
-
<h2><%=t :prohibited_this_post_from_being_saved, scope: 'blogit.posts', count: @post.errors.count%></h2>
|
6
|
-
|
7
|
-
<ul>
|
8
|
-
<% @post.errors.full_messages.each do |msg| %>
|
9
|
-
<li><%= msg %></li>
|
10
|
-
<% end %>
|
11
|
-
</ul>
|
12
|
-
</div>
|
13
|
-
<% end %>
|
14
|
-
|
15
|
-
<fieldset>
|
16
|
-
<%= field do %>
|
17
|
-
<%= f.text_field :title, placeholder: t(:give_your_post_a_title, scope: 'blogit.posts') %>
|
18
|
-
<% end %>
|
19
|
-
|
20
|
-
<%= field do %>
|
21
|
-
<%= f.text_area :body, placeholder: t(:write_something_here, scope: 'blogit.posts') %>
|
22
|
-
<% end %>
|
23
|
-
|
24
|
-
<p class="blog_post_tip">
|
25
|
-
<%=t :tip_you_can_style_your_post_using, scope: 'blogit.posts', parser: blogit_conf.default_parser %>
|
26
|
-
</p>
|
27
|
-
|
28
|
-
</fieldset>
|
29
|
-
|
30
|
-
<fieldset>
|
31
|
-
|
32
|
-
<%= field id: "new_blog_post_tag_field" do %>
|
33
|
-
<%= f.label :tag_list, t(:tags, scope: 'blogit.posts') %>
|
34
|
-
<%= f.text_field :tag_list, placeholder: t(:tag_placeholder, scope: 'blogit.posts') %>
|
35
|
-
<% end %>
|
36
|
-
|
37
|
-
<%= field id: "new_blog_post_state_field" do %>
|
38
|
-
<%= f.label :state, t(:state, scope: 'blogit.posts') %>
|
39
|
-
<%= f.collection_select(:state, Blogit::Post::AVAILABLE_STATUS, :to_s, :to_s) %>
|
40
|
-
<% end %>
|
41
|
-
|
42
|
-
</fieldset>
|
43
|
-
|
44
|
-
<%= actions do %>
|
45
|
-
<%= f.submit %> <%=t :or, scope: 'blogit.posts'%>
|
46
|
-
<%= link_to(t(:cancel, scope: 'blogit.posts'), @post.new_record? ? blog_root_path : post_path(@post)) %>
|
47
|
-
<% end %>
|
48
|
-
|
49
|
-
<% end %>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= format_content(post.body) %>
|
@@ -1,6 +0,0 @@
|
|
1
|
-
<%= login_required do %>
|
2
|
-
<%= actions do %>
|
3
|
-
<%= link_to(t(:edit, scope: 'blogit.posts'), edit_post_path(post)) %> | <%= link_to(t(:delete, scope: 'blogit.posts'), post,
|
4
|
-
method: :delete, data: { confirm: t(:are_you_sure_you_want_to_remove_this_post, scope: 'blogit.posts')}) %>
|
5
|
-
<% end %>
|
6
|
-
<% end unless blogit_conf.author_edits_only and not this_blogger?(post) %>
|
data/lib/tasks/blog_tasks.rake
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
/* =================================== */
|
2
|
-
/* = Some CSS for the dummy app only = */
|
3
|
-
/* =================================== */
|
4
|
-
|
5
|
-
/*
|
6
|
-
*= require_tree .
|
7
|
-
*/
|
8
|
-
|
9
|
-
body{
|
10
|
-
font-size: 15px;
|
11
|
-
line-height: 1.5em;
|
12
|
-
font-family: verdana, sans-serif;
|
13
|
-
}
|
14
|
-
#content, footer{
|
15
|
-
width: 800px;
|
16
|
-
margin: 0 auto;
|
17
|
-
}
|
18
|
-
footer#application_footer{
|
19
|
-
text-align:center;
|
20
|
-
}
|
21
|
-
|
@@ -1,88 +0,0 @@
|
|
1
|
-
# These configuration options can be used to customise the behaviour of Blogit
|
2
|
-
# these are all commented out in testing to use the defaults
|
3
|
-
Blogit.configure do |config|
|
4
|
-
|
5
|
-
# What kind of comments do you want to add to your blog ? (:active_record, :disqus or :no)
|
6
|
-
# config.include_comments = :active_record
|
7
|
-
|
8
|
-
# When using disqus comments, what is the shortname of your forum ?
|
9
|
-
# config.disqus_shortname = ""
|
10
|
-
|
11
|
-
# Should there be a share bar on every post ?
|
12
|
-
# config.include_share_bar = false
|
13
|
-
|
14
|
-
# Twitter username used in the share bar
|
15
|
-
# config.twitter_username = ""
|
16
|
-
|
17
|
-
# The name of the controller method we'll call to return the current blogger.
|
18
|
-
# Change this if you use something other than current_user.
|
19
|
-
# Eg. current_admin_user (if using ActiveAdmin)
|
20
|
-
# config.current_blogger_method = :current_user
|
21
|
-
|
22
|
-
# What method do we call on blogger to show who they are?
|
23
|
-
# config.blogger_display_name_method = :username
|
24
|
-
|
25
|
-
# Which DateTime::FORMATS format do we use to display blog and comment publish time
|
26
|
-
# config.datetime_format = :short
|
27
|
-
|
28
|
-
# No. of posts to show per page
|
29
|
-
# config.posts_per_page = 5
|
30
|
-
|
31
|
-
# The name of the before filter we'll call to authenticate the current user.
|
32
|
-
# config.authentication_method = :login_required
|
33
|
-
|
34
|
-
# If set to true, the comments form will POST and DELETE to the comments
|
35
|
-
# controller using AJAX calls.
|
36
|
-
# config.ajax_comments = true
|
37
|
-
|
38
|
-
# If set to true, the create, edit, update and destroy actions
|
39
|
-
# will be included. If set to false, you'll have to set these
|
40
|
-
# yourself elsewhere in the app.
|
41
|
-
# config.include_admin_actions = true
|
42
|
-
|
43
|
-
# If set to true, links for new posts, editing posts and deleting comments
|
44
|
-
# will be available. If set to false, you'll have to set these
|
45
|
-
# yourself in the templates.
|
46
|
-
# config.include_admin_links = false
|
47
|
-
|
48
|
-
# The default format for parsing the blog content.
|
49
|
-
# config.default_parser = :markdown
|
50
|
-
|
51
|
-
# If blog content contains code, this should be highlighted using
|
52
|
-
# albino.
|
53
|
-
# config.highlight_code_syntax = true
|
54
|
-
|
55
|
-
# RSS Feed title content
|
56
|
-
# config.rss_feed_title = "A blog about ponies!"
|
57
|
-
|
58
|
-
# RSS Feed description content
|
59
|
-
# config.rss_feed_description = "Get your daily pony news here!"
|
60
|
-
|
61
|
-
# Should blogit ping search engines with your sitemap
|
62
|
-
# when posts are created, updated or destroyed?
|
63
|
-
#
|
64
|
-
# Can pass true to ping all supported search engines, or an array of search
|
65
|
-
# engine names. e.g. [:google, :bing]
|
66
|
-
#
|
67
|
-
# Defaults to false
|
68
|
-
config.ping_search_engines = true
|
69
|
-
|
70
|
-
# When using redcarpet as content parser, pass these options as defaults.
|
71
|
-
# @see here for more options: https://github.com/tanoku/redcarpet
|
72
|
-
# config.redcarpet_options = {
|
73
|
-
# hard_wrap: true,
|
74
|
-
# filter_html: true,
|
75
|
-
# autolink: true,
|
76
|
-
# no_intraemphasis: true,
|
77
|
-
# fenced_code_blocks: true,
|
78
|
-
# gh_blockcode: true
|
79
|
-
# }
|
80
|
-
|
81
|
-
# If set to true, it will be possible to call named routes of the main app
|
82
|
-
# directly, without the "main_app." prefix.
|
83
|
-
# Useful in the case where you don't want to change the main app's layout,
|
84
|
-
# but it does not expand correctly from inside blogit because some main
|
85
|
-
# app's named routes are missing.
|
86
|
-
# config.inline_main_app_named_routes = true
|
87
|
-
|
88
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# This migration comes from blogit (originally 20110814091434)
|
2
|
-
class CreateBlogitPosts < ActiveRecord::Migration
|
3
|
-
def change
|
4
|
-
create_table :blogit_posts do |t|
|
5
|
-
t.with_options(null: false) do |r|
|
6
|
-
r.string :title
|
7
|
-
r.text :body
|
8
|
-
r.string :state, default: Blogit::configuration.hidden_states.first.to_s
|
9
|
-
r.integer :comments_count, default: 0
|
10
|
-
end
|
11
|
-
t.references :blogger, polymorphic: true
|
12
|
-
t.timestamps
|
13
|
-
end
|
14
|
-
add_index :blogit_posts, [:blogger_type, :blogger_id]
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# This migration comes from blogit (originally 20110814093229)
|
2
|
-
class CreateBlogitComments < ActiveRecord::Migration
|
3
|
-
def change
|
4
|
-
create_table :blogit_comments do |t|
|
5
|
-
t.string :name, null: false
|
6
|
-
t.string :email, null: false
|
7
|
-
t.string :website
|
8
|
-
t.text :body, null: false
|
9
|
-
t.references :post, null: false
|
10
|
-
t.string :state
|
11
|
-
|
12
|
-
t.timestamps
|
13
|
-
end
|
14
|
-
add_index :blogit_comments, :post_id
|
15
|
-
end
|
16
|
-
end
|
data/spec/dummy/db/test.sqlite3
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,49 +0,0 @@
|
|
1
|
-
# FIXME: These specs are broken
|
2
|
-
# Fix when you have a minute
|
3
|
-
#
|
4
|
-
# require "spec_helper"
|
5
|
-
#
|
6
|
-
# describe PostsController do
|
7
|
-
#
|
8
|
-
# describe "routing" do
|
9
|
-
#
|
10
|
-
# before do
|
11
|
-
# # Use blogit's routes instead
|
12
|
-
# @routes = Blogit::Engine.routes
|
13
|
-
# end
|
14
|
-
#
|
15
|
-
# it "routes /posts/page/:page to posts#index with page param" do
|
16
|
-
# { get: "posts/page/2" }.should route_to({
|
17
|
-
# controller: "blogit/posts",
|
18
|
-
# action: "index",
|
19
|
-
# page: "2"
|
20
|
-
# })
|
21
|
-
# end
|
22
|
-
#
|
23
|
-
# it "routes /posts/tagged/:tag to posts#tagged with tag param" do
|
24
|
-
# { get: "posts/tagged/Spiceworld" }.should route_to({
|
25
|
-
# controller: "blogit/posts",
|
26
|
-
# action: "tagged",
|
27
|
-
# tag: "Spiceworld"
|
28
|
-
# })
|
29
|
-
# end
|
30
|
-
#
|
31
|
-
#
|
32
|
-
# describe "when Blogit.configuration.include_admin_actions is true" do
|
33
|
-
#
|
34
|
-
# before do
|
35
|
-
# Blogit.configuration.include_admin_actions = true
|
36
|
-
# end
|
37
|
-
#
|
38
|
-
# end
|
39
|
-
#
|
40
|
-
# describe "when Blogit.configuration.include_admin_actions is false" do
|
41
|
-
#
|
42
|
-
# before do
|
43
|
-
# Blogit.configuration.include_admin_actions = false
|
44
|
-
# end
|
45
|
-
#
|
46
|
-
# end
|
47
|
-
#
|
48
|
-
# end
|
49
|
-
# end
|