yaks 0.6.0.alpha → 0.6.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -41
- data/{yaks/lib → lib}/yaks/breaking_changes.rb +0 -0
- data/{yaks/lib → lib}/yaks/collection_mapper.rb +0 -0
- data/{yaks/lib → lib}/yaks/collection_resource.rb +0 -0
- data/{yaks/lib → lib}/yaks/config/dsl.rb +0 -0
- data/{yaks/lib → lib}/yaks/config.rb +0 -0
- data/{yaks/lib → lib}/yaks/default_policy.rb +0 -0
- data/{yaks/lib → lib}/yaks/format/collection_json.rb +0 -0
- data/{yaks/lib → lib}/yaks/format/hal.rb +0 -0
- data/{yaks/lib → lib}/yaks/format/json_api.rb +0 -0
- data/{yaks/lib → lib}/yaks/format.rb +0 -0
- data/{yaks/lib → lib}/yaks/fp/callable.rb +0 -0
- data/{yaks/lib → lib}/yaks/fp/hash_updatable.rb +0 -0
- data/{yaks/lib → lib}/yaks/fp/updatable.rb +0 -0
- data/{yaks/lib → lib}/yaks/fp.rb +0 -0
- data/{yaks/lib → lib}/yaks/mapper/association.rb +0 -0
- data/{yaks/lib → lib}/yaks/mapper/association_mapper.rb +0 -0
- data/{yaks/lib → lib}/yaks/mapper/attribute.rb +0 -0
- data/{yaks/lib → lib}/yaks/mapper/class_methods.rb +0 -0
- data/{yaks/lib → lib}/yaks/mapper/config.rb +0 -0
- data/{yaks/lib → lib}/yaks/mapper/has_many.rb +0 -0
- data/{yaks/lib → lib}/yaks/mapper/has_one.rb +0 -0
- data/{yaks/lib → lib}/yaks/mapper/link.rb +0 -0
- data/{yaks/lib → lib}/yaks/mapper.rb +0 -0
- data/{yaks/lib → lib}/yaks/null_resource.rb +0 -0
- data/{yaks/lib → lib}/yaks/primitivize.rb +0 -0
- data/{yaks/lib → lib}/yaks/resource/link.rb +0 -0
- data/{yaks/lib → lib}/yaks/resource.rb +0 -0
- data/{yaks/lib → lib}/yaks/runner.rb +0 -0
- data/{yaks/lib → lib}/yaks/util.rb +0 -0
- data/lib/yaks/version.rb +3 -0
- data/{yaks/lib → lib}/yaks.rb +0 -0
- data/{yaks/spec → spec}/acceptance/acceptance_spec.rb +0 -0
- data/{yaks/spec → spec}/acceptance/json_shared_examples.rb +0 -0
- data/{yaks/spec → spec}/acceptance/models.rb +0 -0
- data/{yaks/spec → spec}/fixture_helpers.rb +0 -0
- data/{yaks/spec → spec}/integration/map_to_resource_spec.rb +0 -0
- data/{yaks/spec → spec}/json/confucius.collection.json +0 -0
- data/{yaks/spec → spec}/json/confucius.hal.json +0 -0
- data/{yaks/spec → spec}/json/confucius.json_api.json +0 -0
- data/{yaks/spec → spec}/json/john.hal.json +0 -0
- data/{yaks/spec → spec}/json/plant_collection.collection.json +0 -0
- data/{yaks/spec → spec}/json/plant_collection.hal.json +0 -0
- data/{yaks/spec → spec}/json/youtypeitwepostit.collection.json +0 -0
- data/{yaks/spec → spec}/spec_helper.rb +0 -0
- data/{yaks/spec → spec}/support/classes_for_policy_testing.rb +0 -0
- data/{yaks/spec → spec}/support/deep_eql.rb +0 -0
- data/{yaks/spec → spec}/support/fixtures.rb +0 -0
- data/{yaks/spec → spec}/support/friends_mapper.rb +0 -0
- data/{yaks/spec → spec}/support/models.rb +0 -0
- data/{yaks/spec → spec}/support/pet_mapper.rb +0 -0
- data/{yaks/spec → spec}/support/pet_peeve_mapper.rb +0 -0
- data/{yaks/spec → spec}/support/shared_contexts.rb +0 -0
- data/{yaks/spec → spec}/support/youtypeit_models_mappers.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/collection_mapper_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/collection_resource_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/config/dsl_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/config_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/default_policy/derive_mapper_from_object_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/default_policy_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/format/collection_json_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/format/hal_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/format/json_api_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/format_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/fp/callable_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/fp/hash_updatable_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/fp/updatable_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/fp_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/mapper/association_mapper_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/mapper/association_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/mapper/attribute_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/mapper/class_methods_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/mapper/config_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/mapper/has_many_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/mapper/has_one_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/mapper/link_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/mapper_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/null_resource_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/primitivize_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/resource/link_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/resource_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/runner_spec.rb +0 -0
- data/{yaks/spec → spec}/unit/yaks/util_spec.rb +0 -0
- data/{yaks/spec → spec}/yaml/confucius.yaml +0 -0
- data/{yaks/spec → spec}/yaml/youtypeitwepostit.yaml +0 -0
- data/{yaks/yaks.gemspec → yaks.gemspec} +1 -1
- metadata +141 -106
- data/.gitignore +0 -7
- data/.travis.yml +0 -36
- data/ADDING_FORMATS.md +0 -13
- data/CHANGELOG.md +0 -149
- data/Gemfile +0 -4
- data/IDENTIFIERS.md +0 -113
- data/LICENSE +0 -7
- data/bench/bench.rb +0 -16
- data/bench/bench_1000.rb +0 -60
- data/notes.org +0 -72
- data/shaved_yak.gif +0 -0
- data/yaks/README.md +0 -526
- data/yaks/lib/yaks/version.rb +0 -3
- data/yaks-html/README.md +0 -3
- data/yaks-html/lib/yaks/format/html.rb +0 -70
- data/yaks-html/lib/yaks/format/template.html +0 -56
- data/yaks-html/lib/yaks-html.rb +0 -3
- data/yaks-html/spec/spec_helper.rb +0 -6
- data/yaks-html/yaks-html.gemspec +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1363b84d5c4a3fc9a834c05015bd3b1f0a00450b
|
4
|
+
data.tar.gz: 90f37a7f613072a718e95023fe5475481096b724
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81db95d4be9d95499da0205e39085611521fdff084abff9902e2cceb8c9677ef24294d912bc537b4874e52008a9694f76f13478af5fcd959931a153a1f171480
|
7
|
+
data.tar.gz: 73897cc179e778e280ce92197df35084a78e737dee498b9579e6132c8fbdbcff2725dea25ae5394747df8866f2372677c18562c0e21c98f628d32fb72aca33b1
|
data/Rakefile
CHANGED
@@ -1,43 +1,3 @@
|
|
1
|
-
|
2
|
-
require 'yaks-html'
|
3
|
-
require 'mutant'
|
4
|
-
require 'rubygems/package_task'
|
5
|
-
require 'rspec/core/rake_task'
|
6
|
-
require 'yard'
|
7
|
-
|
8
|
-
desc "Push gem to rubygems.org"
|
9
|
-
task :push => ["yaks:gem", "yaks-html:gem"] do
|
10
|
-
sh "git tag v#{Yaks::VERSION}"
|
11
|
-
sh "git push --tags"
|
12
|
-
sh "gem push pkg/yaks-#{Yaks::VERSION}.gem"
|
13
|
-
sh "gem push pkg/yaks-html-#{Yaks::VERSION}.gem"
|
14
|
-
end
|
15
|
-
|
16
|
-
def gem_tasks(gem)
|
17
|
-
namespace gem do
|
18
|
-
spec = Gem::Specification.load("#{gem}/#{gem}.gemspec")
|
19
|
-
Gem::PackageTask.new(spec).define
|
20
|
-
|
21
|
-
task :mutant do
|
22
|
-
pattern = ENV.fetch('PATTERN', gem == :yaks ? 'Yaks*' : 'Yaks::Format::HTML*')
|
23
|
-
opts = ENV.fetch('MUTANT_OPTS', '').split(' ')
|
24
|
-
Dir.chdir gem.to_s do
|
25
|
-
result = Mutant::CLI.run(%W[-Ilib -ryaks --use rspec --score 100] + opts + [pattern])
|
26
|
-
fail unless result == Mutant::CLI::EXIT_SUCCESS
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
RSpec::Core::RakeTask.new(:rspec) do |t, task_args|
|
31
|
-
t.rspec_opts = "-I#{gem}/spec #{gem}/spec"
|
32
|
-
end
|
33
|
-
|
34
|
-
|
35
|
-
YARD::Rake::YardocTask.new do |t|
|
36
|
-
t.files = ["#{gem}/lib/**/*.rb" "#{gem}/**/*.md"]
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|
1
|
+
load '../rakelib/shared.rake'
|
41
2
|
|
42
3
|
gem_tasks(:yaks)
|
43
|
-
gem_tasks(:"yaks-html")
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{yaks/lib → lib}/yaks/fp.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/yaks/version.rb
ADDED
data/{yaks/lib → lib}/yaks.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
|
|
15
15
|
|
16
16
|
gem.require_paths = %w[lib]
|
17
17
|
gem.files = `git ls-files`.split($/)
|
18
|
-
gem.test_files =
|
18
|
+
gem.test_files = gem.files.grep(/^spec/)
|
19
19
|
gem.extra_rdoc_files = %w[README.md]
|
20
20
|
|
21
21
|
if Yaks::BreakingChanges.key? Yaks::VERSION
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.0.alpha
|
4
|
+
version: 0.6.0.alpha.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arne Brasseur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inflection
|
@@ -228,111 +228,93 @@ extensions: []
|
|
228
228
|
extra_rdoc_files:
|
229
229
|
- README.md
|
230
230
|
files:
|
231
|
-
- ".gitignore"
|
232
|
-
- ".travis.yml"
|
233
|
-
- ADDING_FORMATS.md
|
234
|
-
- CHANGELOG.md
|
235
|
-
- Gemfile
|
236
|
-
- IDENTIFIERS.md
|
237
|
-
- LICENSE
|
238
231
|
- README.md
|
239
232
|
- Rakefile
|
240
|
-
-
|
241
|
-
-
|
242
|
-
-
|
243
|
-
-
|
244
|
-
- yaks
|
245
|
-
- yaks
|
246
|
-
-
|
247
|
-
-
|
248
|
-
- yaks
|
249
|
-
- yaks
|
250
|
-
- yaks/
|
251
|
-
-
|
252
|
-
-
|
253
|
-
-
|
254
|
-
-
|
255
|
-
-
|
256
|
-
-
|
257
|
-
-
|
258
|
-
-
|
259
|
-
-
|
260
|
-
-
|
261
|
-
-
|
262
|
-
-
|
263
|
-
-
|
264
|
-
-
|
265
|
-
-
|
266
|
-
-
|
267
|
-
-
|
268
|
-
-
|
269
|
-
-
|
270
|
-
-
|
271
|
-
-
|
272
|
-
-
|
273
|
-
-
|
274
|
-
-
|
275
|
-
-
|
276
|
-
-
|
277
|
-
-
|
278
|
-
-
|
279
|
-
-
|
280
|
-
-
|
281
|
-
-
|
282
|
-
-
|
283
|
-
-
|
284
|
-
-
|
285
|
-
-
|
286
|
-
-
|
287
|
-
-
|
288
|
-
-
|
289
|
-
-
|
290
|
-
-
|
291
|
-
-
|
292
|
-
-
|
293
|
-
-
|
294
|
-
- yaks/
|
295
|
-
- yaks/
|
296
|
-
-
|
297
|
-
- yaks/
|
298
|
-
-
|
299
|
-
- yaks/
|
300
|
-
- yaks/
|
301
|
-
- yaks/
|
302
|
-
-
|
303
|
-
- yaks/
|
304
|
-
-
|
305
|
-
-
|
306
|
-
-
|
307
|
-
-
|
308
|
-
-
|
309
|
-
-
|
310
|
-
-
|
311
|
-
-
|
312
|
-
-
|
313
|
-
-
|
314
|
-
-
|
315
|
-
-
|
316
|
-
-
|
317
|
-
-
|
318
|
-
-
|
319
|
-
-
|
320
|
-
-
|
321
|
-
-
|
322
|
-
-
|
323
|
-
-
|
324
|
-
- yaks
|
325
|
-
- yaks/spec/unit/yaks/mapper/link_spec.rb
|
326
|
-
- yaks/spec/unit/yaks/mapper_spec.rb
|
327
|
-
- yaks/spec/unit/yaks/null_resource_spec.rb
|
328
|
-
- yaks/spec/unit/yaks/primitivize_spec.rb
|
329
|
-
- yaks/spec/unit/yaks/resource/link_spec.rb
|
330
|
-
- yaks/spec/unit/yaks/resource_spec.rb
|
331
|
-
- yaks/spec/unit/yaks/runner_spec.rb
|
332
|
-
- yaks/spec/unit/yaks/util_spec.rb
|
333
|
-
- yaks/spec/yaml/confucius.yaml
|
334
|
-
- yaks/spec/yaml/youtypeitwepostit.yaml
|
335
|
-
- yaks/yaks.gemspec
|
233
|
+
- lib/yaks.rb
|
234
|
+
- lib/yaks/breaking_changes.rb
|
235
|
+
- lib/yaks/collection_mapper.rb
|
236
|
+
- lib/yaks/collection_resource.rb
|
237
|
+
- lib/yaks/config.rb
|
238
|
+
- lib/yaks/config/dsl.rb
|
239
|
+
- lib/yaks/default_policy.rb
|
240
|
+
- lib/yaks/format.rb
|
241
|
+
- lib/yaks/format/collection_json.rb
|
242
|
+
- lib/yaks/format/hal.rb
|
243
|
+
- lib/yaks/format/json_api.rb
|
244
|
+
- lib/yaks/fp.rb
|
245
|
+
- lib/yaks/fp/callable.rb
|
246
|
+
- lib/yaks/fp/hash_updatable.rb
|
247
|
+
- lib/yaks/fp/updatable.rb
|
248
|
+
- lib/yaks/mapper.rb
|
249
|
+
- lib/yaks/mapper/association.rb
|
250
|
+
- lib/yaks/mapper/association_mapper.rb
|
251
|
+
- lib/yaks/mapper/attribute.rb
|
252
|
+
- lib/yaks/mapper/class_methods.rb
|
253
|
+
- lib/yaks/mapper/config.rb
|
254
|
+
- lib/yaks/mapper/has_many.rb
|
255
|
+
- lib/yaks/mapper/has_one.rb
|
256
|
+
- lib/yaks/mapper/link.rb
|
257
|
+
- lib/yaks/null_resource.rb
|
258
|
+
- lib/yaks/primitivize.rb
|
259
|
+
- lib/yaks/resource.rb
|
260
|
+
- lib/yaks/resource/link.rb
|
261
|
+
- lib/yaks/runner.rb
|
262
|
+
- lib/yaks/util.rb
|
263
|
+
- lib/yaks/version.rb
|
264
|
+
- spec/acceptance/acceptance_spec.rb
|
265
|
+
- spec/acceptance/json_shared_examples.rb
|
266
|
+
- spec/acceptance/models.rb
|
267
|
+
- spec/fixture_helpers.rb
|
268
|
+
- spec/integration/map_to_resource_spec.rb
|
269
|
+
- spec/json/confucius.collection.json
|
270
|
+
- spec/json/confucius.hal.json
|
271
|
+
- spec/json/confucius.json_api.json
|
272
|
+
- spec/json/john.hal.json
|
273
|
+
- spec/json/plant_collection.collection.json
|
274
|
+
- spec/json/plant_collection.hal.json
|
275
|
+
- spec/json/youtypeitwepostit.collection.json
|
276
|
+
- spec/spec_helper.rb
|
277
|
+
- spec/support/classes_for_policy_testing.rb
|
278
|
+
- spec/support/deep_eql.rb
|
279
|
+
- spec/support/fixtures.rb
|
280
|
+
- spec/support/friends_mapper.rb
|
281
|
+
- spec/support/models.rb
|
282
|
+
- spec/support/pet_mapper.rb
|
283
|
+
- spec/support/pet_peeve_mapper.rb
|
284
|
+
- spec/support/shared_contexts.rb
|
285
|
+
- spec/support/youtypeit_models_mappers.rb
|
286
|
+
- spec/unit/yaks/collection_mapper_spec.rb
|
287
|
+
- spec/unit/yaks/collection_resource_spec.rb
|
288
|
+
- spec/unit/yaks/config/dsl_spec.rb
|
289
|
+
- spec/unit/yaks/config_spec.rb
|
290
|
+
- spec/unit/yaks/default_policy/derive_mapper_from_object_spec.rb
|
291
|
+
- spec/unit/yaks/default_policy_spec.rb
|
292
|
+
- spec/unit/yaks/format/collection_json_spec.rb
|
293
|
+
- spec/unit/yaks/format/hal_spec.rb
|
294
|
+
- spec/unit/yaks/format/json_api_spec.rb
|
295
|
+
- spec/unit/yaks/format_spec.rb
|
296
|
+
- spec/unit/yaks/fp/callable_spec.rb
|
297
|
+
- spec/unit/yaks/fp/hash_updatable_spec.rb
|
298
|
+
- spec/unit/yaks/fp/updatable_spec.rb
|
299
|
+
- spec/unit/yaks/fp_spec.rb
|
300
|
+
- spec/unit/yaks/mapper/association_mapper_spec.rb
|
301
|
+
- spec/unit/yaks/mapper/association_spec.rb
|
302
|
+
- spec/unit/yaks/mapper/attribute_spec.rb
|
303
|
+
- spec/unit/yaks/mapper/class_methods_spec.rb
|
304
|
+
- spec/unit/yaks/mapper/config_spec.rb
|
305
|
+
- spec/unit/yaks/mapper/has_many_spec.rb
|
306
|
+
- spec/unit/yaks/mapper/has_one_spec.rb
|
307
|
+
- spec/unit/yaks/mapper/link_spec.rb
|
308
|
+
- spec/unit/yaks/mapper_spec.rb
|
309
|
+
- spec/unit/yaks/null_resource_spec.rb
|
310
|
+
- spec/unit/yaks/primitivize_spec.rb
|
311
|
+
- spec/unit/yaks/resource/link_spec.rb
|
312
|
+
- spec/unit/yaks/resource_spec.rb
|
313
|
+
- spec/unit/yaks/runner_spec.rb
|
314
|
+
- spec/unit/yaks/util_spec.rb
|
315
|
+
- spec/yaml/confucius.yaml
|
316
|
+
- spec/yaml/youtypeitwepostit.yaml
|
317
|
+
- yaks.gemspec
|
336
318
|
homepage: https://github.com/plexus/yaks
|
337
319
|
licenses:
|
338
320
|
- MIT
|
@@ -357,4 +339,57 @@ rubygems_version: 2.4.2
|
|
357
339
|
signing_key:
|
358
340
|
specification_version: 4
|
359
341
|
summary: Serialize to hypermedia. HAL, JSON-API, etc.
|
360
|
-
test_files:
|
342
|
+
test_files:
|
343
|
+
- spec/acceptance/acceptance_spec.rb
|
344
|
+
- spec/acceptance/json_shared_examples.rb
|
345
|
+
- spec/acceptance/models.rb
|
346
|
+
- spec/fixture_helpers.rb
|
347
|
+
- spec/integration/map_to_resource_spec.rb
|
348
|
+
- spec/json/confucius.collection.json
|
349
|
+
- spec/json/confucius.hal.json
|
350
|
+
- spec/json/confucius.json_api.json
|
351
|
+
- spec/json/john.hal.json
|
352
|
+
- spec/json/plant_collection.collection.json
|
353
|
+
- spec/json/plant_collection.hal.json
|
354
|
+
- spec/json/youtypeitwepostit.collection.json
|
355
|
+
- spec/spec_helper.rb
|
356
|
+
- spec/support/classes_for_policy_testing.rb
|
357
|
+
- spec/support/deep_eql.rb
|
358
|
+
- spec/support/fixtures.rb
|
359
|
+
- spec/support/friends_mapper.rb
|
360
|
+
- spec/support/models.rb
|
361
|
+
- spec/support/pet_mapper.rb
|
362
|
+
- spec/support/pet_peeve_mapper.rb
|
363
|
+
- spec/support/shared_contexts.rb
|
364
|
+
- spec/support/youtypeit_models_mappers.rb
|
365
|
+
- spec/unit/yaks/collection_mapper_spec.rb
|
366
|
+
- spec/unit/yaks/collection_resource_spec.rb
|
367
|
+
- spec/unit/yaks/config/dsl_spec.rb
|
368
|
+
- spec/unit/yaks/config_spec.rb
|
369
|
+
- spec/unit/yaks/default_policy/derive_mapper_from_object_spec.rb
|
370
|
+
- spec/unit/yaks/default_policy_spec.rb
|
371
|
+
- spec/unit/yaks/format/collection_json_spec.rb
|
372
|
+
- spec/unit/yaks/format/hal_spec.rb
|
373
|
+
- spec/unit/yaks/format/json_api_spec.rb
|
374
|
+
- spec/unit/yaks/format_spec.rb
|
375
|
+
- spec/unit/yaks/fp/callable_spec.rb
|
376
|
+
- spec/unit/yaks/fp/hash_updatable_spec.rb
|
377
|
+
- spec/unit/yaks/fp/updatable_spec.rb
|
378
|
+
- spec/unit/yaks/fp_spec.rb
|
379
|
+
- spec/unit/yaks/mapper/association_mapper_spec.rb
|
380
|
+
- spec/unit/yaks/mapper/association_spec.rb
|
381
|
+
- spec/unit/yaks/mapper/attribute_spec.rb
|
382
|
+
- spec/unit/yaks/mapper/class_methods_spec.rb
|
383
|
+
- spec/unit/yaks/mapper/config_spec.rb
|
384
|
+
- spec/unit/yaks/mapper/has_many_spec.rb
|
385
|
+
- spec/unit/yaks/mapper/has_one_spec.rb
|
386
|
+
- spec/unit/yaks/mapper/link_spec.rb
|
387
|
+
- spec/unit/yaks/mapper_spec.rb
|
388
|
+
- spec/unit/yaks/null_resource_spec.rb
|
389
|
+
- spec/unit/yaks/primitivize_spec.rb
|
390
|
+
- spec/unit/yaks/resource/link_spec.rb
|
391
|
+
- spec/unit/yaks/resource_spec.rb
|
392
|
+
- spec/unit/yaks/runner_spec.rb
|
393
|
+
- spec/unit/yaks/util_spec.rb
|
394
|
+
- spec/yaml/confucius.yaml
|
395
|
+
- spec/yaml/youtypeitwepostit.yaml
|
data/.gitignore
DELETED
data/.travis.yml
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
script: bundle exec rake $TASK
|
3
|
-
rvm:
|
4
|
-
- 1.9.3
|
5
|
-
- 2.0
|
6
|
-
- 2.1
|
7
|
-
- ruby-head
|
8
|
-
- rbx-2
|
9
|
-
- jruby
|
10
|
-
- jruby-head
|
11
|
-
env:
|
12
|
-
- TASK=yaks:rspec
|
13
|
-
- TASK=yaks:mutant
|
14
|
-
- TASK=yaks-html:rspec
|
15
|
-
- TASK=yaks-html:mutant
|
16
|
-
matrix:
|
17
|
-
allow_failures:
|
18
|
-
- rvm: ruby-head
|
19
|
-
- rvm: jruby-head
|
20
|
-
- env: TASK=yaks:mutant
|
21
|
-
- env: TASK=yaks-html:mutant
|
22
|
-
exclude:
|
23
|
-
- rvm: jruby
|
24
|
-
env: TASK=yaks:mutant
|
25
|
-
- rvm: jruby
|
26
|
-
env: TASK=yaks-html:mutant
|
27
|
-
|
28
|
-
- rvm: jruby-head
|
29
|
-
env: TASK=yaks:mutant
|
30
|
-
- rvm: jruby-head
|
31
|
-
env: TASK=yaks-html:mutant
|
32
|
-
|
33
|
-
- rvm: rbx-2
|
34
|
-
env: TASK=yaks:mutant
|
35
|
-
- rvm: rbx-2
|
36
|
-
env: TASK=yaks-html:mutant
|
data/ADDING_FORMATS.md
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# Adding Extra Output Formats to Yaks
|
2
|
-
|
3
|
-
Individual output formats are each handled by a dedicated `Yaks::Serializer` class. These take a `Yaks::Resource` as input, and turn it into the requested output format.
|
4
|
-
|
5
|
-
A `Yaks::Resource` is created by "mapping" domain models by a `Yaks::Mapper`. In a `Yaks::Mapper` subclass a DSL is available to specify how to extract different types of information, for example attributes or links, and store them in a generalized way in a `Resource`.
|
6
|
-
|
7
|
-
Different formats have different features. Simple formats might just represent attributes, links, and subresources, other formats have queries, forms, or RDF identifiers. If a format represents data of a different nature, then the first step is to decide on a good and straightforward syntax to specify how to derive this data. This can then be stored in a `Yaks::Resource`, and formats that support it can use it, other formats can ignore it.
|
8
|
-
|
9
|
-
This is already the case, JSON-API ignores links for example.
|
10
|
-
|
11
|
-
So adding an output format is generally straightforward, as long as the information that the output format supports is already available in `Yaks::Resource`. In that case adding a `Yaks::Serializer::YourFormat` is all that is needed.
|
12
|
-
|
13
|
-
If the format has features that are not yet available then syntax needs to be added for those features. The guiding idea there is to try and find more than one format with the given feature, to make sure the intermediate abstraction is general and not tied to the specifics and vocabulary of a single format.
|