peachy 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,11 @@
1
+ == 0.4.1
2
+
3
+ * Added period-separated element / attribute names to the names that can be interpretted.
4
+
5
+ == 0.4.0
6
+
7
+ * Nokogiri strips out XML namespaces when creating new proxies.
8
+
1
9
  == 0.3.5
2
10
 
3
11
  * Improved compatibility for Ruby 1.9
@@ -33,8 +33,8 @@ example above.
33
33
 
34
34
  Peachy expects method names to be called in the Ruby convention of lowercase with
35
35
  underscores. It will do its best to match method names to elements and attributes
36
- following different conventions (currently, this is camelCaseNames, PascalCaseNames
37
- or hyphen-separated-names)
36
+ following different conventions. Currently, this is camelCaseNames, PascalCaseNames,
37
+ hyphen-separated-names and period.separated.names.
38
38
 
39
39
  More detailed usage examples can be found in the .rb files in the /test directory.
40
40
 
@@ -25,6 +25,10 @@ module Peachy
25
25
  @method_name.gsub(/_/, '-')
26
26
  end
27
27
 
28
+ def as_period_separated
29
+ @method_name.gsub(/_/, '.')
30
+ end
31
+
28
32
  def as_underscore
29
33
  @method_name
30
34
  end
@@ -1,3 +1,3 @@
1
1
  module Peachy
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
@@ -14,13 +14,14 @@ describe "Peachy::MethodName" do
14
14
  end
15
15
 
16
16
  it "should return the expected number of variations in format" do
17
- @method_name.variations.size.should == 4
17
+ @method_name.variations.size.should == 5
18
18
  end
19
19
 
20
20
  it "should return the expected variation formats" do
21
21
  variations = @method_name.variations
22
22
 
23
23
  variations.should include('method_name')
24
+ variations.should include('method.name')
24
25
  variations.should include('methodName')
25
26
  variations.should include('method-name')
26
27
  variations.should include('MethodName')
@@ -34,6 +35,7 @@ describe "Peachy::MethodName" do
34
35
  @method_name.to_sym.should == :this_method
35
36
 
36
37
  variations.should include('this_method')
38
+ variations.should include('this.method')
37
39
  variations.should include('thisMethod')
38
40
  variations.should include('this-method')
39
41
  variations.should include('ThisMethod')
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 0
9
- version: 0.4.0
8
+ - 1
9
+ version: 0.4.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - NJ Pearman
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-16 00:00:00 +00:00
17
+ date: 2011-01-20 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies: []
20
20