jekyll-shorts 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/jekyll-shorts.gemspec +1 -1
- data/lib/jekyll-shorts/generator.rb +7 -2
- data/lib/jekyll-shorts/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: 2f5bac761a44799decc825865e2358b45fece80d82d5b42d42f5e0afd86e48d9
|
4
|
+
data.tar.gz: 31c24b5d3621b716cfb9963eb27c90e0c761c45c122db3342f81755dcab9fcf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7014fb51fdf53ac29797a39c785c88d4784fc911d82104f76d931a5d66b011f56bc54fa2d283ce6104c8b3925e06faf7fa93d62c30086f502382d34e19bffd53
|
7
|
+
data.tar.gz: cb2381f5f637fdbbc6f572e1ea72f277c94eb26344e8124ab03d4b92730e22c26f2adaa4ff98923a7f5afd1a053e6733f92db01c051e8b1ba1b060474ab2a15b
|
data/Gemfile
CHANGED
@@ -28,6 +28,6 @@ gemspec
|
|
28
28
|
gem 'cucumber', '9.1.0', require: false
|
29
29
|
gem 'minitest', '5.22.1', require: false
|
30
30
|
gem 'rake', '13.1.0', require: false
|
31
|
-
gem 'rubocop', '1.
|
31
|
+
gem 'rubocop', '1.60.2', require: false
|
32
32
|
gem 'rubocop-rspec', '2.26.1', require: false
|
33
33
|
gem 'simplecov', '0.22.0', require: false
|
data/jekyll-shorts.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
29
29
|
s.required_ruby_version = '>= 2.6'
|
30
30
|
s.name = 'jekyll-shorts'
|
31
|
-
s.version = '0.0.
|
31
|
+
s.version = '0.0.8'
|
32
32
|
s.license = 'MIT'
|
33
33
|
s.summary = 'Automatically generates short links for Jekyll website'
|
34
34
|
s.description = [
|
@@ -77,11 +77,16 @@ class JekyllShorts::Generator < Jekyll::Generator
|
|
77
77
|
@long = long
|
78
78
|
end
|
79
79
|
|
80
|
+
def modified?
|
81
|
+
true
|
82
|
+
end
|
83
|
+
|
80
84
|
def write(_dest)
|
81
85
|
FileUtils.mkdir_p(File.dirname(path))
|
82
86
|
html = "<html><head><meta charset='utf-8'/>\
|
83
87
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>\
|
84
|
-
<meta http-equiv='refresh' content='#{@long}'/></head
|
88
|
+
<meta http-equiv='refresh' content='#{@long}'/></head>\
|
89
|
+
<body></body></html>"
|
85
90
|
if File.exist?(path)
|
86
91
|
before = File.read(path)
|
87
92
|
if before != html
|
@@ -93,7 +98,7 @@ than before. Try to run 'jekyll clean', it will help, if you know what you are d
|
|
93
98
|
end
|
94
99
|
else
|
95
100
|
File.write(path, html)
|
96
|
-
Jekyll.logger.debug("
|
101
|
+
Jekyll.logger.debug("Short URL created from #{path.inspect} to #{@long.inspect}")
|
97
102
|
end
|
98
103
|
true
|
99
104
|
end
|