disqus-for-jekyll 1.0.4 → 1.0.5

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: 8d77ca9296c8498070d04286f5efc5843469651f50c67810622ec90c1dc3ad44
4
- data.tar.gz: 6a5eb42de20af798c4a0b2d099fc8c08ee733c0157e5ea2e0c8250fe86b6fda6
3
+ metadata.gz: 7f6ad1f627cbc8a2d3e0eddd9aac1c49936771c785fdf3a48970ec5c2f7caefd
4
+ data.tar.gz: f24910ff8e82957357ba3440f89470be68809ce6bccb096e4ab2b4a1347a2ff7
5
5
  SHA512:
6
- metadata.gz: aaa9d65594fb393260db5f7be8d34f6be239153be75bc34152befe434c47686b8d737673c79e0cf285eeb8944d390a2072f7f73d362a534853d9486aee46f752
7
- data.tar.gz: 0052e09931aabcb0a5eb93ddfd6893ac40faff75166d64fddf2315edf50f1b5c4388fc88875fa1252ccf23f00c863e1a1020e4997c236c1ec6be2889ae639488
6
+ metadata.gz: 04ad405a76c027522cdcc822a86da6b6b3dd423a06b0e56c7f74a320dafa771314f1c595a252863545577050845e16196c9f19950d45dd3edfde730223931063
7
+ data.tar.gz: a7d863c75747dfbee5185737112b134dc2e4df4da62de09eb91c01ea7be76f6eb46d057810a5f6f9bbffaf4ba85074d1db3c140b758b216643a59b1f2e0d1a8d
data/.gitignore CHANGED
@@ -1,24 +1,24 @@
1
- *.gem
2
- *.swp
3
- *~
4
- .DS_Store
5
- .analysis
6
- .bundle/
7
- .byebug_history
8
- .jekyll-metadata
9
- .ruby-gemset
10
- .ruby-version
11
- .sass-cache
12
- /test/source/file_name.txt
13
- /vendor
14
- Gemfile.lock
15
- _site/
16
- .idea/
17
- bin/
18
- bbin/
19
- coverage
20
- gh-pages/
21
- pkg/
22
- site/_site/
23
- test/dest
24
- tmp/*
1
+ *.gem
2
+ *.swp
3
+ *~
4
+ .DS_Store
5
+ .analysis
6
+ .bundle/
7
+ .byebug_history
8
+ .jekyll-metadata
9
+ .ruby-gemset
10
+ .ruby-version
11
+ .sass-cache
12
+ /test/source/file_name.txt
13
+ /vendor
14
+ Gemfile.lock
15
+ _site/
16
+ .idea/
17
+ bin/
18
+ bbin/
19
+ coverage
20
+ gh-pages/
21
+ pkg/
22
+ site/_site/
23
+ test/dest
24
+ tmp/*
@@ -0,0 +1,8 @@
1
+ inherit_gem:
2
+ jekyll: .rubocop.yml
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 2.3
6
+ Exclude:
7
+ - vendor/**/*
8
+ - disqus-for-jekyll.gemspec
@@ -1,11 +1,14 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
 
4
- before_install:
5
- - gem update --system
4
+ before_install: gem update --system
5
+ before_script: bundle update
6
+
7
+ script: script/cibuild
6
8
 
7
9
  matrix:
8
10
  include:
11
+ - rvm: 2.6.0-preview1
9
12
  - rvm: 2.5.0
10
13
  - rvm: 2.4.3
11
14
  - rvm: 2.3.6
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- gemspec
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec
data/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2017-present Kacper Duras
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017-present Kacper Duras
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,41 +1,41 @@
1
- # disqus-for-jekyll [![Build Status](https://travis-ci.org/kacperduras/disqus-for-jekyll.svg?branch=master)](https://travis-ci.org/kacperduras/disqus-for-jekyll) [![Gem Version](https://badge.fury.io/rb/disqus-for-jekyll.svg)](https://badge.fury.io/rb/disqus-for-jekyll)
2
- A Jekyll plugin to view the comments powered by Disqus.
3
-
4
- ## Installation
5
-
6
- Add this line to your application's Gemfile:
7
- ```
8
- $ gem 'disqus-for-jekyll'
9
- ```
10
-
11
- And then execute:
12
- ```
13
- $ bundle
14
- ```
15
-
16
- Or install it yourself as:
17
- ```
18
- $ gem install disqus-for-jekyll
19
- ```
20
-
21
- Then add the following to your site's `_config.yml`
22
- ```yaml
23
- plugins:
24
- - "disqus-for-jekyll"
25
- ```
26
-
27
- ## Configuration
28
- ```yaml
29
- disqus:
30
- name: "kacperduras" # required
31
- noscript: "Your noscript tag message." # optional
32
- ```
33
-
34
- ## Usage
35
- Use the tag as follows in your Jekyll pages, posts and collections:
36
- ```
37
- {% disqus %}
38
- ```
39
-
40
- ## License
41
- [MIT](LICENSE)
1
+ # disqus-for-jekyll [![Build Status](https://travis-ci.org/kacperduras/disqus-for-jekyll.svg?branch=master)](https://travis-ci.org/kacperduras/disqus-for-jekyll) [![Gem Version](https://badge.fury.io/rb/disqus-for-jekyll.svg)](https://badge.fury.io/rb/disqus-for-jekyll)
2
+ A Jekyll plugin to view the comments powered by Disqus.
3
+
4
+ ## Installation
5
+
6
+ Add this line to your application's Gemfile:
7
+ ```
8
+ $ gem 'disqus-for-jekyll'
9
+ ```
10
+
11
+ And then execute:
12
+ ```
13
+ $ bundle
14
+ ```
15
+
16
+ Or install it yourself as:
17
+ ```
18
+ $ gem install disqus-for-jekyll
19
+ ```
20
+
21
+ Then add the following to your site's `_config.yml`
22
+ ```yaml
23
+ plugins:
24
+ - "disqus-for-jekyll"
25
+ ```
26
+
27
+ ## Configuration
28
+ ```yaml
29
+ disqus:
30
+ name: "kacperduras" # required
31
+ noscript: "Your noscript tag message." # optional
32
+ ```
33
+
34
+ ## Usage
35
+ Use the tag as follows in your Jekyll pages, posts and collections:
36
+ ```
37
+ {% disqus %}
38
+ ```
39
+
40
+ ## License
41
+ [MIT](LICENSE)
data/Rakefile CHANGED
@@ -1,10 +1,12 @@
1
- require 'bundler/gem_tasks'
2
- require 'rake/testtask'
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << 'test'
6
- t.libs << 'lib'
7
- t.test_files = FileList['test/**/*_test.rb']
8
- end
9
-
10
- task default: :test
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/*_test.rb"]
10
+ end
11
+
12
+ task :default => :test
@@ -1,38 +1,41 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path("../lib", __FILE__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "disqus-for-jekyll/version"
3
6
 
4
7
  Gem::Specification.new do |spec|
5
- spec.name = 'disqus-for-jekyll'
6
- spec.version = '1.0.4'
7
- spec.authors = ['Kacper Duras']
8
- spec.email = ['git@kacperduras.pl']
8
+ spec.name = "disqus-for-jekyll"
9
+ spec.version = Jekyll::Disqus::VERSION
10
+ spec.authors = ["Kacper Duras"]
11
+ spec.email = ["git@kacperduras.pl"]
9
12
 
10
- spec.summary = 'A Jekyll plugin to view the comments powered by Disqus.'
11
- spec.homepage = 'https://github.com/kacperduras/disqus-for-jekyll'
12
- spec.license = 'MIT'
13
+ spec.summary = "A Jekyll plugin to view the comments powered by Disqus."
14
+ spec.homepage = "https://github.com/kacperduras/disqus-for-jekyll"
15
+ spec.license = "MIT"
13
16
 
14
17
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
15
18
  # to allow pushing to a single host or delete this section to allow pushing to any host.
16
19
  if spec.respond_to?(:metadata)
17
- spec.metadata['allowed_push_host'] = 'https://rubygems.org'
20
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
21
  else
19
- raise 'RubyGems 2.0 or newer is required to protect against ' \
20
- 'public gem pushes.'
22
+ raise "RubyGems 2.0 or newer is required to protect against " \
23
+ "public gem pushes."
21
24
  end
22
25
 
23
- spec.required_ruby_version = '>= 2.2'
26
+ spec.required_ruby_version = ">= 2.2"
24
27
 
25
28
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
26
- f.match(%r{^(test|spec|features)/})
29
+ f.match(%r!^(test|spec|features)/!)
27
30
  end
28
- spec.bindir = 'exe'
29
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
- spec.require_paths = ['lib']
31
-
32
- spec.add_dependency 'jekyll', '~> 3.7.3'
31
+ spec.bindir = "exe"
32
+ spec.executables = spec.files.grep(%r!^exe/!) { |f| File.basename(f) }
33
+ spec.require_paths = ["lib"]
33
34
 
34
- spec.add_development_dependency 'bundler', '~> 1.16.1'
35
+ spec.add_dependency "jekyll", "~> 3.7.3"
35
36
 
36
- spec.add_development_dependency 'rake', '~> 12.3'
37
- spec.add_development_dependency 'minitest', '~> 5.11.3'
37
+ spec.add_development_dependency "bundler", "~> 1.16.1"
38
+ spec.add_development_dependency "minitest", "~> 5.11.3"
39
+ spec.add_development_dependency "rake", "~> 12.3"
40
+ spec.add_development_dependency "rubocop", "~> 0.52.0"
38
41
  end
@@ -1,30 +1,32 @@
1
- require 'jekyll'
2
- require 'liquid'
1
+ # frozen_string_literal: true
3
2
 
4
- module Jekyll
3
+ require "jekyll"
4
+ require "liquid"
5
5
 
6
- class DisqusTag < Liquid::Tag
6
+ module Jekyll
7
+ module Disqus
7
8
 
8
- def initialize(tag_name, txt, tokens)
9
- super
10
- end
9
+ class Tag < Liquid::Tag
10
+ def initialize(tag_name, txt, tokens)
11
+ super
12
+ end
11
13
 
12
- def render(context)
13
- template.render!(context)
14
- end
14
+ def render(context)
15
+ template.render!(context)
16
+ end
15
17
 
16
- private
18
+ private
17
19
 
18
- def template
19
- @template ||= Liquid::Template.parse(template_content)
20
- end
20
+ def template
21
+ @template ||= Liquid::Template.parse(template_content)
22
+ end
21
23
 
22
- def template_content
23
- File.read(File.expand_path('./template.html', File.dirname(__FILE__)))
24
+ def template_content
25
+ File.read(File.expand_path("./template.html", File.dirname(__FILE__)))
26
+ end
24
27
  end
25
28
 
26
29
  end
27
-
28
30
  end
29
31
 
30
- Liquid::Template.register_tag("disqus", Jekyll::DisqusTag)
32
+ Liquid::Template.register_tag("disqus", Jekyll::Disqus::Tag)
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Jekyll
4
+ module Disqus
5
+ VERSION = "1.0.5"
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ script/fmt
6
+ bundle exec rake build
@@ -0,0 +1,11 @@
1
+ #!/bin/bash
2
+ # Lint Ruby according to Jekyll's conventions
3
+ set -e
4
+
5
+ echo "Rubocop $(bundle exec rubocop --version)"
6
+ bundle exec rubocop -S -D -E $@
7
+ success=$?
8
+ if ((success != 0)); then
9
+ echo -e "\nTry running \`script/fmt -a\` to automatically fix errors"
10
+ fi
11
+ exit $success
@@ -0,0 +1,7 @@
1
+ #!/bin/sh
2
+ # Tag and push a release.
3
+
4
+ set -e
5
+
6
+ script/cibuild
7
+ bundle exec rake release
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: disqus-for-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kacper Duras
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-02 00:00:00.000000000 Z
11
+ date: 2018-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.16.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 5.11.3
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 5.11.3
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -53,19 +67,19 @@ dependencies:
53
67
  - !ruby/object:Gem::Version
54
68
  version: '12.3'
55
69
  - !ruby/object:Gem::Dependency
56
- name: minitest
70
+ name: rubocop
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: 5.11.3
75
+ version: 0.52.0
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: 5.11.3
82
+ version: 0.52.0
69
83
  description:
70
84
  email:
71
85
  - git@kacperduras.pl
@@ -74,6 +88,7 @@ extensions: []
74
88
  extra_rdoc_files: []
75
89
  files:
76
90
  - ".gitignore"
91
+ - ".rubocop.yml"
77
92
  - ".travis.yml"
78
93
  - Gemfile
79
94
  - LICENSE
@@ -83,7 +98,11 @@ files:
83
98
  - bin/setup
84
99
  - disqus-for-jekyll.gemspec
85
100
  - lib/disqus-for-jekyll.rb
101
+ - lib/disqus-for-jekyll/version.rb
86
102
  - lib/template.html
103
+ - script/cibuild
104
+ - script/fmt
105
+ - script/release
87
106
  homepage: https://github.com/kacperduras/disqus-for-jekyll
88
107
  licenses:
89
108
  - MIT