jekyll-google_search_console_verification_file 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.devcontainer/devcontainer.json +3 -0
- data/.github/workflows/ci.yml +51 -0
- data/.qlty/.gitignore +7 -0
- data/.qlty/configs/.shellcheckrc +1 -0
- data/.qlty/qlty.toml +85 -0
- data/.rubocop.yml +9 -9
- data/Appraisals +1 -1
- data/CHANGELOG.md +4 -3
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +1 -2
- data/README.md +65 -74
- data/Rakefile +8 -1
- data/gemfiles/jekyll_3.7.x.gemfile +4 -3
- data/gemfiles/jekyll_4.x.x.gemfile +4 -3
- data/lib/jekyll-google_search_console_verification_file/version.rb +1 -1
- data/scripts/devcontainer_postCreateCommand.sh +8 -0
- data/{script → scripts}/setup +4 -0
- metadata +13 -9
- data/.codeclimate.yml +0 -22
- data/.travis.yml +0 -31
- /data/{script → scripts}/build +0 -0
- /data/{script → scripts}/console +0 -0
- /data/{script → scripts}/lint +0 -0
- /data/{script → scripts}/test +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2c64e1a6b83c3b89935a3dd03f655915bcde2071d26ef52f022823b7305e4213
|
|
4
|
+
data.tar.gz: fb4a48d1c6ad47b2ed9238133e35b8224949583d127d0a15d6d8bd6c61ce785b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f93823d4857a3f41674f0566add8a5629c1328cf9a502ea8653eca6bd3e3d19b5149c6b56a3533114f4ffa0a40872d587fd26372b7e3288a491affd819739cbb
|
|
7
|
+
data.tar.gz: d382cbc30fe9fba74fdafdcc01640d69124e32e631ca7e4321f889fbde5430703da216911db165f854c31b7af979cbf3dc414a819ae7bda954343d0e8d7970e2
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: Continuous Integration
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches: main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: main
|
|
9
|
+
|
|
10
|
+
# OIDC permissions for qlty
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
id-token: write # IMPORTANT
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
strategy:
|
|
20
|
+
matrix:
|
|
21
|
+
ruby: [2.7.0, 3.0.1]
|
|
22
|
+
gemfile:
|
|
23
|
+
- gemfiles/jekyll_3.7.x.gemfile
|
|
24
|
+
- gemfiles/jekyll_4.x.x.gemfile
|
|
25
|
+
|
|
26
|
+
env:
|
|
27
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
|
28
|
+
#CC_TEST_REPORTER_ID: 9a84a9f695de3b120b6fcead4e089b45420f7518fb2123dc5424f862d381c4ff
|
|
29
|
+
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout code
|
|
32
|
+
uses: actions/checkout@v4
|
|
33
|
+
|
|
34
|
+
- name: Set up Ruby
|
|
35
|
+
uses: ruby/setup-ruby@v1
|
|
36
|
+
with:
|
|
37
|
+
ruby-version: ${{ matrix.ruby }}
|
|
38
|
+
bundler-cache: true
|
|
39
|
+
bundler: 2.2.18
|
|
40
|
+
|
|
41
|
+
- name: Run tests
|
|
42
|
+
run: bundle exec rake spec
|
|
43
|
+
|
|
44
|
+
- name: Run linting
|
|
45
|
+
run: bundle exec rake rubocop
|
|
46
|
+
|
|
47
|
+
- uses: qltysh/qlty-action/coverage@v2
|
|
48
|
+
with:
|
|
49
|
+
oidc: true
|
|
50
|
+
format: simplecov
|
|
51
|
+
files: coverage/.resultset.json
|
data/.qlty/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
source-path=SCRIPTDIR
|
data/.qlty/qlty.toml
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# This file was automatically generated by `qlty init`.
|
|
2
|
+
# You can modify it to suit your needs.
|
|
3
|
+
# We recommend you to commit this file to your repository.
|
|
4
|
+
#
|
|
5
|
+
# This configuration is used by both Qlty CLI and Qlty Cloud.
|
|
6
|
+
#
|
|
7
|
+
# Qlty CLI -- Code quality toolkit for developers
|
|
8
|
+
# Qlty Cloud -- Fully automated Code Health Platform
|
|
9
|
+
#
|
|
10
|
+
# Try Qlty Cloud: https://qlty.sh
|
|
11
|
+
#
|
|
12
|
+
# For a guide to configuration, visit https://qlty.sh/d/config
|
|
13
|
+
# Or for a full reference, visit https://qlty.sh/d/qlty-toml
|
|
14
|
+
config_version = "0"
|
|
15
|
+
|
|
16
|
+
exclude_patterns = [
|
|
17
|
+
"*_min.*",
|
|
18
|
+
"*-min.*",
|
|
19
|
+
"*.min.*",
|
|
20
|
+
"**/.yarn/**",
|
|
21
|
+
"**/*.d.ts",
|
|
22
|
+
"**/assets/**",
|
|
23
|
+
"**/bower_components/**",
|
|
24
|
+
"**/build/**",
|
|
25
|
+
"**/cache/**",
|
|
26
|
+
"**/config/**",
|
|
27
|
+
"**/db/**",
|
|
28
|
+
"**/deps/**",
|
|
29
|
+
"**/dist/**",
|
|
30
|
+
"**/extern/**",
|
|
31
|
+
"**/external/**",
|
|
32
|
+
"**/generated/**",
|
|
33
|
+
"**/Godeps/**",
|
|
34
|
+
"**/gradlew/**",
|
|
35
|
+
"**/mvnw/**",
|
|
36
|
+
"**/node_modules/**",
|
|
37
|
+
"**/protos/**",
|
|
38
|
+
"**/seed/**",
|
|
39
|
+
"**/target/**",
|
|
40
|
+
"**/templates/**",
|
|
41
|
+
"**/testdata/**",
|
|
42
|
+
"**/vendor/**",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
test_patterns = [
|
|
46
|
+
"**/test/**",
|
|
47
|
+
"**/spec/**",
|
|
48
|
+
"**/*.test.*",
|
|
49
|
+
"**/*.spec.*",
|
|
50
|
+
"**/*_test.*",
|
|
51
|
+
"**/*_spec.*",
|
|
52
|
+
"**/test_*.*",
|
|
53
|
+
"**/spec_*.*",
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[smells]
|
|
57
|
+
mode = "comment"
|
|
58
|
+
|
|
59
|
+
[smells.boolean_logic]
|
|
60
|
+
threshold = 4
|
|
61
|
+
|
|
62
|
+
[smells.file_complexity]
|
|
63
|
+
threshold = 55
|
|
64
|
+
|
|
65
|
+
[smells.return_statements]
|
|
66
|
+
threshold = 4
|
|
67
|
+
|
|
68
|
+
[smells.nested_control_flow]
|
|
69
|
+
threshold = 4
|
|
70
|
+
|
|
71
|
+
[smells.function_parameters]
|
|
72
|
+
threshold = 4
|
|
73
|
+
|
|
74
|
+
[smells.function_complexity]
|
|
75
|
+
threshold = 5
|
|
76
|
+
|
|
77
|
+
[[source]]
|
|
78
|
+
name = "default"
|
|
79
|
+
default = true
|
|
80
|
+
|
|
81
|
+
[[plugin]]
|
|
82
|
+
name = "rubocop"
|
|
83
|
+
version = "1.81.6"
|
|
84
|
+
package_file = "Gemfile"
|
|
85
|
+
package_filters = ["rubocop"]
|
data/.rubocop.yml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# See pages relaed at https://docs.rubocop.org/rubocop/1.12/cops_layout.html
|
|
2
2
|
|
|
3
|
-
# Rubocop
|
|
4
|
-
|
|
3
|
+
# Rubocop plugins
|
|
4
|
+
plugins:
|
|
5
5
|
- rubocop-rake
|
|
6
6
|
- rubocop-rspec
|
|
7
7
|
|
|
@@ -15,11 +15,12 @@ AllCops:
|
|
|
15
15
|
- lib/**/*.rb
|
|
16
16
|
- spec/**/*.rb
|
|
17
17
|
Exclude:
|
|
18
|
-
# Travis: during build there will be a lot of rubocop config files in this
|
|
18
|
+
# Travis: during build there will be a lot of rubocop config files in this path which will cause build failure as the refer to gems which are not installed by this project.
|
|
19
19
|
# See https://github.com/rubocop/rubocop/issues/9832
|
|
20
20
|
- gemfiles/vendor/bundle/**/*
|
|
21
|
+
NewCops: disable
|
|
21
22
|
|
|
22
|
-
Gemspec/
|
|
23
|
+
Gemspec/DeprecatedAttributeAssignment:
|
|
23
24
|
Enabled: true
|
|
24
25
|
Gemspec/RequireMFA:
|
|
25
26
|
Enabled: true
|
|
@@ -159,18 +160,17 @@ Rake:
|
|
|
159
160
|
# https://github.com/rubocop/rubocop-rspec/blob/master/config/default.yml
|
|
160
161
|
RSpec:
|
|
161
162
|
Enabled: true
|
|
162
|
-
RSpec/
|
|
163
|
+
RSpec/SpecFilePathFormat:
|
|
164
|
+
# Disable to match structure of lib/. For jekyll plugin inclusion convention features, not having lib/jekyll/sth.rb but lib/jekyll-sth.rb
|
|
165
|
+
Enabled: false
|
|
166
|
+
RSpec/SpecFilePathSuffix:
|
|
163
167
|
# Disable to match structure of lib/. For jekyll plugin inclusion convention features, not having lib/jekyll/sth.rb but lib/jekyll-sth.rb
|
|
164
168
|
Enabled: false
|
|
165
169
|
RSpec/IdenticalEqualityAssertion:
|
|
166
170
|
Enabled: true
|
|
167
|
-
RSpec/Rails/AvoidSetupHook:
|
|
168
|
-
Enabled: false
|
|
169
171
|
RSpec/BeforeAfterAll:
|
|
170
172
|
Enabled: false
|
|
171
173
|
RSpec/ExcessiveDocstringSpacing:
|
|
172
174
|
Enabled: true
|
|
173
175
|
RSpec/SubjectDeclaration:
|
|
174
176
|
Enabled: true
|
|
175
|
-
RSpec/FactoryBot/SyntaxMethods:
|
|
176
|
-
Enabled: true
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -6,10 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## [1.1.0] - 2025-10-29
|
|
10
10
|
### Changed
|
|
11
|
-
- Updated format of this file
|
|
12
|
-
- Bump ruby to 3.0.2 from 3.0.1
|
|
11
|
+
- Updated format of this file.
|
|
12
|
+
- Bump ruby to 3.0.2 from 3.0.1.
|
|
13
|
+
- Migrated CI from Travis to GitHub Actions.
|
|
13
14
|
|
|
14
15
|
## [1.0.1] - 2021-08-18
|
|
15
16
|
### Fixed
|
data/CONTRIBUTING.md
CHANGED
data/Gemfile
CHANGED
|
@@ -16,13 +16,12 @@ group :development, :test do
|
|
|
16
16
|
gem "gem-release", "~> 2.0", require: false
|
|
17
17
|
gem "rake", "~> 13.0", require: false
|
|
18
18
|
gem "solargraph", require: false
|
|
19
|
-
gem "travis", "~> 1.0", require: false
|
|
20
19
|
end
|
|
21
20
|
|
|
22
21
|
group :test do
|
|
23
22
|
gem "rspec", "~> 3.0"
|
|
24
23
|
gem "rubocop", "~> 1.18", require: false
|
|
25
24
|
gem "rubocop-rake", "~> 0.6", require: false
|
|
26
|
-
gem "rubocop-rspec", "~>
|
|
25
|
+
gem "rubocop-rspec", "~> 3.5", require: false
|
|
27
26
|
gem "simplecov", "~> 0.21"
|
|
28
27
|
end
|
data/README.md
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
# Jekyll Google Search Console Verification File Generator Plugin [](https://x.com/intent/tweet?text=Generate%20a%20Google%20Search%20Console%20verification%20file%20for%20your%20Jekyll%20site%20with%20this%20plugin&url=https://github.com/erikw/jekyll-google_search_console_verification_file&via=erik_westrup&hashtags=jekyll,plugin)
|
|
2
2
|
[](https://badge.fury.io/rb/jekyll-google_search_console_verification_file)
|
|
3
|
-
[](https://codeclimate.com/github/erikw/jekyll-google_search_console_verification_file/test_coverage)
|
|
3
|
+
[](https://rubygems.org/gems/jekyll-google_search_console_verification_file)
|
|
4
|
+
[](https://github.com/erikw/jekyll-google_search_console_verification_file/actions/workflows/ci.yml)
|
|
5
|
+
[](https://github.com/erikw/jekyll-google_search_console_verification_file/actions/workflows/cd.yml)
|
|
7
6
|
[](https://github.com/erikw/jekyll-google_search_console_verification_file/actions/workflows/codeql-analysis.yml)
|
|
8
|
-
[](https://qlty.sh/gh/erikw/projects/jekyll-google_search_console_verification_file)
|
|
8
|
+
[](https://qlty.sh/gh/erikw/projects/jekyll-google_search_console_verification_file)
|
|
9
|
+
[](#)
|
|
10
|
+
[](#)
|
|
11
|
+
[](#)
|
|
9
12
|
[](LICENSE.txt)
|
|
10
13
|
[](https://github.com/Netflix/osstracker)
|
|
11
14
|
|
|
15
|
+
<p align="center">
|
|
16
|
+
<!-- Ref: https://dev.to/azure/adding-a-github-codespace-button-to-your-readme-5f6l -->
|
|
17
|
+
<a href="https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=381051146" title="Open in GitHub Codespaces" ><img alt="Open in GitHub Codespaces" src="https://github.com/codespaces/badge.svg"></a>
|
|
18
|
+
</p>
|
|
12
19
|
|
|
20
|
+
> [!TIP]
|
|
21
|
+
> :point_right: **Live demo**: https://erikw.github.io/jekyll-google_search_console_verification_file/
|
|
13
22
|
|
|
14
|
-
:point_right: **Live demo**: https://erikw.github.io/jekyll-google_search_console_verification_file/
|
|
15
23
|
|
|
16
|
-
|
|
17
|
-
This is a very simple plugin that will generate a Google Search Console (GSC from here) [verification file](https://support.google.com/webmasters/answer/9008080?hl=en) to your `_site/` directory in a Jekyll project. This file is used by GSC to verify that you own the site and looks for example like my [googlef47733b3288357e4.html](https://erikw.me/google47733b3288357e4.html).
|
|
24
|
+
This is a very simple plugin that will generate a Google Search Console (GSC from here on) [verification file](https://support.google.com/webmasters/answer/9008080?hl=en) to your `_site/` directory in a Jekyll project. This file is used by GSC to verify that you own the site and looks for example like my [googlef47733b3288357e4.html](https://erikw.me/google47733b3288357e4.html).
|
|
18
25
|
|
|
19
26
|
## Why?
|
|
20
27
|
Why use this plugin?
|
|
@@ -25,39 +32,45 @@ Why use this plugin?
|
|
|
25
32
|
|
|
26
33
|
|
|
27
34
|
### !TL;DidRead
|
|
28
|
-
There are multiple ways to [verify](https://support.google.com/webmasters/answer/9008080?hl=en) the ownership of your site. The two simpler ways, both suitable for
|
|
35
|
+
There are multiple ways to [verify](https://support.google.com/webmasters/answer/9008080?hl=en) the ownership of your site. The two simpler ways, both suitable for GitHub Pages owners, are to add a `<meta> tag to your pages` or upload a special, unique file to the root of the site. For adding the meta tag, there are excellent plugins making this very easy, for example [jekyll-seo-tag](http://jekyll.github.io/jekyll-seo-tag/usage/). If you want the meta tag, I recommend this plugin.
|
|
29
36
|
|
|
30
|
-
However if you feel that it's bloated to add this `<meta>` tag to the header all
|
|
37
|
+
However, if you feel that it's bloated to add this `<meta>` tag to the header of all your pages, keeping file size and page load speed in mind, you may one to go for the file-based verification method instead.
|
|
31
38
|
|
|
32
|
-
So with the file
|
|
39
|
+
So with the file-based method, why not just add the file you downloaded from GSC to your source directory and let Jekyll put it in `_site/` on generation? As we're using an SSG (Static Site Generator), we should generate everything we can. It's very nice to keep the source tree clean and make everything that can be a configuration that generates what is needed.
|
|
33
40
|
|
|
34
|
-
Thus, this plugin
|
|
41
|
+
Thus, this plugin exists to solve this problem. Give the plugin the unique code GSC provided you, and it will generate the file for you in `_site/`!
|
|
35
42
|
|
|
36
43
|
Note that if you do place a verification file in the root of the source tree, this will override the generation by this plugin.
|
|
37
44
|
|
|
38
45
|
# Installation
|
|
39
|
-
1. Add this gem to your Jekyll site's Gemfile
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
1. Add this gem to your Jekyll site's Gemfile in the `:jekyll_plugins` group:
|
|
47
|
+
* On CLI (in project root directory):
|
|
48
|
+
```shell
|
|
49
|
+
bundle add --group jekyll_plugins jekyll-google_search_console_verification_file
|
|
50
|
+
```
|
|
51
|
+
* Or manually:
|
|
42
52
|
```ruby
|
|
43
|
-
|
|
53
|
+
group :jekyll_plugins do
|
|
54
|
+
[...]
|
|
55
|
+
gem 'jekyll-google_search_console_verification_file'
|
|
56
|
+
end
|
|
44
57
|
```
|
|
45
|
-
|
|
58
|
+
1. Run `$ bundle install`.
|
|
46
59
|
1. In your site's `_config.yml`, enable the plugin:
|
|
47
60
|
```yml
|
|
48
61
|
plugins:
|
|
49
|
-
- jekyll-
|
|
62
|
+
- jekyll-google_search_console_verification_file
|
|
50
63
|
```
|
|
51
|
-
1. Get the GSC unique code for
|
|
64
|
+
1. Get the GSC unique code for your website.
|
|
52
65
|
1. Register your website at [Google Search Console](https://search.google.com/search-console?resource_id=https://erikw.me/)
|
|
53
66
|
1. From the main dashboard of your site at GSC: _Settings > Ownership Verification > HTML File_ and download the unique file
|
|
54
|
-
1. Instead of putting this file in our
|
|
67
|
+
1. Instead of putting this file in our Jekyll site, just copy the unique code from the HTML file name, e.g., from `googlef47733b3288357e4.html`, copy `f47733b3288357e4`.
|
|
55
68
|
1. In your site's `_config.yml`, configure this plugin with the code from the previous step:
|
|
56
69
|
```yml
|
|
57
70
|
google_search_console:
|
|
58
71
|
verification_file_code: 47733b3288357e4
|
|
59
72
|
```
|
|
60
|
-
1. Now just build your site and verify that the verification file now
|
|
73
|
+
1. Now, just build your site and verify that the verification file now exists!
|
|
61
74
|
```console
|
|
62
75
|
$ bundle exec jekyll build
|
|
63
76
|
$ ls _site/ | grep "google.*\.html"
|
|
@@ -65,19 +78,19 @@ Note that if you do place a verification file in the root of the source tree, th
|
|
|
65
78
|
```
|
|
66
79
|
|
|
67
80
|
# Development
|
|
68
|
-
The structure of this plugin was inspired by [https://ayastreb.me/writing-a-jekyll-plugin/](https://ayastreb.me/writing-a-jekyll-plugin/), the plugin jekyll-sitemap and the [Bundler Gem tutorial](https://bundler.io/guides/creating_gem.html).
|
|
81
|
+
The structure of this plugin was inspired by [https://ayastreb.me/writing-a-jekyll-plugin/](https://ayastreb.me/writing-a-jekyll-plugin/), the plugin jekyll-sitemap, and the [Bundler Gem tutorial](https://bundler.io/guides/creating_gem.html).
|
|
69
82
|
|
|
70
83
|
After checking out the repo;
|
|
71
|
-
1. Install [RVM](https://rvm.io/rvm/install) and install a supported
|
|
72
|
-
1. run `
|
|
73
|
-
1. run `
|
|
74
|
-
1. You can also run `
|
|
84
|
+
1. Install [RVM](https://rvm.io/rvm/install) and install a supported Ruby version (see .gemspec)
|
|
85
|
+
1. run `scripts/setup` to install dependencies
|
|
86
|
+
1. run `scripts/test` to run the tests
|
|
87
|
+
1. You can also run `scripts/console` for an interactive prompt that will allow you to experiment.
|
|
75
88
|
|
|
76
89
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
77
90
|
|
|
78
91
|
|
|
79
92
|
## Local development
|
|
80
|
-
Following the setup at [how-to-specify-local-ruby-gems-in-your-gemfile](https://rossta.net/blog/how-to-specify-local-ruby-gems-in-your-gemfile.html), these are the steps needed to build a
|
|
93
|
+
Following the setup at [how-to-specify-local-ruby-gems-in-your-gemfile](https://rossta.net/blog/how-to-specify-local-ruby-gems-in-your-gemfile.html), these are the steps needed to build a Jekyll site with a local clone of this plugin for local testing.
|
|
81
94
|
|
|
82
95
|
1. Clone this repo to your machine, say at `~/src/jekyll-google_search_console_verification_file`
|
|
83
96
|
1. In your Jekyll project's `Gemfile`:
|
|
@@ -86,76 +99,54 @@ Following the setup at [how-to-specify-local-ruby-gems-in-your-gemfile](https://
|
|
|
86
99
|
1. Configure bundler to use a local path for this gem in this project:
|
|
87
100
|
- `$ bundle config --local local.jekyll-google_search_console_verification_file ~/src/jekyll-google_search_console_verification_file`
|
|
88
101
|
1. Update the project: `$ bundle install`
|
|
89
|
-
1. Now the project will build with the local clone of this plugin when issuing e.g
|
|
102
|
+
1. Now the project will build with the local clone of this plugin when issuing e.g., `bundle exec jekyll build`
|
|
90
103
|
1. When you're done:
|
|
91
104
|
- Remove the local override with: `$ bundle config --delete local.jekyll-google_search_console_verification_file`
|
|
92
|
-
- Optionally restore the original gem
|
|
105
|
+
- Optionally restore the original gem included in `Gemfile` or keep building from a branch in the GitHub repo.
|
|
93
106
|
|
|
94
107
|
## Releasing
|
|
95
|
-
Instructions for releasing on rubygems.org below. Optionally make a GitHub [release](https://github.com/erikw/jekyll-google_search_console_verification_file/releases) after this for the pushed git tag.
|
|
108
|
+
Instructions for releasing on rubygems.org are below. Optionally make a GitHub [release](https://github.com/erikw/jekyll-google_search_console_verification_file/releases) after this for the pushed git tag.
|
|
96
109
|
|
|
97
|
-
## Using bundler/gem_tasks rake tasks
|
|
110
|
+
## [manual] Using bundler/gem_tasks rake tasks
|
|
98
111
|
Following instructions from [bundler.io](https://bundler.io/guides/creating_gem.html#releasing-the-gem):
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
112
|
+
```shell
|
|
113
|
+
vi -p lib/jekyll-google_search_console_verification_file/version.rb CHANGELOG.md
|
|
114
|
+
bundle exec rake build
|
|
115
|
+
ver=$(ruby -r jekyll-google_search_console_verification_file/version -e 'puts Jekyll::GoogleSearchConsoleVerificationFile::VERSION')
|
|
103
116
|
|
|
104
117
|
# Optional: test locally by including in another project
|
|
105
|
-
|
|
118
|
+
gem install pkg/jekyll-google_search_console_verification_file-$ver.gem
|
|
106
119
|
|
|
107
|
-
|
|
120
|
+
bundle exec rake release
|
|
108
121
|
```
|
|
109
122
|
|
|
110
|
-
## Using gem-release gem extension
|
|
123
|
+
## [recommended] Using gem-release gem extension
|
|
111
124
|
Using [gem-release](https://github.com/svenfuchs/gem-release):
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
|
|
125
|
+
```shell
|
|
126
|
+
vi CHANGELOG.md && git add CHANGELOG.md && git commit -m "Update CHANGELOG.md" && git push
|
|
127
|
+
gem signin
|
|
128
|
+
gem bump --version minor --tag --push --release --sign
|
|
115
129
|
```
|
|
116
130
|
For `--version`, use `major|minor|patch` as needed.
|
|
117
131
|
|
|
118
132
|
## Multi-versions
|
|
119
|
-
* For
|
|
133
|
+
* For Ruby, just use RVM to switch between supported Ruby versions specified in `.gemspec`.
|
|
120
134
|
* To run with different jekyll versions, [Appraisal](https://github.com/thoughtbot/appraisal) is used with [`Appraisals`](Appraisals) to generate different [`gemfiles/`](gemfiles/)
|
|
121
135
|
- To use a specific Gemfile, run like
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
|
|
136
|
+
```shell
|
|
137
|
+
BUNDLE_GEMFILE=gemfiles/jekyll_4.x.x.gemfile bundle exec rake spec
|
|
138
|
+
bundle exec appraisal jekyll-4.x.x rake spec
|
|
125
139
|
```
|
|
126
140
|
- To run `rake spec` for all gemfiles:
|
|
127
|
-
```
|
|
128
|
-
|
|
141
|
+
```shell
|
|
142
|
+
bundle exec appraisal rake spec
|
|
129
143
|
```
|
|
130
144
|
- To generate new/updated gemfiles from `Appraisals`
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
|
|
145
|
+
```shell
|
|
146
|
+
bundle exec appraisal install
|
|
147
|
+
bundle exec appraisal generate
|
|
134
148
|
```
|
|
135
149
|
|
|
136
|
-
## Travis
|
|
137
|
-
To use the [travis cli client](https://github.com/travis-ci/travis.rb) (installed from `Gemfile`):
|
|
138
|
-
1. Get a GitHub OAuth token by
|
|
139
|
-
- going to [github.com/settings/tokens](https://github.com/settings/tokens)
|
|
140
|
-
- create a new token named `travis-cli`
|
|
141
|
-
- Set the scopes `repo`, `read:org`, `user:email` according to the [docs](https://docs.travis-ci.com/user/github-oauth-scopes).
|
|
142
|
-
1. Set travis.com as the default so we don't need to add `--pro` to most commands
|
|
143
|
-
```console
|
|
144
|
-
$ bundle exec travis endpoint --set-default --api-endpoint https://api.travis-ci.com/
|
|
145
|
-
```
|
|
146
|
-
1. Login with the cli client
|
|
147
|
-
```console
|
|
148
|
-
$ bundle exec travis login --github-token $GITHUB_TOKEN
|
|
149
|
-
```
|
|
150
|
-
1. Now the cli client can be used (might need `--pro` to use travis.com)
|
|
151
|
-
```console
|
|
152
|
-
$ bundle exec travis lint
|
|
153
|
-
$ bundle exec travis accounts
|
|
154
|
-
$ bundle exec travis status
|
|
155
|
-
$ bundle exec travis branches
|
|
156
|
-
$ bundle exec travis monitor
|
|
157
|
-
```
|
|
158
|
-
|
|
159
150
|
# Contributing
|
|
160
151
|
Bug reports and pull requests are welcome on GitHub at https://github.com/erikw/jekyll-google_search_console_verification_file.
|
|
161
152
|
|
data/Rakefile
CHANGED
|
@@ -13,7 +13,14 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
13
13
|
require "rubocop/rake_task"
|
|
14
14
|
RuboCop::RakeTask.new(:rubocop) do |t|
|
|
15
15
|
# See https://docs.rubocop.org/rubocop/usage/basic_usage.html
|
|
16
|
-
t.options = [
|
|
16
|
+
t.options = ["--display-cop-names", "--parallel"]
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
desc "Run Qlty code analysis"
|
|
20
|
+
task :qlty do
|
|
21
|
+
sh "qlty smells --all"
|
|
22
|
+
sh "qlty metrics --all --max-depth=2 --sort complexity --limit 10"
|
|
23
|
+
# sh "qlty lint" # Just runs rubocop, not necessary as we have a task for this already
|
|
17
24
|
end
|
|
18
25
|
|
|
19
26
|
# default task: Add spec and rubocop to default tasks.
|
|
@@ -7,16 +7,17 @@ gem "kramdown", "2.3.1"
|
|
|
7
7
|
gem "kramdown-parser-gfm", "~> 1.0"
|
|
8
8
|
|
|
9
9
|
group :development, :test do
|
|
10
|
-
gem "rake", "~> 13.0", require: false
|
|
11
|
-
gem "travis", "~> 1.0", require: false
|
|
12
10
|
gem "appraisal", "~> 2.4", require: false
|
|
11
|
+
gem "gem-release", "~> 2.0", require: false
|
|
12
|
+
gem "rake", "~> 13.0", require: false
|
|
13
|
+
gem "solargraph", require: false
|
|
13
14
|
end
|
|
14
15
|
|
|
15
16
|
group :test do
|
|
16
17
|
gem "rspec", "~> 3.0"
|
|
17
18
|
gem "rubocop", "~> 1.18", require: false
|
|
18
19
|
gem "rubocop-rake", "~> 0.6", require: false
|
|
19
|
-
gem "rubocop-rspec", "~>
|
|
20
|
+
gem "rubocop-rspec", "~> 3.5", require: false
|
|
20
21
|
gem "simplecov", "~> 0.21"
|
|
21
22
|
end
|
|
22
23
|
|
|
@@ -5,16 +5,17 @@ source "https://rubygems.org"
|
|
|
5
5
|
gem "jekyll", "~> 4.0"
|
|
6
6
|
|
|
7
7
|
group :development, :test do
|
|
8
|
-
gem "rake", "~> 13.0", require: false
|
|
9
|
-
gem "travis", "~> 1.0", require: false
|
|
10
8
|
gem "appraisal", "~> 2.4", require: false
|
|
9
|
+
gem "gem-release", "~> 2.0", require: false
|
|
10
|
+
gem "rake", "~> 13.0", require: false
|
|
11
|
+
gem "solargraph", require: false
|
|
11
12
|
end
|
|
12
13
|
|
|
13
14
|
group :test do
|
|
14
15
|
gem "rspec", "~> 3.0"
|
|
15
16
|
gem "rubocop", "~> 1.18", require: false
|
|
16
17
|
gem "rubocop-rake", "~> 0.6", require: false
|
|
17
|
-
gem "rubocop-rspec", "~>
|
|
18
|
+
gem "rubocop-rspec", "~> 3.5", require: false
|
|
18
19
|
gem "simplecov", "~> 0.21"
|
|
19
20
|
end
|
|
20
21
|
|
data/{script → scripts}/setup
RENAMED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-google_search_console_verification_file
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Erik Westrup
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -41,17 +41,20 @@ extensions: []
|
|
|
41
41
|
extra_rdoc_files: []
|
|
42
42
|
files:
|
|
43
43
|
- ".ackrc"
|
|
44
|
-
- ".
|
|
44
|
+
- ".devcontainer/devcontainer.json"
|
|
45
45
|
- ".editorconfig"
|
|
46
46
|
- ".github/dependabot.yml"
|
|
47
47
|
- ".github/workflows/cd.yml"
|
|
48
|
+
- ".github/workflows/ci.yml"
|
|
48
49
|
- ".github/workflows/codeql-analysis.yml"
|
|
49
50
|
- ".gitignore"
|
|
51
|
+
- ".qlty/.gitignore"
|
|
52
|
+
- ".qlty/configs/.shellcheckrc"
|
|
53
|
+
- ".qlty/qlty.toml"
|
|
50
54
|
- ".rspec"
|
|
51
55
|
- ".rubocop.yml"
|
|
52
56
|
- ".ruby-version"
|
|
53
57
|
- ".simplecov"
|
|
54
|
-
- ".travis.yml"
|
|
55
58
|
- Appraisals
|
|
56
59
|
- CHANGELOG.md
|
|
57
60
|
- CONTRIBUTING.md
|
|
@@ -69,11 +72,12 @@ files:
|
|
|
69
72
|
- lib/jekyll-google_search_console_verification_file/generator.rb
|
|
70
73
|
- lib/jekyll-google_search_console_verification_file/template.html
|
|
71
74
|
- lib/jekyll-google_search_console_verification_file/version.rb
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
75
|
+
- scripts/build
|
|
76
|
+
- scripts/console
|
|
77
|
+
- scripts/devcontainer_postCreateCommand.sh
|
|
78
|
+
- scripts/lint
|
|
79
|
+
- scripts/setup
|
|
80
|
+
- scripts/test
|
|
77
81
|
homepage: https://github.com/erikw/jekyll-google_search_console_verification_file/
|
|
78
82
|
licenses:
|
|
79
83
|
- MIT
|
data/.codeclimate.yml
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Reference: https://docs.codeclimate.com/docs/advanced-configuration#section-checks
|
|
2
|
-
# Reference of plugins: https://docs.codeclimate.com/docs/list-of-engines
|
|
3
|
-
|
|
4
|
-
version: "2"
|
|
5
|
-
plugins:
|
|
6
|
-
rubocop:
|
|
7
|
-
enabled: true
|
|
8
|
-
channel: rubocop-1-18-3
|
|
9
|
-
fixme:
|
|
10
|
-
enabled: true
|
|
11
|
-
eslint:
|
|
12
|
-
enabled: true
|
|
13
|
-
duplication:
|
|
14
|
-
enabled: true
|
|
15
|
-
config:
|
|
16
|
-
languages:
|
|
17
|
-
- ruby
|
|
18
|
-
ratings:
|
|
19
|
-
paths:
|
|
20
|
-
- "**.rb"
|
|
21
|
-
exclude_paths:
|
|
22
|
-
- script/
|
data/.travis.yml
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# NOTE run $(travis lint) after modyifing this file.
|
|
2
|
-
|
|
3
|
-
# Travis
|
|
4
|
-
# - build lifecycle: https://docs.travis-ci.com/user/job-lifecycle
|
|
5
|
-
# - config doc: https://config.travis-ci.com/
|
|
6
|
-
# - ruby defaults: https://docs.travis-ci.com/user/languages/ruby/
|
|
7
|
-
# Codeclimate setup: https://docs.codeclimate.com/docs/travis-ci-test-coverage
|
|
8
|
-
|
|
9
|
-
version: ~> 1.0
|
|
10
|
-
env:
|
|
11
|
-
global:
|
|
12
|
-
- CC_TEST_REPORTER_ID=9a84a9f695de3b120b6fcead4e089b45420f7518fb2123dc5424f862d381c4ff
|
|
13
|
-
language: ruby
|
|
14
|
-
dist: focal # TODO Remove this when solved: https://github.com/rvm/rvm/issues/5133
|
|
15
|
-
# Buid matrix (rvm x gemfile = 2x2) with one version from each supported major version in range defined in .gemspec for
|
|
16
|
-
rvm:
|
|
17
|
-
- 2.7.0
|
|
18
|
-
- 3.0.1
|
|
19
|
-
gemfile:
|
|
20
|
-
- gemfiles/jekyll_3.7.x.gemfile
|
|
21
|
-
- gemfiles/jekyll_4.x.x.gemfile
|
|
22
|
-
cache: bundler
|
|
23
|
-
before_install: gem install bundler -v 2.2.18
|
|
24
|
-
#install: bundle install # Default
|
|
25
|
-
before_script:
|
|
26
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
|
27
|
-
- chmod +x ./cc-test-reporter
|
|
28
|
-
- ./cc-test-reporter before-build
|
|
29
|
-
#script: bundle exec rake # Default
|
|
30
|
-
after_script:
|
|
31
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
/data/{script → scripts}/build
RENAMED
|
File without changes
|
/data/{script → scripts}/console
RENAMED
|
File without changes
|
/data/{script → scripts}/lint
RENAMED
|
File without changes
|
/data/{script → scripts}/test
RENAMED
|
File without changes
|