Skip to content

Minor tweaks to #11 #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
environment:
matrix:
- julia_version: 1.0
- julia_version: 1
- julia_version: nightly

platform:
- x86 # 32-bit
- x64 # 64-bit

branches:
only:
- master
- /release-.*/

notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false

install:
- ps: iex ((new-object net.webclient).DownloadString("https://github.com/raw/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))

build_script:
- echo "%JL_BUILD_SCRIPT%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
- echo "%JL_TEST_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.jl.cov
*.jl.*.cov
*.jl.mem
Manifest.toml
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ os:
- linux
- osx
julia:
- 0.6
- 1.3
- nightly
notifications:
email: false
Expand Down
15 changes: 15 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name = "DeepDiffs"
uuid = "ab62b9b5-e342-54a8-a765-a90f495de1a6"
keywords = ["diff"]
license = "MIT"
desc = "Compute and pretty-print diffs for data structures like arrays and dictionaries"
version = "1.1.1"

[compat]
julia = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
2 changes: 0 additions & 2 deletions REQUIRE

This file was deleted.

40 changes: 0 additions & 40 deletions appveyor.yml

This file was deleted.

11 changes: 3 additions & 8 deletions src/DeepDiffs.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module DeepDiffs

using Compat

export deepdiff, added, removed, changed, before, after
export SimpleDiff, VectorDiff, StringDiff, DictDiff

Expand All @@ -13,12 +11,9 @@ function fieldequal(x::T, y::T) where T
true
end

# Determine whether color is supported by the given stream
@static if VERSION >= v"0.7.0-DEV.3077"
hascolor(io::IO) = get(IOContext(io), :color, false)
else
hascolor(io::IO) = Base.have_color
end

hascolor(io::IO) = get(IOContext(io), :color, false)


"""
diff = deepdiff(obj1, obj2)
Expand Down
3 changes: 3 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[deps]
DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
6 changes: 0 additions & 6 deletions test/display.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
# Return a stream with color set as specified. On 0.6 this requires setting
# a global flag, and the :color property in the IOContext has no effect.
function setcolor(yn::Bool)
if VERSION < v"0.7.0-DEV.3077"
eval(Base, :(have_color = $yn))
end
IOContext(IOBuffer(), :color=>yn)
end

function resetcolor()
global orig_color
if VERSION < v"0.7.0-DEV.3077"
eval(Base, :(have_color = $orig_color))
end
nothing
end

Expand Down
3 changes: 1 addition & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using DeepDiffs
using Compat
using Compat.Test
using Test

if isdefined(Base, :have_color)
# Capture the original state of the global flag
Expand Down