restspec 0.0.4 → 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +5 -0
- data/CHANGELOG.md +0 -0
- data/README.md +11 -7
- data/Rakefile +7 -0
- data/bin/restspec +1 -1
- data/examples/store-api-tests/Gemfile.lock +3 -1
- data/examples/store-api-tests/api.md +47 -47
- data/examples/store-api-tests/spec/api/product_spec.rb +0 -2
- data/examples/store-api-tests/spec/api/restspec/endpoints.rb +6 -5
- data/examples/store-api-tests/spec/api/restspec/schemas.rb +2 -1
- data/{docs → guides}/endpoints.md +0 -0
- data/{docs → guides}/helpers.md +0 -0
- data/{docs → guides}/macros.md +0 -0
- data/{docs → guides}/matchers.md +0 -0
- data/{docs → guides}/schemas.md +0 -0
- data/{docs → guides}/tutorial.md +1 -1
- data/{docs → guides}/types.md +0 -0
- data/lib/restspec/configuration.rb +28 -4
- data/lib/restspec/endpoints/dsl.rb +281 -48
- data/lib/restspec/endpoints/endpoint.rb +18 -58
- data/lib/restspec/endpoints/has_schemas.rb +39 -0
- data/lib/restspec/endpoints/namespace.rb +4 -7
- data/lib/restspec/endpoints/network.rb +27 -0
- data/lib/restspec/endpoints/request.rb +3 -0
- data/lib/restspec/endpoints/response.rb +3 -0
- data/lib/restspec/endpoints/url_builder.rb +51 -0
- data/lib/restspec/rspec/api_macros.rb +2 -2
- data/lib/restspec/rspec/matchers/be_like_schema.rb +1 -1
- data/lib/restspec/rspec/matchers/be_like_schema_array.rb +1 -1
- data/lib/restspec/runners/docs/templates/docs.md.erb +2 -2
- data/lib/restspec/schema/attribute.rb +43 -0
- data/lib/restspec/schema/attribute_example.rb +13 -1
- data/lib/restspec/schema/checker.rb +80 -8
- data/lib/restspec/schema/dsl.rb +67 -11
- data/lib/restspec/schema/schema.rb +13 -1
- data/lib/restspec/schema/schema_example.rb +7 -1
- data/lib/restspec/schema/types/array_type.rb +42 -1
- data/lib/restspec/schema/types/basic_type.rb +62 -0
- data/lib/restspec/schema/types/boolean_type.rb +10 -0
- data/lib/restspec/schema/types/date_type.rb +12 -0
- data/lib/restspec/schema/types/datetime_type.rb +16 -0
- data/lib/restspec/schema/types/decimal_string_type.rb +16 -5
- data/lib/restspec/schema/types/decimal_type.rb +17 -1
- data/lib/restspec/schema/types/embedded_schema_type.rb +39 -8
- data/lib/restspec/schema/types/hash_type.rb +51 -12
- data/lib/restspec/schema/types/integer_type.rb +12 -1
- data/lib/restspec/schema/types/null_type.rb +7 -0
- data/lib/restspec/schema/types/one_of_type.rb +18 -0
- data/lib/restspec/schema/types/schema_id_type.rb +14 -17
- data/lib/restspec/schema/types/string_type.rb +9 -0
- data/lib/restspec/schema/types/type_methods.rb +32 -0
- data/lib/restspec/schema/types.rb +1 -18
- data/lib/restspec/shortcuts.rb +10 -0
- data/lib/restspec/stores/endpoint_store.rb +27 -2
- data/lib/restspec/stores/namespace_store.rb +23 -4
- data/lib/restspec/stores/schema_store.rb +15 -0
- data/lib/restspec/values/status_code.rb +16 -1
- data/lib/restspec/version.rb +1 -1
- data/lib/restspec.rb +2 -0
- data/restspec.gemspec +2 -0
- data/spec/restspec/endpoints/dsl_spec.rb +32 -19
- data/spec/restspec/endpoints/endpoint_spec.rb +20 -43
- data/spec/restspec/endpoints/namespace_spec.rb +0 -7
- data/spec/restspec/endpoints/request_spec.rb +33 -0
- data/spec/restspec/schema/attribute_spec.rb +44 -0
- data/spec/restspec/schema/checker_spec.rb +57 -0
- data/spec/restspec/schema/dsl_spec.rb +1 -1
- data/spec/restspec/schema/schema_spec.rb +15 -0
- data/spec/restspec/schema/types/basic_type_spec.rb +2 -2
- data/spec/restspec/schema/types/decimal_string_type_spec.rb +56 -0
- data/spec/restspec/schema/types/decimal_type_spec.rb +25 -0
- data/spec/restspec/schema/types/embedded_schema_type_spec.rb +32 -0
- data/spec/restspec/schema/types/hash_type_spec.rb +39 -0
- data/spec/restspec/schema/types/integer_type_spec.rb +28 -0
- data/spec/restspec/schema/types/one_of_type_spec.rb +21 -0
- data/spec/restspec/stores/endpoint_store_spec.rb +62 -0
- metadata +63 -10
- data/ROADMAP.md +0 -13
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- juliogarciag
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -94,6 +94,34 @@ dependencies:
|
|
94
94
|
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.9.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: yard
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ~>
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.8.7
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ~>
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.8.7
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: redcarpet
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.2'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ~>
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.2'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: activesupport
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -247,20 +275,14 @@ files:
|
|
247
275
|
- .rbenv-vars.example
|
248
276
|
- .rspec
|
249
277
|
- .travis.yml
|
278
|
+
- .yardopts
|
279
|
+
- CHANGELOG.md
|
250
280
|
- Gemfile
|
251
281
|
- Guardfile
|
252
282
|
- LICENSE.txt
|
253
283
|
- README.md
|
254
|
-
- ROADMAP.md
|
255
284
|
- Rakefile
|
256
285
|
- bin/restspec
|
257
|
-
- docs/endpoints.md
|
258
|
-
- docs/helpers.md
|
259
|
-
- docs/macros.md
|
260
|
-
- docs/matchers.md
|
261
|
-
- docs/schemas.md
|
262
|
-
- docs/tutorial.md
|
263
|
-
- docs/types.md
|
264
286
|
- examples/store-api-tests/.rspec
|
265
287
|
- examples/store-api-tests/Gemfile
|
266
288
|
- examples/store-api-tests/Gemfile.lock
|
@@ -378,14 +400,23 @@ files:
|
|
378
400
|
- examples/store-api/spec/views/products/show.html.erb_spec.rb
|
379
401
|
- examples/store-api/vendor/assets/javascripts/.keep
|
380
402
|
- examples/store-api/vendor/assets/stylesheets/.keep
|
403
|
+
- guides/endpoints.md
|
404
|
+
- guides/helpers.md
|
405
|
+
- guides/macros.md
|
406
|
+
- guides/matchers.md
|
407
|
+
- guides/schemas.md
|
408
|
+
- guides/tutorial.md
|
409
|
+
- guides/types.md
|
381
410
|
- lib/restspec.rb
|
382
411
|
- lib/restspec/configuration.rb
|
383
412
|
- lib/restspec/endpoints/dsl.rb
|
384
413
|
- lib/restspec/endpoints/endpoint.rb
|
414
|
+
- lib/restspec/endpoints/has_schemas.rb
|
385
415
|
- lib/restspec/endpoints/namespace.rb
|
386
416
|
- lib/restspec/endpoints/network.rb
|
387
417
|
- lib/restspec/endpoints/request.rb
|
388
418
|
- lib/restspec/endpoints/response.rb
|
419
|
+
- lib/restspec/endpoints/url_builder.rb
|
389
420
|
- lib/restspec/requirements/dsl.rb
|
390
421
|
- lib/restspec/requirements/requirement.rb
|
391
422
|
- lib/restspec/rspec/api_helpers.rb
|
@@ -426,6 +457,7 @@ files:
|
|
426
457
|
- lib/restspec/schema/types/one_of_type.rb
|
427
458
|
- lib/restspec/schema/types/schema_id_type.rb
|
428
459
|
- lib/restspec/schema/types/string_type.rb
|
460
|
+
- lib/restspec/schema/types/type_methods.rb
|
429
461
|
- lib/restspec/shortcuts.rb
|
430
462
|
- lib/restspec/stores/endpoint_store.rb
|
431
463
|
- lib/restspec/stores/namespace_store.rb
|
@@ -437,8 +469,11 @@ files:
|
|
437
469
|
- spec/restspec/endpoints/dsl_spec.rb
|
438
470
|
- spec/restspec/endpoints/endpoint_spec.rb
|
439
471
|
- spec/restspec/endpoints/namespace_spec.rb
|
472
|
+
- spec/restspec/endpoints/request_spec.rb
|
440
473
|
- spec/restspec/endpoints/response_spec.rb
|
441
474
|
- spec/restspec/schema/attribute_example_spec.rb
|
475
|
+
- spec/restspec/schema/attribute_spec.rb
|
476
|
+
- spec/restspec/schema/checker_spec.rb
|
442
477
|
- spec/restspec/schema/dsl_spec.rb
|
443
478
|
- spec/restspec/schema/schema_example_spec.rb
|
444
479
|
- spec/restspec/schema/schema_spec.rb
|
@@ -447,8 +482,15 @@ files:
|
|
447
482
|
- spec/restspec/schema/types/boolean_type_spec.rb
|
448
483
|
- spec/restspec/schema/types/date_type_spec.rb
|
449
484
|
- spec/restspec/schema/types/datetime_type_spec.rb
|
485
|
+
- spec/restspec/schema/types/decimal_string_type_spec.rb
|
486
|
+
- spec/restspec/schema/types/decimal_type_spec.rb
|
487
|
+
- spec/restspec/schema/types/embedded_schema_type_spec.rb
|
488
|
+
- spec/restspec/schema/types/hash_type_spec.rb
|
489
|
+
- spec/restspec/schema/types/integer_type_spec.rb
|
450
490
|
- spec/restspec/schema/types/null_type_spec.rb
|
491
|
+
- spec/restspec/schema/types/one_of_type_spec.rb
|
451
492
|
- spec/restspec/schema/types/string_type_spec.rb
|
493
|
+
- spec/restspec/stores/endpoint_store_spec.rb
|
452
494
|
- spec/restspec/values/status_code_spec.rb
|
453
495
|
- spec/spec_helper.rb
|
454
496
|
homepage: ''
|
@@ -479,8 +521,11 @@ test_files:
|
|
479
521
|
- spec/restspec/endpoints/dsl_spec.rb
|
480
522
|
- spec/restspec/endpoints/endpoint_spec.rb
|
481
523
|
- spec/restspec/endpoints/namespace_spec.rb
|
524
|
+
- spec/restspec/endpoints/request_spec.rb
|
482
525
|
- spec/restspec/endpoints/response_spec.rb
|
483
526
|
- spec/restspec/schema/attribute_example_spec.rb
|
527
|
+
- spec/restspec/schema/attribute_spec.rb
|
528
|
+
- spec/restspec/schema/checker_spec.rb
|
484
529
|
- spec/restspec/schema/dsl_spec.rb
|
485
530
|
- spec/restspec/schema/schema_example_spec.rb
|
486
531
|
- spec/restspec/schema/schema_spec.rb
|
@@ -489,7 +534,15 @@ test_files:
|
|
489
534
|
- spec/restspec/schema/types/boolean_type_spec.rb
|
490
535
|
- spec/restspec/schema/types/date_type_spec.rb
|
491
536
|
- spec/restspec/schema/types/datetime_type_spec.rb
|
537
|
+
- spec/restspec/schema/types/decimal_string_type_spec.rb
|
538
|
+
- spec/restspec/schema/types/decimal_type_spec.rb
|
539
|
+
- spec/restspec/schema/types/embedded_schema_type_spec.rb
|
540
|
+
- spec/restspec/schema/types/hash_type_spec.rb
|
541
|
+
- spec/restspec/schema/types/integer_type_spec.rb
|
492
542
|
- spec/restspec/schema/types/null_type_spec.rb
|
543
|
+
- spec/restspec/schema/types/one_of_type_spec.rb
|
493
544
|
- spec/restspec/schema/types/string_type_spec.rb
|
545
|
+
- spec/restspec/stores/endpoint_store_spec.rb
|
494
546
|
- spec/restspec/values/status_code_spec.rb
|
495
547
|
- spec/spec_helper.rb
|
548
|
+
has_rdoc:
|
data/ROADMAP.md
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# For 0.0.x
|
2
|
-
- 100% Test coverage.
|
3
|
-
- Find a way to avoid example value clashes when using resource tests.
|
4
|
-
- Document DateType and DateTimeType
|
5
|
-
|
6
|
-
# For 0.1 (They require more thoughts)
|
7
|
-
- Research pagination strategies and integrating them with `schema_id`.
|
8
|
-
- Provide a method for cookie-based authentication.
|
9
|
-
- Research some way to generate markdown from a mix of the schemas and endpoints. (Like Apiary and others)
|
10
|
-
+ Add a way to add texts to some points of the documentation.
|
11
|
-
+ TODO:
|
12
|
-
* Untie Schema for Schema Response Body. DELETEs don't return string, they usually returns NO CONTENT. Indeed: nothing.
|
13
|
-
* Allow using a TITLE.
|