praxis 0.18.0 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c55f5d3363aed4bc5157e0064e35b399e1bcf20
4
- data.tar.gz: 2bf66b28b0d80ea8e57de43b69dc5c76e7e504ea
3
+ metadata.gz: 56c2fbb99665a6c0af6430bb7975fd82f469e58f
4
+ data.tar.gz: 8b8c200026e69903049082b28dc43cceaf2e8365
5
5
  SHA512:
6
- metadata.gz: 32fdd9a038fa46b129d1da10a9edee94d032c2ff7ce14889cf45f162b57e3d2aaf4d3ecc4f5827ddb84a2bc33490259293a4b84a3905cd2dd269f1fb0a2a29c2
7
- data.tar.gz: 04b7c664a294d7766e65640855112fb80455f6ba3fe7c840bb5b70e5de4d8bcf13b58f8cefaf151ea3787644185c4e20070f5f5cb2edcf2c58d78822ca2fef63
6
+ metadata.gz: cd790aa9cb59f989310a1977e2b0584717973ed2ab4090a11643cdeb514227c9c504f6260214839e00ccb472170bf507e9de942129c95ce7f25ea913c71624b0
7
+ data.tar.gz: e4746483a28b0e48e39de2ee7b4dec0aaaa06714dc20112a9f306ce0141af1a525e60bc23a09765d5e124a30fd3263bf2c876f4c54f47f5c4482a9d57105c236
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## next
4
4
 
5
+ ## 0.18.1
6
+
7
+ * Fix Doc Browser regression, which would not show the schema in the Resource Definition home page.
8
+
5
9
  ## 0.18.0
6
10
 
7
11
  * Added `display_name` DSL to `ResourceDefinition` and `MediaType`
@@ -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>
@@ -15,7 +15,7 @@ module Praxis
15
15
  end
16
16
 
17
17
  def describe(shallow=true)
18
- {identifier: identifier}
18
+ {name: name, family: "string", id: id, identifier: identifier}
19
19
  end
20
20
 
21
21
  end
@@ -1,3 +1,3 @@
1
1
  module Praxis
2
- VERSION = '0.18.0'
2
+ VERSION = '0.18.1'
3
3
  end
@@ -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 == { identifier: 'foobar'} }
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.0
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-18 00:00:00.000000000 Z
12
+ date: 2015-09-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack