riddl 0.99.186 → 0.99.187

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbbf2dfb9e8fba5304f7cc3465685dbd71980a8b
4
- data.tar.gz: 0753b24bff90435f99561c095bb9ab9ddef1e295
3
+ metadata.gz: a2a66a5fae23e728695a686b2d059ac4b3ba65ce
4
+ data.tar.gz: fc0060b340bee403e33bc45962c41cde11d4e1d2
5
5
  SHA512:
6
- metadata.gz: ac4bcab2b1abb836205b40b212e27f86eb03e9719e693a503ad3441b0b58bc001e4e2e162152f710d291f95a67a0707d964479bf4164bd4dc2282f8242e3d754
7
- data.tar.gz: 74e7e33e28e8edd30b3c0bf45e142fb6d1b2e9dccfcd61036c6b57b9f85b7b229f612ba3c906410319f6a3b029b7b31af82eed98da9317260160b9900a362ed4
6
+ metadata.gz: b37e33a0dc5d8d358ca6730745fa0f27536f1e5acea5ddcaf3fc97d8d6f5d632869da73927098944dd85e6efb55fbd73ddcd92021f1f7fc2f0bd83eac790c2f5
7
+ data.tar.gz: 6c0af2e2474e1a7bbe2caedefb54396a4ffb0efd73e6a4cab7d773b200f805534f0fa81c83807309406900a9ab3f54ef4b03e79b7445c0169b714f788bb2720a
@@ -63,94 +63,103 @@
63
63
  success: function(data){
64
64
  $('#main').append(marked($('description > resource > documentation',data).text()));
65
65
 
66
- $('description > resource > resource',data).each(function(k,ele){
67
- var sum = $('documentation',ele).attr('summary');
68
- var exa = $('example',ele).length == 0 ? null : $('example',ele).text();
69
- if (exa) {
70
- var rell = exa;
71
- var relt = exa + ' (' + $(ele).attr('relative') + ')';
72
- } else {
73
- var rell = $(ele).attr('relative');
74
- var relt = _.trim(rell);
75
- }
76
- var t = $('#subresourceitem')[0];
77
- var clone = document.importNode(t.content, true);
78
- $('a',clone).attr('href','./' + rell + '/?doc=true');
79
- if (relt != "") {
80
- $('a',clone).text(relt);
81
- }
82
- if (sum) { $('.content',clone).text(sum); }
83
- $('#subresources .anchor').append(clone);
84
- });
85
-
86
- $('description > resource > :not(documentation):not(resource):not(example)',data).each(function(k,ele){
87
- var sum = $('documentation',ele).attr('summary');
88
- var details = $('documentation',ele).text();
89
- var tin = $(ele).attr('in');
90
- var tout = $(ele).attr('out');
91
- var whatl = $(ele).prop('tagName');
92
- var whatd = tin == "*" ? '' : '( ' + tin + ' )';
93
- whatd += tout ? ' : ' + tout : '';
94
-
95
- var ex = "";
96
- var tinmess = "";
97
- if (tin && tin != "*") {
98
- $('description > message[name="' + tin + '"]',data).each(function(k,mess){
99
- tinmess = mess;
100
- _.each(mess.attributes,function(attr){
101
- if (attr.localName == 'example' && attr.namespaceURI == "http://riddl.org/ns/documentation/1.0") {
102
- ex = attr.nodeValue;
103
- }
66
+ var subr = $('description > resource > resource',data);
67
+ if (subr.length == 0) {
68
+ $('#subresources').remove();
69
+ } else {
70
+ $('description > resource > resource',data).each(function(k,ele){
71
+ var sum = $('documentation',ele).attr('summary');
72
+ var exa = $('example',ele).length == 0 ? null : $('example',ele).text();
73
+ if (exa) {
74
+ var rell = exa;
75
+ var relt = exa + ' (' + $(ele).attr('relative') + ')';
76
+ } else {
77
+ var rell = $(ele).attr('relative');
78
+ var relt = _.trim(rell);
79
+ }
80
+ var t = $('#subresourceitem')[0];
81
+ var clone = document.importNode(t.content, true);
82
+ $('a',clone).attr('href','./' + rell + '/?doc=true');
83
+ if (relt != "") {
84
+ $('a',clone).text(relt);
85
+ }
86
+ if (sum) { $('.content',clone).text(sum); }
87
+ $('#subresources .anchor').append(clone);
88
+ });
89
+ }
90
+
91
+ var oprs = $('description > resource > :not(documentation):not(resource):not(example)',data);
92
+ if (oprs.length == 0) {
93
+ $('#operations').remove();
94
+ } else {
95
+ $('description > resource > :not(documentation):not(resource):not(example)',data).each(function(k,ele){
96
+ var sum = $('documentation',ele).attr('summary');
97
+ var details = $('documentation',ele).text();
98
+ var tin = $(ele).attr('in');
99
+ var tout = $(ele).attr('out');
100
+ var whatl = $(ele).prop('tagName');
101
+ var whatd = tin == "*" ? '' : '( ' + tin + ' )';
102
+ whatd += tout ? ' : ' + tout : '';
103
+
104
+ var ex = "";
105
+ var tinmess = "";
106
+ if (tin && tin != "*") {
107
+ $('description > message[name="' + tin + '"]',data).each(function(k,mess){
108
+ tinmess = mess;
109
+ _.each(mess.attributes,function(attr){
110
+ if (attr.localName == 'example' && attr.namespaceURI == "http://riddl.org/ns/documentation/1.0") {
111
+ ex = attr.nodeValue;
112
+ }
113
+ });
104
114
  });
105
- });
106
- }
107
- var toutmess = "";
108
- if (tout && tout != "*") {
109
- $('description > message[name="' + tout + '"]',data).each(function(k,mess){
110
- toutmess = mess;
111
- });
112
- }
113
-
114
- // Overview
115
- var t = $('#operationitem')[0];
116
- var clone = document.importNode(t.content, true);
117
- $('.what .link',clone).text(whatl);
118
- $('.what .link',clone).attr('href','#' + (whatl + '_' + whatd).replace(/ /g,'_'));
119
- $('.what .details',clone).text(whatd);
120
- if (ex != "") {
121
- $('.what .try a',clone).attr('href','?' + ex);
122
- } else {
123
- $('.what .try',clone).remove();
124
- }
125
- if (sum) { $('.content',clone).text(sum); }
126
- $('#operations .anchor').append(clone);
127
-
128
- //Details
129
- var t = $('#operationsec')[0];
130
- var clone = document.importNode(t.content, true);
131
- $('.what',clone).text(whatl + ' ' + whatd);
132
- $('.what',clone).attr('id',(whatl + '_' + whatd).replace(/ /g,'_'));
133
- $('.text',clone).text(details == "" ? sum : details);
134
- if (ex != "") {
135
- $('.try a',clone).attr('href','?' + ex);
136
- $('.try a',clone).text('?' + ex);
137
- } else {
138
- $('.try',clone).remove();
139
- }
140
-
141
- if (tin && tin != "*") {
142
- $('.input .message',clone).text(vkbeautify.xml($(tinmess).serializeXML()));
143
- } else {
144
- $('.input',clone).remove();
145
- }
146
- if (tout) {
147
- $('.output .message',clone).text(vkbeautify.xml($(toutmess).serializeXML()));
148
- } else {
149
- $('.output',clone).remove();
150
- }
151
- $('#operations').append(clone);
152
- });
153
-
115
+ }
116
+ var toutmess = "";
117
+ if (tout && tout != "*") {
118
+ $('description > message[name="' + tout + '"]',data).each(function(k,mess){
119
+ toutmess = mess;
120
+ });
121
+ }
122
+
123
+ // Overview
124
+ var t = $('#operationitem')[0];
125
+ var clone = document.importNode(t.content, true);
126
+ $('.what .link',clone).text(whatl);
127
+ $('.what .link',clone).attr('href','#' + (whatl + '_' + whatd).replace(/ /g,'_'));
128
+ $('.what .details',clone).text(whatd);
129
+ if (ex != "") {
130
+ $('.what .try a',clone).attr('href','?' + ex);
131
+ } else {
132
+ $('.what .try',clone).remove();
133
+ }
134
+ if (sum) { $('.content',clone).text(sum); }
135
+ $('#operations .anchor').append(clone);
136
+
137
+ //Details
138
+ var t = $('#operationsec')[0];
139
+ var clone = document.importNode(t.content, true);
140
+ $('.what',clone).text(whatl + ' ' + whatd);
141
+ $('.what',clone).attr('id',(whatl + '_' + whatd).replace(/ /g,'_'));
142
+ $('.text',clone).text(details == "" ? sum : marked(details));
143
+ if (ex != "") {
144
+ $('.try a',clone).attr('href','?' + ex);
145
+ $('.try a',clone).text('?' + ex);
146
+ } else {
147
+ $('.try',clone).remove();
148
+ }
149
+
150
+ if (tin && tin != "*") {
151
+ $('.input .message',clone).text(vkbeautify.xml($(tinmess).serializeXML()));
152
+ } else {
153
+ $('.input',clone).remove();
154
+ }
155
+ if (tout) {
156
+ $('.output .message',clone).text(vkbeautify.xml($(toutmess).serializeXML()));
157
+ } else {
158
+ $('.output',clone).remove();
159
+ }
160
+ $('#operations').append(clone);
161
+ });
162
+ }
154
163
  }
155
164
  });
156
165
  });
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "riddl"
3
- s.version = "0.99.186"
3
+ s.version = "0.99.187"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3"
6
6
  s.summary = "restful interface description and declaration language: tools and client/server libs"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riddl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.99.186
4
+ version: 0.99.187
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler