Skip to content

Commit

Permalink
ci: Add rubocop CI (#18)
Browse files Browse the repository at this point in the history
* ci: Add rubocop CI

* Create .rubocop.yml

* chore: Add metadata definition

* Update `.rubocop.yml`

* rubocop -a
  • Loading branch information
toshimaru authored Jul 7, 2024
1 parent c6c0f05 commit cf8c359
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,14 @@ jobs:
bundler-cache: true
- name: Run Test
run: bundle exec rake

rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Rubocop
run: bundle exec rubocop
28 changes: 28 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
inherit_mode:
merge:
- Exclude

AllCops:
TargetRubyVersion: 2.7
NewCops: enable
SuggestExtensions: false
Exclude:
- 'gemfiles/*.gemfile'

Style/FrozenStringLiteralComment:
Enabled: true

Style/StringLiterals:
Enabled: false

Layout/LineLength:
Enabled: false

Naming/FileName:
Enabled: false

Metrics/MethodLength:
Enabled: false

Style/ClassAndModuleChildren:
Enabled: false
9 changes: 7 additions & 2 deletions jekyll-include_sass.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ Gem::Specification.new do |spec|
spec.authors = ["toshimaru"]
spec.email = ["me@toshimaru.net"]

spec.summary = %q{Jekyll include_sass tag which aincludes and converts SASS/SCSS file. Useful for AMP HTML!}
spec.description = %q{Jekyll include_sass tag is a shorthand tag for including SASS/SCSS file inside head tag. It's useful when you don't want to reference external CSS, for example, in AMP.}
spec.summary = 'Jekyll include_sass tag which aincludes and converts SASS/SCSS file. Useful for AMP HTML!'
spec.description = "Jekyll include_sass tag is a shorthand tag for including SASS/SCSS file inside head tag. It's useful when you don't want to reference external CSS, for example, in AMP."
spec.homepage = "https://github.com/toshimaru/jekyll-include_sass"
spec.license = "MIT"

spec.metadata["homepage_uri"] = "https://github.com/toshimaru/jekyll-include_sass"
spec.metadata["source_code_uri"] = "https://github.com/toshimaru/jekyll-include_sass"
spec.metadata["changelog_uri"] = "https://github.com/toshimaru/jekyll-include_sass/releases"
spec.metadata['rubygems_mfa_required'] = 'true'

spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
Expand Down
4 changes: 2 additions & 2 deletions test/jekyll/include_tag_test_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def create_post(content, override = {})
def render_with(site, content, override = {})
converter = site.converters.find { |c| c.instance_of?(Jekyll::Converters::Markdown) }
payload = { "highlighter_prefix" => converter.highlighter_prefix,
"highlighter_suffix" => converter.highlighter_suffix, }.merge(override)
info = { :registers => { :site => site } }
"highlighter_suffix" => converter.highlighter_suffix }.merge(override)
info = { registers: { site: site } }
converter.convert(
Liquid::Template.parse(content).render!(payload, info)
)
Expand Down

0 comments on commit cf8c359

Please sign in to comment.