popularity 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0048626f9fa80640a2fa1fe48db95e65435fd88c
4
- data.tar.gz: 06cb57772c17993c8cbfefff1ed8a8494e07ca2b
3
+ metadata.gz: 8f43df47453436c7ba42f3d70d5196f939f518a5
4
+ data.tar.gz: 8261963d61f74d92a8b06767d936a843d2d04c45
5
5
  SHA512:
6
- metadata.gz: 7f74093f5e0170d6ca1a7b35deac27dd4e74a9a2ed3cddd7b84f168078342114e560a72fa7e10de5ec4c7f41c93761705aacaa2a8e88a459d469f8b49ba4fb56
7
- data.tar.gz: 2da61d6f6a64cfdb6d0e5d84d713b06cc5ec609e0883f2cc3e71daa6d0e498f6cbd88369888355d769c517deffe8badfda6bab95adc6574f19afecebd8973a69
6
+ metadata.gz: 5d867060540e84600a65bf8f33202314cc245466743a9b1acf64630c91964fe620624d56b435c6558bba88c9fb12ce54da34a201d5cc5be22c1d6ff45d97a95d
7
+ data.tar.gz: 5e98e6ab95d4b38dc6e957523107d5e867a9712e517a43abb58c9f3d98ab992b48272f7d27c007ea091432a56789e1a65b3910278e85f3645b8240c92cf38bfa
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -44,4 +44,32 @@ module Popularity
44
44
  "#{@url}.json"
45
45
  end
46
46
  end
47
+
48
+ class RedditResult < RedditPost
49
+ # A stubbed out version of a RedditPost so RedditShare can
50
+ # stub in the json response it already has
51
+
52
+ def initialize(url, r)
53
+ super(url)
54
+ @response = r
55
+
56
+ self
57
+ end
58
+
59
+ def has_response?
60
+ true
61
+ end
62
+
63
+ def valid?
64
+ URI.parse(@url).host
65
+ end
66
+
67
+ def fetch
68
+ false
69
+ end
70
+
71
+ def fetch_async
72
+ false
73
+ end
74
+ end
47
75
  end
@@ -1,32 +1,8 @@
1
+
1
2
  module Popularity
2
3
  class RedditShare < Crawler
3
4
  include Popularity::ContainerMethods
4
5
 
5
- class RedditResult < Popularity::RedditPost
6
- def initialize(url, r)
7
- super(url)
8
- @response = r
9
-
10
- self
11
- end
12
-
13
- def has_response?
14
- true
15
- end
16
-
17
- def valid?
18
- URI.parse(@url).host
19
- end
20
-
21
- def fetch
22
- false
23
- end
24
-
25
- def fetch_async
26
- false
27
- end
28
- end
29
-
30
6
  def initialize(*args)
31
7
  super(*args)
32
8
  posts_json = response_json["data"]["children"]
data/popularity.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: popularity 0.1.0 ruby lib
5
+ # stub: popularity 0.1.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "popularity"
9
- s.version = "0.1.0"
9
+ s.version = "0.1.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Jeff Keen"]
14
- s.date = "2015-04-10"
14
+ s.date = "2015-04-11"
15
15
  s.description = "Supports Facebook, Twitter, Pinterest, Reddit (Links, Posts, and Comments), Github, Soundcloud, Medium, and Rubygems"
16
16
  s.email = "jeff@keen.me"
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popularity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Keen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-10 00:00:00.000000000 Z
11
+ date: 2015-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: open_uri_redirections