share_counter 0.1.3 → 0.1.4
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 +4 -4
- data/lib/share_counter/version.rb +1 -1
- data/lib/share_counter.rb +1 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2d0fa373642896c7cea9f8dd6025750172613b1
|
4
|
+
data.tar.gz: a32660024d0996aec33f576f077913233ae9c49c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eff5826f3992269f1976e85910efb20d9056fa3c6f94a1ebcfb7cffa7711e0ba47f654c132484d0ae617531f33cb2253e959e98455823a448df0863efdb50a4
|
7
|
+
data.tar.gz: 8779b027912b04aec6ca2560307b0a1707545322d83466712fa35da755e4afed409e4e08a479e4a2f2451a23cd93250f259519473f4e7c390a34e6d2433f38d2
|
data/lib/share_counter.rb
CHANGED
@@ -45,7 +45,7 @@ module ShareCounter
|
|
45
45
|
def self.seomoz url, access_id, secret
|
46
46
|
client = Linkscape::Client.new(accessID: access_id, secret: secret)
|
47
47
|
response = client.urlMetrics(get_host_without_www(url), cols: :all)
|
48
|
-
{ mozrank: response.data['source'][:mozrank], page_authority: response.data['source'][:page_authority] }
|
48
|
+
{ mozrank: response.data['source'][:mozrank], page_authority: response.data['source'][:page_authority], domain_authority: response.data['source'][:domain_authority]}
|
49
49
|
end
|
50
50
|
|
51
51
|
def self.supported_networks
|
@@ -63,12 +63,6 @@ module ShareCounter
|
|
63
63
|
|
64
64
|
private
|
65
65
|
|
66
|
-
# URL always gets parsed twice
|
67
|
-
def self.get_host_without_www(url)
|
68
|
-
url = "http://#{url}" if URI.parse(url).scheme.nil?
|
69
|
-
host = URI.parse(url).host.downcase
|
70
|
-
end
|
71
|
-
|
72
66
|
def self.make_request *args
|
73
67
|
result = nil
|
74
68
|
attempts = 1
|