toto 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/lib/toto.rb +4 -1
  3. data/test/toto_test.rb +1 -0
  4. data/toto.gemspec +1 -1
  5. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
data/lib/toto.rb CHANGED
@@ -201,8 +201,11 @@ module Toto
201
201
  "http://#{(@config[:url].sub("http://", '') + self.path).squeeze('/')}"
202
202
  end
203
203
 
204
+ def body
205
+ markdown self[:body].sub(@config[:summary][:delim], '') rescue markdown self[:body]
206
+ end
207
+
204
208
  def title() self[:title] || "an article" end
205
- def body() markdown self[:body] end
206
209
  def date() @config[:date, self[:date]] end
207
210
  def path() self[:date].strftime("/%Y/%m/%d/#{slug}/") end
208
211
  def author() self[:author] || @config[:author] end
data/test/toto_test.rb CHANGED
@@ -111,6 +111,7 @@ context Toto do
111
111
  end
112
112
 
113
113
  should("split the article at the delimiter") { topic.summary }.equals "Well,\nhello"
114
+ should("not have the delimiter in the body") { topic.body !~ /~/ }
114
115
  end
115
116
 
116
117
  context "with everything specified" do
data/toto.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{toto}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["cloudhead"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - cloudhead