Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

Commit

Permalink
A couple of fixes for 0.7 (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Jan 4, 2018
1 parent 1a4e06e commit d8df01c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
4 changes: 3 additions & 1 deletion src/prepjson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
# exist, as well as other useful information about the package.
#######################################################################

import JSON
using JSON
using Compat
using Compat.Unicode

include("constants.jl")

Expand Down
4 changes: 3 additions & 1 deletion src/preptest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ function prepare_test()
print(fp, "xvfb-run ")
end
print(fp, "$TIMEOUTPATH -s 9 900s ")
print(fp, "julia -e 'versioninfo(true); Pkg.test(\"", pkg_name, "\")'")
# Avoid emitting a deprecation warning for every package tested on 0.7
print(fp, "julia -e 'VERSION >= v\"0.7.0-DEV.467\" ? versioninfo(verbose=true) :")
print(fp, " versioninfo(true); Pkg.test(\"", pkg_name, "\")'")
print(fp, " 2>&1 | tee PKGEVAL_", pkg_name, "_test.log")
close(fp)
end
Expand Down
3 changes: 2 additions & 1 deletion test/REQUIRE
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
JSON
JSON
Compat 0.41.0
11 changes: 7 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
using Compat
using Compat.Test

# Check src/constants.jl loads
src_dir = joinpath(splitdir(@__FILE__)[1], "..", "src")
include(joinpath(src_dir, "constants.jl"))
Expand All @@ -7,10 +10,10 @@ try
run(`$(ENV["_"]) $(joinpath(src_dir, "preptest.jl")) Arduino`)
error("preptest didn't exit correctly")
catch err
@assert contains(err.msg, "255")
@test contains(err.msg, "255")
end
run(`$(ENV["_"]) $(joinpath(src_dir, "preptest.jl")) JSON`)
@assert isfile("JSON.sh")
@test isfile("JSON.sh")
rm(joinpath(pwd(),"JSON.sh"))

# Check prepjson works
Expand All @@ -19,10 +22,10 @@ open("PKGEVAL_JSON_test.log","w") do nothing end
run(`$(ENV["_"]) $(joinpath(src_dir, "prepjson.jl")) JSON 0 $(pwd())`)
rm("PKGEVAL_JSON_add.log")
rm("PKGEVAL_JSON_test.log")
@assert isfile("JSON.json")
@test isfile("JSON.json")

# Check joinjson works
run(`$(ENV["_"]) $(joinpath(src_dir, "joinjson.jl")) $(pwd()) test`)
@assert isfile("test.json")
@test isfile("test.json")
rm("JSON.json")
rm("test.json")
2 changes: 1 addition & 1 deletion website/build_index.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jllogo_svg = read("html/jllogo.svg", String)
pkg_css = read("html/pkg.css", String)

# Load and render header
index_head = Mustache.render(readstring("html/indexhead.html"),
index_head = Mustache.render(read("html/indexhead.html", String),
Dict("JLLOGO" => jllogo_svg,
"PKGCSS" => pkg_css,
"LASTUPDATED" => string(Dates.today()), # YYYY-MM-DD
Expand Down
3 changes: 2 additions & 1 deletion website/build_pulse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ print_with_color(:magenta, "Building pulse page...\n")

import JSON, Mustache
using Compat
using Compat.Printf

include("shared.jl")
const RELEASE = "0.6"
Expand Down Expand Up @@ -38,7 +39,7 @@ end
hist_db, pkgnames, hist_dates = load_hist_db(hist_db_file)

# Load template, initialize template dictionary
template = readstring("html/pulse_temp.html")
template = read("html/pulse_temp.html", String)
temp_data = Dict{Any,Any}("UPDATEDATE" => string(dbdate_to_date(date_str)))

#-----------------------------------------------------------------------
Expand Down

0 comments on commit d8df01c

Please sign in to comment.