breakdown 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -65,11 +65,9 @@ section prior to writing out to a file.
65
65
  Breakdown::process input_filename, output_dir do |section|
66
66
  section[:title] = section[:title].upcase
67
67
  section[:text] = convert_to_swedish_chef(section[:text])
68
- section
69
68
  end
70
69
 
71
- Each `section` is hash containing values for `:title` and `:text` keys. It's important to pass the modified section
72
- back (as the last statement in the block) so it can be accessed by the rest of the `process` method.
70
+ Each `section` is hash containing values for `:title` and `:text` keys. Modifying the section will change the file content and title generated by the processor.
73
71
 
74
72
  Typical uses for the block method is to add metadata to the head of a section's text, for example when using Breakdown to generate content for *nanoc* or *Jekyll*.
75
73
 
@@ -58,7 +58,7 @@ module Breakdown
58
58
  section = {:title => title, :text => text}
59
59
  end
60
60
 
61
- section = yield section if block_given?
61
+ yield section if block_given?
62
62
 
63
63
  write_section(section, options) unless section.nil?
64
64
  end
@@ -1,3 +1,3 @@
1
1
  module Breakdown
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -22,13 +22,12 @@ describe Breakdown do
22
22
  filecount(@output_dir).should equal(9)
23
23
  end
24
24
 
25
- it "should modify title and text when processed using a block" do
25
+ it "should modify title and text when section returned by block" do
26
26
 
27
27
  filecount(@output_dir).should equal(0)
28
28
  Breakdown::process './spec/examples/the-tachypomp-and-other-stories.md', @output_dir do |section|
29
29
  section[:title] = section[:title] + '-modified'
30
30
  section[:text]= '!!modified!!' + section[:text]
31
- section
32
31
  end
33
32
 
34
33
  %w(
@@ -48,6 +47,7 @@ describe Breakdown do
48
47
  text.should include('!!modified!!')
49
48
  end
50
49
  end
50
+
51
51
  end
52
52
  end
53
53
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: breakdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: