Cleanup leftover references to ruby
This commit is contained in:
1 parent
da170faafe
commit
e1fb525796
6 files changed
+5
-226
No files matched your search
+5
-7
@@ -13,9 +13,8 @@ RUN apt-get update && \
|
|||||||
git \
|
git \
|
||||||
bison \
|
bison \
|
||||||
flex \
|
flex \
|
||||||
ruby \
|
python3 \
|
||||||
wget \
|
wget && \
|
||||||
ruby-dev && \
|
|
||||||
wget https://github.com/kkos/oniguruma/archive/v5.9.6.tar.gz -O onig-5.9.6.tar.gz && \
|
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 && \
|
sha512sum onig-5.9.6.tar.gz | grep 6b048d345e148c9da38af7a8df76d4a358eb3d4db91fa7834076e511f526a63544284f212b0d56badbbd33112c8b458a5fff02bfbbda012ecfe478bc436ea679 && \
|
||||||
tar zxvf onig-5.9.6.tar.gz && \
|
tar zxvf onig-5.9.6.tar.gz && \
|
||||||
@@ -25,8 +24,8 @@ RUN apt-get update && \
|
|||||||
./configure --prefix=/usr/local && \
|
./configure --prefix=/usr/local && \
|
||||||
make && \
|
make && \
|
||||||
make install ) && \
|
make install ) && \
|
||||||
gem install bundler && \
|
pip3 install pipenv && \
|
||||||
(cd /app/docs && bundle install) && \
|
(cd /app/docs && pipenv sync) && \
|
||||||
(cd /app && \
|
(cd /app && \
|
||||||
autoreconf -i && \
|
autoreconf -i && \
|
||||||
./configure --disable-valgrind --enable-all-static --prefix=/usr/local && \
|
./configure --disable-valgrind --enable-all-static --prefix=/usr/local && \
|
||||||
@@ -43,8 +42,7 @@ RUN apt-get update && \
|
|||||||
bison \
|
bison \
|
||||||
git \
|
git \
|
||||||
flex \
|
flex \
|
||||||
ruby \
|
python3 && \
|
||||||
ruby-dev && \
|
|
||||||
apt-get autoremove -y && \
|
apt-get autoremove -y && \
|
||||||
rm -rf oniguruma-5.9.6 && \
|
rm -rf oniguruma-5.9.6 && \
|
||||||
rm -rf /var/lib/apt/lists/* /var/lib/gems
|
rm -rf /var/lib/apt/lists/* /var/lib/gems
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
Reference in new issue
Block a user