spud_blog 0.8.17 → 0.8.18
Sign up to get free protection for your applications and to get access to all the features.
@@ -28,7 +28,7 @@ class Spud::Admin::PostsController < Spud::Admin::ApplicationController
|
|
28
28
|
|
29
29
|
def new
|
30
30
|
@categories = SpudPostCategory.grouped
|
31
|
-
@post = SpudPost.new(:published_at => Time.zone.now, :spud_user_id => current_user.id, :spud_site_ids => [
|
31
|
+
@post = SpudPost.new(:published_at => Time.zone.now, :spud_user_id => current_user.id, :spud_site_ids => [session[:admin_site] || 0])
|
32
32
|
respond_with @post
|
33
33
|
end
|
34
34
|
|
@@ -44,7 +44,7 @@ class Spud::Admin::PostsController < Spud::Admin::ApplicationController
|
|
44
44
|
|
45
45
|
def destroy
|
46
46
|
if @post.destroy
|
47
|
-
flash[:notice] = 'Post was successfully deleted.'
|
47
|
+
flash[:notice] = 'Post was successfully deleted.'
|
48
48
|
end
|
49
49
|
respond_with @post, :location => spud_admin_posts_path
|
50
50
|
end
|
@@ -59,4 +59,4 @@ class Spud::Admin::PostsController < Spud::Admin::ApplicationController
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
-
end
|
62
|
+
end
|
@@ -3,15 +3,15 @@ xml.rss :version => "2.0" do
|
|
3
3
|
xml.channel do
|
4
4
|
xml.title "#{Spud::Core.site_name} Blog Articles"
|
5
5
|
xml.description "Blog articles for #{Spud::Core.site_name}"
|
6
|
-
xml.link
|
6
|
+
xml.link blog_url(:format => :rss)
|
7
7
|
|
8
8
|
for article in @posts
|
9
9
|
xml.item do
|
10
10
|
xml.title article.title
|
11
11
|
xml.description article.content
|
12
12
|
xml.pubDate article.created_at.to_s(:rfc822)
|
13
|
-
xml.link
|
14
|
-
xml.guid
|
13
|
+
xml.link blog_post_url(article.url_name)
|
14
|
+
xml.guid blog_post_url(article.url_name)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/lib/spud_blog/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spud_blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.18
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -281,7 +281,6 @@ files:
|
|
281
281
|
- MIT-LICENSE
|
282
282
|
- Rakefile
|
283
283
|
- Readme.markdown
|
284
|
-
- test/dummy/log/development.log
|
285
284
|
- test/fixtures/spud_post_sites.yml
|
286
285
|
- test/unit/spud_post_site_test.rb
|
287
286
|
homepage: http://github.com/davydotcom/spud_blog
|
@@ -298,7 +297,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
298
297
|
version: '0'
|
299
298
|
segments:
|
300
299
|
- 0
|
301
|
-
hash:
|
300
|
+
hash: -2103438922837053937
|
302
301
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
303
302
|
none: false
|
304
303
|
requirements:
|
@@ -307,7 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
307
306
|
version: '0'
|
308
307
|
segments:
|
309
308
|
- 0
|
310
|
-
hash:
|
309
|
+
hash: -2103438922837053937
|
311
310
|
requirements: []
|
312
311
|
rubyforge_project:
|
313
312
|
rubygems_version: 1.8.24
|
@@ -315,6 +314,5 @@ signing_key:
|
|
315
314
|
specification_version: 3
|
316
315
|
summary: Spud Blog Engine.
|
317
316
|
test_files:
|
318
|
-
- test/dummy/log/development.log
|
319
317
|
- test/fixtures/spud_post_sites.yml
|
320
318
|
- test/unit/spud_post_site_test.rb
|
@@ -1,36 +0,0 @@
|
|
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
|