Skip to content

Commit

Permalink
update nokogiri dependency (#38)
Browse files Browse the repository at this point in the history
Co-authored-by: Arvind Satyanarayan <arvind@users.noreply.github.com>
  • Loading branch information
jonathanzong and arvind committed Jun 9, 2023
1 parent a56f19a commit 7b75b88
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 41 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -28,6 +28,6 @@ end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

gem "nokogumbo"
gem "nokogiri", "~> 1.12"
gem "webrick"
gem "htmlbeautifier"
48 changes: 17 additions & 31 deletions Gemfile.lock
@@ -1,20 +1,19 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0)
concurrent-ruby (1.1.9)
concurrent-ruby (1.2.2)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.15.5)
ffi (1.15.5-x64-mingw-ucrt)
forwardable-extended (2.6.0)
htmlbeautifier (1.4.1)
htmlbeautifier (1.4.2)
http_parser.rb (0.8.0)
i18n (1.10.0)
i18n (1.13.0)
concurrent-ruby (~> 1.0)
jekyll (4.2.2)
addressable (~> 2.4)
Expand All @@ -31,68 +30,55 @@ GEM
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 2.0)
jekyll-feed (0.16.0)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.3.1)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.7.1)
liquid (4.0.4)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
nokogiri (1.14.3-arm64-darwin)
nokogiri (1.15.1-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.14.3-x64-mingw-ucrt)
racc (~> 1.4)
nokogiri (1.14.3-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.14.3-x86_64-linux)
racc (~> 1.4)
nokogumbo (2.0.5)
nokogiri (~> 1.8, >= 1.8.4)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
public_suffix (5.0.1)
racc (1.6.2)
rb-fsevent (0.11.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.28.0)
rouge (3.30.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.8.0)
webrick (1.7.0)
webrick (1.8.1)

PLATFORMS
arm64-darwin-21
x64-mingw-ucrt
x86_64-darwin-19
x86_64-darwin-20
x86_64-darwin-21
x86_64-linux
x86_64-darwin-22

DEPENDENCIES
htmlbeautifier
jekyll (~> 4.2.0)
jekyll-feed (~> 0.12)
jekyll-seo-tag
nokogumbo
nokogiri (~> 1.12)
tzinfo (~> 1.2)
tzinfo-data
wdm (~> 0.1.1)
webrick

BUNDLED WITH
2.2.22
2.4.10
12 changes: 6 additions & 6 deletions _plugins/MITVisFilters.rb
@@ -1,12 +1,12 @@
require 'nokogumbo'
require 'nokogiri'

module MITVisFilters
def filter_alumni(input, flag)
input.select{ |key, value| value['alumni'] == flag }
end

def filter_titles(arr, titles, flip=false)
arr.select{ |key, value|
arr.select{ |key, value|
title = value['title']
first = titles.any? { |t| title.include?(t) }
flip ? !first : first
Expand All @@ -24,7 +24,7 @@ def namesort(arr)
if sort_head
head = namesort(head)
end

tail = namesort(filter_titles(input, titles, true))
head + tail
end
Expand All @@ -33,12 +33,12 @@ def jsonify_pub(input)
people = @context.registers[:site].data['people']
pub = {
'id': input['slug'],
'title': input['title'],
'title': input['title'],
'year': input['year'],
'type': input['type'],
'tags': input['tags'].map { |tag| tag.downcase},
'authors': input['authors'].map {
|author| author['name'] || people[author['key']]['name']
'authors': input['authors'].map {
|author| author['name'] || people[author['key']]['name']
}
}

Expand Down
6 changes: 3 additions & 3 deletions _scripts/tex2md.rb
@@ -1,7 +1,7 @@
#! /usr/bin/env ruby

require 'fileutils'
require 'nokogumbo'
require 'nokogiri'
require 'htmlbeautifier'

# Call from the root directory.
Expand All @@ -25,7 +25,7 @@

# Improve semantics
h6 = doc.css('h6')
h6.each do |h|
h6.each do |h|
h.name = 'h2'
if h.content == 'Acknowledgements.'
h.content = 'Acknowledgements'
Expand Down Expand Up @@ -91,7 +91,7 @@

# Remove "External Links" text
span.inner_html = span.inner_html.sub('External Links: ', '')


# Remove URL Notes
# Remove empty Document links
Expand Down

0 comments on commit 7b75b88

Please sign in to comment.