jekyll-wns 4.0.1 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/jekyll-wns.gemspec +3 -1
- data/lib/jekyll-wns.rb +1 -1
- data/lib/jekyll-wns/assets/file_property_filters.rb +39 -0
- data/lib/jekyll-wns/register_filters.rb +1 -1
- metadata +18 -4
- data/lib/jekyll-wns/assets/file_properties_filter.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 310b65aa25c9965524dcd5fd5e4f1b744fbf6d7640403ffa0c2ca257dae4c246
|
4
|
+
data.tar.gz: ac7e510fd0c70e90df4fe5e51961ee4e691c787c5de5451cd40c38b56eed8c06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b84558f5db3a205b2fb788040ba239ff6ec6247c3a200c0e023e7e792f9782bd9eb482fd604e8de90a31859b9e73d2abbfe8be05200bda21cf05297b9dcead3b
|
7
|
+
data.tar.gz: 9d35693e10e8ce1667a2fb971dd7f832f8522988c044d5a33980233b3fc334b9fade0e29966dc7d6926d49b6ba3070838a383804c24a77029121ad459131f5e3
|
data/Gemfile
CHANGED
data/jekyll-wns.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "jekyll-wns"
|
5
|
-
spec.version = "4.0
|
5
|
+
spec.version = "4.1.0"
|
6
6
|
spec.authors = ["Thai Chung"]
|
7
7
|
spec.email = ["mail@0xReki.de"]
|
8
8
|
spec.summary = "Collection of Filters, Tags and Hooks I use."
|
@@ -10,4 +10,6 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.licenses = "MIT"
|
11
11
|
|
12
12
|
spec.files = `git ls-files -z`.split("\x0")
|
13
|
+
|
14
|
+
spec.add_dependency("ruby-mp3info", "~> 0.8.10")
|
13
15
|
end
|
data/lib/jekyll-wns.rb
CHANGED
@@ -6,7 +6,7 @@ require_relative 'jekyll-wns/assets/label_unicode'
|
|
6
6
|
require_relative 'jekyll-wns/assets/quads'
|
7
7
|
|
8
8
|
require_relative 'jekyll-wns/assets/digest_filters'
|
9
|
-
require_relative 'jekyll-wns/assets/
|
9
|
+
require_relative 'jekyll-wns/assets/file_property_filters'
|
10
10
|
require_relative 'jekyll-wns/assets/quads_filter'
|
11
11
|
|
12
12
|
require_relative 'jekyll-wns/assets/ruby_tag'
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'mp3info'
|
2
|
+
|
3
|
+
module WNS
|
4
|
+
module FilePropertyFilters
|
5
|
+
def file_size(path)
|
6
|
+
source = Jekyll.configuration({})['source']
|
7
|
+
|
8
|
+
unless source.empty?
|
9
|
+
source += '/'
|
10
|
+
else
|
11
|
+
source = ''
|
12
|
+
end
|
13
|
+
full_path = source + path
|
14
|
+
|
15
|
+
unless path.nil?
|
16
|
+
File.size full_path
|
17
|
+
else
|
18
|
+
0
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def mp3_duration(path)
|
23
|
+
source = Jekyll.configuration({})['source'] || ''
|
24
|
+
|
25
|
+
unless source.empty?
|
26
|
+
source += '/'
|
27
|
+
else
|
28
|
+
source = ''
|
29
|
+
end
|
30
|
+
full_path = source + path
|
31
|
+
|
32
|
+
unless path.nil?
|
33
|
+
Mp3Info.open(full_path).length.to_i
|
34
|
+
else
|
35
|
+
0
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-wns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thai Chung
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
12
|
-
dependencies:
|
11
|
+
date: 2021-06-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ruby-mp3info
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.8.10
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.8.10
|
13
27
|
description:
|
14
28
|
email:
|
15
29
|
- mail@0xReki.de
|
@@ -27,7 +41,7 @@ files:
|
|
27
41
|
- lib/jekyll-wns.rb
|
28
42
|
- lib/jekyll-wns/assets/abbreviations.rb
|
29
43
|
- lib/jekyll-wns/assets/digest_filters.rb
|
30
|
-
- lib/jekyll-wns/assets/
|
44
|
+
- lib/jekyll-wns/assets/file_property_filters.rb
|
31
45
|
- lib/jekyll-wns/assets/label_unicode.rb
|
32
46
|
- lib/jekyll-wns/assets/quads.rb
|
33
47
|
- lib/jekyll-wns/assets/quads_filter.rb
|