grape-starter 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/starter/importer/description.rb +13 -3
- data/lib/starter/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88f7a549c78c1741a4c0ff18077722f2fb62d3d8b557cc6549c964de83487c2a
|
4
|
+
data.tar.gz: cdf6fa7b945c98c173b5c64d1d49423fbc004856b65951f00cc3ace640761ed6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a5e7ab35998625f88a216f9313ab7a155a1a2df30a8da690eb96ba75e1bc3cf26c1ed2d830a2b0761dd8c7e4554796bec064c9707de3048532502a53ae7ff20
|
7
|
+
data.tar.gz: 73569bbbd944855371b5121bf1d28c1d3dadfa848b3dddb856781785ea82a328204ef2cb97631a037ac4bf9f1ae3633513100b067b6e3103ff01472f31e287c4
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
- contributions
|
4
4
|
|
5
|
+
### v2.1.1 / 2023-10-24
|
6
|
+
|
7
|
+
- [(#43)](https://github.com/LeFnord/grape-starter/pull/43) Fixes desc generation if now useful prop is in content [LeFnord](https://github.com/LeFnord)
|
8
|
+
|
5
9
|
### v2.1.0 / 2023-10-21 Imports OApi specs
|
6
10
|
|
7
11
|
- [(#41)](https://github.com/LeFnord/grape-starter/pull/41) Adds generating of desc block [LeFnord](https://github.com/LeFnord)
|
data/README.md
CHANGED
@@ -9,18 +9,28 @@ module Starter
|
|
9
9
|
@content = content
|
10
10
|
end
|
11
11
|
|
12
|
-
def to_s
|
12
|
+
def to_s # rubocop:disable Metrics/AbcSize
|
13
13
|
return if content.blank?
|
14
14
|
|
15
|
-
desc = content['summary'] ||
|
15
|
+
desc = content['summary'] || content['operationId']
|
16
|
+
entry = "desc '#{desc}'\n"
|
16
17
|
|
17
|
-
entry
|
18
|
+
return entry unless block_keys.intersect?(content.keys)
|
19
|
+
|
20
|
+
entry.sub!("\n", " do\n")
|
18
21
|
entry << " detail '#{content['description']}'\n" if content.key?('description')
|
19
22
|
entry << " tags #{content['tags']}\n" if content.key?('tags')
|
20
23
|
entry << 'end'
|
21
24
|
|
22
25
|
entry
|
23
26
|
end
|
27
|
+
|
28
|
+
def block_keys
|
29
|
+
%w[
|
30
|
+
description
|
31
|
+
tags
|
32
|
+
]
|
33
|
+
end
|
24
34
|
end
|
25
35
|
end
|
26
36
|
end
|
data/lib/starter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-starter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LeFnord
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
|
-
rubygems_version: 3.4.
|
180
|
+
rubygems_version: 3.4.21
|
181
181
|
signing_key:
|
182
182
|
specification_version: 4
|
183
183
|
summary: Creates a Grape Rack skeleton
|