sutty-liquid 0.7.0 → 0.7.1

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
  SHA256:
3
- metadata.gz: 658822833e2c35c0741555012f7c9661277e6cab4590e3492858f534b8504a7a
4
- data.tar.gz: 3b854a57718da74f498ccd7b115ee9e4c6238f98eba9a7fe8e8de7356f128037
3
+ metadata.gz: 71f4b369c3f6a7abf71811e1f5c9c95a69639c511507df0679b2a87bc2f84341
4
+ data.tar.gz: 4c86e2f9be638bd60a7f5a02cdfad76523e60fc07a98dd567da6950ebef6d1b3
5
5
  SHA512:
6
- metadata.gz: 8dc1a69885fc49dc8ad8b74d2fcde8796a228f9e41e9f57bbf4daf264e382347cf230917c6c3ea8e270483e3720caa955f4e6f4faa439edbe968522343520807
7
- data.tar.gz: 1ab464adf6ee552e28df4e25eccfa03b3e4e167b291b7e307e67f0f40f56be854df5563bc16b3d06f1dc515cb2b55235c3c85d948dcf34b237b55ae3b4decbc0
6
+ metadata.gz: ea1c1fe8c57294b6b954fea1021f3c62cff4697852a297d395403409e38432697fca55f35879bb0920ef2b218b087c75e8dfb66dc15146d8c8749e2ac9d8ed23
7
+ data.tar.gz: 5b5c622c4b38b24e44ae262d914affd3c0dd52554a17a1a926c5d036c526a12723063c448601556075661a3cdb84f0ee773ef2a43a063c15118e639656f61bd6
@@ -3,6 +3,8 @@
3
3
  module Jekyll
4
4
  module Filters
5
5
  module SocialNetwork
6
+ SUBDOMAINS = /\A(www|chat)\./.freeze
7
+
6
8
  # Takes a URL and returns a Hash of attributes, useful when you
7
9
  # want to generate social network buttons from an undetermined
8
10
  # list of URLs.
@@ -24,7 +26,7 @@ module Jekyll
24
26
  require 'uri'
25
27
 
26
28
  uri = URI url
27
- uri.host.sub! 'www.', ''
29
+ uri.host.sub! SUBDOMAINS, ''
28
30
  name = %r{/@\w+} =~ uri.query ? 'mastodon' : uri.host.split('.', 2).first
29
31
 
30
32
  { 'host' => uri.host, 'name' => name, 'url' => url }.to_liquid
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sutty-liquid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-05 00:00:00.000000000 Z
11
+ date: 2021-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll