foxy_sync 0.3.0 → 0.3.1

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.
@@ -29,7 +29,7 @@ module FoxySync::Xml
29
29
  private
30
30
 
31
31
  def method_missing(method_name, *args, &block)
32
- node_set = node.xpath "//#{method_name}"
32
+ node_set = node.xpath ".//#{method_name}"
33
33
  return nil if node_set.nil? || node_set.empty?
34
34
 
35
35
  contents = []
@@ -8,7 +8,7 @@ module FoxySync::Xml
8
8
  unless @details
9
9
  @details = []
10
10
 
11
- node.xpath('//transaction_details').each do |detail|
11
+ node.xpath('.//transaction_detail').each do |detail|
12
12
  @details << TransactionDetail.new(detail)
13
13
  end
14
14
  end
@@ -21,7 +21,7 @@ module FoxySync::Xml
21
21
  # Returns custom fields in a 'name' => 'value' +Hash+
22
22
  def custom_fields
23
23
  fields = {}
24
- fields_xml = node.xpath '//custom_field'
24
+ fields_xml = node.xpath './/custom_field'
25
25
 
26
26
  fields_xml.each do |node|
27
27
  name = node.at_css('custom_field_name').content.strip
@@ -7,7 +7,7 @@ module FoxySync::Xml
7
7
  # Returns custom product options in a 'name' => 'value' +Hash+
8
8
  def custom_product_options
9
9
  options = {}
10
- options_xml = node.xpath '//transaction_detail_option'
10
+ options_xml = node.xpath './/transaction_detail_option'
11
11
 
12
12
  options_xml.each do |node|
13
13
  name = node.at_css('product_option_name').content.strip
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foxy_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-25 00:00:00.000000000 Z
12
+ date: 2013-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri