help_spot 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +11 -0
- data/Gemfile.lock +26 -0
- data/Rakefile +1 -3
- data/lib/help_spot.rb +1 -0
- data/lib/help_spot/version.rb +2 -2
- data/spec/fixtures/request.get.xml +46 -87
- data/spec/help_spot_spec.rb +2 -1
- metadata +106 -15
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
crack (0.1.6)
|
5
|
+
fakeweb (1.3.0)
|
6
|
+
git (1.2.5)
|
7
|
+
hashie (0.1.8)
|
8
|
+
httparty (0.5.2)
|
9
|
+
crack (= 0.1.6)
|
10
|
+
jeweler (1.6.4)
|
11
|
+
bundler (~> 1.0)
|
12
|
+
git (>= 1.2.5)
|
13
|
+
rake
|
14
|
+
rake (0.9.2)
|
15
|
+
rspec (1.3.0)
|
16
|
+
|
17
|
+
PLATFORMS
|
18
|
+
ruby
|
19
|
+
|
20
|
+
DEPENDENCIES
|
21
|
+
fakeweb
|
22
|
+
hashie (~> 0.1.8)
|
23
|
+
httparty (~> 0.5.0)
|
24
|
+
jeweler
|
25
|
+
rake
|
26
|
+
rspec (= 1.3.0)
|
data/Rakefile
CHANGED
@@ -34,8 +34,6 @@ Spec::Rake::SpecTask.new(:rcov) do |spec|
|
|
34
34
|
spec.rcov = true
|
35
35
|
end
|
36
36
|
|
37
|
-
task :spec => :check_dependencies
|
38
|
-
|
39
37
|
task :default => :spec
|
40
38
|
|
41
39
|
require 'rake/rdoctask'
|
@@ -46,4 +44,4 @@ Rake::RDocTask.new do |rdoc|
|
|
46
44
|
rdoc.title = "help_spot #{version}"
|
47
45
|
rdoc.rdoc_files.include('README*')
|
48
46
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
49
|
-
end
|
47
|
+
end
|
data/lib/help_spot.rb
CHANGED
@@ -35,6 +35,7 @@ class HelpSpot
|
|
35
35
|
response = api_request(:get, 'private.request.get', options.merge(:xRequest => id), :item => 'request')
|
36
36
|
#munge even further the request history
|
37
37
|
response.request_history = response.request_history['item'] rescue []
|
38
|
+
response.request_history = [response.request_history] unless response.request_history.is_a?(Array)
|
38
39
|
response
|
39
40
|
end
|
40
41
|
|
data/lib/help_spot/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
class HelpSpot
|
2
|
-
VERSION = '0.0.
|
3
|
-
end
|
2
|
+
VERSION = '0.0.7'
|
3
|
+
end
|
@@ -1,89 +1,48 @@
|
|
1
1
|
<request>
|
2
|
-
<xRequest>12745</xRequest>
|
3
|
-
<fOpenedVia>Web Service</fOpenedVia>
|
4
|
-
<xOpenedViaId>0</xOpenedViaId>
|
5
|
-
<xPersonOpenedBy />
|
6
|
-
<xPersonAssignedTo>Ian Landsman</xPersonAssignedTo>
|
7
|
-
<fOpen>1</fOpen>
|
8
|
-
<xStatus>Active</xStatus>
|
9
|
-
<fUrgent>0</fUrgent>
|
10
|
-
<xCategory>Bugs</xCategory>
|
11
|
-
<dtGMTOpened>September 24, 2007</dtGMTOpened>
|
12
|
-
<dtGMTClosed />
|
13
|
-
<sRequestPassword>itetxb</sRequestPassword>
|
14
|
-
<sTitle />
|
15
|
-
<sUserId>12345</sUserId>
|
16
|
-
<sFirstName />
|
17
|
-
<sLastName />
|
18
|
-
<sEmail />
|
19
|
-
<sPhone />
|
20
|
-
<iLastReplyBy>Ian Landsman</iLastReplyBy>
|
21
|
-
<fTrash>0</fTrash>
|
22
|
-
<dtGMTTrashed />
|
23
|
-
<fullname> </fullname>
|
24
|
-
<request_history>
|
25
|
-
<item>
|
26
|
-
<xRequestHistory>1378</xRequestHistory>
|
27
|
-
<xRequest>12745</xRequest>
|
28
|
-
<xPerson>Ian Landsman</xPerson>
|
29
|
-
<dtGMTChange>Tue, September 25, 2007, 11:00 AM</dtGMTChange>
|
30
|
-
<fPublic>1</fPublic>
|
31
|
-
<fInitial>0</fInitial>
|
32
|
-
<tLog />
|
33
|
-
<tNote><p>An HTML note example</p></tNote>
|
34
|
-
<tEmailHeaders />
|
35
|
-
<fNoteIsHTML>1</fNoteIsHTML>
|
36
|
-
<fMergedFromRequest>0</fMergedFromRequest>
|
37
|
-
<files>
|
38
|
-
<file>
|
39
|
-
<sFileMimeType>application/pdf</sFileMimeType>
|
40
|
-
<sFilename>Invoice.pdf</sFilename>
|
41
|
-
<xDocumentId>60</xDocumentId>
|
42
|
-
<public_url>http://www.domain.com/index.php?pg=file&from=3&id=60&reqid=12745&reqhisid=1378</public_url>
|
43
|
-
<private_url>http://www.domain.com/admin.php?pg=file&from=0&id=60&showfullsize=1&download=1</private_url>
|
44
|
-
</file>
|
45
|
-
</files>
|
46
|
-
</item>
|
47
|
-
|
48
|
-
<xRequestHistory>1377</xRequestHistory>
|
49
|
-
<xRequest>12745</xRequest>
|
50
|
-
<xPerson>Ian Landsman</xPerson>
|
51
|
-
<dtGMTChange>Tue, September 25, 2007, 11:00 AM</dtGMTChange>
|
52
|
-
<fPublic>0</fPublic>
|
53
|
-
<fInitial>0</fInitial>
|
54
|
-
<tLog>Category changed from "" to "Bugs"</tLog>
|
55
|
-
<tNote />
|
56
|
-
<tEmailHeaders />
|
57
|
-
<fNoteIsHTML>0</fNoteIsHTML>
|
58
|
-
<fMergedFromRequest>0</fMergedFromRequest>
|
59
|
-
</item>
|
60
|
-
<item>
|
61
|
-
<xRequestHistory>1376</xRequestHistory>
|
62
|
-
<xRequest>12745</xRequest>
|
63
|
-
<xPerson> </xPerson>
|
64
|
-
<dtGMTChange>Mon, September 24, 2007, 08:03 PM</dtGMTChange>
|
65
|
-
<fPublic>1</fPublic>
|
66
|
-
<fInitial>0</fInitial>
|
67
|
-
<tLog />
|
68
|
-
<tNote>Plain text update to the request.</tNote>
|
69
|
-
<tEmailHeaders />
|
70
|
-
<fNoteIsHTML>0</fNoteIsHTML>
|
71
|
-
<fMergedFromRequest>0</fMergedFromRequest>
|
72
|
-
<files />
|
73
|
-
</item>
|
74
|
-
<item>
|
75
|
-
<xRequestHistory>1375</xRequestHistory>
|
76
|
-
<xRequest>12745</xRequest>
|
77
|
-
<xPerson> </xPerson>
|
78
|
-
<dtGMTChange>Mon, September 24, 2007, 07:44 PM</dtGMTChange>
|
79
|
-
<fPublic>1</fPublic>
|
80
|
-
<fInitial>1</fInitial>
|
81
|
-
<tLog />
|
82
|
-
<tNote>This is the request.</tNote>
|
83
|
-
<tEmailHeaders />
|
84
|
-
<fNoteIsHTML>0</fNoteIsHTML>
|
85
|
-
<fMergedFromRequest>0</fMergedFromRequest>
|
86
|
-
<files />
|
87
|
-
</item>
|
88
|
-
</request_history>
|
2
|
+
<xRequest>12745</xRequest>
|
3
|
+
<fOpenedVia>Web Service</fOpenedVia>
|
4
|
+
<xOpenedViaId>0</xOpenedViaId>
|
5
|
+
<xPersonOpenedBy />
|
6
|
+
<xPersonAssignedTo>Ian Landsman</xPersonAssignedTo>
|
7
|
+
<fOpen>1</fOpen>
|
8
|
+
<xStatus>Active</xStatus>
|
9
|
+
<fUrgent>0</fUrgent>
|
10
|
+
<xCategory>Bugs</xCategory>
|
11
|
+
<dtGMTOpened>September 24, 2007</dtGMTOpened>
|
12
|
+
<dtGMTClosed />
|
13
|
+
<sRequestPassword>itetxb</sRequestPassword>
|
14
|
+
<sTitle />
|
15
|
+
<sUserId>12345</sUserId>
|
16
|
+
<sFirstName />
|
17
|
+
<sLastName />
|
18
|
+
<sEmail />
|
19
|
+
<sPhone />
|
20
|
+
<iLastReplyBy>Ian Landsman</iLastReplyBy>
|
21
|
+
<fTrash>0</fTrash>
|
22
|
+
<dtGMTTrashed />
|
23
|
+
<fullname> </fullname>
|
24
|
+
<request_history>
|
25
|
+
<item>
|
26
|
+
<xRequestHistory>1378</xRequestHistory>
|
27
|
+
<xRequest>12745</xRequest>
|
28
|
+
<xPerson>Ian Landsman</xPerson>
|
29
|
+
<dtGMTChange>Tue, September 25, 2007, 11:00 AM</dtGMTChange>
|
30
|
+
<fPublic>1</fPublic>
|
31
|
+
<fInitial>0</fInitial>
|
32
|
+
<tLog />
|
33
|
+
<tNote><p>An HTML note example</p></tNote>
|
34
|
+
<tEmailHeaders />
|
35
|
+
<fNoteIsHTML>1</fNoteIsHTML>
|
36
|
+
<fMergedFromRequest>0</fMergedFromRequest>
|
37
|
+
<files>
|
38
|
+
<file>
|
39
|
+
<sFileMimeType>application/pdf</sFileMimeType>
|
40
|
+
<sFilename>Invoice.pdf</sFilename>
|
41
|
+
<xDocumentId>60</xDocumentId>
|
42
|
+
<public_url>http://www.domain.com/index.php?pg=file&from=3&id=60&reqid=12745&reqhisid=1378</public_url>
|
43
|
+
<private_url>http://www.domain.com/admin.php?pg=file&from=0&id=60&showfullsize=1&download=1</private_url>
|
44
|
+
</file>
|
45
|
+
</files>
|
46
|
+
</item>
|
47
|
+
</request_history>
|
89
48
|
</request>
|
data/spec/help_spot_spec.rb
CHANGED
@@ -53,7 +53,8 @@ describe "HelpSpot" do
|
|
53
53
|
it "should have accessible history" do
|
54
54
|
@help_spot.stub_get('/api/index.php?method=private.request.get&xRequest=12745', 'request.get.xml')
|
55
55
|
request = @help_spot.request(12745)
|
56
|
-
request.request_history.
|
56
|
+
request.request_history.should be_an(Array)
|
57
|
+
request.request_history.length.should == 1
|
57
58
|
request.request_history.first.xPerson.should == 'Ian Landsman'
|
58
59
|
end
|
59
60
|
it "should be searchable" do
|
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:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jesse Newland
|
@@ -15,13 +15,59 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-09-07 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: hashie
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 11
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 1
|
33
|
+
- 8
|
34
|
+
version: 0.1.8
|
35
|
+
type: :runtime
|
36
|
+
requirement: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: httparty
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 11
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
- 5
|
49
|
+
- 0
|
50
|
+
version: 0.5.0
|
51
|
+
type: :runtime
|
52
|
+
requirement: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rake
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 3
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
version: "0"
|
65
|
+
type: :development
|
66
|
+
requirement: *id003
|
21
67
|
- !ruby/object:Gem::Dependency
|
22
68
|
name: rspec
|
23
69
|
prerelease: false
|
24
|
-
|
70
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
25
71
|
none: false
|
26
72
|
requirements:
|
27
73
|
- - "="
|
@@ -33,11 +79,11 @@ dependencies:
|
|
33
79
|
- 0
|
34
80
|
version: 1.3.0
|
35
81
|
type: :development
|
36
|
-
|
82
|
+
requirement: *id004
|
37
83
|
- !ruby/object:Gem::Dependency
|
38
84
|
name: fakeweb
|
39
85
|
prerelease: false
|
40
|
-
|
86
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
41
87
|
none: false
|
42
88
|
requirements:
|
43
89
|
- - ">="
|
@@ -47,11 +93,55 @@ dependencies:
|
|
47
93
|
- 0
|
48
94
|
version: "0"
|
49
95
|
type: :development
|
50
|
-
|
96
|
+
requirement: *id005
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: jeweler
|
99
|
+
prerelease: false
|
100
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
101
|
+
none: false
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
hash: 3
|
106
|
+
segments:
|
107
|
+
- 0
|
108
|
+
version: "0"
|
109
|
+
type: :development
|
110
|
+
requirement: *id006
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
prerelease: false
|
114
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
116
|
+
requirements:
|
117
|
+
- - "="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
hash: 27
|
120
|
+
segments:
|
121
|
+
- 1
|
122
|
+
- 3
|
123
|
+
- 0
|
124
|
+
version: 1.3.0
|
125
|
+
type: :development
|
126
|
+
requirement: *id007
|
127
|
+
- !ruby/object:Gem::Dependency
|
128
|
+
name: fakeweb
|
129
|
+
prerelease: false
|
130
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
hash: 3
|
136
|
+
segments:
|
137
|
+
- 0
|
138
|
+
version: "0"
|
139
|
+
type: :development
|
140
|
+
requirement: *id008
|
51
141
|
- !ruby/object:Gem::Dependency
|
52
142
|
name: hashie
|
53
143
|
prerelease: false
|
54
|
-
|
144
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
55
145
|
none: false
|
56
146
|
requirements:
|
57
147
|
- - ~>
|
@@ -63,11 +153,11 @@ dependencies:
|
|
63
153
|
- 8
|
64
154
|
version: 0.1.8
|
65
155
|
type: :runtime
|
66
|
-
|
156
|
+
requirement: *id009
|
67
157
|
- !ruby/object:Gem::Dependency
|
68
158
|
name: httparty
|
69
159
|
prerelease: false
|
70
|
-
|
160
|
+
version_requirements: &id010 !ruby/object:Gem::Requirement
|
71
161
|
none: false
|
72
162
|
requirements:
|
73
163
|
- - ~>
|
@@ -79,7 +169,7 @@ dependencies:
|
|
79
169
|
- 0
|
80
170
|
version: 0.5.0
|
81
171
|
type: :runtime
|
82
|
-
|
172
|
+
requirement: *id010
|
83
173
|
description: API wrapper for HelpSpot
|
84
174
|
email: jnewland@gmail.com
|
85
175
|
executables: []
|
@@ -91,6 +181,8 @@ extra_rdoc_files:
|
|
91
181
|
- README.rdoc
|
92
182
|
- TODO
|
93
183
|
files:
|
184
|
+
- Gemfile
|
185
|
+
- Gemfile.lock
|
94
186
|
- LICENSE
|
95
187
|
- README.rdoc
|
96
188
|
- Rakefile
|
@@ -144,6 +236,5 @@ rubygems_version: 1.6.2
|
|
144
236
|
signing_key:
|
145
237
|
specification_version: 3
|
146
238
|
summary: API wrapper for HelpSpot
|
147
|
-
test_files:
|
148
|
-
|
149
|
-
- spec/spec_helper.rb
|
239
|
+
test_files: []
|
240
|
+
|