processr 0.9.5 → 0.9.6

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.5
1
+ 0.9.6
@@ -78,7 +78,7 @@ InBetweenFilter = lambda do |filename, contents|
78
78
  end
79
79
 
80
80
  processor = Processr.new
81
- processor.file_filters << InBetweenFilter
81
+ processor.add_file_filter(InBetweenFilter)
82
82
  processor.files << File.join('..', 'spec', 'fixtures', 'one.txt')
83
83
  processor.files << File.join('..', 'spec', 'fixtures', 'two.txt')
84
84
  puts processor.process!
@@ -27,6 +27,10 @@ class Processr
27
27
  self.filters << filter
28
28
  end
29
29
 
30
+ def add_file_filter(filter)
31
+ self.file_filters << filter
32
+ end
33
+
30
34
  def process!
31
35
  read_files
32
36
  process_filters
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{processr}
8
- s.version = "0.9.5"
8
+ s.version = "0.9.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Josh Nesbitt"]
@@ -81,7 +81,7 @@ describe Processr do
81
81
  it "should allow the use of inbetween filters to modify file buffer content" do
82
82
  Processr.out = nil
83
83
  @processor.buffer.should == ""
84
- @processor.file_filters << lambda { |filename, contents| contents + "{mod}" }
84
+ @processor.add_file_filter(lambda { |filename, contents| contents + "{mod}" })
85
85
  @processor.files << File.join('fixtures', 'one.txt')
86
86
  @processor.files << File.join('fixtures', 'two.txt')
87
87
  @processor.process!.should == "one\n{mod}two\n{mod}"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: processr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 49
4
+ hash: 55
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 5
10
- version: 0.9.5
9
+ - 6
10
+ version: 0.9.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Nesbitt