summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Langford <wlangfor@gmail.com>2019-02-20 21:28:10 -0500
committerWilliam Langford <wlangfor@gmail.com>2019-02-22 19:32:31 -0500
commite1fb5257961b914456015efdf2a0fe28165705bf (patch)
tree811500c351c2f7d304feb39e766f1561b98b55fd
parentda170faafe341eaaf9cb352ce9e308566c301d4b (diff)
Cleanup leftover references to ruby
-rw-r--r--Dockerfile12
-rw-r--r--docs/Gemfile7
-rw-r--r--docs/Gemfile.lock63
-rw-r--r--docs/Rakefile24
-rw-r--r--docs/Rakefile.manual49
-rw-r--r--docs/Rakefile.website76
6 files changed, 5 insertions, 226 deletions
diff --git a/Dockerfile b/Dockerfile
index 4161b978..d35e4ada 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,9 +13,8 @@ RUN apt-get update && \
git \
bison \
flex \
- ruby \
- wget \
- ruby-dev && \
+ python3 \
+ wget && \
wget https://github.com/kkos/oniguruma/archive/v5.9.6.tar.gz -O onig-5.9.6.tar.gz && \
sha512sum onig-5.9.6.tar.gz | grep 6b048d345e148c9da38af7a8df76d4a358eb3d4db91fa7834076e511f526a63544284f212b0d56badbbd33112c8b458a5fff02bfbbda012ecfe478bc436ea679 && \
tar zxvf onig-5.9.6.tar.gz && \
@@ -25,8 +24,8 @@ RUN apt-get update && \
./configure --prefix=/usr/local && \
make && \
make install ) && \
- gem install bundler && \
- (cd /app/docs && bundle install) && \
+ pip3 install pipenv && \
+ (cd /app/docs && pipenv sync) && \
(cd /app && \
autoreconf -i && \
./configure --disable-valgrind --enable-all-static --prefix=/usr/local && \
@@ -43,8 +42,7 @@ RUN apt-get update && \
bison \
git \
flex \
- ruby \
- ruby-dev && \
+ python3 && \
apt-get autoremove -y && \
rm -rf oniguruma-5.9.6 && \
rm -rf /var/lib/apt/lists/* /var/lib/gems
diff --git a/docs/Gemfile b/docs/Gemfile
deleted file mode 100644
index 5908be71..00000000
--- a/docs/Gemfile
+++ /dev/null
@@ -1,7 +0,0 @@
-source "https://rubygems.org"
-
-gem "rake"
-gem "bonsai"
-gem "maruku"
-gem "ronn"
-gem "mustache", "<1.0" # to support ruby <2.0
diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock
deleted file mode 100644
index 61db44cc..00000000
--- a/docs/Gemfile.lock
+++ /dev/null
@@ -1,63 +0,0 @@
-GEM
- remote: https://rubygems.org/
- specs:
- activesupport (4.2.3)
- i18n (~> 0.7)
- json (~> 1.7, >= 1.7.7)
- minitest (~> 5.1)
- thread_safe (~> 0.3, >= 0.3.4)
- tzinfo (~> 1.1)
- addressable (2.3.8)
- bonsai (1.4.9)
- activesupport (>= 3.0.3)
- builder (>= 3.0.0)
- i18n (>= 0.5.0)
- launchy (>= 0.3.7)
- liquid (>= 2.2.2)
- maruku (>= 0.6.0)
- rack
- sass
- sinatra (>= 1.0)
- tilt (>= 1.3)
- watch (>= 0.1.0)
- yui-compressor
- builder (3.2.2)
- hpricot (0.8.6)
- i18n (0.7.0)
- json (1.8.3)
- launchy (2.4.3)
- addressable (~> 2.3)
- liquid (3.0.6)
- maruku (0.7.2)
- minitest (5.8.0)
- mustache (0.99.8)
- rack (1.6.4)
- rack-protection (1.5.3)
- rack
- rake (10.4.2)
- rdiscount (2.1.8)
- ronn (0.7.3)
- hpricot (>= 0.8.2)
- mustache (>= 0.7.0)
- rdiscount (>= 1.5.8)
- sass (3.4.16)
- sinatra (1.4.6)
- rack (~> 1.4)
- rack-protection (~> 1.4)
- tilt (>= 1.3, < 3)
- thread_safe (0.3.5)
- tilt (2.0.1)
- tzinfo (1.2.2)
- thread_safe (~> 0.1)
- watch (0.1.0)
- yui-compressor (0.12.0)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- bonsai
- maruku
- mustache (< 1.0)
- rake
- ronn
diff --git a/docs/Rakefile b/docs/Rakefile
deleted file mode 100644
index 93302a21..00000000
--- a/docs/Rakefile
+++ /dev/null
@@ -1,24 +0,0 @@
-current_dir = File.dirname(__FILE__)
-rakefile_manual = File.expand_path(File.join(current_dir, "Rakefile.manual"))
-rakefile_website = File.expand_path(File.join(current_dir, "Rakefile.website"))
-
-desc "Build the manpage from the bonsai source of the manual"
-task :manpage do
- system %(#{$0} -f #{rakefile_manual} manpage)
-end
-
-desc "Collect jq unit test cases from the bonsai source of the manual"
-task :mantests do
- system %(#{$0} -f #{rakefile_manual} mantests)
-end
-
-desc "Build the website from the bonsai sources"
-task :build do
- system %(#{$0} -f #{rakefile_website} build)
-end
-
-desc "Serve a live view of the website on http://localhost:5000/jq/"
-task :serve do
- system %(#{$0} -f #{rakefile_website} serve)
-end
-
diff --git a/docs/Rakefile.manual b/docs/Rakefile.manual
deleted file mode 100644
index 03eccb0f..00000000
--- a/docs/Rakefile.manual
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'ronn'
-require 'tempfile'
-require 'yaml'
-
-def load_manual
- YAML::load(File.open("content/3.manual/manual.yml"))
-end
-
-task :manpage do
- Tempfile.open "manpage" do |f|
- manual = load_manual
- f.puts manual['manpage_intro']
- f.puts manual['body']
- manual['sections'].each do |section|
-
- f.puts "## #{section['title'].upcase}\n"
- f.puts section['body']
- f.puts ""
- (section['entries'] || []).each do |entry|
- f.puts "### #{entry['title']}\n"
- f.puts entry['body']
- f.puts ""
- (entry['examples'] || []).each do |example|
- f.puts " jq '#{example['program']}'"
- f.puts " #{example['input']}"
- f.puts " => #{example['output'].join(", ")}"
- f.puts
- end
- end
- f.puts ""
- end
- f.puts manual['manpage_epilogue']
- f.close
- puts Ronn::Document.new(f.path).convert('roff').gsub(/<\/?code>/,"")
- end
-end
-
-task :mantests do
- load_manual['sections'].each do |section|
- (section['entries'] || []).each do |entry|
- (entry['examples'] || []).each do |example|
- puts example['program'].gsub("\n", " ")
- puts example['input']
- example['output'].each do |s| puts s end
- puts
- end
- end
- end
-end
diff --git a/docs/Rakefile.website b/docs/Rakefile.website
deleted file mode 100644
index efd54ee4..00000000
--- a/docs/Rakefile.website
+++ /dev/null
@@ -1,76 +0,0 @@
-require 'bonsai'
-require 'json'
-require 'liquid'
-require 'maruku'
-
-module ExtraFilters
- def markdownify(input)
- Maruku.new(input).to_html
- end
- def search_id(input)
- input.gsub(/`/, '')
- end
- def section_id(input)
- input.gsub(/[^a-zA-Z0-9_]/, '')
- end
- def entry_id(input)
- input.gsub(/[ `]/, '')
- end
- def no_paragraph(input)
- input.gsub('<p>', '').gsub('</p>', '')
- end
- def json(input)
- input.to_json
- end
- def unique(input)
- @n = (@n || 0) + 1
- input + @n.to_s
- end
-end
-
-Liquid::Template.register_filter(ExtraFilters)
-
-begin
- `java 2>&1`
-rescue
- class Bonsai::Exporter
- def self.compress_assets
- Bonsai.log "java not found! Not compressing javascript or stylesheets"
- end
- end
-end
-
-task :build do
- Bonsai.root_dir = Dir.pwd
- Bonsai::Exporter.publish!
-end
-
-task :serve do
- begin
- Bonsai.log "Press Control+C to quit"
-
- require 'rack'
- require 'sinatra'
- require 'watch'
- require 'launchy'
-
- Bonsai.root_dir = Dir.pwd
-
- server = fork {
- app = Rack::Builder.app {
- map "/jq" do
- use Bonsai::StaticPassThrough, :root => Bonsai.root_dir + "/output", :urls => ["/"]
- end
- run Bonsai::DevelopmentServer
- }
- Rack::Handler.default.run(app, :Port => 5000) do
- Launchy.open("http://localhost:5000/jq/")
- end
- }
- Watch.new("{content,templates,public}/**/*") { Bonsai::Exporter.process! }
- rescue Interrupt
- Process.kill("QUIT", server)
- Process.wait(server)
- exit
- end
-end