match_point 0.0.7 → 0.0.8

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.
@@ -1,3 +1,3 @@
1
1
  module MatchPoint
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
@@ -13,11 +13,11 @@ module MatchPoint
13
13
  end
14
14
 
15
15
  def to_xml
16
- @template.to_xml
16
+ @xml.to_xml
17
17
  end
18
18
 
19
19
  def to_s
20
- @template.to_s
20
+ @xml.to_s
21
21
  end
22
22
 
23
23
  def operation_name
@@ -29,10 +29,14 @@ module MatchPoint
29
29
  end
30
30
 
31
31
  def document
32
- @template.document.clone
32
+ @xml.document.clone
33
33
  end
34
34
 
35
- private
35
+ def at_xpath a_path
36
+ @xml.at_xpath a_path
37
+ end
38
+
39
+ protected
36
40
 
37
41
  def assign_values data
38
42
  data.each do |key, value|
@@ -45,7 +49,7 @@ module MatchPoint
45
49
  end
46
50
 
47
51
  def specify_value value, path
48
- @template.xpath(remove_spec_node_from(path)).first.content = value
52
+ @xml.xpath(remove_spec_node_from(path)).first.content = value
49
53
  end
50
54
 
51
55
  def synchronize_object_to_xml
@@ -76,6 +80,5 @@ module MatchPoint
76
80
  self.class.add_attr_reader_for node_in_template, new_value
77
81
  }
78
82
  end
79
-
80
83
  end
81
84
  end
@@ -36,12 +36,12 @@ describe MatchPoint do
36
36
  it "should create an xml with the values on the hash" do
37
37
  request.to_xml.should == "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
38
38
  <TIX version=\"TIX 4.11.0\">
39
- <AccessControl method=\"AccessControlAuthenticate\">
40
- <AuthRequest>
41
- <AuthID>NeWVaLue</AuthID>
42
- </AuthRequest>
43
- </AccessControl>
44
- </TIX>
39
+ <AccessControl method=\"AccessControlAuthenticate\">
40
+ <AuthRequest>
41
+ <AuthID>NeWVaLue</AuthID>
42
+ </AuthRequest>
43
+ </AccessControl>
44
+ </TIX>
45
45
  "
46
46
  end
47
47
 
@@ -63,6 +63,11 @@ describe MatchPoint do
63
63
  document.nil?.should be_false
64
64
  end
65
65
 
66
+ it "should return some xpath node" do
67
+ response.at_xpath("/TIX/AccessControl/AuthRequest/AuthID").text.should == "1ua5J1gJz3TryPEMQZkeWFarOagSJvYY"
68
+ end
69
+
70
+
66
71
  end
67
72
 
68
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: match_point
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
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-05-14 00:00:00.000000000 Z
12
+ date: 2013-05-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec