Skip to content

Commit 220931f

Browse files
committed
Update documentation, provisionally add ruby-2.4 for Travis (yajl prevents clean run).
1 parent 05ebb2b commit 220931f

File tree

7 files changed

+66
-135
lines changed

7 files changed

+66
-135
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ script: "bundle exec rspec spec"
44
env:
55
- CI=true
66
rvm:
7-
- 2.2.5
8-
- 2.3.1
7+
- 2.2.6
8+
- 2.3.3
9+
- 2.4
910
- jruby
1011
- rbx
1112
cache: bundler
@@ -14,3 +15,4 @@ matrix:
1415
allow_failures:
1516
- rvm: jruby
1617
- rvm: rbx
18+
- rvm: 2.4
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"@context": "...",
3+
"id": "person1",
4+
"type": "IdentityProfile",
5+
"credential": [{
6+
"@graph": {
7+
"id": "cred1",
8+
"claim": {
9+
"id": "person1",
10+
"ageOver": 21
11+
},
12+
"signature": { ... }
13+
}, {
14+
"@graph": {
15+
"id": "cred2",
16+
"claim": {
17+
"id": "person1",
18+
"passport": { ... },
19+
},
20+
"signature": { ... }
21+
}
22+
}]
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"id": "person1",
4+
"type": "IdentityProfile",
5+
"credential": [{
6+
"@graph": {
7+
"id": "cred1",
8+
"claim": {
9+
"id": "person1",
10+
"ageOver": 21
11+
},
12+
"signature": { ... }
13+
}, {
14+
"@graph": {
15+
"id": "cred2",
16+
"claim": {
17+
"id": "person1",
18+
"passport": { ... },
19+
},
20+
"signature": { ... }
21+
}
22+
}]
23+
}

lib/json/ld/api.rb

Lines changed: 10 additions & 126 deletions
Large diffs are not rendered by default.

lib/json/ld/context.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ def inspect
189189
##
190190
# Create a new context by parsing a context.
191191
#
192-
# @see {#initialize}, {#parse}
192+
# @see #initialize
193+
# @see #parse
193194
# @param [String, #read, Array, Hash, Context] local_context
194195
# @raise [JsonLdError]
195196
# on a remote context load error, syntax error, or a reference to a term which is not defined.

lib/json/ld/expand.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ module Expand
1414
# @param [Context] context
1515
# @param [Boolean] ordered (true)
1616
# Ensure output objects have keys ordered properly
17-
# @param [Hash{Symbol => Object}] options
18-
# See {JSON::LD::API.expand}
1917
# @return [Array<Hash{String => Object}>]
2018
def expand(input, active_property, context, ordered: true)
2119
framing = @options[:processingMode].include?("expand-frame")

script/tc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ def run_tc(man, tc, options)
3131

3232
if options[:verbose]
3333
puts "\nTestCase: #{tc.inspect}"
34-
puts "\nInput:\n" + tc.input.read
35-
puts "\nContext:\n" + tc.context.read if tc.context
36-
puts "\nFrame:\n" + tc.frame.read if tc.frame
37-
puts "\nExpected:\n" + tc.expect.read if tc.positiveTest?
34+
puts "\nInput:\n" + tc.input
35+
puts "\nContext:\n" + tc.context if tc.context
36+
puts "\nFrame:\n" + tc.frame if tc.frame
37+
puts "\nExpected:\n" + tc.expect if tc.positiveTest?
3838
end
3939

4040
output = ""

0 commit comments

Comments
 (0)