muck-raker 0.1.29 → 0.1.30

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.29
1
+ 0.1.30
@@ -8,7 +8,7 @@ class Muck::RecommendationsController < ApplicationController
8
8
  @details = params[:details] == "true"
9
9
 
10
10
  @uri = params[:u] || request.env['HTTP_REFERER']
11
- if !allowed_uri(@uri)
11
+ if @uri.blank? || !allowed_uri(@uri)
12
12
  render :text => '<!-- permission denied -->'
13
13
  return
14
14
  end
@@ -29,13 +29,13 @@ class Muck::RecommendationsController < ApplicationController
29
29
  respond_to do |format|
30
30
  format.html {
31
31
  order = params[:order] || "mixed"
32
- redirect_to resource_path(@entry) + "?limit=" + @limit.to_s + "&order=" + order + "&details=" + @details.to_s if !@entry.id.nil?
32
+ redirect_to resource_path(@entry) + "?limit=#{@limit}&order=#{order}&details=#{@details}" if !@entry.id.nil?
33
33
  }
34
34
  format.xml {
35
35
  render(:template => @entry.id.nil? ? '/recommendations/index_real_time.xml.builder' : '/recommendations/index.xml.builder', :layout => false)
36
36
  }
37
37
  format.pjs {
38
- @host = "http://" + URI.parse(@uri).host
38
+ @host = "http://#{URI.parse(@uri).host}"
39
39
  render(:template => @entry.id.nil? ? 'recommendations/index_real_time.pjs.erb' : 'recommendations/index.pjs.erb', :layout => false)
40
40
  }
41
41
  format.rss {
@@ -47,6 +47,7 @@ class Muck::RecommendationsController < ApplicationController
47
47
  protected
48
48
 
49
49
  def allowed_uri(uri)
50
+ return false if uri.blank?
50
51
  uri.match(/^(10\.|192\.168|172\.|127\.)/) == nil && uri.include?('localhost') == false
51
52
  end
52
53
 
data/muck-raker.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-raker}
8
- s.version = "0.1.29"
8
+ s.version = "0.1.30"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joel Duffin Justin Ball"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-raker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.29
4
+ version: 0.1.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Duffin Justin Ball