skeleton 0.3.3 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +140 -65
- data/Rakefile +10 -3
- data/lib/skeleton.rb +6 -10
- data/lib/skeleton/contact.rb +1 -13
- data/lib/skeleton/error.rb +4 -0
- data/lib/skeleton/graph.rb +56 -0
- data/lib/skeleton/header.rb +2 -63
- data/lib/skeleton/items.rb +34 -0
- data/lib/skeleton/license.rb +1 -12
- data/lib/skeleton/model.rb +13 -17
- data/lib/skeleton/operation.rb +50 -121
- data/lib/skeleton/parameter.rb +31 -88
- data/lib/skeleton/parameters.rb +40 -0
- data/lib/skeleton/path.rb +42 -80
- data/lib/skeleton/presenter.rb +19 -0
- data/lib/skeleton/property.rb +6 -0
- data/lib/skeleton/response.rb +24 -45
- data/lib/skeleton/schema.rb +80 -63
- data/lib/skeleton/scope.rb +18 -0
- data/lib/skeleton/security_scheme.rb +19 -37
- data/lib/skeleton/serializers/options.rb +215 -0
- data/lib/skeleton/serializers/swagger.rb +197 -0
- data/lib/skeleton/structure.rb +92 -138
- data/lib/skeleton/swagger.rb +9 -0
- data/lib/skeleton/tag.rb +11 -16
- data/lib/skeleton/version.rb +1 -1
- data/skeleton.gemspec +2 -0
- data/test/fixtures/json-schema-draft-04.json +150 -0
- data/test/fixtures/schema.json +1482 -0
- data/test/integrations/validate_complex_schema_spec.rb +42 -0
- data/test/skeleton/graph_test.rb +22 -0
- data/test/skeleton/mapper_test.rb +84 -0
- data/test/skeleton/operation_test.rb +11 -0
- data/test/skeleton/parameter_test.rb +34 -0
- data/test/skeleton/parameters_test.rb +9 -0
- data/test/skeleton/path_test.rb +46 -0
- data/test/skeleton/property_test.rb +8 -0
- data/test/skeleton/serializers/options_test.rb +68 -0
- data/test/skeleton/serializers/swagger_test.rb +30 -0
- data/test/support/factories/structure_factory.rb +86 -0
- data/test/support/fixtures.rb +6 -0
- data/test/support/kissmetrics/core_api.rb +542 -0
- data/{spec/spec_helper.rb → test/test_helper.rb} +7 -1
- metadata +73 -25
- data/lib/skeleton/config.rb +0 -37
- data/lib/skeleton/documentation.rb +0 -17
- data/lib/skeleton/example.rb +0 -31
- data/lib/skeleton/headers.rb +0 -50
- data/lib/skeleton/helpers/controller_helpers.rb +0 -25
- data/lib/skeleton/info.rb +0 -40
- data/lib/skeleton/item.rb +0 -99
- data/lib/skeleton/responses.rb +0 -59
- data/lib/skeleton/scopes.rb +0 -24
- data/lib/skeleton/security_definitions.rb +0 -46
- data/lib/skeleton/security_requirement.rb +0 -29
- data/spec/integrations/use_case_spec.rb +0 -131
- data/spec/skeleton/operation_spec.rb +0 -113
- data/spec/skeleton/serializers/contact_spec.rb +0 -30
- data/spec/skeleton/serializers/documentation_spec.rb +0 -23
- data/spec/skeleton/serializers/header_spec.rb +0 -57
@@ -1,57 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
require 'skeleton/header'
|
4
|
-
|
5
|
-
describe Skeleton::Header do
|
6
|
-
before do
|
7
|
-
@header = Skeleton::Header.new
|
8
|
-
end
|
9
|
-
|
10
|
-
describe '#exclusive_maximum?' do
|
11
|
-
describe 'when set' do
|
12
|
-
it 'is true' do
|
13
|
-
@header.exclusive_maximum = 10
|
14
|
-
assert(@header.exclusive_maximum?)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
describe 'when not set' do
|
19
|
-
it 'is false' do
|
20
|
-
@header.exclusive_maximum = nil
|
21
|
-
refute(@header.exclusive_maximum?)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
describe '#exclusive_minimum?' do
|
27
|
-
describe 'when set' do
|
28
|
-
it 'is true' do
|
29
|
-
@header.exclusive_minimum = 10
|
30
|
-
assert(@header.exclusive_minimum?)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
describe 'when not set' do
|
35
|
-
it 'is false' do
|
36
|
-
@header.exclusive_minimum = nil
|
37
|
-
refute(@header.exclusive_minimum?)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
describe '#unique_items?' do
|
43
|
-
describe 'when set' do
|
44
|
-
it 'is true' do
|
45
|
-
@header.unique_items = 10
|
46
|
-
assert(@header.unique_items?)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
describe 'when not set' do
|
51
|
-
it 'is false' do
|
52
|
-
@header.unique_items = nil
|
53
|
-
refute(@header.unique_items?)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|