tramway-profiles 1.4.0.1 → 1.4.1
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/app/helpers/tramway/profiles/links_helper.rb +12 -23
- data/lib/tramway/profiles/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b4145d261d0aa604bcb7fd66b497dfaef037ab43e5274ee7dc76a12ee1fd9d09
|
|
4
|
+
data.tar.gz: d2275491d22eda25c2c21d61f6a7aaa1cdf418626d8565704afbf5b04d7905b1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b6fe19f14cfbccf69df677e3975ad47088f5a60d78bc26c3c07b17b5bde907b868468f3d1ae0ed7bd52c52bbf47a8bf5903b672e9d2f36a163f41c4a8cb33bc
|
|
7
|
+
data.tar.gz: e54ee2db7e2afc18a818c5f3e5b0cab18f7a40b2f57038855e798d04d08671af4bfd908df18667ce0a7dbc7635430baa69c7e2153695cb15dd19584acdda9df6
|
|
@@ -2,34 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
module Tramway::Profiles::LinksHelper
|
|
4
4
|
def profile_link(profile)
|
|
5
|
-
|
|
5
|
+
profile_link_template profile.title, profile_url(profile), profile.network_name
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
DOMAINS = {
|
|
9
|
+
vk: 'vk.com',
|
|
10
|
+
facebook: 'facebook.com',
|
|
11
|
+
twitter: 'twitter.com',
|
|
12
|
+
instagram: 'instagram.com',
|
|
13
|
+
telegram: 'intg.me',
|
|
14
|
+
patreon: 'patreon.com'
|
|
15
|
+
}.with_indifferent_access
|
|
13
16
|
|
|
14
|
-
def
|
|
15
|
-
|
|
17
|
+
def profile_url(profile)
|
|
18
|
+
"https://#{DOMAINS[profile.network_name]}/#{profile.uid}"
|
|
16
19
|
end
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
profile_link_template title, "https://twitter.com/#{uid}", :twitter
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def instagram(uid, title)
|
|
23
|
-
profile_link_template title, "https://instagram.com/#{uid}", :instagram
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def telegram(uid, title)
|
|
27
|
-
profile_link_template title, "https://intg.me/#{uid}", :telegram
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def patreon(uid, title)
|
|
31
|
-
profile_link_template title, "https://patreon.com/#{uid}", :patreon
|
|
32
|
-
end
|
|
21
|
+
private
|
|
33
22
|
|
|
34
23
|
def profile_link_template(title, link, icon)
|
|
35
24
|
link_to link, target: '_blank' do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tramway-profiles
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pavel Kalashnikov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-03-
|
|
11
|
+
date: 2020-03-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Rails engine for social networks profiles
|
|
14
14
|
email:
|