docraptor 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +8 -5
- data/docraptor.yaml +3 -0
- data/lib/docraptor/models/prince_options.rb +12 -1
- data/lib/docraptor/version.rb +1 -1
- data/script/generate_language +5 -5
- data/script/swagger +15 -9
- data/script/update_from_upstream +8 -8
- data/swagger-config.json +1 -1
- 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: 097e035caf9f22488252db9ec59987938d16fc54
|
4
|
+
data.tar.gz: 44c9f2a187ec1076951e5450d6d88d30fae3c7ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ebf83bb3a49ca1a7f54176260552d45d1c923fa622bc3aab278cf5ba8dc4d5be6b39d2ee31e546bcade0db082562e831e3a2ea6475234b0c6dfc521bf6538cb
|
7
|
+
data.tar.gz: d6d8473f1fe408d0ea83405335215dda62699e87838b1864217832c776a5c64a53a75f44b30279a7536e0bd92c89f4bebb9d90432793f7ba928035c4dbc9c003
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -67,13 +67,16 @@ The majority of the code in this repo is generated using swagger-codegen on [doc
|
|
67
67
|
|
68
68
|
## Release Process
|
69
69
|
|
70
|
-
1.
|
71
|
-
2.
|
70
|
+
1. Pull latest master
|
71
|
+
2. Merge feature branch(es) into master
|
72
|
+
3. `script/test`
|
73
|
+
4. Increment version in code:
|
72
74
|
- `swagger-config.json`
|
73
75
|
- `lib/docraptor/version.rb`
|
74
|
-
|
75
|
-
|
76
|
-
|
76
|
+
5. Update [CHANGELOG.md](CHANGELOG.md)
|
77
|
+
6. Commit "Release version vX.Y.Z"
|
78
|
+
7. `rake release`
|
79
|
+
8. Refresh documentation on docraptor.com
|
77
80
|
|
78
81
|
|
79
82
|
## Version Policy
|
data/docraptor.yaml
CHANGED
@@ -214,6 +214,9 @@ definitions:
|
|
214
214
|
no_network:
|
215
215
|
type: boolean
|
216
216
|
description: Disable network access.
|
217
|
+
no_parallel_downloads:
|
218
|
+
type: boolean
|
219
|
+
description: Disables parallel fetching of assets during PDF creation. Useful if your asset host has strict rate limiting.
|
217
220
|
http_user:
|
218
221
|
type: string
|
219
222
|
description: Set the user for HTTP authentication.
|
@@ -11,6 +11,9 @@ module DocRaptor
|
|
11
11
|
# Disable network access.
|
12
12
|
attr_accessor :no_network
|
13
13
|
|
14
|
+
# Disables parallel fetching of assets during PDF creation. Useful if your asset host has strict rate limiting.
|
15
|
+
attr_accessor :no_parallel_downloads
|
16
|
+
|
14
17
|
# Set the user for HTTP authentication.
|
15
18
|
attr_accessor :http_user
|
16
19
|
|
@@ -96,6 +99,8 @@ module DocRaptor
|
|
96
99
|
|
97
100
|
:'no_network' => :'no_network',
|
98
101
|
|
102
|
+
:'no_parallel_downloads' => :'no_parallel_downloads',
|
103
|
+
|
99
104
|
:'http_user' => :'http_user',
|
100
105
|
|
101
106
|
:'http_password' => :'http_password',
|
@@ -155,6 +160,7 @@ module DocRaptor
|
|
155
160
|
:'baseurl' => :'String',
|
156
161
|
:'no_xinclude' => :'BOOLEAN',
|
157
162
|
:'no_network' => :'BOOLEAN',
|
163
|
+
:'no_parallel_downloads' => :'BOOLEAN',
|
158
164
|
:'http_user' => :'String',
|
159
165
|
:'http_password' => :'String',
|
160
166
|
:'http_proxy' => :'String',
|
@@ -203,6 +209,10 @@ module DocRaptor
|
|
203
209
|
self.no_network = attributes[:'no_network']
|
204
210
|
end
|
205
211
|
|
212
|
+
if attributes[:'no_parallel_downloads']
|
213
|
+
self.no_parallel_downloads = attributes[:'no_parallel_downloads']
|
214
|
+
end
|
215
|
+
|
206
216
|
if attributes[:'http_user']
|
207
217
|
self.http_user = attributes[:'http_user']
|
208
218
|
end
|
@@ -325,6 +335,7 @@ module DocRaptor
|
|
325
335
|
baseurl == o.baseurl &&
|
326
336
|
no_xinclude == o.no_xinclude &&
|
327
337
|
no_network == o.no_network &&
|
338
|
+
no_parallel_downloads == o.no_parallel_downloads &&
|
328
339
|
http_user == o.http_user &&
|
329
340
|
http_password == o.http_password &&
|
330
341
|
http_proxy == o.http_proxy &&
|
@@ -359,7 +370,7 @@ module DocRaptor
|
|
359
370
|
|
360
371
|
# Calculate hash code according to all attributes.
|
361
372
|
def hash
|
362
|
-
[baseurl, no_xinclude, no_network, http_user, http_password, http_proxy, http_timeout, insecure, media, no_author_style, no_default_style, no_embed_fonts, no_subset_fonts, no_compress, encrypt, key_bits, user_password, owner_password, disallow_print, disallow_copy, disallow_annotate, disallow_modify, debug, input, version, javascript, css_dpi, profile].hash
|
373
|
+
[baseurl, no_xinclude, no_network, no_parallel_downloads, http_user, http_password, http_proxy, http_timeout, insecure, media, no_author_style, no_default_style, no_embed_fonts, no_subset_fonts, no_compress, encrypt, key_bits, user_password, owner_password, disallow_print, disallow_copy, disallow_annotate, disallow_modify, debug, input, version, javascript, css_dpi, profile].hash
|
363
374
|
end
|
364
375
|
|
365
376
|
# build the object from hash
|
data/lib/docraptor/version.rb
CHANGED
data/script/generate_language
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
#!/bin/sh
|
2
2
|
set -e
|
3
|
-
cd "
|
3
|
+
cd "$(dirname "$0")/.."
|
4
4
|
|
5
5
|
LANGUAGE="$1"
|
6
6
|
CONFIG_FILE="swagger-config.json"
|
7
7
|
|
8
|
-
if [ "$LANGUAGE"
|
8
|
+
if [ "$LANGUAGE" = "" ]; then
|
9
9
|
./script/swagger # prints languages
|
10
10
|
exit 1
|
11
11
|
fi
|
12
12
|
|
13
13
|
if [ ! -f "$CONFIG_FILE" ]; then
|
14
14
|
echo "Could not find $CONFIG_FILE"
|
15
|
-
./script/swagger config-help -l $LANGUAGE
|
15
|
+
./script/swagger config-help -l "$LANGUAGE"
|
16
16
|
exit 1
|
17
17
|
fi
|
18
18
|
|
@@ -20,8 +20,8 @@ fi
|
|
20
20
|
|
21
21
|
./script/swagger generate \
|
22
22
|
-i docraptor.yaml \
|
23
|
-
-l $LANGUAGE \
|
24
|
-
-c $CONFIG_FILE
|
23
|
+
-l "$LANGUAGE" \
|
24
|
+
-c "$CONFIG_FILE"
|
25
25
|
|
26
26
|
# call a generator cleanup script
|
27
27
|
if [ -f "script/post_generate_language" ]; then
|
data/script/swagger
CHANGED
@@ -1,19 +1,25 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
set -e
|
3
|
-
cd "
|
3
|
+
cd "$(dirname "$0")/.."
|
4
|
+
|
5
|
+
SWAGGER_CODGEN_REVISION=$(cat .swagger-revision 2> /dev/null || true)
|
6
|
+
if [ "$SWAGGER_CODGEN_REVISION" = "" ]; then
|
7
|
+
echo "Set a revision of swagger-codegen to use in .swagger-revision"
|
8
|
+
exit 1
|
9
|
+
fi
|
4
10
|
|
5
11
|
if [ ! -d "swagger-codegen" ]; then
|
6
12
|
git clone https://github.com/swagger-api/swagger-codegen
|
7
13
|
fi
|
8
14
|
|
9
|
-
|
10
|
-
cd swagger-codegen
|
11
|
-
if [[
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
fi
|
16
|
-
|
15
|
+
(
|
16
|
+
cd swagger-codegen
|
17
|
+
if [[ $(cat .git/HEAD) != "$SWAGGER_CODGEN_REVISION" ]]; then
|
18
|
+
git fetch
|
19
|
+
git checkout "$SWAGGER_CODGEN_REVISION"
|
20
|
+
mvn clean package
|
21
|
+
fi
|
22
|
+
)
|
17
23
|
|
18
24
|
executable="./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
|
19
25
|
|
data/script/update_from_upstream
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
set -e
|
3
|
-
cd "
|
3
|
+
cd "$(dirname "$0")/.."
|
4
4
|
|
5
|
-
if [[
|
5
|
+
if [[ $(basename "$PWD") == "swagger" ]]; then
|
6
6
|
echo "This command is only used in langauge specific repositories"
|
7
7
|
exit 1
|
8
8
|
fi
|
@@ -10,23 +10,23 @@ fi
|
|
10
10
|
# Gets content at $1 and puts it into $2, automatically chmod +x if $2 is the
|
11
11
|
# script dir.
|
12
12
|
get() {
|
13
|
-
curl --fail --silent --show-error $1 > $2
|
14
|
-
if [[
|
15
|
-
chmod +x $2
|
13
|
+
curl --fail --silent --show-error "$1" > "$2"
|
14
|
+
if [[ $(dirname "$2") == "script" ]]; then
|
15
|
+
chmod +x "$2"
|
16
16
|
fi
|
17
17
|
}
|
18
18
|
|
19
19
|
# Gets a file $1 from the upstream repo and places it in the same location.
|
20
20
|
get_upstream() {
|
21
|
-
get "https://raw.githubusercontent.com/docraptor/docraptor-swagger/master/$1" $1
|
21
|
+
get "https://raw.githubusercontent.com/docraptor/docraptor-swagger/master/$1" "$1"
|
22
22
|
}
|
23
23
|
|
24
24
|
# Main entry point, wrapped in a function so that bash can handle replacing
|
25
25
|
# this file while executing it.
|
26
26
|
update() {
|
27
|
-
original
|
27
|
+
original=$(md5 script/update_from_upstream)
|
28
28
|
get_upstream script/update_from_upstream
|
29
|
-
if [[
|
29
|
+
if [[ $(md5 script/update_from_upstream) != "$original" ]]; then
|
30
30
|
echo "Detected updated update_from_upstream command, running again"
|
31
31
|
script/update_from_upstream
|
32
32
|
exit 0 # recursive call above handled everything
|
data/swagger-config.json
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docraptor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elijah Miller
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-09-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: typhoeus
|