virility 0.1.3 → 0.1.4

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: d541ebf042336379aeb1ddbbf5eb8f55762c6770
4
- data.tar.gz: 8f4206593f7b132a797492ee1836bdf33e083788
3
+ metadata.gz: 192acfdf2d757a8fd21934d481e5b76879bce823
4
+ data.tar.gz: 71f7a4ff20a49e39d5228132ed10513485afff84
5
5
  SHA512:
6
- metadata.gz: ed364ba501cf7304b289318736996b6970fdda227ffc13370e9521b756ee9e2b95c21609bfd55e0213080e7dfa772bbf0513c0764014d3dbda5edd92aee9e2d7
7
- data.tar.gz: bc480d6ef6397b2b04c1ced551be7b329fc560abbfa76e5e230a1a2117e86436353bf6b0ee6401cddeee883e4a259a67ae94a25a2c0f18a601ec94fdef38aead
6
+ metadata.gz: 86ac8277dcb48e7559f035b24e3d736e3c37c53fbd70dfcd17cf62452de1fb020f5e37a83824881cab6462f428d8140f9dce3ec3c331e1671dd94f53f9be9b8d
7
+ data.tar.gz: 0fe93108823ec634512bb5810524fa8a8a384a7c3df89bb38efc72959958abefccaa77ef96c5925f20484df0224612adab85129e6edcbe740f946b302556d977
@@ -1,6 +1,12 @@
1
1
  module Virility
2
2
  class Delicious < Strategy
3
3
 
4
+ parser(
5
+ Proc.new do |body, format|
6
+ MultiJson.decode(body.scan(/(\{.+\})/).flatten.first)
7
+ end
8
+ )
9
+
4
10
  def census
5
11
  self.class.get("http://feeds.delicious.com/v2/json/urlinfo/data?url=#{@url}")
6
12
  end
@@ -6,14 +6,14 @@ module Virility
6
6
  MultiJson.decode(body)["result"]
7
7
  end
8
8
  )
9
-
9
+
10
10
  def census
11
11
  self.class.get("http://www.stumbleupon.com/services/1.01/badge.getinfo?url=#{@url}")
12
12
  end
13
-
13
+
14
14
  def count
15
15
  results["views"] || 0
16
16
  end
17
-
17
+
18
18
  end
19
19
  end
@@ -1,3 +1,3 @@
1
1
  module Virility
2
- VERSION = "0.1.3"
3
- end
2
+ VERSION = "0.1.4"
3
+ end
data/lib/virility.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'cgi'
2
2
  require 'httparty'
3
+ require 'multi_json'
3
4
 
4
5
  require 'virility/version'
5
6
  require 'virility/supporter'
data/virility.gemspec CHANGED
@@ -21,4 +21,5 @@ Gem::Specification.new do |gem|
21
21
  gem.add_development_dependency "rspec", "~> 2.6"
22
22
  # Dependencies
23
23
  gem.add_dependency "httparty", "~> 0.13"
24
+ gem.add_dependency "multi_json", "~> 1.0"
24
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Sanders
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.13'
41
+ - !ruby/object:Gem::Dependency
42
+ name: multi_json
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
  description: Virility leverages the API's of many popular social services to collect
42
56
  data about the virility of a particular URL.
43
57
  email: