Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch from python-docutils to ruby-pandoc for rst files #1789

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
83c3200
switch from python-docutils to ruby-pandoc for rst files
Fuzzwah Feb 26, 2024
b43708d
switch from python-docutils to ruby-pandoc for rst files
Fuzzwah Feb 26, 2024
7deae54
switch from python-docutils to ruby-pandoc for rst files
Fuzzwah Feb 26, 2024
93559b3
remove python things from dockerfile
Fuzzwah Feb 27, 2024
c489cc6
Update Gemfile
Fuzzwah Feb 27, 2024
24217d1
Delete lib/github/commands/rest2html
Fuzzwah Feb 27, 2024
e4346d8
use ruby-pandoc rather than python-docutils for rst
Fuzzwah Feb 27, 2024
323af6a
fixing rakudo
Fuzzwah Feb 27, 2024
847d66c
use ruby-build
Fuzzwah Feb 27, 2024
a077ef4
nokogiri
Fuzzwah Feb 27, 2024
0e24daa
successfully built 4.0.3
Fuzzwah Feb 27, 2024
8a18397
working pandoc
Fuzzwah Feb 28, 2024
cba0793
allow ruby > 2.4
Fuzzwah Feb 28, 2024
32294f2
Merge branch 'rst-pandoc' into fuzzwah-patch-1
Fuzzwah Feb 28, 2024
e603d5a
Merge pull request #1788 from Fuzzwah/fuzzwah-patch-1
Fuzzwah Feb 28, 2024
a7e0864
Commonmarker.to_html
Fuzzwah Feb 29, 2024
17fb948
Commonmarker.to_html
Fuzzwah Feb 29, 2024
a442498
commonmarker
Fuzzwah Feb 29, 2024
7fc188f
rst fix
Fuzzwah Feb 29, 2024
38d94b6
lets test paru
Fuzzwah Feb 29, 2024
5ad9012
nokogiri version pin
Fuzzwah Feb 29, 2024
c282a3c
paru pin
Fuzzwah Feb 29, 2024
428745f
nokogiri pin
Fuzzwah Feb 29, 2024
32944ce
names
Fuzzwah Feb 29, 2024
2b23c72
test
Fuzzwah Feb 29, 2024
941efe3
rst fun
Fuzzwah Feb 29, 2024
9964439
version
Fuzzwah Feb 29, 2024
f74c862
rst
Fuzzwah Feb 29, 2024
a080ef6
ok, i think i get it
Fuzzwah Feb 29, 2024
1bc2ae2
back to pandoc-ruby
Fuzzwah Feb 29, 2024
132964d
arrh ha
Fuzzwah Feb 29, 2024
fd42963
Update Gemfile
Fuzzwah Feb 29, 2024
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
13 changes: 1 addition & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ jobs:
strategy:
matrix:
ruby:
- "2.4"
- "2.5"
- "2.6"
- "2.7"
- "3.3.0"
fail-fast: false

steps:
Expand All @@ -28,11 +25,6 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- uses: actions/setup-python@v2
with:
# This should match lib/github/markups.rb GitHub::Markups::MARKUP_RST
python-version: '3.x'

- uses: actions/cache@v2
with:
path: ~/.cache/pip
Expand All @@ -49,9 +41,6 @@ jobs:
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
sudo cpanm --installdeps --notest Pod::Simple

- name: Install Python dependencies
run: python -m pip install docutils

- name: Run rake
run: |
export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ pkg/
Gemfile.lock
.project
.buildpath
vendor/
*~
68 changes: 52 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,74 @@
FROM ubuntu:trusty
FROM ubuntu:focal

RUN apt-get update -qq
RUN apt-get install -y apt-transport-https
RUN apt-get install -y \
apt-transport-https \
locales \
software-properties-common \
curl \
gnupg2

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 379CE192D401AB61
RUN echo "deb https://dl.bintray.com/nxadm/rakudo-pkg-debs `lsb_release -cs` main" | tee -a /etc/apt/sources.list.d/rakudo-pkg.list
# add the Raku repository
RUN curl -1sLf 'https://dl.cloudsmith.io/public/nxadm-pkgs/rakudo-pkg/gpg.0DD4CA7EB1C6CC6B.key' | gpg --dearmor >> /usr/share/keyrings/nxadm-pkgs-rakudo-pkg-archive-keyring.gpg
RUN curl -1sLf 'https://dl.cloudsmith.io/public/nxadm-pkgs/rakudo-pkg/config.deb.txt?distro=ubuntu&codename=focal&component=main' > /etc/apt/sources.list.d/nxadm-pkgs-rakudo-pkg.list
# add the Node.js repository
RUN curl -1sLf https://deb.nodesource.com/setup_20.x | bash
RUN apt-get update -qq

RUN apt-get install -y \
perl rakudo-pkg curl git build-essential python python-pip \
libssl-dev libreadline-dev zlib1g-dev \
libicu-dev cmake pkg-config
perl \
rakudo-pkg \
git \
libssl-dev \
libreadline-dev \
zlib1g-dev \
libicu-dev \
cmake \
build-essential \
g++ \
pkg-config \
nodejs \
libffi-dev \
libyaml-dev \
gcc \
libxslt-dev \
libxml2-dev \
zlib1g-dev \
libidn11-dev \
pandoc \
vim-nox

ENV PATH $PATH:/opt/rakudo-pkg/bin
RUN install-zef-as-user && zef install Pod::To::HTML
RUN install-zef
ENV PATH $PATH:/root/.raku/bin
RUN zef install Pod::To::HTML2

RUN curl -L http://cpanmin.us | perl - App::cpanminus
RUN cpanm --installdeps --notest Pod::Simple

RUN pip install docutils
RUN apt-get purge ruby -y

# Install Rbenv and Ruby
RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv && echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc && echo 'eval "$(rbenv init -)"' >> ~/.bashrc
RUN git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
ENV PATH $PATH:/root/.rbenv/bin:/root/.rbenv/shims
RUN curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash
RUN rbenv install 2.4.1
RUN rbenv global 2.4.1
RUN rbenv rehash
RUN cd /root/.rbenv/plugins/ruby-build && git pull && cd -
ENV RUBY_VERSION 3.3.0
RUN rbenv install -l
RUN rbenv install $RUBY_VERSION && rbenv global $RUBY_VERSION && rbenv rehash
RUN rbenv install --list-all
RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
RUN gem install rubygems-update && update_rubygems
RUN gem install bundler:2.4.22

RUN bundle config --global build.nokogiri --use-system-libraries

RUN gem install bundler
#RUN dpkg -i https://github.com/jgm/pandoc/releases/download/3.1.12.1/pandoc-3.1.12.1-1-amd64.deb

WORKDIR /data/github-markup
COPY github-markup.gemspec .
COPY Gemfile .
COPY Gemfile.lock .
COPY lib/github-markup.rb lib/github-markup.rb
ADD lib ./lib
RUN bundle

ENV LC_ALL en_US.UTF-8
Expand Down
22 changes: 12 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
source "http://rubygems.org"
gemspec

gem "nokogiri", ">= 1.16.2", force_ruby_platform: true
gem "posix-spawn", :platforms => :ruby
gem "redcarpet", :platforms => :ruby
gem "kramdown", :platforms => :jruby
gem "RedCloth"
# using a tag version here because 0.18.3 was not published by the author to encourage users to upgrade.
# however we want to bump up to this version since this has a security patch
gem "commonmarker", git: "https://github.com/gjtorikian/commonmarker.git", tag: "v0.18.3"
gem "rdoc", "~>3.6"
gem "org-ruby", "= 0.9.9"
gem "creole", "~>0.3.6"
gem "wikicloth", "=0.8.3"
gem "twitter-text", "~> 1.14"
gem "asciidoctor", "~> 2.0.5"
gem "rake"
gem "commonmarker", "~> 0.23.10"
gem 'rdoc', '~> 6.6', '>= 6.6.2'
gem 'org-ruby', '~> 0.9.12'
gem 'creole', '~> 0.5.0'
gem 'idn-ruby', '~> 0.1.5'
gem 'twitter-text', '~> 3.1'
gem "wikicloth", "= 0.8.3"
gem 'asciidoctor', '~> 2.0', '>= 2.0.21'
gem 'rake', '~> 13.1'
gem 'pandoc-ruby', '~> 2.1.10'

68 changes: 38 additions & 30 deletions github-markup.gemspec
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
require File.expand_path("../lib/github-markup", __FILE__)

Gem::Specification.new do |s|
s.name = "github-markup"
s.version = GitHub::Markup::VERSION
s.summary = "The code GitHub uses to render README.markup"
s.description = <<~DESC
This gem is used by GitHub to render any fancy markup such as Markdown,
Textile, Org-Mode, etc. Fork it and add your own!
DESC
s.authors = ["Chris Wanstrath"]
s.email = "[email protected]"
s.homepage = "https://github.com/github/markup"
s.license = "MIT"

s.files = `git ls-files`.split($\)
s.files += Dir['vendor/**/*']
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
s.test_files = s.files.grep(%r{^(test|spec|features)/})
s.require_paths = %w[lib]

s.add_development_dependency 'rake', '~> 12'
s.add_development_dependency 'activesupport', '~> 4.0'
s.add_development_dependency 'minitest', '~> 5.4', '>= 5.4.3'
s.add_development_dependency 'html-pipeline', '~> 1.0'
s.add_development_dependency 'sanitize', '>= 4.6.3'
s.add_development_dependency 'nokogiri', '~> 1.8.1'
s.add_development_dependency 'nokogiri-diff', '~> 0.2.0'
s.add_development_dependency "github-linguist", ">= 7.1.3"
end
# frozen_string_literal: true

require_relative "lib/github/markup/version"

Gem::Specification.new do |spec|
spec.name = "github-markup"
spec.version = GitHub::Markup::VERSION
spec.homepage = "https://github.com/github/markup"
spec.summary = "The code GitHub uses to render README.markup"
spec.description = <<~DESC
This gem is used by GitHub to render any fancy markup such as Markdown,
Textile, Org-Mode, etc. Fork it and add your own!
DESC
spec.authors = ["Chris Wanstrath", "Rob Crouch"]
spec.license = "MIT"

spec.metadata = {
"bug_tracker_uri" => "https://github.com/github/markup/issues",
"source_code_uri" => "https://github.com/github/markup"
}

spec.required_ruby_version = ">= 2.4"

spec.files = Dir.glob("lib/**/*", File::FNM_DOTMATCH)
spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})

spec.add_development_dependency 'rake', '~> 13.1'
spec.add_development_dependency 'activesupport', '~> 7.1', '>= 7.1.3.2'
spec.add_development_dependency 'minitest', '~> 5.4', '>= 5.4.3'
spec.add_development_dependency 'html-pipeline', '~> 1.0'
spec.add_development_dependency "sanitize", "~> 4.6", ">= 4.6.3"
spec.add_development_dependency 'nokogiri', '~> 1.8.1'
spec.add_development_dependency 'nokogiri-diff', '~> 0.2.0'
spec.add_development_dependency "github-linguist", "~> 7.1", ">= 7.1.3"


end
Loading
Loading