juju 0.0.2 → 0.0.3
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.
- data/Gemfile.lock +1 -1
- data/lib/juju/version.rb +1 -1
- data/lib/juju.rb +1 -9
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/lib/juju/version.rb
CHANGED
data/lib/juju.rb
CHANGED
@@ -23,19 +23,11 @@ class Juju
|
|
23
23
|
protected
|
24
24
|
def parse_xml(xml)
|
25
25
|
data = Hash.from_xml(xml)['rss']['channel']
|
26
|
-
jobs =
|
26
|
+
jobs = data['item'].each {|item| item['link'].squish!}
|
27
27
|
JujuResult.new(jobs, data['totalresults'], data['startindex'], data['itemsperpage'])
|
28
28
|
rescue REXML::ParseException
|
29
29
|
raise JujuError, 'Did not get a valid XML response from Juju'
|
30
30
|
end
|
31
|
-
|
32
|
-
def remove_tags_and_spaces(jobs)
|
33
|
-
jobs.each do |item|
|
34
|
-
item['link'].squish!
|
35
|
-
item['title'] = strip_tags(item['title']).squish!
|
36
|
-
item['description'] = strip_tags(item['description']).squish!
|
37
|
-
end
|
38
|
-
end
|
39
31
|
|
40
32
|
def check_required(params)
|
41
33
|
raise ArgumentError.new('Partner ID was not provided') unless params[:partnerid]
|