Skip to content

Commit d19c332

Browse files
committed
Add Project.toml and Manifest.toml
1 parent 146b945 commit d19c332

File tree

6 files changed

+41
-26
lines changed

6 files changed

+41
-26
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ matrix:
2727

2828
## uncomment the following lines to override the default test script
2929
script:
30-
# - julia -e 'mit="ModuleInterfaceTools"; sa="StrAPI"; loc="https://github.com/JuliaString"; if VERSION < v"0.7.0-DEV.5183"; Pkg.clone(pwd()); Pkg.clone("$loc/$sa.jl"); Pkg.checkout(sa, "master"); else; using UUIDs; import Pkg; p = "Project.toml"; uuid = "5cb8414e-7aab-5a03-a681-351269c074bf"; write(p, replace(read(p, String), uuid => uuid4())); Pkg.add(sa); Pkg.add(pwd()); Pkg.up(); end; Pkg.test(mit; coverage=true)'
31-
- julia -e 'mit="ModuleInterfaceTools"; sa="StrAPI"; loc="https://github.com/JuliaString"; if VERSION < v"0.7.0-DEV.5183"; Pkg.clone(pwd()); Pkg.clone("$loc/$sa.jl"); Pkg.checkout(sa, "master"); else; import Pkg; Pkg.add(sa); Pkg.add(pwd()); Pkg.up(); end; Pkg.test(mit; coverage=true)'
30+
- julia -e 'mit="ModuleInterfaceTools"; if VERSION < v"0.7.0-DEV.5183"; Pkg.clone(pwd()); Pkg.test(mit; coverage=true); else; import Pkg; using UUIDs; p = "Project.toml"; uuid = "5cb8414e-7aab-5a03-a681-351269c074bf"; write(p, replace(read(p, String), uuid => uuid4())); Pkg.up(); Pkg.test(;coverage=true); end'
3231
after_success:
3332
# push coverage results to Coveralls
3433
- julia -e 'cd(Pkg.dir("ModuleInterfaceTools")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'

Manifest.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[[Dates]]
2+
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
3+
4+
[[InteractiveUtils]]
5+
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
6+
7+
[[Pkg]]
8+
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
9+
10+
[[StrTables]]
11+
deps = ["Dates", "InteractiveUtils", "Pkg", "Test"]
12+
git-tree-sha1 = "56e259bdbcf08215f567771c765b8d93b6bbdf42"
13+
uuid = "9700d1a9-a7c8-5760-9816-a99fda30bb8f"
14+
version = "0.2.4"
15+
16+
[[Test]]
17+
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

Project.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name = "ModuleInterfaceTools"
2+
uuid = "5cb8414e-7aab-5a03-a681-351269c074bf"
3+
keywords = ["Packages", "API", "Modules"]
4+
license = "MIT"
5+
desc = "Macro to help manage module and package APIs"
6+
authors = ["ScottPJones <[email protected]>"]
7+
version = "0.1.4"
8+
9+
[deps]
10+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
11+
StrTables = "9700d1a9-a7c8-5760-9816-a99fda30bb8f"
12+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

appveyor.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,8 @@ build_script:
4141
# Need to convert from shallow to complete for Pkg.clone to work
4242
- IF EXIST .git\shallow (git fetch --unshallow)
4343
- C:\projects\julia\bin\julia -e "VERSION < v\"0.7.0-DEV\" || (using InteractiveUtils, Pkg);
44-
versioninfo();
45-
mit = \"ModuleInterfaceTools\"; sa = \"StrAPI\"; loc=\"https://github.com/JuliaString\";
46-
if VERSION < v\"0.7.0-DEV.5183\";
47-
Pkg.clone(pwd(), mit);
48-
Pkg.clone(\"$loc/$sa.jl\", sa);
49-
Pkg.checkout(sa, \"master\");
50-
else;
51-
Pkg.add(sa); Pkg.add(pwd()); Pkg.up();
52-
end"
44+
versioninfo(); mit = \"ModuleInterfaceTools\";
45+
if VERSION < v\"0.7.0-DEV.5183\"; Pkg.clone(pwd(), mit); else; Pkg.up(); end"
5346

5447
test_script:
5548
- C:\projects\julia\bin\julia -e "VERSION < v\"0.7.0-DEV\" || (using Pkg); push!(LOAD_PATH, \"test\"); Pkg.test(\"ModuleInterfaceTools\")"

test/REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
julia 0.6
2-
StrAPI
2+
StrTables

test/runtests.jl

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ using ModuleInterfaceTools
55

66
@api test
77

8-
@api extend StrAPI
8+
@api extend StrTables
99

10-
@api list StrAPI
10+
@api list StrTables
1111

1212
@api def testcase begin
1313
myname = "Scott Paul Jones"
@@ -18,18 +18,12 @@ end
1818
@test myname == "Scott Paul Jones"
1919
end
2020

21-
codepoints(x::Integer) = 1
22-
codepoints(x::Float64) = 2
21+
cvt_char(x::Integer) = 1
22+
cvt_char(x::Float64) = 2
2323

2424
@testset "Function extension" begin
25-
@test typeof(codepoints("foo")) === CodePoints{String}
26-
@test codepoints(1) == 1
27-
@test codepoints(2.0) == 2
28-
end
29-
30-
@testset "API lists" begin
31-
@test StrAPI.__api__.mod == StrAPI
32-
@test :split in Set(StrAPI.__api__.base)
33-
@test :encoding in Set(StrAPI.__api__.public!)
34-
@test :Direction in Set(StrAPI.__api__.public)
25+
@test typeof(cvt_char("foo")) == Vector{Char}
26+
@test cvt_char(1) == 1
27+
@test cvt_char(2.0) == 2
28+
@test cvt_char("th") == Char['t', 'h']
3529
end

0 commit comments

Comments
 (0)