feed_us_grabber 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/README.rdoc +60 -49
  2. metadata +3 -3
data/README.rdoc CHANGED
@@ -1,65 +1,76 @@
1
1
  = feed_us_grabber
2
2
 
3
- ENVIRONEMNT
4
- To be used with Rails 3.x and Ruby 1.9x
3
+ == ENVIRONEMNT
4
+
5
+ To be used with Rails 3.x and Ruby 1.9x
5
6
 
6
- INSTALLATION
7
+ == INSTALLATION
8
+
7
9
  Follow these steps to download and install the feed_us_grabber gem
10
+
8
11
  1. In your rails application, edit your Gemfile to include:
9
- gem 'feed_us_grabber'
12
+ gem 'feed_us_grabber'
13
+
10
14
  2. Run bundle install from the command line (this will download the feed_us_grabber to your environment)
11
- 3. Open config/routes.rb and add following line match "rails_app/FeedUsGrabber" => "FeedUsGrabber#index"
12
- ** where rails_app is the root URL to your application. The match is case sensitive.
15
+
16
+ 3. Open config/routes.rb and add following line:
17
+ match "rails_app/FeedUsGrabber" => "FeedUsGrabber#index"
18
+ ** where rails_app is the root URL to your application. The match is case sensitive.
19
+
13
20
  4. Update environment.rb and include require 'net/http'
14
- Your installation is complete
15
21
 
16
- USAGE
17
- Add following line to each controller (or app/controllers/application_controller.rb)
18
- include FeedUsGrabberHelper
19
- Add following code inside your controllers actions
20
- @grabber = feedUsGrabber(:FeedUsURL => '<FEED.US URL>',:FeedUsCacheInterval => FEED_INTERVAL, :FeedUsCacheIntervalLength => FEED_INTERVAL_LENGTH, :FeedUsCacheGroup => 'FEED CACHE GROUP NAME')
21
- e.g.
22
- If you want to use FeedUsGrabber inside action index under controller "test" add following code inside action index of "test" controller
23
-
24
- def index
25
- @grabber = feedUsGrabber(:FeedUsURL => 'http://dev.render.feed.us/Feed.aspx?g=98397b1c-5494-de11-938c-00304891151d',:FeedUsCacheInterval => CI_DAYS, :FeedUsCacheIntervalLength => 2, :FeedUsCacheGroup => 'demo')
26
- end
22
+ 5. Your installation is complete
23
+
24
+ == USAGE
25
+ 1. Add following line to each controller (or app/controllers/application_controller.rb):
26
+ include FeedUsGrabberHelper
27
27
 
28
- The most basic configuration is (Note you will replace the URL listed with the URL of your content from "Export" on Feed.Us):
29
-
30
- def index
31
- @grabber = feedUsGrabber(:FeedUsURL => 'http://dev.render.feed.us/Feed.aspx?g=98397b1c-5494-de11-938c-00304891151d')
32
- end
28
+ 2. Add following code inside your controllers actions:
29
+ @grabber = feedUsGrabber(:FeedUsURL => '<FEED.US URL>',:FeedUsCacheInterval => FEED_INTERVAL, :FeedUsCacheIntervalLength => FEED_INTERVAL_LENGTH, :FeedUsCacheGroup => 'FEED CACHE GROUP NAME')
33
30
 
34
- now inside view of the action add the following code to render your content
35
- <%= feedUsGrabberRender @grabber %>
36
- e.g.
37
- index.erb of "test" looks like
38
- <table>
39
- <tr>
40
- <td width='20%'>
41
- <%= feedUsGrabberRender @grabber %>
42
- </td>
43
- <td> Some text </td>
44
- </tr>
45
- </table>
31
+ If you want to use FeedUsGrabber inside action index under controller "test" add following code inside action index of "test" controller
46
32
 
47
- CLEARING CACHE
48
- To clear cache goto following url
49
- http://rails_app/FeedUsGrabber
50
- 1. Clear a specific cache group
51
- http://rails_app/FeedUsGrabber?cachecommand=clear&group=demo
52
- OR
33
+ * Example 1
34
+ def index
35
+ @grabber = feedUsGrabber(:FeedUsURL => 'http://dev.render.feed.us/Feed.aspx?g=98397b1c-5494-de11-938c-00304891151d',:FeedUsCacheInterval => CI_DAYS, :FeedUsCacheIntervalLength => 2, :FeedUsCacheGroup => 'demo')
36
+ end
37
+
38
+ * Example 2 The most basic configuration is (Note you will replace the URL listed with the URL of your content from "Export" on Feed.Us):
39
+
40
+ def index
41
+ @grabber = feedUsGrabber(:FeedUsURL => 'http://dev.render.feed.us/Feed.aspx?g=98397b1c-5494-de11-938c-00304891151d')
42
+ end
53
43
 
54
- http://rails_app/FeedUsGrabber?group=demo
55
- 2. Clear entire cache
56
- http://rails_app/FeedUsGrabber?cachecommand=clearall
44
+ 3. Inside the view of the action add the following code to render your content
45
+ <%= feedUsGrabberRender @grabber %>
46
+
47
+ Example
48
+ index.erb of "test" looks like
49
+ <table>
50
+ <tr>
51
+ <td width='20%'>
52
+ <%= feedUsGrabberRender @grabber %>
53
+ </td>
54
+ <td> Some text </td>
55
+ </tr>
56
+ </table>
57
57
 
58
- LOCATION OF CACHE
59
- Cache is maintained under RAILS_ROOT/tmp
60
-
61
- LOCATION OF LOG
62
- Log is maintained under RAILS_ROOT/log/FeedUsGrabber.log
58
+ == CLEARING CACHE
59
+ To clear cache goto following url
60
+ http://rails_app/FeedUsGrabber
61
+ 1. Clear a specific cache group
62
+ http://rails_app/FeedUsGrabber?cachecommand=clear&group=demo
63
+ OR
64
+
65
+ http://rails_app/FeedUsGrabber?group=demo
66
+ 2. Clear entire cache
67
+ http://rails_app/FeedUsGrabber?cachecommand=clearall
68
+
69
+ == LOCATION OF CACHE
70
+ Cache is maintained under RAILS_ROOT/tmp
71
+
72
+ == LOCATION OF LOG
73
+ Log is maintained under RAILS_ROOT/log/FeedUsGrabber.log
63
74
 
64
75
  == Contributing to feed_us_grabber
65
76
 
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: 0.1.0
4
+ version: 0.1.1
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: 2012-08-16 00:00:00.000000000 Z
12
+ date: 2012-08-19 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: 96139695
127
+ hash: -293201279
128
128
  required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements: