Skip to content

Commit

Permalink
Merge pull request #34 from DannyBen/update/deps
Browse files Browse the repository at this point in the history
Update Sinatra, Octokit and Commonmarker and drop support for Ruby 3.0
  • Loading branch information
DannyBen committed Jan 26, 2024
2 parents 308b23c + 6b9079c commit 5f62fe2
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

strategy:
matrix: { ruby: ['3.0', '3.1', '3.2', head] }
matrix: { ruby: ['3.1', '3.2', '3.3'] }

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Expand Up @@ -8,7 +8,7 @@ inherit_gem:
- rspec.yml

AllCops:
TargetRubyVersion: 3.0
TargetRubyVersion: 3.1
Exclude:
- debug.rb
- dev/**/*
Expand Down
6 changes: 3 additions & 3 deletions Gemfile
@@ -1,14 +1,14 @@
source 'https://rubygems.org'

gem 'byebug'
gem 'colsole'
gem 'debug', require: ENV['DEBUGGER'] == '1'
gem 'lp'
gem 'rack-test'
gem 'rspec'
gem 'rspec_approvals'
gem 'rspec-html-matchers'
gem 'runfile', '>= 1.0.0.rc4', require: false
gem 'runfile-tasks', '>= 1.0.0.rc2', require: false
gem 'runfile', require: false
gem 'runfile-tasks', require: false
gem 'simplecov'

gemspec
2 changes: 1 addition & 1 deletion Runfile
@@ -1,4 +1,4 @@
require "byebug"
require "debug"
require "lp"
require 'madman/version'

Expand Down
1 change: 0 additions & 1 deletion lib/madman.rb
Expand Up @@ -2,7 +2,6 @@
# ref: https://github.com/octokit/octokit.rb/blob/main/lib/octokit/warnable.rb
ENV['OCTOKIT_SILENT'] = '1'

require 'byebug' if ENV['BYEBUG']
require 'commonmarker'
require 'mister_bin'
require 'octokit'
Expand Down
2 changes: 1 addition & 1 deletion lib/madman/refinements/array.rb
Expand Up @@ -5,7 +5,7 @@ def to_markdown
end

def to_html
CommonMarker.render_html to_markdown, :DEFAULT, [:table]
Commonmarker.to_html to_markdown, options: { extension: { table: true } }
end
end
end
2 changes: 1 addition & 1 deletion lib/madman/refinements/string.rb
Expand Up @@ -5,7 +5,7 @@ def slug
end

def to_html
CommonMarker.render_html self, :DEFAULT, [:table]
Commonmarker.to_html self, options: { extension: { table: true } }
end
end
end
5 changes: 4 additions & 1 deletion lib/madman/renderers/default.rb
Expand Up @@ -2,7 +2,10 @@ module Madman
module Renderers
class Default
def self.render(text, _opts = {})
CommonMarker.render_html text, %i[DEFAULT UNSAFE], [:table]
Commonmarker.to_html text, options: {
render: { unsafe: true },
extension: { table: true },
}
end
end
end
Expand Down
26 changes: 13 additions & 13 deletions madman.gemspec
Expand Up @@ -14,20 +14,20 @@ Gem::Specification.new do |s|
s.homepage = 'https://github.com/dannyben/madman'
s.license = 'MIT'

s.required_ruby_version = '>= 3.0.0'
s.required_ruby_version = '>= 3.1.0'

s.add_runtime_dependency 'addressable', '~> 2.7'
s.add_runtime_dependency 'coffee-script', '~> 2.4'
s.add_runtime_dependency 'colsole', '>= 0.8.1', '< 2'
s.add_runtime_dependency 'commonmarker', '~> 0.23', '>= 0.23.4'
s.add_runtime_dependency 'mister_bin', '~> 0.7'
s.add_runtime_dependency 'octokit', '~> 6.0'
s.add_runtime_dependency 'puma', '>= 5.1', '< 7'
s.add_runtime_dependency 'requires', '~> 1.0'
s.add_runtime_dependency 'sassc', '~> 2.4'
s.add_runtime_dependency 'sinatra', '~> 3.0'
s.add_runtime_dependency 'slim', '>= 4.0', '< 6'
s.add_runtime_dependency 'string-direction', '~> 1.2'
s.add_dependency 'addressable', '~> 2.7'
s.add_dependency 'coffee-script', '~> 2.4'
s.add_dependency 'colsole', '>= 0.8.1', '< 2'
s.add_dependency 'commonmarker', '~> 1.0'
s.add_dependency 'mister_bin', '~> 0.7'
s.add_dependency 'octokit', '~> 8.0'
s.add_dependency 'puma', '>= 5.1', '< 7'
s.add_dependency 'requires', '~> 1.0'
s.add_dependency 'sassc', '~> 2.4'
s.add_dependency 'sinatra', '>= 3.0', '< 5'
s.add_dependency 'slim', '>= 4.0', '< 6'
s.add_dependency 'string-direction', '~> 1.2'

s.metadata['rubygems_mfa_required'] = 'true'
end
2 changes: 1 addition & 1 deletion spec/approvals/renderer/github
@@ -1 +1 @@
<h1><a id="user-content-hello-world" class="anchor" aria-hidden="true" href="#hello-world"><span aria-hidden="true" class="octicon octicon-link"></span></a>hello world</h1>
<h1><a id="user-content-hello-world" class="anchor" aria-hidden="true" tabindex="-1" href="#hello-world"><span aria-hidden="true" class="octicon octicon-link"></span></a>hello world</h1>
4 changes: 2 additions & 2 deletions spec/rspec_mixin.rb
Expand Up @@ -6,7 +6,7 @@ def with_env(key, value)
ENV[key] = old_value
end

def without_env(key, &block)
with_env(key, nil, &block)
def without_env(key, &)
with_env(key, nil, &)
end
end

0 comments on commit 5f62fe2

Please sign in to comment.