smacks-apricoteatsgorilla 0.2.0 → 0.2.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.
Files changed (3) hide show
  1. data/README.rdoc +3 -3
  2. data/lib/apricoteatsgorilla.rb +3 -3
  3. metadata +1 -1
data/README.rdoc CHANGED
@@ -4,7 +4,7 @@ Apricot eats Gorilla translates between XML documents and Ruby hashes.
4
4
  It's based on CobraVsMongoose but uses Hpricot instead of REXML to parse
5
5
  XML and it also doesn't follow the BadgerFish convention.
6
6
 
7
- It's initial purpose was to convert SOAP response messages to Ruby hashes,
7
+ Its initial purpose was to convert SOAP response messages to Ruby hashes,
8
8
  but it quickly evolved into a more general translation tool.
9
9
 
10
10
  == Install
@@ -36,13 +36,13 @@ Let's assume you receive the following SOAP response:
36
36
  </soap:Body>
37
37
  </soap:Envelope>
38
38
 
39
- Just pass in the raw XML string like this:
39
+ Just pass in the raw XML string:
40
40
 
41
41
  require "rubygems"
42
42
  require "apricoteatsgorilla
43
43
  hash = ApricotEatsGorilla.xml_to_hash(xml, "//return")
44
44
 
45
- And it gets converted into a nice little hash:
45
+ And it gets converted into a nice little Hash:
46
46
 
47
47
  "empty" => false,
48
48
  "customer" => {
@@ -6,13 +6,13 @@ require 'hpricot'
6
6
  # It's based on CobraVsMongoose but uses Hpricot instead of REXML to parse
7
7
  # XML and it also doesn't follow the BadgerFish convention.
8
8
  #
9
- # It's initial purpose was to convert SOAP response messages to Ruby hashes,
9
+ # Its initial purpose was to convert SOAP response messages to Ruby hashes,
10
10
  # but it quickly evolved into a more general translation tool.
11
11
  class ApricotEatsGorilla
12
12
 
13
13
  # Converts XML into a Ruby Hash. Starts parsing at root node by default.
14
14
  # Call with XPath expession (Hpricot search) as second parameter to define
15
- # a custom root node. The root node itself is not included in the Hash.
15
+ # a custom root node. The root node itself will not be included in the Hash.
16
16
  #
17
17
  # E.g.
18
18
  # xml = "<dude><likes>beer</likes><hates>appletini</hates></dude>"
@@ -99,7 +99,7 @@ private
99
99
  end
100
100
  end
101
101
 
102
- # Helper to remove line breaks and whitespace between XML nodes.
102
+ # Helper to remove line breaks and whitespace between XML tags.
103
103
  def self.clean_xml(xml)
104
104
  xml = xml.gsub(/\n+/, "")
105
105
  xml = xml.gsub(/(>)\s*(<)/, '\1\2')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smacks-apricoteatsgorilla
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Harrington