overlord 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0
1
+ 3.0.1
@@ -52,7 +52,7 @@ module OverlordGoogleHelper
52
52
  end
53
53
  end
54
54
  end
55
- content << "searchControl.addSearcher(#{type}Search);\n"
55
+ content << "searchControl.addSearcher(#{type}Search);\n".html_safe
56
56
  end
57
57
 
58
58
  # Render feeds using Google's api
@@ -162,7 +162,7 @@ module OverlordGoogleHelper
162
162
 
163
163
  # Generates a valid dom id for the feed
164
164
  def feed_content_id(feed)
165
- "feed_#{feed.id}_#{feed.title.parameterize}_#{feed.service.name.parameterize}".gsub('+', '-')
165
+ "feed_#{feed.id}_#{feed.title.parameterize}_#{feed.service.name.parameterize}".gsub('+', '-').html_safe
166
166
  end
167
167
 
168
168
  # Outputs the appropriate script for handling the google response once the feed is loaded
@@ -193,18 +193,18 @@ module OverlordGoogleHelper
193
193
 
194
194
  def google_muck_load_callback_script(feed, content_id, number_of_items = 4, number_of_images = 6, number_of_videos = 6)
195
195
  if feed.service.blank?
196
- "google_load_entries('#{feed.uri}', '#{content_id}', #{number_of_items});"
196
+ "google_load_entries('#{feed.uri}', '#{content_id}', #{number_of_items});".html_safe
197
197
  else
198
198
  if feed.service.photo?
199
- "google_load_images('#{feed.uri}', '#{content_id}', #{number_of_images});"
199
+ "google_load_images('#{feed.uri}', '#{content_id}', #{number_of_images});".html_safe
200
200
  elsif feed.service.bookmark?
201
- "google_load_bookmarks('#{feed.uri}', '#{content_id}', #{number_of_items});"
201
+ "google_load_bookmarks('#{feed.uri}', '#{content_id}', #{number_of_items});".html_safe
202
202
  elsif feed.service.video?
203
- "google_load_videos('#{feed.uri}', '#{content_id}', #{number_of_videos});"
203
+ "google_load_videos('#{feed.uri}', '#{content_id}', #{number_of_videos});".html_safe
204
204
  elsif feed.service.music?
205
- "google_load_entries('#{feed.uri}', '#{content_id}', #{number_of_items});"
205
+ "google_load_entries('#{feed.uri}', '#{content_id}', #{number_of_items});".html_safe
206
206
  else
207
- "google_load_entries('#{feed.uri}', '#{content_id}', #{number_of_items});"
207
+ "google_load_entries('#{feed.uri}', '#{content_id}', #{number_of_items});".html_safe
208
208
  end
209
209
  end
210
210
  end
@@ -214,7 +214,7 @@ module OverlordGoogleHelper
214
214
  %Q{var link = jQuery(item.content).find('img').parent('a');
215
215
  link.attr('rel', '#{content_id}');
216
216
  link.addClass('feed-video');
217
- jQuery('#' + content_id).append(link);}
217
+ jQuery('#' + content_id).append(link);}.html_safe
218
218
  end
219
219
  end
220
220
 
@@ -223,7 +223,7 @@ module OverlordGoogleHelper
223
223
  %Q{var link = jQuery(item.content).find('img').parent('a');
224
224
  link.attr('rel', '#{content_id}');
225
225
  link.addClass('feed-photo');
226
- jQuery('#' + content_id).append(link);}
226
+ jQuery('#' + content_id).append(link);}.html_safe
227
227
  end
228
228
  end
229
229
 
@@ -231,7 +231,7 @@ module OverlordGoogleHelper
231
231
  google_load_template_script 'google_load_entries', javascript_callback, uri, content_id do
232
232
  %Q{var status_class = 'even';
233
233
  if(i%2 > 0) { status_class = 'odd'; }
234
- jQuery('#' + content_id).append('<div class="hentry ' + status_class + '"><h4 class="title"><a class="entry-link" href="#" target="blank">' + item.title + '</a><span class="entry-close"><a class="entry-link-close" href="#">#{t('overlord.close')}</a></span></h4><div class="entry">' + item.content + ' <p><a href="' + item.link + '">#{t('overlord.read_more')}</a></p></div></div>');}
234
+ jQuery('#' + content_id).append('<div class="hentry ' + status_class + '"><h4 class="title"><a class="entry-link" href="#" target="blank">' + item.title + '</a><span class="entry-close"><a class="entry-link-close" href="#">#{t('overlord.close')}</a></span></h4><div class="entry">' + item.content + ' <p><a href="' + item.link + '">#{t('overlord.read_more')}</a></p></div></div>');}.html_safe
235
235
  end
236
236
  end
237
237
 
@@ -239,7 +239,7 @@ module OverlordGoogleHelper
239
239
  google_load_template_script 'google_load_bookmarks', javascript_callback, uri, content_id do
240
240
  %Q{var status_class = 'even';
241
241
  if(i%2 > 0) { status_class = 'odd'; }
242
- jQuery('#' + content_id).append('<div class="hentry ' + status_class + '"><h4 class="title"><a class="bookmark-link" href="' + item.link + '" target="_blank">' + item.title + '</a></h4></div>');}
242
+ jQuery('#' + content_id).append('<div class="hentry ' + status_class + '"><h4 class="title"><a class="bookmark-link" href="' + item.link + '" target="_blank">' + item.title + '</a></h4></div>');}.html_safe
243
243
  end
244
244
  end
245
245
 
@@ -265,7 +265,7 @@ module OverlordGoogleHelper
265
265
  }
266
266
  });
267
267
  }
268
- </script>}
268
+ </script>}.html_safe
269
269
  end
270
270
 
271
271
  # Renders a partial with the latest trends from google.
@@ -283,49 +283,49 @@ module OverlordGoogleHelper
283
283
  script << "?key=#{Overlord.configuration.google_ajax_api_key}" if Overlord.configuration.google_ajax_api_key
284
284
  script << '"></script>'
285
285
  @google_ajax_api_scripts_included = true
286
- script
286
+ script.html_safe
287
287
  end
288
288
 
289
289
  # Output include script for google slideshows
290
290
  def google_ajax_slideshow_scripts
291
291
  return '' if defined?(@google_ajax_slideshow_scripts_included)
292
292
  @google_ajax_slideshow_scripts_included = true
293
- '<script src="http://www.google.com/uds/solutions/slideshow/gfslideshow.js" type="text/javascript"></script>'
293
+ '<script src="http://www.google.com/uds/solutions/slideshow/gfslideshow.js" type="text/javascript"></script>'.html_safe
294
294
  end
295
295
 
296
296
  # Output include script for google feeds
297
297
  def google_load_feeds
298
298
  return '' if defined?(@google_load_feeds_included)
299
299
  @google_load_feeds_included = true
300
- google_ajax_api_scripts + '<script type="text/javascript">google.load("feeds", "1");</script>'
300
+ (google_ajax_api_scripts + '<script type="text/javascript">google.load("feeds", "1");</script>').html_safe
301
301
  end
302
302
 
303
303
  # Output include script for google search
304
304
  def google_load_search
305
305
  return '' if defined?(@google_load_search_included)
306
306
  @google_load_search_included = true
307
- google_ajax_api_scripts + '<script type="text/javascript">google.load("search", "1");</script>'
307
+ (google_ajax_api_scripts + '<script type="text/javascript">google.load("search", "1");</script>').html_safe
308
308
  end
309
309
 
310
310
  # Output include script for google maps
311
311
  def google_load_maps
312
312
  return '' if defined?(@google_load_maps_included)
313
313
  @google_load_maps_included = true
314
- google_ajax_api_scripts + '<script type="text/javascript">google.load("maps", "2");</script>'
314
+ (google_ajax_api_scripts + '<script type="text/javascript">google.load("maps", "2");</script>').html_safe
315
315
  end
316
316
 
317
317
  # Output include script to load jquery from google
318
318
  def google_load_jquery(http_protocol = 'http://', version = '1.4.2')
319
319
  return '' if defined?(@google_load_jquery_included)
320
320
  @google_load_jquery_included = true
321
- %Q{<script src="#{http_protocol}ajax.googleapis.com/ajax/libs/jquery/#{version}/jquery.min.js" type="text/javascript"></script>}
321
+ %Q{<script src="#{http_protocol}ajax.googleapis.com/ajax/libs/jquery/#{version}/jquery.min.js" type="text/javascript"></script>}.html_safe
322
322
  end
323
323
 
324
324
  # Output include script to load jquery ui from google
325
325
  def google_load_jquery_ui(http_protocol = 'http://', version = '1.8.4')
326
326
  return '' if defined?(@google_load_jquery_ui_included)
327
327
  @google_load_jquery_ui_included = true
328
- %Q{<script src="#{http_protocol}ajax.googleapis.com/ajax/libs/jqueryui/#{version}/jquery-ui.min.js" type="text/javascript"></script>}
328
+ %Q{<script src="#{http_protocol}ajax.googleapis.com/ajax/libs/jqueryui/#{version}/jquery-ui.min.js" type="text/javascript"></script>}.html_safe
329
329
  end
330
330
 
331
331
  # Output a link to the jquery-ui css file on google
@@ -336,7 +336,7 @@ module OverlordGoogleHelper
336
336
  def google_load_jquery_ui_css(http_protocol = 'http://', theme = "smoothness", version = '1.8.4')
337
337
  return '' if defined?(@google_load_jquery_ui_css_included)
338
338
  @google_load_jquery_ui_css_included = true
339
- %Q{<link rel="stylesheet" href="#{http_protocol}ajax.googleapis.com/ajax/libs/jqueryui/#{version}/themes/#{theme}/jquery-ui.css" type="text/css" />}
339
+ %Q{<link rel="stylesheet" href="#{http_protocol}ajax.googleapis.com/ajax/libs/jqueryui/#{version}/themes/#{theme}/jquery-ui.css" type="text/css" />}.html_safe
340
340
  end
341
341
 
342
342
  def change_chars(term)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{overlord}
8
- s.version = "3.0.0"
8
+ s.version = "3.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin"]
12
- s.date = %q{2010-09-11}
12
+ s.date = %q{2010-09-17}
13
13
  s.description = %q{Code to interact with the google ajax apis on the server and the client.}
14
14
  s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overlord
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 0
10
- version: 3.0.0
9
+ - 1
10
+ version: 3.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Ball
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-09-11 00:00:00 -06:00
19
+ date: 2010-09-17 00:00:00 -06:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency