spud_blog 0.7.2 → 0.7.4
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/controllers/spud/admin/post_categories_controller.rb +2 -2
- data/app/models/spud_post_sweeper.rb +7 -7
- data/lib/spud_blog/version.rb +1 -1
- data/test/dummy/config/application.rb +4 -1
- data/test/dummy/log/development.log +36 -0
- metadata +25 -25
- data/config/application.rb +0 -48
- data/config/boot.rb +0 -6
@@ -53,8 +53,8 @@ class Spud::Admin::PostCategoriesController < Spud::Admin::ApplicationController
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def expire_post_actions
|
56
|
-
expire_action news_url
|
57
|
-
expire_action blog_url
|
56
|
+
expire_action news_url if Spud::Blog.config.news_enabled
|
57
|
+
expire_action blog_url if Spud::Blog.config.blog_enabled
|
58
58
|
end
|
59
59
|
|
60
60
|
end
|
@@ -14,24 +14,24 @@ class SpudPostSweeper < ActionController::Caching::Sweeper
|
|
14
14
|
|
15
15
|
def expire_cache_for(record)
|
16
16
|
if Spud::Blog.config.enable_action_caching
|
17
|
-
expire_action spud_blog_sitemap_url
|
18
|
-
if record.is_news
|
19
|
-
expire_action blog_url
|
17
|
+
expire_action spud_blog_sitemap_url if Spud::Blog.config.blog_enabled
|
18
|
+
if !record.is_news && Spud::Blog.config.blog_enabled
|
19
|
+
expire_action blog_url
|
20
20
|
expire_action blog_url(:format => :rss)
|
21
21
|
expire_action blog_post_url(record.url_name)
|
22
|
-
|
22
|
+
elsif Spud::Blog.config.news_enabled
|
23
23
|
expire_action news_url
|
24
24
|
expire_action news_url(:format => :rss)
|
25
25
|
expire_action news_post_url(record.url_name)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
if Spud::Blog.config.enable_full_page_caching
|
29
|
-
expire_page spud_blog_sitemap_path(:format => :xml)
|
30
|
-
if record.is_news
|
29
|
+
expire_page spud_blog_sitemap_path(:format => :xml) if Spud::Blog.config.blog_enabled
|
30
|
+
if record.is_news && Spud::Blog.config.news_enabled
|
31
31
|
expire_page news_path
|
32
32
|
expire_page news_path(:format => :rss)
|
33
33
|
expire_page news_post_path(record.url_name)
|
34
|
-
|
34
|
+
elsif Spud::Blog.config.blog_enabled
|
35
35
|
expire_page blog_path
|
36
36
|
expire_page blog_path(:format => :rss)
|
37
37
|
expire_page blog_post_path(record.url_name)
|
data/lib/spud_blog/version.rb
CHANGED
@@ -48,7 +48,10 @@ module Dummy
|
|
48
48
|
|
49
49
|
# Enable the asset pipeline
|
50
50
|
config.assets.enabled = true
|
51
|
-
|
51
|
+
config.generators do |g|
|
52
|
+
g.test_framework :rspec
|
53
|
+
g.integration_tool :rspec
|
54
|
+
end
|
52
55
|
# Version of your assets, change this if you want to expire all your assets
|
53
56
|
config.assets.version = '1.0'
|
54
57
|
end
|
@@ -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
|
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.7.
|
4
|
+
version: 0.7.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &70207980310320 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 3.2.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70207980310320
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: spud_core
|
27
|
-
requirement: &
|
27
|
+
requirement: &70207980309820 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.7.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70207980309820
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: spud_permalinks
|
38
|
-
requirement: &
|
38
|
+
requirement: &70207980309360 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.0.1
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70207980309360
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: mysql2
|
49
|
-
requirement: &
|
49
|
+
requirement: &70207980325340 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70207980325340
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &70207980324880 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70207980324880
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec-rails
|
71
|
-
requirement: &
|
71
|
+
requirement: &70207980324460 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70207980324460
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: factory_girl
|
82
|
-
requirement: &
|
82
|
+
requirement: &70207980323960 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - =
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 2.5.0
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70207980323960
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: mocha
|
93
|
-
requirement: &
|
93
|
+
requirement: &70207980323460 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - =
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 0.10.3
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70207980323460
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: database_cleaner
|
104
|
-
requirement: &
|
104
|
+
requirement: &70207980323000 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - =
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
version: 0.7.1
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70207980323000
|
113
113
|
description: Spud blogging/news and rss engine.
|
114
114
|
email:
|
115
115
|
- greg@westlakedesign.com
|
@@ -174,8 +174,6 @@ files:
|
|
174
174
|
- app/views/spud/admin/posts/index.html.erb
|
175
175
|
- app/views/spud/admin/posts/new.html.erb
|
176
176
|
- app/views/spud/blog/sitemaps/show.xml.builder
|
177
|
-
- config/application.rb
|
178
|
-
- config/boot.rb
|
179
177
|
- config/routes.rb
|
180
178
|
- db/migrate/20120125180945_create_spud_posts.rb
|
181
179
|
- db/migrate/20120125181022_create_spud_post_categories.rb
|
@@ -216,6 +214,7 @@ files:
|
|
216
214
|
- test/dummy/config/routes.rb
|
217
215
|
- test/dummy/config.ru
|
218
216
|
- test/dummy/db/schema.rb
|
217
|
+
- test/dummy/log/development.log
|
219
218
|
- test/dummy/public/404.html
|
220
219
|
- test/dummy/public/422.html
|
221
220
|
- test/dummy/public/500.html
|
@@ -237,7 +236,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
237
236
|
version: '0'
|
238
237
|
segments:
|
239
238
|
- 0
|
240
|
-
hash:
|
239
|
+
hash: 3201644603181069855
|
241
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
242
241
|
none: false
|
243
242
|
requirements:
|
@@ -246,10 +245,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
245
|
version: '0'
|
247
246
|
segments:
|
248
247
|
- 0
|
249
|
-
hash:
|
248
|
+
hash: 3201644603181069855
|
250
249
|
requirements: []
|
251
250
|
rubyforge_project:
|
252
|
-
rubygems_version: 1.8.
|
251
|
+
rubygems_version: 1.8.15
|
253
252
|
signing_key:
|
254
253
|
specification_version: 3
|
255
254
|
summary: Spud Blog Engine.
|
@@ -276,6 +275,7 @@ test_files:
|
|
276
275
|
- test/dummy/config/routes.rb
|
277
276
|
- test/dummy/config.ru
|
278
277
|
- test/dummy/db/schema.rb
|
278
|
+
- test/dummy/log/development.log
|
279
279
|
- test/dummy/public/404.html
|
280
280
|
- test/dummy/public/422.html
|
281
281
|
- test/dummy/public/500.html
|
data/config/application.rb
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
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
|
11
|
-
|
12
|
-
module SpudTest
|
13
|
-
class Application < Rails::Application
|
14
|
-
# Settings in config/environments/* take precedence over those specified here.
|
15
|
-
# Application configuration should go into files in config/initializers
|
16
|
-
# -- all .rb files in that directory are automatically loaded.
|
17
|
-
|
18
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
19
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
20
|
-
|
21
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
22
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
23
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
24
|
-
|
25
|
-
# Activate observers that should always be running.
|
26
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
27
|
-
|
28
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
29
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
30
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
31
|
-
|
32
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
33
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
34
|
-
# config.i18n.default_locale = :de
|
35
|
-
|
36
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
-
config.encoding = "utf-8"
|
38
|
-
|
39
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
-
config.filter_parameters += [:password]
|
41
|
-
|
42
|
-
# Enable the asset pipeline
|
43
|
-
config.assets.enabled = true
|
44
|
-
|
45
|
-
# Version of your assets, change this if you want to expire all your assets
|
46
|
-
config.assets.version = '1.0'
|
47
|
-
end
|
48
|
-
end
|