ids_please 2.1.1 → 2.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f282a4ee45b75e27744745a696bf9e2572addb19
4
- data.tar.gz: 29653b59cf0b17c10d57174abf335f43a2964de6
3
+ metadata.gz: 8da387525f9002e6b61c37a156ab3463eddc1f13
4
+ data.tar.gz: 1b011d8e71246e51a912afc902b976d9e77bdcaa
5
5
  SHA512:
6
- metadata.gz: caadb181abdf9cf62b1bfc1f077ae002c2e94f97bf0c1b1460a01613efcabf2a24f1c2d5bc854d7682b444ec1d22570fa3a5b22a9fe720d0a0a515b0cf5706dc
7
- data.tar.gz: 5341a16843794409791411e5c61c0b84f5dd155a47350bff2eb05857276a18d0c4fb3323f0a937fca4e6fc4a889b52e0fe03436c14da32967acae1ef076c2b6a
6
+ metadata.gz: a40722b50e4e5105b965feb3ef03264bbde369bec2a5b9d52407111a618cc06e05c7a0eef3ca6fece82f1889f020752a74fa89a05b07b2f95fd28b7481fff18b
7
+ data.tar.gz: 014973413f0ff8677839a3b82d7ba73896e4d345fdd33ed93b800f8bf91048b29db4918ceaa0f702d4c11226df9071a52cbb76f9f94b3ad7cea1a0e79c3a3e31
data/README.md CHANGED
@@ -2,14 +2,19 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/gazay/ids_please.svg)](https://codeclimate.com/github/gazay/ids_please) [![ids_please API Documentation](https://www.omniref.com/ruby/gems/ids_please.png)](https://www.omniref.com/ruby/gems/ids_please)
4
4
 
5
+ ![IDs, Please](https://raw.githubusercontent.com/gazay/ids_please/gh-pages/doc/ids-grey.png)
6
+
5
7
  Grab some hidden in html data from social account page. Get social network IDs or screen names from links to social network accounts.
6
8
 
7
- Sometimes you need to get a social network account name from a link
8
- to store a screen name in your database instead of parsing the link every time,
9
+ Sometimes you need to get a social network account name from a link. To store a screen name in your database instead of parsing the link every time,
9
10
  or maybe to work with these accounts using social network APIs (as I do).
10
11
  Would be easier to have a library that extracts this kind of information
11
12
  from all known social networks for your pleasure.
12
13
 
14
+ <a href="https://amplifr.com/?utm_source=ids_please-gem">
15
+ <img src="https://amplifr.com/logo.png" alt="Amplifr" width="162" height="162">
16
+ </a>
17
+
13
18
  <a href="https://evilmartians.com/?utm_source=ids_please">
14
19
  <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
15
20
  </a>
@@ -28,18 +33,18 @@ gem 'ids_please'
28
33
 
29
34
  ## Usage
30
35
 
31
- This gem works in two modes – you can get real data from social network by http request and page parsing
32
- and you can just parse link to social account to find username/id. Sometimes username from link can't be
33
- used with social network's API, in this case try to get real ID with grab mode.
36
+ This gem works in two modes – you can get real data from social network by HTTP request and page parsing
37
+ and you can just parse a link to social account to find username/id. Sometimes username from link can't be
38
+ used with social network's API, in this case, try to get real ID with grab mode.
34
39
 
35
40
  ### Grabbing data from social account's page
36
41
 
37
- This functionality works through real http requests, so if you feed it with many links – it can take a while.
42
+ This functionality works through real HTTP requests, so if you feed it with many links – it can take a while.
38
43
 
39
44
  As Facebook shows data only from public pages and public groups – in most cases you can't gather data from
40
- any profile page. Same thing about private `instagram` accounts, profiles and private groups in `vk`.
45
+ any profile page. Same thing about private `Instagram` accounts, profiles and private groups in `vk`.
41
46
 
42
- Also you should provide real urls with right protocols. For example you will not receive any data from `http://facebook.com/Microsoft`,
47
+ Also, you should provide real URLs with right protocols. For example, you will not receive any data from `http://facebook.com/Microsoft`,
43
48
  but from `https://facebook.com/Microsoft` you'll receive all data as in example below:
44
49
 
45
50
  ```ruby
@@ -127,7 +132,11 @@ Special thanks to @ai, @yaroslav, @whitequark
127
132
 
128
133
  ## Notes
129
134
 
130
- Gem named under an impression of an awesome game called [Papers, please](http://papersplea.se/)
135
+ Gem named under an impression of an awesome game called [Papers, please](http://papersplea.se/).
136
+
137
+ Logo of gem also was inspired by its logo.
138
+
139
+ Thanks [@dukope](https://twitter.com/dukope) for allowing me to do this!
131
140
 
132
141
  ## License
133
142
 
@@ -29,6 +29,18 @@ class IdsPlease
29
29
  "#{self.class}##{self.object_id} #{line[1..-1]}"
30
30
  end
31
31
 
32
+ def to_h
33
+ {
34
+ avatar: avatar,
35
+ display_name: display_name,
36
+ username: username,
37
+ link: link,
38
+ page_source: page_source,
39
+ network_id: network_id,
40
+ data: data
41
+ }
42
+ end
43
+
32
44
  def inspect
33
45
  to_s
34
46
  end
@@ -1,3 +1,3 @@
1
1
  class IdsPlease
2
- VERSION = '2.1.1'
2
+ VERSION = '2.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ids_please
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - gazay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-06 00:00:00.000000000 Z
11
+ date: 2015-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake