feedie_the_feed 0.2.0 → 0.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1902638b99d250f6b9af85dbcc2f20e177b246f9
4
- data.tar.gz: f8f95a0b6ad6ad12b3ede181df0784cf2314e27a
3
+ metadata.gz: ed73ac147945d28aa2ce8c81cc10df6ad2e6990d
4
+ data.tar.gz: 0ea6bca1c16b9b7b10ea8b639e2082fb5b23e4b5
5
5
  SHA512:
6
- metadata.gz: '098a225782d3e05b6e2a10ef51da41696037646abfa9ff6d0e875dab86e8d27d8591f44ab7c3179e0eaf167fe0917d1d8a72727eb89f64b6f780a096c1f0f8d6'
7
- data.tar.gz: 3c195f611068f7409fa9c605bc2b1ff2d54769b153cd9643524c0546bccd946564f94944fb23d0b47cea89ca863f92b6225b1098beb4053bbe730ab70bf356e7
6
+ metadata.gz: 6f7226a7183f2be07a2515bb5333987887c45cc8a9027cb3c82859ab3879b8774bbfff0569f1cbfba0fd71fa0723d7af5e5d0bef94c6668c7bd2ab7a5b9a54cd
7
+ data.tar.gz: cdb8b18f7483fc55b468a511717cba6e6cd38e77e857e8a1af860d145ddddb1245c7bb7d9bc0307de7623d9018ae1efaf04d7b474ac28fb94f871227c8b3de11
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/krabique48/feedie_the_feed.svg?branch=master)](https://travis-ci.org/krabique48/feedie_the_feed)
1
+ [![Build Status](https://travis-ci.org/krabique48/feedie_the_feed.svg?branch=master)](https://travis-ci.org/krabique48/feedie_the_feed) [![Gem Version](https://badge.fury.io/rb/feedie_the_feed.svg)](https://badge.fury.io/rb/feedie_the_feed) [![Dependency Status](https://gemnasium.com/badges/github.com/krabique48/feedie_the_feed.svg)](https://gemnasium.com/github.com/krabique48/feedie_the_feed) [![Maintainability](https://api.codeclimate.com/v1/badges/2b6e9817b3a7664751a5/maintainability)](https://codeclimate.com/github/krabique48/feedie_the_feed/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/2b6e9817b3a7664751a5/test_coverage)](https://codeclimate.com/github/krabique48/feedie_the_feed/test_coverage)
2
2
 
3
3
  # Feedie The Feed
4
4
 
@@ -31,10 +31,10 @@ git clone git@github.com:krabique48/feedie_the_feed.git
31
31
 
32
32
  ### Running the tests
33
33
 
34
- Just run RSpec and watch it go green! But you'll have to clone the repo for that, since tests aren't included in the gem.
34
+ Just run rake and watch it go green for RSpec and RuboCop!
35
35
 
36
36
  ```
37
- rspec spec/*
37
+ rake
38
38
  ```
39
39
 
40
40
  ### Documentation
@@ -73,9 +73,19 @@ To use the gem with Facebook you'll have to use your Facebook AppID and Facebook
73
73
 
74
74
  ```
75
75
  @feed_grabber = FeedieTheFeed::FeedGrabber.new
76
- @feed_grabber.get('https://www.facebook.com/PokerGP')
76
+ @feed_grabber.get('https://www.facebook.com/ruby.programming')
77
77
  ```
78
78
 
79
+ ### Module method
80
+
81
+ You can also do this, without explicitly creating an object, as a shortcut.
82
+
83
+ ```
84
+ FeedieTheFeed.get('https://www.facebook.com/ruby.programming')
85
+ ```
86
+
87
+ It acts just like as if you have created a FeedieTheFeed::FeedGrabber instance, and called it's get instance method.
88
+
79
89
  #### Facebook credentials priorities
80
90
 
81
91
  Facebook AppID and secret key follow a priority rule:
@@ -89,7 +99,7 @@ So, you can also provide the Facebook credentials as parameters in the get metho
89
99
  ```
90
100
  @feed_grabber = FeedieTheFeed::FeedGrabber.new
91
101
  @feed_grabber.get(
92
- 'https://www.facebook.com/PokerGP',
102
+ 'https://www.facebook.com/ruby.programming',
93
103
  facebook_appid: '123',
94
104
  facebook_secret: '123'
95
105
  )
@@ -102,12 +112,12 @@ Or during object creation:
102
112
  facebook_appid: '123',
103
113
  facebook_secret: '123'
104
114
  )
105
- @feed_grabber.get('https://www.facebook.com/PokerGP')
115
+ @feed_grabber.get('https://www.facebook.com/ruby.programming')
106
116
  ```
107
117
 
108
118
  #### Facebook posts limit
109
119
 
110
- You can also set the amount of posts you want to get, similarily to Facebook credentials (it also follows the same priority rule):
120
+ You can also set the amount of posts you want to get, similarly to Facebook credentials (it also follows the same priority rule):
111
121
 
112
122
  ```
113
123
  @feed_grabber = FeedieTheFeed::FeedGrabber.new(facebook_posts_limit: 50)
@@ -145,6 +155,18 @@ plus some additional ones that may not always be there, due to the nature of Fac
145
155
  'image'
146
156
  ```
147
157
 
158
+ `'title'`, if not provided, will be automatically generated based on `'summary'`, and will not exceed 80 characters (exactly like RoR truncate(80) method). For example,
159
+
160
+ ```
161
+ summary: The Grand Finals of the #ManilaMasters will start in less than an hour. Newbee or Evil Geniuses, who are you rooting for?
162
+ ```
163
+
164
+ will turn to
165
+
166
+ ```
167
+ title: The Grand Finals of the #ManilaMasters will start is less than an hour...
168
+ ```
169
+
148
170
  ##### RSS
149
171
 
150
172
  With RSS, the only two keys that would be there no matter what are `entry_id` and `url`, due to the nature of RSS. Although, most of the time, some other keys will also be present:
@@ -178,5 +200,4 @@ With RSS, the only two keys that would be there no matter what are `entry_id` an
178
200
 
179
201
  ## Authors
180
202
 
181
- * **Oleg Larkin** - *Initial work* -
182
- [krabique48](https://github.com/krabique48) (krabique48@gmail.com)
203
+ * **Oleg Larkin** - *Initial work* - [krabique48](https://github.com/krabique48) (krabique48@gmail.com)
@@ -1,4 +1,4 @@
1
1
  module FeedieTheFeed
2
2
  # Current version of the gem
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.3.0'.freeze
4
4
  end
@@ -2,4 +2,8 @@ require 'feedie_the_feed/feed_grabber'
2
2
 
3
3
  # This is the main namespace of the gem
4
4
  module FeedieTheFeed
5
+ # {FeedGrabber#get}
6
+ def self.get(url, options = {})
7
+ FeedGrabber.new.get(url, options)
8
+ end
5
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feedie_the_feed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerry Wisdom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-25 00:00:00.000000000 Z
11
+ date: 2017-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: feedjira
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: nesty
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: public_suffix
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -53,19 +67,19 @@ dependencies:
53
67
  - !ruby/object:Gem::Version
54
68
  version: '3.0'
55
69
  - !ruby/object:Gem::Dependency
56
- name: nesty
70
+ name: rake
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :runtime
75
+ version: '12.2'
76
+ type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: '1.0'
82
+ version: '12.2'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rspec
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +94,62 @@ dependencies:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
96
  version: '3.7'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.51'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.51'
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.15'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.15'
125
+ - !ruby/object:Gem::Dependency
126
+ name: sinatra
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '2.0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '2.0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: webmock
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '3.1'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '3.1'
83
153
  description: A feed posts aggregator for rss and facebook pages
84
154
  email:
85
155
  - krabique48@gmail.com