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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5cf8121ad1c5f8911cba244d047a3fed94092fce
4
- data.tar.gz: a32b83320f951539542a1c6f8a65f8c26b342704
3
+ metadata.gz: 097e035caf9f22488252db9ec59987938d16fc54
4
+ data.tar.gz: 44c9f2a187ec1076951e5450d6d88d30fae3c7ef
5
5
  SHA512:
6
- metadata.gz: 36a53a768c5db547c22dccc043b5d9cd53aaef8fc9cfe6e3ec787219276c86a2d95362c2c93f0d56cc1ba40bfa8027df42f98ed9a117112631042214e0ee7032
7
- data.tar.gz: 428af8015465729bf1de1ceca4cf2f8baf584c417b804a4a449b6fcc40645be188ec5a6344177c15bad8b07743f709efffcee4899a1db220e7b23ba3824cd3ea
6
+ metadata.gz: 0ebf83bb3a49ca1a7f54176260552d45d1c923fa622bc3aab278cf5ba8dc4d5be6b39d2ee31e546bcade0db082562e831e3a2ea6475234b0c6dfc521bf6538cb
7
+ data.tar.gz: d6d8473f1fe408d0ea83405335215dda62699e87838b1864217832c776a5c64a53a75f44b30279a7536e0bd92c89f4bebb9d90432793f7ba928035c4dbc9c003
@@ -1,3 +1,6 @@
1
+ ### 0.4.0 [March 11, 2016]
2
+ * Added support for prince_options[no_parallel_downloads]
3
+
1
4
  ### 0.3.0 [March 11, 2016]
2
5
  * Added support for prince_options[debug]
3
6
 
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. `script/test`
71
- 2. Increment version in code:
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
- 3. Update [CHANGELOG.md](CHANGELOG.md)
75
- 4. `rake release`
76
- 5. Update documentation on docraptor.com
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module DocRaptor
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -1,18 +1,18 @@
1
1
  #!/bin/sh
2
2
  set -e
3
- cd "`dirname \"$0\"`/.."
3
+ cd "$(dirname "$0")/.."
4
4
 
5
5
  LANGUAGE="$1"
6
6
  CONFIG_FILE="swagger-config.json"
7
7
 
8
- if [ "$LANGUAGE" == "" ]; then
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
@@ -1,19 +1,25 @@
1
1
  #!/bin/bash
2
2
  set -e
3
- cd "`dirname \"$0\"`/.."
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
- SWAGGER_CODGEN_REVISION=$(cat .swagger-revision)
10
- cd swagger-codegen
11
- if [[ `cat .git/HEAD` != "$SWAGGER_CODGEN_REVISION" ]]; then
12
- git fetch
13
- git checkout $SWAGGER_CODGEN_REVISION
14
- mvn clean package
15
- fi
16
- cd ..
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
 
@@ -1,8 +1,8 @@
1
1
  #!/bin/bash
2
2
  set -e
3
- cd "`dirname \"$0\"`/.."
3
+ cd "$(dirname "$0")/.."
4
4
 
5
- if [[ `basename $PWD` == "swagger" ]]; then
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 [[ `dirname $2` == "script" ]]; then
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=`md5 script/update_from_upstream`
27
+ original=$(md5 script/update_from_upstream)
28
28
  get_upstream script/update_from_upstream
29
- if [[ `md5 script/update_from_upstream` != "$original" ]]; then
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
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "gemName": "docraptor",
3
3
  "moduleName": "DocRaptor",
4
- "gemVersion": "0.3.0"
4
+ "gemVersion": "0.4.0"
5
5
  }
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.3.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-03-11 00:00:00.000000000 Z
12
+ date: 2016-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus