Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,14 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.7, 3.0.3]
ruby: ['3.2', '3.3']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Cache gems
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-rubocop-
- name: Install gems
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
bundler-cache: true
- name: Run tests
run: bundle exec rake test
- name: Run RuboCop
Expand Down
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#
# See https://docs.rubocop.org/rubocop/configuration
AllCops:
TargetRubyVersion: 2.5.0
TargetRubyVersion: 3.1
NewCops: enable

require:
Expand Down Expand Up @@ -39,3 +39,6 @@ Layout/LineLength:
Style/ClassAndModuleChildren:
Exclude:
- 'test/**/*'

Gemspec/RequiredRubyVersion:
Enabled: false
11 changes: 6 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ GEM
nokogiri (>= 1.12.0)
lumberjack (1.2.10)
method_source (1.1.0)
minitest (5.20.0)
minitest (5.27.0)
minitest-focus (1.4.0)
minitest (>= 4, < 6)
minitest-line (0.6.5)
Expand All @@ -70,11 +70,11 @@ GEM
minitest (>= 5.0)
ruby-progressbar
nenv (0.3.0)
nokogiri (1.16.7-aarch64-linux)
nokogiri (1.19.3-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
nokogiri (1.19.3-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
nokogiri (1.19.3-x86_64-linux-gnu)
racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
Expand Down Expand Up @@ -141,6 +141,7 @@ GEM
PLATFORMS
aarch64-linux
arm64-darwin-22
arm64-darwin-24
x86_64-linux

DEPENDENCIES
Expand All @@ -159,4 +160,4 @@ DEPENDENCIES
simplecov

BUNDLED WITH
2.4.22
4.0.3
4 changes: 2 additions & 2 deletions lib/render_editorjs/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ def render
return "" unless valid_renderer?

safe_join(
content["blocks"].map do |block|
content["blocks"].filter_map do |block|
block_renderer = block_renderers(block["type"])
next unless block_renderer

block_renderer.render(block["data"])
end.compact
end
)
end

Expand Down
2 changes: 1 addition & 1 deletion render_editorjs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
spec.summary = "A modular and customizable Ruby renderer for https://editorjs.io"
spec.homepage = "https://github.com/ceritium/render_editorjs"
spec.license = "MIT"
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
spec.required_ruby_version = Gem::Requirement.new(">= 3.2")

# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"

Expand Down
Loading