social_shares 0.3.2 → 0.3.3

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: 68ed4dccbb12f249991e6e45978c595f5b615bc1
4
- data.tar.gz: 15d506f7f27c0bd24777a012b567941f9b8c6b01
3
+ metadata.gz: 0ef85c357efabd0a1c0e50b506ac65696186d8f8
4
+ data.tar.gz: 5074d394a1ae7d4a61936706e5424a5f5be0076e
5
5
  SHA512:
6
- metadata.gz: e2495e9bdd8e87f6ad6cd20567ab22f9db316de48f22f2557fa69c871a724ce7074b72661c3eac22b0521811a374b6e3fccb13eb84f3aa86d8a05355569255cd
7
- data.tar.gz: d49f4ce29c7083df52e1df987f00889130c7b0643386d608a36642f5dfd3b55d5d63892dbdbd0ec91b487dec852540737610f5dc1919d0a838907b71478d994a
6
+ metadata.gz: 19fe64d35664fba401fae204b5eee8b2f7e559b63a21052604bd53ac76c10e84a5ce44136ff5cfb5d3da19ebfdbf7f72279ea94c55042964a728ff037e659d7f
7
+ data.tar.gz: d5256abfdf3a0e90ec5deeac10b8e4dfcfdf4d2fbd4d09f953bdcddc22c82cff08d3ac38d3d8d4474ecdd521924de690d56ebd1d96f37d54e9113cb49a245784
data/README.md CHANGED
@@ -27,6 +27,9 @@ Russian:
27
27
  Chinese:
28
28
  * [weibo](http://www.weibo.com)
29
29
 
30
+ Japanese:
31
+ * [hatebu](http://b.hatena.ne.jp/)
32
+
30
33
  Basic usage
31
34
  -----
32
35
  ```ruby
@@ -0,0 +1,13 @@
1
+ module SocialShares
2
+ class Hatebu < Base
3
+ URL = 'http://api.b.st-hatena.com/entry.count'
4
+
5
+ def shares!
6
+ response = get(URL, params: {
7
+ url: checked_url
8
+ })
9
+ # response.body.to_i returns status code instead of body converted to integer
10
+ response.body.empty? ? 0 : response.body.to_f.to_i
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module SocialShares
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
data/lib/social_shares.rb CHANGED
@@ -15,6 +15,7 @@ require 'social_shares/pinterest'
15
15
  require 'social_shares/stumbleupon'
16
16
  require 'social_shares/weibo'
17
17
  require 'social_shares/buffer'
18
+ require 'social_shares/hatebu'
18
19
 
19
20
  module SocialShares
20
21
  class << self
@@ -37,6 +38,7 @@ module SocialShares
37
38
  :stumbleupon,
38
39
  :weibo,
39
40
  :buffer,
41
+ :hatebu,
40
42
  ]
41
43
 
42
44
  def supported_networks
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_shares
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timur Kozmenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-26 00:00:00.000000000 Z
11
+ date: 2017-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -97,6 +97,7 @@ files:
97
97
  - lib/social_shares/buffer.rb
98
98
  - lib/social_shares/facebook.rb
99
99
  - lib/social_shares/google.rb
100
+ - lib/social_shares/hatebu.rb
100
101
  - lib/social_shares/linkedin.rb
101
102
  - lib/social_shares/mail_ru.rb
102
103
  - lib/social_shares/odnoklassniki.rb