help_spot 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -75,11 +75,13 @@ private
75
75
  parsed_options[:query].merge!(:method => method)
76
76
  response = self.class.send(http_method, '/index.php', parsed_options)
77
77
  if munge_options[:collection]
78
- return [] unless collection = response[munge_options[:collection]][munge_options[:item]]
78
+ unless collection = response[munge_options[:collection]][munge_options[:item]]
79
+ return []
80
+ end
79
81
  if collection.is_a?(Array)
80
82
  collection.map { |item| Hashie::Mash.new(item) }
81
83
  else
82
- Hashie::Mash.new(collection)
84
+ [Hashie::Mash.new(collection)]
83
85
  end
84
86
  elsif munge_options[:item]
85
87
  Hashie::Mash.new(response[munge_options[:item]])
@@ -1,3 +1,3 @@
1
1
  class HelpSpot
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
@@ -60,7 +60,7 @@ describe "HelpSpot" do
60
60
  it "can be listed" do
61
61
  @help_spot.stub_get('/api/index.php?method=private.request.getCategories&fDeleted=0', 'request.getCategories.xml')
62
62
  categories = @help_spot.categories
63
- categories.sCategory.should == 'Pre Sales Question'
63
+ categories.first.sCategory.should == 'Pre Sales Question'
64
64
  end
65
65
  end
66
66
  describe 'statuses' do
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: help_spot
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 21
5
+ prerelease:
5
6
  segments:
6
7
  - 0
7
8
  - 0
8
- - 4
9
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
10
11
  platform: ruby
11
12
  authors:
12
13
  - Jesse Newland
@@ -14,16 +15,18 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-05-24 00:00:00 -04:00
18
+ date: 2011-06-15 00:00:00 -04:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: rspec
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - "="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 27
27
30
  segments:
28
31
  - 1
29
32
  - 3
@@ -35,9 +38,11 @@ dependencies:
35
38
  name: fakeweb
36
39
  prerelease: false
37
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
38
42
  requirements:
39
43
  - - ">="
40
44
  - !ruby/object:Gem::Version
45
+ hash: 3
41
46
  segments:
42
47
  - 0
43
48
  version: "0"
@@ -47,9 +52,11 @@ dependencies:
47
52
  name: hashie
48
53
  prerelease: false
49
54
  requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
50
56
  requirements:
51
57
  - - ~>
52
58
  - !ruby/object:Gem::Version
59
+ hash: 11
53
60
  segments:
54
61
  - 0
55
62
  - 1
@@ -61,9 +68,11 @@ dependencies:
61
68
  name: httparty
62
69
  prerelease: false
63
70
  requirement: &id004 !ruby/object:Gem::Requirement
71
+ none: false
64
72
  requirements:
65
73
  - - ~>
66
74
  - !ruby/object:Gem::Version
75
+ hash: 11
67
76
  segments:
68
77
  - 0
69
78
  - 5
@@ -82,7 +91,6 @@ extra_rdoc_files:
82
91
  - README.rdoc
83
92
  - TODO
84
93
  files:
85
- - .gitignore
86
94
  - LICENSE
87
95
  - README.rdoc
88
96
  - Rakefile
@@ -107,28 +115,32 @@ homepage: http://github.com/jnewland/help_spot
107
115
  licenses: []
108
116
 
109
117
  post_install_message:
110
- rdoc_options:
111
- - --charset=UTF-8
118
+ rdoc_options: []
119
+
112
120
  require_paths:
113
121
  - lib
114
122
  required_ruby_version: !ruby/object:Gem::Requirement
123
+ none: false
115
124
  requirements:
116
125
  - - ">="
117
126
  - !ruby/object:Gem::Version
127
+ hash: 3
118
128
  segments:
119
129
  - 0
120
130
  version: "0"
121
131
  required_rubygems_version: !ruby/object:Gem::Requirement
132
+ none: false
122
133
  requirements:
123
134
  - - ">="
124
135
  - !ruby/object:Gem::Version
136
+ hash: 3
125
137
  segments:
126
138
  - 0
127
139
  version: "0"
128
140
  requirements: []
129
141
 
130
142
  rubyforge_project:
131
- rubygems_version: 1.3.6
143
+ rubygems_version: 1.6.2
132
144
  signing_key:
133
145
  specification_version: 3
134
146
  summary: API wrapper for HelpSpot
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- pkg
2
- doc
3
- *.gem
4
- *.gemspec