yaml-ld 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/psych/amazing_print.rb +61 -0
  4. data/lib/yaml_ld/api.rb +69 -11
  5. data/lib/yaml_ld/format.rb +25 -0
  6. data/lib/yaml_ld/reader.rb +3 -1
  7. data/lib/yaml_ld/representation.rb +256 -0
  8. data/lib/yaml_ld/version.rb +1 -1
  9. data/lib/yaml_ld.rb +1 -0
  10. data/spec/api_spec.rb +21 -27
  11. data/spec/compact_spec.rb +1 -1
  12. data/spec/expand_spec.rb +1 -1
  13. data/spec/format_spec.rb +56 -0
  14. data/spec/frame_spec.rb +55 -110
  15. data/spec/from_rdf_spec.rb +3 -3
  16. data/spec/matchers.rb +2 -2
  17. data/spec/reader_spec.rb +1 -1
  18. data/spec/representation_spec.rb +170 -0
  19. data/spec/spec_helper.rb +1 -0
  20. data/spec/test-files/test-1-compacted.yamlld +9 -0
  21. data/spec/test-files/test-1-context.yamlld +6 -0
  22. data/spec/test-files/test-1-expanded.yamlld +8 -0
  23. data/spec/test-files/test-1-input.yamlld +1 -0
  24. data/spec/test-files/test-2-compacted.yamlld +17 -0
  25. data/spec/test-files/test-2-context.yamlld +5 -0
  26. data/spec/test-files/test-2-expanded.yamlld +21 -0
  27. data/spec/test-files/test-3-compacted.yamlld +14 -0
  28. data/spec/test-files/test-3-context.yamlld +11 -0
  29. data/spec/test-files/test-3-expanded.yamlld +9 -0
  30. data/spec/test-files/test-4-compacted.yamlld +10 -0
  31. data/spec/test-files/test-4-context.yamlld +5 -0
  32. data/spec/test-files/test-4-expanded.yamlld +9 -0
  33. data/spec/test-files/test-5-compacted.yamlld +11 -0
  34. data/spec/test-files/test-5-context.yamlld +5 -0
  35. data/spec/test-files/test-5-expanded.yamlld +12 -0
  36. data/spec/test-files/test-6-compacted.yamlld +13 -0
  37. data/spec/test-files/test-6-context.yamlld +5 -0
  38. data/spec/test-files/test-6-expanded.yamlld +12 -0
  39. data/spec/test-files/test-7-compacted.yamlld +17 -0
  40. data/spec/test-files/test-7-context.yamlld +4 -0
  41. data/spec/test-files/test-7-expanded.yamlld +23 -0
  42. data/spec/test-files/test-8-compacted.yamlld +25 -0
  43. data/spec/test-files/test-8-context.yamlld +12 -0
  44. data/spec/test-files/test-8-expanded.yamlld +23 -0
  45. data/spec/test-files/test-8-frame.yamlld +15 -0
  46. data/spec/test-files/test-8-framed.yamlld +22 -0
  47. data/spec/test-files/test-9-compacted.yamlld +31 -0
  48. data/spec/test-files/test-9-context.yamlld +20 -0
  49. data/spec/test-files/test-9-expanded.yamlld +17 -0
  50. data/spec/to_rdf_spec.rb +10 -8
  51. metadata +89 -61
  52. data/spec/test-files/test-1-expanded.jsonld +0 -5
  53. data/spec/test-files/test-2-compacted.jsonld +0 -20
  54. data/spec/test-files/test-2-context.jsonld +0 -7
  55. data/spec/test-files/test-2-expanded.jsonld +0 -16
  56. data/spec/test-files/test-3-compacted.jsonld +0 -11
  57. data/spec/test-files/test-3-context.jsonld +0 -8
  58. data/spec/test-files/test-3-expanded.jsonld +0 -10
  59. data/spec/test-files/test-4-compacted.jsonld +0 -10
  60. data/spec/test-files/test-4-context.jsonld +0 -7
  61. data/spec/test-files/test-4-expanded.jsonld +0 -6
  62. data/spec/test-files/test-5-compacted.jsonld +0 -13
  63. data/spec/test-files/test-5-context.jsonld +0 -7
  64. data/spec/test-files/test-5-expanded.jsonld +0 -9
  65. data/spec/test-files/test-6-compacted.jsonld +0 -10
  66. data/spec/test-files/test-6-context.jsonld +0 -7
  67. data/spec/test-files/test-6-expanded.jsonld +0 -10
  68. data/spec/test-files/test-7-compacted.jsonld +0 -23
  69. data/spec/test-files/test-7-context.jsonld +0 -4
  70. data/spec/test-files/test-7-expanded.jsonld +0 -20
  71. data/spec/test-files/test-8-compacted.jsonld +0 -34
  72. data/spec/test-files/test-8-context.jsonld +0 -11
  73. data/spec/test-files/test-8-expanded.jsonld +0 -24
  74. data/spec/test-files/test-8-frame.jsonld +0 -18
  75. data/spec/test-files/test-8-framed.jsonld +0 -25
  76. data/spec/test-files/test-9-compacted.jsonld +0 -20
  77. data/spec/test-files/test-9-context.jsonld +0 -13
  78. data/spec/test-files/test-9-expanded.jsonld +0 -14
@@ -1,14 +0,0 @@
1
- [
2
- {
3
- "@id": "http://example.com/id1",
4
- "@type": ["http://example.com/t1"],
5
- "http://example.com/term": [
6
- {"@value": "v1","@language": "de"},
7
- {"@value": "v2","@type": "http://example.com/t2"},
8
- {"@value": "v3","@language": "en"},
9
- {"@list": [{"@value": 1},{"@value": 2}]},
10
- {"@value": "v5"},
11
- {"@value": "plain literal"}
12
- ]
13
- }
14
- ]