praxis 0.18.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/api_browser/app/js/controllers/type.js +1 -1
- data/lib/api_browser/app/views/controller.html +5 -1
- data/lib/api_browser/app/views/type/details.html +1 -1
- data/lib/praxis/simple_media_type.rb +1 -1
- data/lib/praxis/version.rb +1 -1
- data/spec/praxis/response_definition_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56c2fbb99665a6c0af6430bb7975fd82f469e58f
|
4
|
+
data.tar.gz: 8b8c200026e69903049082b28dc43cceaf2e8365
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd790aa9cb59f989310a1977e2b0584717973ed2ab4090a11643cdeb514227c9c504f6260214839e00ccb472170bf507e9de942129c95ce7f25ea913c71624b0
|
7
|
+
data.tar.gz: e4746483a28b0e48e39de2ee7b4dec0aaaa06714dc20112a9f306ce0141af1a525e60bc23a09765d5e124a30fd3263bf2c876f4c54f47f5c4482a9d57105c236
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
app.controller('TypeCtrl', function ($scope, $stateParams, Documentation, normalizeAttributes) {
|
2
|
-
$scope.typeId = $stateParams.type || $scope.controller.media_type;
|
2
|
+
$scope.typeId = $stateParams.type || $scope.controller.media_type.id;
|
3
3
|
$scope.apiVersion = $stateParams.version;
|
4
4
|
$scope.controllers = [];
|
5
5
|
$scope.views = [];
|
@@ -42,9 +42,13 @@
|
|
42
42
|
</div>
|
43
43
|
</div>
|
44
44
|
</div>
|
45
|
-
<div ng-if="controller.media_type" ng-controller="TypeCtrl">
|
45
|
+
<div ng-if="controller.media_type && controller.media_type.family != 'string'" ng-controller="TypeCtrl">
|
46
46
|
<ng-include src="'views/type/details.html'" />
|
47
47
|
</div>
|
48
|
+
<div ng-if="controller.media_type && controller.media_type.family == 'string'">
|
49
|
+
<h2>Schema</h2>
|
50
|
+
<p ><b>Internet Media-type: {{ controller.media_type.identifier }}</b></p>
|
51
|
+
</div>
|
48
52
|
<h1>Actions</h1>
|
49
53
|
<div ng-controller="ActionCtrl" ng-repeat="action in controller.actions">
|
50
54
|
<div id="action-{{action.name}}" ng-include="'views/action.html'"></div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="row" ng-if="type">
|
2
2
|
<div class="col-lg-12">
|
3
3
|
<h2>Schema</h2>
|
4
|
-
<p ng-if="type.identifier"><b>Media-type: {{ type.identifier }}</b></p>
|
4
|
+
<p ng-if="type.identifier"><b>Media-type identifier: {{ type.identifier }}</b></p>
|
5
5
|
<div ng-if="type.description" ng-bind-html="type.description | markdown"></div>
|
6
6
|
|
7
7
|
<attribute-table attributes="type.attributes"></attribute-table>
|
data/lib/praxis/version.rb
CHANGED
@@ -522,7 +522,7 @@ describe Praxis::ResponseDefinition do
|
|
522
522
|
subject(:examples) { payload[:examples] }
|
523
523
|
its(['json', :content_type]) { 'application/vnd.acme.instance+json '}
|
524
524
|
its(['xml', :content_type]) { 'application/vnd.acme.instance+xml' }
|
525
|
-
|
525
|
+
|
526
526
|
it 'properly encodes the example bodies' do
|
527
527
|
json = Praxis::Application.instance.handlers['json'].parse(examples['json'][:body])
|
528
528
|
xml = Praxis::Application.instance.handlers['xml'].parse(examples['xml'][:body])
|
@@ -556,7 +556,7 @@ describe Praxis::ResponseDefinition do
|
|
556
556
|
end
|
557
557
|
|
558
558
|
it{ should be_kind_of(::Hash) }
|
559
|
-
its([:payload]){ should ==
|
559
|
+
its([:payload]){ should == {id: 'Praxis-SimpleMediaType', name: 'Praxis::SimpleMediaType', family: 'string', identifier: 'foobar' } }
|
560
560
|
its([:status]){ should == 200 }
|
561
561
|
end
|
562
562
|
context 'using a full response definition block' do
|
@@ -572,7 +572,7 @@ describe Praxis::ResponseDefinition do
|
|
572
572
|
end
|
573
573
|
|
574
574
|
it{ should be_kind_of(::Hash) }
|
575
|
-
its([:payload]) { should == { identifier: 'custom_media'} }
|
575
|
+
its([:payload]) { should == {id: 'Praxis-SimpleMediaType', name: 'Praxis::SimpleMediaType', family: 'string', identifier: 'custom_media'} }
|
576
576
|
its([:status]) { should == 234 }
|
577
577
|
end
|
578
578
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: praxis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep M. Blanquer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-09-
|
12
|
+
date: 2015-09-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|