sharedcount 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/sharedcount/api.rb +1 -2
- data/lib/sharedcount/data.rb +19 -18
- data/lib/sharedcount/version.rb +1 -1
- data/sharedcount.gemspec +7 -2
- metadata +78 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0266ae0e11ce075aa619f0d019109ee62fd0d19b
|
4
|
+
data.tar.gz: def78610ec6e6b8a84cf4e1e7e2745a668999c57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59ace3494805c885cb2211566a46c817cd938d1b94e5b8d111c9d7d3e93c8cc62b0501547317f992d1378860e36ba13e7997af394939dbdba5f49f440b86fee1
|
7
|
+
data.tar.gz: 7d4a6083b95adcc4ef6520b4e71476e15a9113ab48864a7a4e079a8fa02bce215df6b7e9c84f36798a8381687792c655b26ab149c5dd7e67e6cbf95fe9d0a7b2
|
data/.gitignore
CHANGED
data/lib/sharedcount/api.rb
CHANGED
data/lib/sharedcount/data.rb
CHANGED
@@ -5,27 +5,28 @@ module Sharedcount
|
|
5
5
|
:facebook_clicks, :facebook_total, :facebook_comments, :facebook_likes,
|
6
6
|
:facebook_shares, :delicious_shares, :google_plus_one, :google_buzzs,
|
7
7
|
:twitter_shares, :pinterest_shares, :digg_shares, :linkedin_shares,
|
8
|
-
:total_actions, :raw_data
|
8
|
+
:total_actions, :json_data, :raw_data
|
9
9
|
|
10
|
-
def initialize(
|
10
|
+
def initialize(json_data)
|
11
11
|
|
12
|
-
self.
|
12
|
+
self.json_data = json_data
|
13
|
+
self.raw_data = JSON.parse(json_data)
|
13
14
|
|
14
|
-
self.stumble_upon_shares = (
|
15
|
-
self.reddit_shares = (
|
16
|
-
self.delicious_shares = (
|
17
|
-
self.google_plus_one = (
|
18
|
-
self.google_buzzs = (
|
19
|
-
self.twitter_shares = (
|
20
|
-
self.digg_shares = (
|
21
|
-
self.pinterest_shares = (
|
22
|
-
self.linkedin_shares = (
|
23
|
-
self.facebook_commentsbox = (
|
24
|
-
self.facebook_clicks = (
|
25
|
-
self.facebook_total = (
|
26
|
-
self.facebook_comments = (
|
27
|
-
self.facebook_likes = (
|
28
|
-
self.facebook_shares = (
|
15
|
+
self.stumble_upon_shares = (self.raw_data["StumbleUpon"] || nil)
|
16
|
+
self.reddit_shares = (self.raw_data["Reddit"] || nil)
|
17
|
+
self.delicious_shares = (self.raw_data["Delicious"] || nil)
|
18
|
+
self.google_plus_one = (self.raw_data["GooglePlusOne"] || nil)
|
19
|
+
self.google_buzzs = (self.raw_data["Buzz"] || nil)
|
20
|
+
self.twitter_shares = (self.raw_data["Twitter"] || nil)
|
21
|
+
self.digg_shares = (self.raw_data["Diggs"] || nil)
|
22
|
+
self.pinterest_shares = (self.raw_data["Pinterest"] || nil)
|
23
|
+
self.linkedin_shares = (self.raw_data["LinkedIn"] || nil)
|
24
|
+
self.facebook_commentsbox = (self.raw_data["Facebook"]["commentsbox_count"] || nil)
|
25
|
+
self.facebook_clicks = (self.raw_data["Facebook"]["click_count"] || nil)
|
26
|
+
self.facebook_total = (self.raw_data["Facebook"]["total_count"] || nil)
|
27
|
+
self.facebook_comments = (self.raw_data["Facebook"]["comment_count"] || nil)
|
28
|
+
self.facebook_likes = (self.raw_data["Facebook"]["like_count"] || nil)
|
29
|
+
self.facebook_shares = (self.raw_data["Facebook"]["share_count"] || nil)
|
29
30
|
|
30
31
|
self.total_actions = self.stumble_upon_shares + self.reddit_shares + self.delicious_shares + self.google_plus_one + self.google_buzzs + self.twitter_shares + self.digg_shares + self.pinterest_shares + self.linkedin_shares + self.facebook_total
|
31
32
|
|
data/lib/sharedcount/version.rb
CHANGED
data/sharedcount.gemspec
CHANGED
@@ -22,6 +22,11 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency "faraday", '~> 0.9', '>= 0.9.0'
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.10"
|
25
|
-
spec.add_development_dependency "rake", "~> 10.
|
26
|
-
spec.add_development_dependency "rspec"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.1"
|
26
|
+
spec.add_development_dependency "rspec","~> 3.3"
|
27
|
+
spec.add_development_dependency "vcr", "~> 2.9"
|
28
|
+
spec.add_development_dependency "webmock", "~> 1.21"
|
29
|
+
spec.add_development_dependency "simplecov", "~> 0.10"
|
30
|
+
spec.add_development_dependency "coveralls", "~> 0.8"
|
31
|
+
spec.add_development_dependency "yard", "~> 0.8"
|
27
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sharedcount
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Mostosi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -50,28 +50,98 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '10.
|
53
|
+
version: '10.1'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '10.
|
60
|
+
version: '10.1'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rspec
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - "
|
65
|
+
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '3.3'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - "
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '3.3'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: vcr
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '2.9'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '2.9'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: webmock
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.21'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '1.21'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: simplecov
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0.10'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0.10'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: coveralls
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0.8'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0.8'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: yard
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0.8'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
73
143
|
- !ruby/object:Gem::Version
|
74
|
-
version: '0'
|
144
|
+
version: '0.8'
|
75
145
|
description: Connector for SharedCount API service
|
76
146
|
email:
|
77
147
|
- andrea.mostosi@zenkay.net
|