oxmlk 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = oxmlk
2
2
 
3
- Description goes here.
3
+ OxMlk is a simple lightweight XML mapper. Its structure is inspired by happymapper and its syntax takes after ROXML. Right now there is one example to get things going. More features, examples and documentation will be coming soon.
4
4
 
5
5
  == Note on Patches/Pull Requests
6
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -138,7 +138,7 @@ module OxMlk
138
138
  end
139
139
 
140
140
  def wrap(xpath=nil)
141
- [@in,xpath].compact.join('/')
141
+ (xpath.split('|').map {|x| [@in,x].compact.join('/') }).join('|')
142
142
  end
143
143
  end
144
144
  end
data/oxmlk.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{oxmlk}
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 = ["Josh Robinson"]
@@ -45,10 +45,15 @@ describe OxMlk::Description do
45
45
  @desc.xpath.should == 'number|person'
46
46
  end
47
47
 
48
- it 'should add in + / to xpath if :in is passed' do
48
+ it 'should add :in + / to xpath if :in is passed' do
49
49
  @desc = OxMlk::Description.new(:person, :in => :friends)
50
50
  @desc.xpath.should == 'friends/person'
51
51
  end
52
+
53
+ it 'should add :in + / to all items in array of ox_objetcs' do
54
+ @desc = OxMlk::Description.new(:digits, :as => [Number,Person], :in => :friends)
55
+ @desc.xpath.should == 'friends/number|friends/person'
56
+ end
52
57
  end
53
58
 
54
59
  describe '#accessor' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oxmlk
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
  - Josh Robinson