social_nets_db 0.0.1 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/social_nets_db/db.yml +25 -25
- data/lib/social_nets_db/social_net.rb +5 -5
- data/lib/social_nets_db/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62d4c75398e3ad3aa5de120fb8d6712a7d993589a5d41770cbcc69bb2b292f6b
|
4
|
+
data.tar.gz: 9c13c27ba2d6d261b80cdb869f04940e4075a4d0ad07683f39f939e910598002
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49de6dc8f10faa23a5d78e8df0adc2b4f477d4dbbe0ffcab568810237a238466ce6ddcf5032348671a29bdd865e16cc2c09dcb87699b3d070290e15f4012fcbf
|
7
|
+
data.tar.gz: 37d1d959e60762d7b9f1fba82615443e71f12ab801516c149e0b1bce701e00bbb46a85ff744db56f443e16e7bf970c1404ea2d09d29cc74159ded0bf530f6ffa
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [0.0.5] - 2021-12-03
|
4
|
+
|
5
|
+
- Corrects an error in `uids`
|
6
|
+
|
7
|
+
## [0.0.4] - 2021-12-03
|
8
|
+
|
9
|
+
- Corrects an error in `values_for_select`
|
10
|
+
|
11
|
+
## [0.0.3] - 2021-12-03
|
12
|
+
|
13
|
+
- Corrects an error with email / website
|
14
|
+
|
15
|
+
## [0.0.2] - 2021-12-02
|
16
|
+
|
17
|
+
- Renames `:font_awesome` into `:font_awesome_4` because FA v5 and v6 may have different UIDs.
|
18
|
+
|
19
|
+
## [0.0.1] - 2021-12-02
|
20
|
+
|
21
|
+
- Initial
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -16,7 +16,7 @@ It stores data about social nets in a Ruby hash like so:
|
|
16
16
|
name: Behance
|
17
17
|
uid: behance
|
18
18
|
icons:
|
19
|
-
|
19
|
+
font_awesome_4: "behance"
|
20
20
|
color: "#1769ff"
|
21
21
|
url: behance.com
|
22
22
|
tags:
|
@@ -54,7 +54,7 @@ ul
|
|
54
54
|
- accounts.each do |account|
|
55
55
|
- net = SocialNetsDB.find account[:net_uid]
|
56
56
|
li
|
57
|
-
= fa_icon net.icons["
|
57
|
+
= fa_icon net.icons["font_awesome_4"], style: "color: #{net.color}"
|
58
58
|
=< link_to net.name, \
|
59
59
|
net.user_page(username: account[:username], account_id: account[:account_id]), \
|
60
60
|
target: "_blank", \
|
data/lib/social_nets_db/db.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
behance:
|
2
2
|
name: Behance
|
3
3
|
icons:
|
4
|
-
|
4
|
+
font_awesome_4: behance
|
5
5
|
color: "#1769ff"
|
6
6
|
domain: behance.com
|
7
7
|
tags:
|
@@ -37,7 +37,7 @@ bitclout:
|
|
37
37
|
blogger:
|
38
38
|
name: Blogger
|
39
39
|
icons:
|
40
|
-
|
40
|
+
font_awesome_4: "link"
|
41
41
|
color: "#ff8000"
|
42
42
|
domain: blogger.com
|
43
43
|
tags:
|
@@ -58,7 +58,7 @@ discord:
|
|
58
58
|
dribble:
|
59
59
|
name: Dribble
|
60
60
|
icons:
|
61
|
-
|
61
|
+
font_awesome_4: "dribble"
|
62
62
|
color: "#ea4c89"
|
63
63
|
domain: dribble.com
|
64
64
|
tags:
|
@@ -72,13 +72,12 @@ dribble:
|
|
72
72
|
email:
|
73
73
|
name: E-mail
|
74
74
|
icons:
|
75
|
-
|
75
|
+
font_awesome_4: "envelope-o"
|
76
76
|
color: "#ea4c89"
|
77
|
-
domain: gmail.com
|
78
77
|
tags:
|
79
78
|
- protocols
|
80
79
|
profile_url:
|
81
|
-
by_username:
|
80
|
+
by_username: "mailto:${uid}"
|
82
81
|
|
83
82
|
ens:
|
84
83
|
name: Ethereum namespace
|
@@ -86,14 +85,15 @@ ens:
|
|
86
85
|
color: "#5284ff"
|
87
86
|
domain: ens.domains
|
88
87
|
tags:
|
89
|
-
-
|
88
|
+
- crypto
|
89
|
+
- protocols
|
90
90
|
profile_url:
|
91
91
|
by_username: https://${uid}.eth
|
92
92
|
|
93
93
|
facebook:
|
94
94
|
name: Facebook
|
95
95
|
icons:
|
96
|
-
|
96
|
+
font_awesome_4: "facebook"
|
97
97
|
color: "#3C5A99"
|
98
98
|
domain: facebook.com
|
99
99
|
tags:
|
@@ -195,7 +195,7 @@ hh:
|
|
195
195
|
github:
|
196
196
|
name: GitHub
|
197
197
|
icons:
|
198
|
-
|
198
|
+
font_awesome_4: "github"
|
199
199
|
color: "#333333"
|
200
200
|
domain: github.com
|
201
201
|
tags:
|
@@ -208,7 +208,7 @@ github:
|
|
208
208
|
gitlab:
|
209
209
|
name: GitLab
|
210
210
|
icons:
|
211
|
-
|
211
|
+
font_awesome_4: "gitlab"
|
212
212
|
color: "#fa7035"
|
213
213
|
domain: gitlab.com
|
214
214
|
tags:
|
@@ -220,7 +220,7 @@ gitlab:
|
|
220
220
|
instagram:
|
221
221
|
name: Instagram
|
222
222
|
icons:
|
223
|
-
|
223
|
+
font_awesome_4: "instagram"
|
224
224
|
color: "#e1306c"
|
225
225
|
domain: instagram.com
|
226
226
|
tags:
|
@@ -241,7 +241,7 @@ lbry:
|
|
241
241
|
linkedin:
|
242
242
|
name: LinkedIn
|
243
243
|
icons:
|
244
|
-
|
244
|
+
font_awesome_4: "linkedin"
|
245
245
|
color: "#0077b5"
|
246
246
|
domain: linkedin.com
|
247
247
|
tags:
|
@@ -253,7 +253,7 @@ linkedin:
|
|
253
253
|
livejournal:
|
254
254
|
name: LiveJournal
|
255
255
|
icons:
|
256
|
-
|
256
|
+
font_awesome_4: "livejournal"
|
257
257
|
color: "#00A3D9"
|
258
258
|
domain: livejournal.com
|
259
259
|
tags:
|
@@ -287,7 +287,7 @@ manosphere:
|
|
287
287
|
medium:
|
288
288
|
name: Medium
|
289
289
|
icons:
|
290
|
-
|
290
|
+
font_awesome_4: "medium"
|
291
291
|
color: "#00ab6c"
|
292
292
|
domain: medium.com
|
293
293
|
tags:
|
@@ -334,7 +334,7 @@ odysee:
|
|
334
334
|
odnoklassniki:
|
335
335
|
name: Одноклассники
|
336
336
|
icons:
|
337
|
-
|
337
|
+
font_awesome_4: "odnoklassniki"
|
338
338
|
color: "#e47d08"
|
339
339
|
domain: ok.ru
|
340
340
|
tags:
|
@@ -346,7 +346,7 @@ odnoklassniki:
|
|
346
346
|
paypal:
|
347
347
|
name: PayPal
|
348
348
|
icons:
|
349
|
-
|
349
|
+
font_awesome_4: "paypal"
|
350
350
|
color: "#0070ba"
|
351
351
|
domain: paypal.com
|
352
352
|
tags:
|
@@ -390,7 +390,7 @@ rokfin:
|
|
390
390
|
rumble:
|
391
391
|
name: Rumble
|
392
392
|
icons:
|
393
|
-
|
393
|
+
font_awesome_4: "play-circle"
|
394
394
|
color: "#74a441"
|
395
395
|
domain: rumble.com
|
396
396
|
tags:
|
@@ -402,7 +402,7 @@ rumble:
|
|
402
402
|
stackoverflow:
|
403
403
|
name: StackOverflow
|
404
404
|
icons:
|
405
|
-
|
405
|
+
font_awesome_4: "stackoverflow"
|
406
406
|
color: "#F48024"
|
407
407
|
domain: stackoverflow.com
|
408
408
|
tags:
|
@@ -435,7 +435,7 @@ substack:
|
|
435
435
|
telegram:
|
436
436
|
name: Telegram
|
437
437
|
icons:
|
438
|
-
|
438
|
+
font_awesome_4: "telegram"
|
439
439
|
color: "#0088cc"
|
440
440
|
domain: telegram.com
|
441
441
|
tags:
|
@@ -458,7 +458,7 @@ tiktok:
|
|
458
458
|
twitter:
|
459
459
|
name: Twitter
|
460
460
|
icons:
|
461
|
-
|
461
|
+
font_awesome_4: "twitter"
|
462
462
|
color: "#1da1f2"
|
463
463
|
domain: twitter.com
|
464
464
|
tags:
|
@@ -481,7 +481,7 @@ upwork:
|
|
481
481
|
vkontakte:
|
482
482
|
name: Вконтакте
|
483
483
|
icons:
|
484
|
-
|
484
|
+
font_awesome_4: "vk"
|
485
485
|
color: "#45668e"
|
486
486
|
domain: vkontakte.com
|
487
487
|
tags:
|
@@ -493,7 +493,7 @@ vkontakte:
|
|
493
493
|
youtube:
|
494
494
|
name: YouTube
|
495
495
|
icons:
|
496
|
-
|
496
|
+
font_awesome_4: "youtube"
|
497
497
|
color: "#ff0000"
|
498
498
|
domain: youtube.com
|
499
499
|
tags:
|
@@ -503,9 +503,9 @@ youtube:
|
|
503
503
|
by_account_id: "https://${domain}/channel/${uid}"
|
504
504
|
|
505
505
|
youtube_profile:
|
506
|
-
name: YouTube
|
506
|
+
name: YouTube profile
|
507
507
|
icons:
|
508
|
-
|
508
|
+
font_awesome_4: "youtube"
|
509
509
|
color: "#ff0000"
|
510
510
|
domain: youtube.com
|
511
511
|
tags:
|
@@ -516,7 +516,7 @@ youtube_profile:
|
|
516
516
|
website:
|
517
517
|
name: Web site
|
518
518
|
icons:
|
519
|
-
|
519
|
+
font_awesome_4: "link"
|
520
520
|
color: "#ff0000"
|
521
521
|
domain:
|
522
522
|
tags:
|
@@ -38,10 +38,10 @@ class SocialNetsDB
|
|
38
38
|
|
39
39
|
if username && page["by_username"]
|
40
40
|
fail ArgumentError, "Either a username or an account id must be provided" unless present_str?(username)
|
41
|
-
template.sub("${domain}", domain).sub("${uid}", username)
|
41
|
+
template.sub("${domain}", domain.to_s).sub("${uid}", username)
|
42
42
|
elsif account_id && page["by_account_id"]
|
43
43
|
fail ArgumentError, "Either a username or an account id must be provided" unless present_str?(account_id)
|
44
|
-
template.sub("${domain}", domain).sub("${uid}", account_id)
|
44
|
+
template.sub("${domain}", domain.to_s).sub("${uid}", account_id)
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -92,15 +92,15 @@ class SocialNetsDB
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def names
|
95
|
-
RECORDS.map { |uid, data| data[
|
95
|
+
RECORDS.map { |uid, data| data["name"] }
|
96
96
|
end
|
97
97
|
|
98
98
|
def uids
|
99
|
-
RECORDS.map
|
99
|
+
RECORDS.keys.map(&:to_s)
|
100
100
|
end
|
101
101
|
|
102
102
|
def values_for_select
|
103
|
-
RECORDS.map { |uid, data| [data[
|
103
|
+
RECORDS.map { |uid, data| [data["name"], uid] }
|
104
104
|
end
|
105
105
|
|
106
106
|
alias_method :find, :find_by_uid
|