blog_logic 1.1.5 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/models/blog_category.rb +1 -1
- data/app/models/post.rb +1 -1
- data/app/models/post2.rb +4 -3
- data/blog_logic.gemspec +2 -2
- data/spec/models/post_spec.rb +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.6
|
data/app/models/blog_category.rb
CHANGED
data/app/models/post.rb
CHANGED
data/app/models/post2.rb
CHANGED
@@ -14,6 +14,7 @@ class Post2
|
|
14
14
|
|
15
15
|
# Mongoid ========================================================================================
|
16
16
|
field :title
|
17
|
+
field :title_short # because "title" is often too long for a decent layout
|
17
18
|
field :content
|
18
19
|
field :tags, :type => Array
|
19
20
|
field :slug
|
@@ -68,7 +69,7 @@ class Post2
|
|
68
69
|
end
|
69
70
|
|
70
71
|
def humanize_path
|
71
|
-
"/#{self.slug}
|
72
|
+
"/#{self.slug}".gsub('//', '/')
|
72
73
|
end
|
73
74
|
|
74
75
|
def my_index
|
@@ -92,7 +93,7 @@ class Post2
|
|
92
93
|
end
|
93
94
|
|
94
95
|
def publish!
|
95
|
-
self.update_attributes
|
96
|
+
self.update_attributes :state => 'published', :published_at => Time.zone.now
|
96
97
|
end
|
97
98
|
|
98
99
|
def published?
|
@@ -113,7 +114,7 @@ class Post2
|
|
113
114
|
end
|
114
115
|
|
115
116
|
def unpublish!
|
116
|
-
self.update_attributes :state => 'draft'
|
117
|
+
self.update_attributes :state => 'draft'
|
117
118
|
end
|
118
119
|
|
119
120
|
def state=(arg)
|
data/blog_logic.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "blog_logic"
|
8
|
-
s.version = "1.1.
|
8
|
+
s.version = "1.1.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bantik"]
|
12
|
-
s.date = "2011-09-
|
12
|
+
s.date = "2011-09-21"
|
13
13
|
s.description = "An engine for search-engine-optimized blog management."
|
14
14
|
s.email = "corey@seologic.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/models/post_spec.rb
CHANGED
@@ -10,11 +10,11 @@ describe Post do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
it 'returns its relative URL' do
|
13
|
-
@blog.posts.new(:slug => 'foo').full_path.should == '/my-blog/foo
|
13
|
+
@blog.posts.new(:slug => 'foo').full_path.should == '/my-blog/foo'
|
14
14
|
end
|
15
15
|
|
16
16
|
it 'returns its formatted slug' do
|
17
|
-
@blog.posts.new(:slug => 'foo').humanize_path.should == '/foo
|
17
|
+
@blog.posts.new(:slug => 'foo').humanize_path.should == '/foo'
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'publishes, setting its publication date' do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blog_logic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 6
|
10
|
+
version: 1.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Bantik
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-21 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: bson_ext
|