help_spot 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  class HelpSpot
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
data/lib/help_spot.rb CHANGED
@@ -34,7 +34,7 @@ class HelpSpot
34
34
  def request(id, options = {})
35
35
  response = api_request(:get, 'private.request.get', options.merge(:xRequest => id), :item => 'request')
36
36
  #munge even further the request history
37
- response.request_history = response.request_history.map { |item| item[1].first }
37
+ response.request_history = response.request_history['item'] rescue []
38
38
  response
39
39
  end
40
40
 
@@ -50,6 +50,12 @@ describe "HelpSpot" do
50
50
  request.xPersonAssignedTo.should == 'Ian Landsman'
51
51
  request.request_history.first.xPerson.should == 'Ian Landsman'
52
52
  end
53
+ it "should have accessible history" do
54
+ @help_spot.stub_get('/api/index.php?method=private.request.get&xRequest=12745', 'request.get.xml')
55
+ request = @help_spot.request(12745)
56
+ request.request_history.length.should == 4
57
+ request.request_history.first.xPerson.should == 'Ian Landsman'
58
+ end
53
59
  it "should be searchable" do
54
60
  @help_spot.stub_get('/api/index.php?method=private.request.search&sSearch=printer', 'request.search.xml')
55
61
  requests = @help_spot.search_requests(:sSearch => 'printer')
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: help_spot
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jesse Newland
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-15 00:00:00 -04:00
18
+ date: 2011-06-27 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency