ianwhite-pickle 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,10 +1,16 @@
1
+ == 0.1.15 - 28 Aug 2009
2
+
3
+ * 1 minor enhancement
4
+ * avoid namespace collision on replace by renaming mapping#replace -> mapping#replacement [nruth]
5
+
6
+
1
7
  == 0.1.14 - 9 July 2009
2
8
 
3
9
  * 1 minor enhancement
4
10
  * update specs and features for latest cucumber and machinist changes
5
11
 
6
12
 
7
- == 0.1.13 - 16 June 2009
13
+ == 0.1.13 - 16 June 2009
8
14
 
9
15
  * 2 minor enhancements
10
16
  * model! and created_model! raise an error if pickle name can't be found
data/lib/pickle/config.rb CHANGED
@@ -41,7 +41,7 @@ module Pickle
41
41
  options = args.extract_options!
42
42
  raise ArgumentError, "Usage: map 'search' [, 'search2', ...] :to => 'replace'" unless args.any? && options[:to].is_a?(String)
43
43
  args.each do |search|
44
- self.mappings << OpenStruct.new(:search => search, :replace => options[:to])
44
+ self.mappings << OpenStruct.new(:search => search, :replacement => options[:to])
45
45
  end
46
46
  end
47
47
  end
data/lib/pickle/parser.rb CHANGED
@@ -58,7 +58,7 @@ module Pickle
58
58
  private
59
59
  def apply_mappings!(string)
60
60
  config.mappings.each do |mapping|
61
- string.sub! /^#{mapping.search}$/, mapping.replace
61
+ string.sub! /^#{mapping.search}$/, mapping.replacement
62
62
  end
63
63
  end
64
64
  end
@@ -2,7 +2,7 @@ module Pickle
2
2
  module Version
3
3
  Major = 0
4
4
  Minor = 1
5
- Tiny = 14
5
+ Tiny = 15
6
6
 
7
7
  String = [Major, Minor, Tiny].join('.')
8
8
  end
@@ -73,7 +73,7 @@ describe Pickle::Config do
73
73
  end
74
74
 
75
75
  it "should create OpenStruct(search: 'foo', replace: 'faz') mapping" do
76
- @config.mappings.first.should == OpenStruct.new(:search => 'foo', :replace => 'faz')
76
+ @config.mappings.first.should == OpenStruct.new(:search => 'foo', :replacement => 'faz')
77
77
  end
78
78
  end
79
79
 
@@ -83,8 +83,8 @@ describe Pickle::Config do
83
83
  end
84
84
 
85
85
  it "should create 2 mappings" do
86
- @config.mappings.first.should == OpenStruct.new(:search => 'foo', :replace => 'faz')
87
- @config.mappings.last.should == OpenStruct.new(:search => 'bar', :replace => 'faz')
86
+ @config.mappings.first.should == OpenStruct.new(:search => 'foo', :replacement => 'faz')
87
+ @config.mappings.last.should == OpenStruct.new(:search => 'bar', :replacement => 'faz')
88
88
  end
89
89
  end
90
90
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ianwhite-pickle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian White
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-09 00:00:00 -07:00
12
+ date: 2009-08-28 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15