feed_us_grabber 1.0.3 → 1.0.4

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.
@@ -8,18 +8,18 @@ To be used with Rails 3.x and Ruby 1.9x. We're proud of our software, and we wa
8
8
 
9
9
  Follow these steps to download and install the feed_us_grabber gem:
10
10
 
11
- (1) In your rails application, edit your Gemfile to include:
11
+ 1. In your rails application, edit your Gemfile to include:
12
12
  gem 'feed_us_grabber'
13
13
 
14
- (2) Run bundle install from the command line (this will download the feed_us_grabber to your environment)
14
+ 2. Run bundle install from the command line (this will download the feed_us_grabber to your environment)
15
15
 
16
- (3) Open config/routes.rb and add following line:
16
+ 3. Open config/routes.rb and add following line:
17
17
  match "rails_app/FeedUsGrabber" => "FeedUsGrabber#index"
18
18
  ** where rails_app is the root URL to your application. The match is case sensitive.
19
19
 
20
- (4) Update environment.rb and include require 'net/http'
20
+ 4. Update environment.rb and include require 'net/http'
21
21
 
22
- (5) Your installation is complete
22
+ 5. Your installation is complete
23
23
 
24
24
  == USAGE
25
25
  (1) Add following line to each controller (or app/controllers/application_controller.rb):
@@ -74,6 +74,8 @@ def index
74
74
  @grabber = feedUsGrabber(:FeedUsURL => 'http://render.feed.us/Feed.aspx?g=00767d50-bde8-e111-9875-4040419a7f04', :ClientWhiteList => 'xxx.xx.xx.xx')
75
75
  end
76
76
 
77
+ <b>You can also specify multiple IP's seperated with a comma :ClientWhiteList => 'xxx.xx.xx.xx,yyy.yy.yy.yy'</b>
78
+
77
79
  == LOCATION OF CACHE
78
80
  Cache is maintained under RAILS_ROOT/tmp
79
81
 
@@ -132,9 +132,9 @@ class FeedUsGrabberController < ActionController::Base
132
132
  else
133
133
  # User can specify additional IP's to add to whitelist
134
134
  grabber = FeedUsGrabber.new
135
- configuredClientWhiteList = grabber.getClientWhiteList
135
+ configuredClientWhiteList = grabber.getClientWhiteList.split(",")
136
136
  unless configuredClientWhiteList.nil? || configuredClientWhiteList.empty?
137
- @mClientWhiteList.push(configuredClientWhiteList)
137
+ @mClientWhiteList.concat(configuredClientWhiteList)
138
138
  end
139
139
  AddToDebugOutput(grabber.getDebugOutput)
140
140
  AddToDebugOutput("Checking if IP #{@mClientIp} is in ClientWhiteList #{@mClientWhiteList.to_s}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feed_us_grabber
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-28 00:00:00.000000000 Z
12
+ date: 2013-05-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda
@@ -124,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  segments:
126
126
  - 0
127
- hash: -47287185
127
+ hash: 891976977
128
128
  required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements: