jekyll-bits 0.14 → 0.15

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
  SHA1:
3
- metadata.gz: 122342a2c6700b64c568ff83f4b96b6840194697
4
- data.tar.gz: 317fc9bf12f3ffc3db8b835f677efd70cfd81085
3
+ metadata.gz: d18acabf421b2f66d61cfa1a88fe2517b29dd7e0
4
+ data.tar.gz: 986a2380ac5aca96a222fc541c4d3f7fa57ca888
5
5
  SHA512:
6
- metadata.gz: 7887e9e68115a34ba7785215153050a645ee850088e496b54b71f14d5bea5bbd368882dfc0a5c79ca370653d5c9dfc185378803c7623c672c32f6c27ed83574b
7
- data.tar.gz: 464fb8e889306f29c1ed9624a7d1374fe42cba80fb630e72f7b1defa47eeaa241e01700dbf3938550ba0e9fb0afa4341b2fafd64407b43f8270dce1922d8f3e2
6
+ metadata.gz: ca7244d1fba025c37ec5d25477af9a3b38b02817c33325f19d4f10892cb2f1fe439e3ec05e66f131be2d6c6300a086e2c74f37c6f8b359370ee16870efead50e
7
+ data.tar.gz: 71c7a837f666af4a398ecbc950ea1790a7380a2beee9dab9d0a2b3ccbd6082be90540ff851dc765ed0a3b2a01cbb655fe6a17cb63d81c168aa431b7742a3c53a
data/.0pdd.yml CHANGED
@@ -3,3 +3,7 @@ errors:
3
3
  # alerts:
4
4
  # github:
5
5
  # - yegor256
6
+
7
+ tags:
8
+ - pdd
9
+ - bug
@@ -0,0 +1,12 @@
1
+ Make sure the title of the issue explains the problem you are having. Also, the description of the issue must clearly explain what is broken, not what you want us to implement. Go through this checklist and make sure you answer "YES" to all points:
2
+
3
+ - You have all pre-requisites listed in README.md installed
4
+ - You are sure that you are not reporting a duplicate (search all issues)
5
+ - You say "is broken" or "doesn't work" in the title
6
+ - You tell us what you are trying to do
7
+ - You explain the results you are getting
8
+ - You suggest an alternative result you would like to see
9
+
10
+ This article will help you understand what we are looking for: http://www.yegor256.com/2014/11/24/principles-of-bug-tracking.html
11
+
12
+ Thank you for your contribution!
@@ -0,0 +1,11 @@
1
+ Many thanks for your contribution, we truly appreciate it. We will appreciate it even more, if you make sure that you can say "YES" to each point in this short checklist:
2
+
3
+ - You made a small amount of changes (less than 100 lines, less than 10 files)
4
+ - You made changes related to only one bug (create separate PRs for separate problems)
5
+ - You are ready to defend your changes (there will be a code review)
6
+ - You don't touch what you don't understand
7
+ - You ran the build locally and it passed
8
+
9
+ This article will help you understand what we are looking for: http://www.yegor256.com/2015/02/09/serious-code-reviewer.html
10
+
11
+ Thank you for your contribution!
@@ -2,7 +2,7 @@ assets:
2
2
  rubygems.yml: zerocracy/home#assets/rubygems.yml
3
3
  release:
4
4
  script: |-
5
- sudo bundle install
5
+ bundle install
6
6
  rake
7
7
  rm -rf *.gem
8
8
  sed -i "s/1\.0\.snapshot/${tag}/g" jekyll-bits.gemspec
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/jekyll-bits)](http://www.rultor.com/p/yegor256/jekyll-bits)
2
- [![We recommend RubyMine](http://img.teamed.io/rubymine-recommend.svg)](https://www.jetbrains.com/ruby/)
2
+ [![We recommend RubyMine](http://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
3
3
 
4
4
  [![Build Status](https://travis-ci.org/yegor256/jekyll-bits.svg)](https://travis-ci.org/yegor256/jekyll-bits)
5
5
  [![Gem Version](https://badge.fury.io/rb/jekyll-bits.svg)](http://badge.fury.io/rb/jekyll-bits)
@@ -9,6 +9,10 @@
9
9
  It's a collection of very simply and useful [Jekyll](https://jekyllrb.com/) plugins,
10
10
  which I'm using on [my blog](https://github.com/yegor256/blog).
11
11
 
12
+ **ATTENTION**: You
13
+ [can't](https://help.github.com/articles/adding-jekyll-plugins-to-a-github-pages-site/)
14
+ use this plugin with GitHub Pages.
15
+
12
16
  To start, add it to your `_config.yml`:
13
17
 
14
18
  ```yaml
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.rubygems_version = '2.2.2'
9
9
  s.required_ruby_version = '>= 1.9.3'
10
10
  s.name = 'jekyll-bits'
11
- s.version = '0.14'
11
+ s.version = '0.15'
12
12
  s.license = 'MIT'
13
13
  s.summary = 'Jekyll Bits'
14
14
  s.description = 'Useful and very simple Jekyll plugins'
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
19
19
  s.test_files = s.files.grep(%r{^(test)/})
20
20
  s.rdoc_options = ['--charset=UTF-8']
21
21
  s.extra_rdoc_files = ['README.md']
22
- s.add_runtime_dependency('jekyll', '>=1.5.1')
23
- s.add_runtime_dependency('fastimage')
22
+ s.add_runtime_dependency 'fastimage'
23
+ s.add_development_dependency 'jekyll', '3.4.0'
24
24
  s.add_development_dependency 'bundler', '~> 1.5'
25
25
  s.add_development_dependency 'coveralls', '0.7.0'
26
26
  s.add_development_dependency 'test-unit', '3.0.8'
@@ -32,7 +32,7 @@ module Jekyll
32
32
  # All our custom filters
33
33
  module JbFilters
34
34
  def jb_picture_head(page)
35
- uri = abs(uri(page))
35
+ uri = jb_abs(jb_uri(page))
36
36
  return '' if uri.empty?
37
37
  html = "<meta name='og:image' content='#{CGI.escapeElement(uri)}'/>"
38
38
  html += "<meta name='twitter:image' content='#{CGI.escapeElement(uri)}'/>"
@@ -54,15 +54,15 @@ module Jekyll
54
54
  html += "<meta name='twitter:card' content='summary'/>"
55
55
  end
56
56
  html += "<meta name='twitter:image:alt' \
57
- content='#{CGI.escapeHTML(alt(page))}'/>"
57
+ content='#{CGI.escapeHTML(jb_alt(page))}'/>"
58
58
  html
59
59
  end
60
60
 
61
61
  def jb_picture_body(page)
62
- uri = uri(page)
62
+ uri = jb_uri(page)
63
63
  return '' if uri.empty?
64
64
  yaml = page['jb_picture']
65
- html = "<img itemprop='image' alt='#{CGI.escapeHTML(alt(page))}'"
65
+ html = "<img itemprop='image' alt='#{CGI.escapeHTML(jb_alt(page))}'"
66
66
  html += " src='#{CGI.escapeElement(uri)}'"
67
67
  md5 = Digest::MD5.new.hexdigest(uri)[0, 8]
68
68
  html += " longdesc='##{md5}'" \
@@ -86,7 +86,7 @@ content='#{CGI.escapeHTML(alt(page))}'/>"
86
86
 
87
87
  @@home = nil
88
88
 
89
- def uri(page)
89
+ def jb_uri(page)
90
90
  uri = ''
91
91
  uri = page['image'] if page['image']
92
92
  yaml = page['jb_picture']
@@ -100,15 +100,15 @@ content='#{CGI.escapeHTML(alt(page))}'/>"
100
100
  uri.to_s
101
101
  end
102
102
 
103
- def abs(uri)
103
+ def jb_abs(uri)
104
104
  unless uri.empty?
105
105
  uri = URI.parse(uri)
106
- uri = home + uri.to_s unless %w(http https).include?(uri.scheme)
106
+ uri = jb_home + uri.to_s unless %w(http https).include?(uri.scheme)
107
107
  end
108
108
  uri.to_s
109
109
  end
110
110
 
111
- def home
111
+ def jb_home
112
112
  if @@home.nil?
113
113
  @@home = Jekyll.configuration({})['url']
114
114
  if @@home.nil?
@@ -120,7 +120,7 @@ content='#{CGI.escapeHTML(alt(page))}'/>"
120
120
  @@home
121
121
  end
122
122
 
123
- def alt(page)
123
+ def jb_alt(page)
124
124
  alt = ''
125
125
  yaml = page['jb_picture']
126
126
  if yaml && yaml.is_a?(Hash)
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-bits
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.14'
4
+ version: '0.15'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-28 00:00:00.000000000 Z
11
+ date: 2018-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: jekyll
14
+ name: fastimage
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.5.1
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.5.1
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: fastimage
28
+ name: jekyll
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
33
+ version: 3.4.0
34
+ type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 3.4.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -144,6 +144,8 @@ extra_rdoc_files:
144
144
  - README.md
145
145
  files:
146
146
  - ".0pdd.yml"
147
+ - ".github/ISSUE_TEMPLATE.md"
148
+ - ".github/PULL_REQUEST_TEMPLATE.md"
147
149
  - ".gitignore"
148
150
  - ".pdd"
149
151
  - ".rubocop.yml"
@@ -178,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
180
  version: '0'
179
181
  requirements: []
180
182
  rubyforge_project:
181
- rubygems_version: 2.4.5.2
183
+ rubygems_version: 2.6.8
182
184
  signing_key:
183
185
  specification_version: 2
184
186
  summary: Jekyll Bits