spud_blog 0.8.18 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/assets/images/spud/admin/news_thumb@2x.png +0 -0
- data/app/assets/javascripts/spud/admin/post_categories.js +116 -2
- data/app/assets/javascripts/spud/admin/posts.js +52 -10
- data/app/assets/stylesheets/spud/admin/posts.css +93 -38
- data/app/controllers/blog_controller.rb +2 -4
- data/app/controllers/news_controller.rb +4 -4
- data/app/controllers/spud/admin/news_posts_controller.rb +2 -2
- data/app/controllers/spud/admin/post_categories_controller.rb +14 -8
- data/app/controllers/spud/admin/posts_controller.rb +1 -1
- data/app/controllers/spud/blog/sitemaps_controller.rb +2 -2
- data/app/models/spud_post_categories_post.rb +5 -0
- data/app/models/spud_post_category.rb +12 -7
- data/app/models/spud_post_category_sweeper.rb +3 -3
- data/app/models/spud_post_comment_sweeper.rb +4 -4
- data/app/models/spud_post_sweeper.rb +5 -5
- data/app/views/blog/index.html.erb +6 -2
- data/app/views/blog/show.html.erb +1 -1
- data/app/views/news/index.html.erb +6 -2
- data/app/views/news/show.html.erb +2 -2
- data/app/views/spud/admin/news_posts/index.html.erb +6 -1
- data/app/views/spud/admin/news_posts/new.html.erb +1 -1
- data/app/views/spud/admin/post_categories/_category.html.erb +14 -0
- data/app/views/spud/admin/post_categories/_form.html.erb +17 -27
- data/app/views/spud/admin/post_categories/edit.html.erb +1 -1
- data/app/views/spud/admin/post_categories/index.html.erb +6 -29
- data/app/views/spud/admin/posts/_category.html.erb +7 -7
- data/app/views/spud/admin/posts/_form.html.erb +70 -67
- data/app/views/spud/admin/posts/index.html.erb +5 -0
- data/app/views/spud/admin/posts/new.html.erb +1 -1
- data/db/migrate/20121113135812_add_nested_set_to_post_categories.rb +21 -0
- data/lib/spud_blog/configuration.rb +3 -4
- data/lib/spud_blog/engine.rb +6 -6
- data/lib/spud_blog/version.rb +1 -1
- data/test/dummy/log/development.log +36 -0
- metadata +44 -19
- data/app/assets/javascripts/spud/admin/news_posts.js +0 -2
- data/app/assets/javascripts/spud/admin/post_comments.js +0 -2
- data/app/assets/stylesheets/spud/admin/news_posts.css +0 -4
- data/app/assets/stylesheets/spud/admin/post_categories.css +0 -4
- data/app/assets/stylesheets/spud/admin/post_comments.css +0 -4
- data/app/views/layouts/spud/admin/post.html.erb +0 -5
- data/app/views/spud/admin/post_categories/show.html.erb +0 -0
@@ -1,3 +1,7 @@
|
|
1
|
+
<% content_for :title do %>
|
2
|
+
News | <%=current_site_name%>
|
3
|
+
<% end %>
|
4
|
+
|
1
5
|
<% content_for :head do %>
|
2
6
|
<%= spud_news_rss_link %>
|
3
7
|
<% end %>
|
@@ -19,7 +23,7 @@
|
|
19
23
|
<h3><%= link_to post.title, news_post_path(post.url_name) %></h3>
|
20
24
|
<h4>Posted by <%= post.author.full_name %> on <%= post.display_date %></h4>
|
21
25
|
<div class="spud_news_post_content">
|
22
|
-
<%=
|
26
|
+
<%= truncate_html post.content.html_safe, :length => 250 %>
|
23
27
|
</div>
|
24
28
|
</div>
|
25
29
|
<% end %>
|
@@ -28,4 +32,4 @@
|
|
28
32
|
<% end %>
|
29
33
|
</div>
|
30
34
|
|
31
|
-
<%= will_paginate @posts %>
|
35
|
+
<%= will_paginate @posts %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% content_for :title do %>
|
2
|
-
<%= @post.title %> | <%=
|
2
|
+
<%= @post.title %> | <%=current_site_name%>
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :head do %>
|
@@ -24,4 +24,4 @@
|
|
24
24
|
<div id="spud_news_post_content">
|
25
25
|
<%= raw @post.content %>
|
26
26
|
</div>
|
27
|
-
</div>
|
27
|
+
</div>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<%= content_for :data_controls do %>
|
2
|
+
<%= link_to "Manage Categories", spud_admin_post_categories_path, :class => 'btn spud_blog_manage_categories', :title => 'Manage Categories' %>
|
2
3
|
<%= link_to "New Post", new_spud_admin_news_post_path, :class => "btn btn-primary", :title => "New Post" %>
|
3
4
|
<% end %>
|
4
5
|
|
@@ -27,7 +28,7 @@
|
|
27
28
|
<td><%= post.author.full_name %></td>
|
28
29
|
<td><%= link_to(post.published_at.strftime('%m/%d/%Y'), news_post_path(post.url_name)) %></td>
|
29
30
|
<td align="right">
|
30
|
-
<%= link_to 'Delete', spud_admin_news_post_path(post), :method => :delete, :confirm => 'Are you sure you want to delete this post?', :class => 'btn btn-danger' %>
|
31
|
+
<%= link_to 'Delete', spud_admin_news_post_path(post), :method => :delete, :confirm => 'Are you sure you want to delete this post?', :class => 'btn btn-small btn-danger' %>
|
31
32
|
</td>
|
32
33
|
</tr>
|
33
34
|
<%end%>
|
@@ -36,4 +37,8 @@
|
|
36
37
|
<div class="spud_admin_pagination">
|
37
38
|
<%= will_paginate @posts %>
|
38
39
|
</div>
|
40
|
+
|
41
|
+
<script>
|
42
|
+
$(document).ready(Spud.Admin.PostCategories.index);
|
43
|
+
</script>
|
39
44
|
<%end%>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<%= content_tag :li, :class => 'spud_blog_category_manager_item', 'data-id' => category.id do %>
|
2
|
+
<span class="spud_blog_category_manager_item_name">
|
3
|
+
<%= category.name %>
|
4
|
+
</span>
|
5
|
+
<span class="spud_blog_category_manager_item_actions">
|
6
|
+
<%= link_to 'Edit', edit_spud_admin_post_category_path(category), :class => 'btn btn-mini spud_blog_category_edit' %>
|
7
|
+
<%= link_to 'Delete', spud_admin_post_category_path(category), :class => 'btn btn-mini btn-danger spud_blog_category_delete' %>
|
8
|
+
</span>
|
9
|
+
<ul class="spud_blog_category_manager_item_children">
|
10
|
+
<% if @post_categories[category.id] %>
|
11
|
+
<%= render :partial => 'category', :collection => @post_categories[category.id] %>
|
12
|
+
<% end %>
|
13
|
+
</ul>
|
14
|
+
<% end %>
|
@@ -1,33 +1,23 @@
|
|
1
|
-
<%= form_for @post_category, :url =>
|
2
|
-
|
1
|
+
<%= form_for @post_category, :url => (@post_category.new_record? ? spud_admin_post_categories_path : spud_admin_post_category_path(@post_category)), :html => {:class => 'form-horizontal spud_post_category_form'} do |f| %>
|
2
|
+
|
3
|
+
<%= error_messages_for(f.object) %>
|
3
4
|
|
4
5
|
<fieldset>
|
5
|
-
<
|
6
|
-
|
7
|
-
<div class="
|
8
|
-
<%= f.
|
9
|
-
<div class="controls">
|
10
|
-
<%= f.text_field :name %>
|
11
|
-
</div>
|
6
|
+
<div class="control-group">
|
7
|
+
<%= f.label :name,"Name",:class => "control-label" %>
|
8
|
+
<div class="controls">
|
9
|
+
<%= f.text_field :name %>
|
12
10
|
</div>
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
</
|
11
|
+
</div>
|
12
|
+
<div class="control-group">
|
13
|
+
<%= label_tag :parent,'Parent',:class => "control-label" %>
|
14
|
+
<div class="controls">
|
15
|
+
<select name="spud_post_category[parent_id]">
|
16
|
+
<option value="">No Parent</option>
|
17
|
+
<%= options_for_select(SpudPostCategory.options_for_categories(:filter => @post_category.id), @post_category.parent_id) %>
|
18
|
+
</select>
|
21
19
|
</div>
|
22
|
-
|
20
|
+
</div>
|
23
21
|
</fieldset>
|
24
22
|
|
25
|
-
|
26
|
-
<%=f.submit "Save Post Category", :class=>"btn btn-primary form-btn","data-loading-text"=>"Saving..."%> or <%=link_to "cancel",request.referer,:class => "btn"%>
|
27
|
-
</div>
|
28
|
-
|
29
|
-
<% end %>
|
30
|
-
|
31
|
-
<script type="text/javascript">
|
32
|
-
$(document).ready(Spud.Admin.Posts.edit);
|
33
|
-
</script>
|
23
|
+
<% end %>
|
@@ -1 +1 @@
|
|
1
|
-
<%= render :partial => 'form'
|
1
|
+
<%= render :partial => 'form' %>
|
@@ -1,29 +1,6 @@
|
|
1
|
-
|
2
|
-
<%= link_to "New Post Category", new_spud_admin_post_category_path, :class => "btn btn-primary", :title => "New Post Category" %>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<thead>
|
8
|
-
<tr>
|
9
|
-
<th>Name</th>
|
10
|
-
<th># Occurances</th>
|
11
|
-
<th> </th>
|
12
|
-
</tr>
|
13
|
-
</thead>
|
14
|
-
<tbody>
|
15
|
-
<% @post_categories.each do |category| %>
|
16
|
-
<tr>
|
17
|
-
<td><%= link_to category.name, edit_spud_admin_post_category_path(category) %></td>
|
18
|
-
<td><%= category.posts.size %></td>
|
19
|
-
<td align="right">
|
20
|
-
<%= link_to 'Delete', spud_admin_post_category_path(category), :method => :delete, :confirm => 'Are you sure you want to delete this category?', :class => 'btn btn-danger' %>
|
21
|
-
</td>
|
22
|
-
</tr>
|
23
|
-
<%end%>
|
24
|
-
</tbody>
|
25
|
-
</table>
|
26
|
-
<div class="spud_admin_pagination">
|
27
|
-
<%= will_paginate @post_categories %>
|
28
|
-
</div>
|
29
|
-
<%end%>
|
1
|
+
<div class="spud_blog_category_manager">
|
2
|
+
<%= link_to "New Post Category", new_spud_admin_post_category_path, :class => "btn btn-small btn-primary spud_blog_category_add_new", :title => "New Post Category" %>
|
3
|
+
<ul class="spud_blog_category_manager_list">
|
4
|
+
<%= render :partial => 'category', :collection => @post_categories[nil] %>
|
5
|
+
</ul>
|
6
|
+
</div>
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
1
|
+
<%= content_tag :li, :class => 'spud_post_form_category', 'data-id' => category.id do %>
|
2
2
|
<%= check_box_tag 'spud_post[category_ids][]', category.id, @post.category_ids.include?(category.id), :id => "spud_post_category_#{category.id}" %>
|
3
3
|
<%= label_tag "spud_post_category_#{category.id}", category.name %>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
<ul>
|
5
|
+
<% if @categories[category.id] %>
|
6
|
+
<%= render :partial => '/spud/admin/posts/category', :collection => @categories[category.id] %>
|
7
|
+
<% end %>
|
8
|
+
</ul>
|
9
|
+
<% end %>
|
@@ -1,24 +1,14 @@
|
|
1
1
|
<%=error_messages_for(f.object)%>
|
2
2
|
|
3
3
|
<fieldset>
|
4
|
-
|
5
|
-
|
6
|
-
<%=f.text_field :title, :class => "full-width",:placeholder=>"Enter title here"%>
|
7
|
-
</div>
|
4
|
+
<%= f.label :title, :required=>true,:style =>"display:none;" %>
|
5
|
+
<%= f.text_field :title, :class => "full-width",:placeholder=>"Enter title here" %>
|
8
6
|
</fieldset>
|
9
7
|
|
10
8
|
<div>
|
11
9
|
<%= f.text_area :content,:style => "width:100%;", :class => 'tinymce full-width' %>
|
12
10
|
</div>
|
13
11
|
|
14
|
-
<fieldset>
|
15
|
-
<legend>Categories</legend>
|
16
|
-
<input type="hidden" name="spud_post[category_ids][]" value="" />
|
17
|
-
<ul id="spud_post_categories_form">
|
18
|
-
<%= render :partial => '/spud/admin/posts/category', :collection => @categories[0] %>
|
19
|
-
</ul>
|
20
|
-
</fieldset>
|
21
|
-
|
22
12
|
<% if Spud::Blog.config.has_custom_fields %>
|
23
13
|
<fieldset>
|
24
14
|
<legend>Custom Fields</legend>
|
@@ -26,71 +16,84 @@
|
|
26
16
|
</fieldset>
|
27
17
|
<% end %>
|
28
18
|
|
29
|
-
|
30
|
-
<fieldset id="spud_post_site_options">
|
31
|
-
<legend>Sites</legend>
|
32
|
-
<div class="control-group">
|
33
|
-
<div class="controls">
|
34
|
-
<span class="help-block"><b>Choose which websites you would like to publish to:</b></span>
|
35
|
-
<%= spud_post_site_check_box_tag(Spud::Core.default_site_config, @post) %>
|
36
|
-
<%= spud_post_site_label_tag(Spud::Core.default_site_config) %>
|
37
|
-
<% Spud::Core.config.multisite_config.each do |site| %>
|
38
|
-
<%= spud_post_site_check_box_tag(site, @post) %>
|
39
|
-
<%= spud_post_site_label_tag(site) %>
|
40
|
-
<% end %>
|
41
|
-
</div>
|
42
|
-
</div>
|
43
|
-
</fieldset>
|
44
|
-
<% end %>
|
45
|
-
|
46
|
-
<fieldset>
|
19
|
+
<fieldset class="spud_post_form_fieldset">
|
47
20
|
<legend>Advanced</legend>
|
48
21
|
|
49
|
-
<div class="
|
50
|
-
|
51
|
-
|
22
|
+
<div class="spud_post_form_col">
|
23
|
+
<h4>Meta Data</h4>
|
24
|
+
|
25
|
+
<div class="spud_post_form_row">
|
26
|
+
<%= f.label :published_at, 'Publish Date' %>
|
52
27
|
<%= f.text_field :published_at,:value => f.object.published_at.strftime("%Y-%m-%d %H:%M") , :class => 'spud_form_date_picker' %>
|
53
28
|
</div>
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
29
|
+
|
30
|
+
<% if @current_user.super_admin %>
|
31
|
+
<div class="spud_post_form_row">
|
32
|
+
<%= f.label :spud_user_id, 'Author' %>
|
33
|
+
<%= f.select :spud_user_id,options_for_select(SpudUser.order(:first_name,:last_name,:login).all.collect{|user| [user.full_name,user.id]},f.object.spud_user_id)%>
|
34
|
+
</div>
|
35
|
+
<% else %>
|
36
|
+
<%= f.hidden_field :spud_user_id %>
|
37
|
+
<% end %>
|
38
|
+
|
39
|
+
<% if Spud::Core.config.multisite_mode_enabled %>
|
40
|
+
<div class="spud_post_form_row">
|
41
|
+
<%= f.label :sites, 'Websites to Publish' %>
|
42
|
+
<div class="spud_post_form_input_group">
|
43
|
+
<%= spud_post_site_check_box_tag(Spud::Core.default_site_config, @post) %>
|
44
|
+
<%= spud_post_site_label_tag(Spud::Core.default_site_config) %>
|
45
|
+
<% Spud::Core.config.multisite_config.each do |site| %>
|
46
|
+
<%= spud_post_site_check_box_tag(site, @post) %>
|
47
|
+
<%= spud_post_site_label_tag(site) %>
|
48
|
+
<% end %>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
<% end %>
|
52
|
+
|
53
|
+
<div class="spud_post_form_row">
|
54
|
+
<%= f.label :visible %>
|
55
|
+
<div class="spud_post_form_input_group">
|
56
|
+
<%= f.radio_button :visible, true %>
|
57
|
+
<label class="radio inline" for="spud_post_visible_true">Yes</label>
|
58
|
+
<%= f.radio_button :visible, false %>
|
59
|
+
<label class="radio inline" for="spud_post_visible_false">No</label>
|
60
60
|
</div>
|
61
61
|
</div>
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
62
|
+
|
63
|
+
<% unless @post.is_news %>
|
64
|
+
<div class="spud_post_form_row">
|
65
|
+
<%= f.label :comments_enabled,"Comments Enabled" %>
|
66
|
+
<div class="spud_post_form_input_group">
|
67
|
+
<%= f.radio_button :comments_enabled, true %>
|
68
|
+
<label class="radio inline" for="spud_post_comments_enabled_true">Yes</label>
|
69
|
+
<%= f.radio_button :comments_enabled, false %>
|
70
|
+
<label class="radio inline" for="spud_post_comments_enabled_false">No</label>
|
71
|
+
</div>
|
72
|
+
</div>
|
73
|
+
<% end %>
|
74
|
+
|
75
|
+
<div class="spud_post_form_row">
|
76
|
+
<%= f.label :meta_keywords, 'Keywords' %>
|
77
|
+
<%= f.text_field :meta_keywords %>
|
78
|
+
<span class="spud_post_form_help_block">A Comma seperated list of keywords for search engines. Keep it short (no more than 10 keywords)</span>
|
76
79
|
</div>
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
<span class="help-block">A short description of the article. This is what appears on a search engines search result page.</span>
|
80
|
+
|
81
|
+
<div class="spud_post_form_row">
|
82
|
+
<%= f.label :meta_description, 'Description' %>
|
83
|
+
<%= f.text_area :meta_description %>
|
84
|
+
<span class="spud_post_form_help_block">A short description of the article. This is what appears on a search engines search result page.</span>
|
83
85
|
</div>
|
84
86
|
</div>
|
85
|
-
|
86
|
-
<div class="
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
87
|
+
|
88
|
+
<div class="spud_post_form_col">
|
89
|
+
<h4>Categories</h4>
|
90
|
+
<%= link_to 'Add Category', new_spud_admin_post_category_path, :class => 'btn btn-mini spud_post_add_category' %>
|
91
|
+
<input type="hidden" name="spud_post[category_ids][]" value="" />
|
92
|
+
<ul class="spud_post_categories_form">
|
93
|
+
<%= render :partial => '/spud/admin/posts/category', :collection => @categories[nil] %>
|
94
|
+
</ul>
|
91
95
|
</div>
|
92
|
-
|
93
|
-
</ol>
|
96
|
+
|
94
97
|
</fieldset>
|
95
98
|
<%= f.hidden_field :is_news %>
|
96
99
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<%= content_for :data_controls do %>
|
2
|
+
<%= link_to "Manage Categories", spud_admin_post_categories_path, :class => 'btn spud_blog_manage_categories', :title => 'Manage Categories' %>
|
2
3
|
<%= link_to "New Post", new_spud_admin_post_path, :class => "btn btn-primary", :title => "New Post" %>
|
3
4
|
<% end %>
|
4
5
|
|
@@ -37,4 +38,8 @@
|
|
37
38
|
<div class="spud_admin_pagination">
|
38
39
|
<%= will_paginate @posts %>
|
39
40
|
</div>
|
41
|
+
|
42
|
+
<script>
|
43
|
+
$(document).ready(Spud.Admin.PostCategories.index);
|
44
|
+
</script>
|
40
45
|
<%end%>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class AddNestedSetToPostCategories < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
change_table :spud_post_categories do |t|
|
4
|
+
t.integer :lft
|
5
|
+
t.integer :rgt
|
6
|
+
t.integer :depth
|
7
|
+
end
|
8
|
+
|
9
|
+
# Populates lft, rgt, and depth values for nested set
|
10
|
+
SpudPostCategory.where(:parent_id => 0).update_all({:parent_id => nil})
|
11
|
+
SpudPostCategory.rebuild!
|
12
|
+
end
|
13
|
+
|
14
|
+
def down
|
15
|
+
change_table :spud_post_categories do |t|
|
16
|
+
t.remove :ltf
|
17
|
+
t.remove :rgt
|
18
|
+
t.remove :depth
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -5,8 +5,8 @@ module Spud
|
|
5
5
|
:base_layout, :news_layout, :blog_enabled,
|
6
6
|
:news_enabled, :posts_per_page, :blog_path,
|
7
7
|
:news_path, :enable_sitemap, :has_custom_fields,
|
8
|
-
:
|
9
|
-
:
|
8
|
+
:cache_mode, :action_caching_duration,
|
9
|
+
:enable_rakismet
|
10
10
|
)
|
11
11
|
self.base_layout = 'application'
|
12
12
|
self.news_layout = nil
|
@@ -17,9 +17,8 @@ module Spud
|
|
17
17
|
self.news_path = 'news'
|
18
18
|
self.enable_sitemap = true
|
19
19
|
self.has_custom_fields = false
|
20
|
-
self.
|
20
|
+
self.cache_mode = nil #options :full_page, :action
|
21
21
|
self.action_caching_duration = 3600
|
22
|
-
self.enable_full_page_caching = false
|
23
22
|
self.enable_rakismet = false
|
24
23
|
end
|
25
24
|
end
|
data/lib/spud_blog/engine.rb
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
require 'spud_core'
|
2
|
+
require 'awesome_nested_set'
|
3
|
+
require 'spud_permalinks'
|
4
|
+
require 'truncate_html'
|
5
|
+
|
2
6
|
module Spud
|
3
7
|
module Blog
|
4
8
|
class Engine < Rails::Engine
|
@@ -13,12 +17,6 @@ module Spud
|
|
13
17
|
|
14
18
|
engine_name :spud_blog
|
15
19
|
initializer :admin do
|
16
|
-
Spud::Core.config.admin_applications += [{
|
17
|
-
:name => 'Post Categories',
|
18
|
-
:thumbnail => 'spud/admin/posts_thumb.png',
|
19
|
-
:url => '/spud/admin/post_categories',
|
20
|
-
:order => 3
|
21
|
-
}]
|
22
20
|
if Spud::Blog.enable_sitemap == true
|
23
21
|
Spud::Core.config.sitemap_urls += [:spud_blog_sitemap_url]
|
24
22
|
end
|
@@ -41,6 +39,8 @@ module Spud
|
|
41
39
|
end
|
42
40
|
initializer :assets do
|
43
41
|
Rails.application.config.assets.precompile += ['spud/admin/posts.css','spud/blog/validity.css']
|
42
|
+
Spud::Core.append_admin_javascripts('spud/admin/posts')
|
43
|
+
Spud::Core.append_admin_stylesheets('spud/admin/posts')
|
44
44
|
end
|
45
45
|
initializer :associations do
|
46
46
|
SpudUser.class_eval do
|
data/lib/spud_blog/version.rb
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
Mysql2::Error: Table 'spud_blog_development.spud_users' doesn't exist: SHOW FULL FIELDS FROM `spud_users`
|
2
|
+
Mysql2::Error: Table 'spud_blog_development.spud_users' doesn't exist: SHOW FULL FIELDS FROM `spud_users`
|
3
|
+
Mysql2::Error: Table 'spud_blog_development.spud_users' doesn't exist: SHOW FULL FIELDS FROM `spud_users`
|
4
|
+
[1m[36m (153.8ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
5
|
+
[1m[35m (287.7ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
6
|
+
[1m[36m (0.2ms)[0m [1mSELECT `schema_migrations`.`version` FROM `schema_migrations` [0m
|
7
|
+
Migrating to CreateSpudPosts (20120125180945)
|
8
|
+
[1m[35m (163.8ms)[0m CREATE TABLE `spud_posts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_user_id` int(11), `title` varchar(255), `content` text, `comments_enabled` tinyint(1) DEFAULT 0, `visible` tinyint(1) DEFAULT 1, `published_at` datetime, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
|
9
|
+
[1m[36m (225.6ms)[0m [1mCREATE INDEX `index_spud_posts_on_spud_user_id` ON `spud_posts` (`spud_user_id`)[0m
|
10
|
+
[1m[35m (178.6ms)[0m CREATE INDEX `index_spud_posts_on_visible` ON `spud_posts` (`visible`)
|
11
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120125180945')[0m
|
12
|
+
Migrating to CreateSpudPostCategories (20120125181022)
|
13
|
+
[1m[35m (214.2ms)[0m CREATE TABLE `spud_post_categories` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
|
14
|
+
[1m[36m (209.6ms)[0m [1mCREATE TABLE `spud_post_categories_posts` (`spud_post_id` int(11), `spud_post_category_id` int(11)) ENGINE=InnoDB[0m
|
15
|
+
[1m[35m (182.2ms)[0m CREATE INDEX `index_spud_post_categories_posts_on_spud_post_category_id` ON `spud_post_categories_posts` (`spud_post_category_id`)
|
16
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120125181022')[0m
|
17
|
+
Migrating to CreateSpudPostComments (20120125181359)
|
18
|
+
[1m[35m (171.4ms)[0m CREATE TABLE `spud_post_comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_post_id` int(11), `author` varchar(255), `content` text, `approved` tinyint(1) DEFAULT 0, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
|
19
|
+
[1m[36m (237.9ms)[0m [1mCREATE INDEX `index_spud_post_comments_on_spud_post_id` ON `spud_post_comments` (`spud_post_id`)[0m
|
20
|
+
[1m[35m (227.0ms)[0m CREATE INDEX `index_spud_post_comments_on_approved` ON `spud_post_comments` (`approved`)
|
21
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120125181359')[0m
|
22
|
+
Migrating to AddUrlToSpudPosts (20120127143054)
|
23
|
+
[1m[35m (239.3ms)[0m ALTER TABLE `spud_posts` ADD `url_name` varchar(255)
|
24
|
+
[1m[36m (234.5ms)[0m [1mCREATE INDEX `index_spud_posts_on_url_name` ON `spud_posts` (`url_name`)[0m
|
25
|
+
[1m[35m (0.6ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120127143054')
|
26
|
+
Migrating to AddUrlToSpudPostCategories (20120127144942)
|
27
|
+
[1m[36m (196.9ms)[0m [1mALTER TABLE `spud_post_categories` ADD `parent_id` int(11) DEFAULT 0[0m
|
28
|
+
[1m[35m (220.7ms)[0m ALTER TABLE `spud_post_categories` ADD `url_name` varchar(255)
|
29
|
+
[1m[36m (179.0ms)[0m [1mCREATE INDEX `index_spud_post_categories_on_parent_id` ON `spud_post_categories` (`parent_id`)[0m
|
30
|
+
[1m[35m (178.4ms)[0m CREATE INDEX `index_spud_post_categories_on_url_name` ON `spud_post_categories` (`url_name`)
|
31
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120127144942')[0m
|
32
|
+
Migrating to AddIsNewsToSpudPosts (20120210165540)
|
33
|
+
[1m[35m (207.1ms)[0m ALTER TABLE `spud_posts` ADD `is_news` tinyint(1) DEFAULT 0
|
34
|
+
[1m[36m (212.3ms)[0m [1mCREATE INDEX `index_spud_posts_on_is_news` ON `spud_posts` (`is_news`)[0m
|
35
|
+
[1m[35m (0.8ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120210165540')
|
36
|
+
[1m[36m (0.2ms)[0m [1mSELECT `schema_migrations`.`version` FROM `schema_migrations` [0m
|