doc_raptor 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +10 -4
  2. data/lib/doc_raptor.rb +9 -2
  3. metadata +4 -4
data/README.md CHANGED
@@ -36,8 +36,11 @@ The create call can also take a block, like so:
36
36
  end
37
37
 
38
38
  To get the status of an async request, you can call:
39
- DocRaptor.status # uses the id of the most recently created async job
40
- DocRaptor.status(status_id) # query some other async job and make it the "active" async job for the DocRaptor class
39
+
40
+ # uses the id of the most recently created async job
41
+ DocRaptor.status
42
+ # query some other async job and make it the "active" async job for the DocRaptor class
43
+ DocRaptor.status(status_id)
41
44
 
42
45
  status_id is the value returned from DocRaptor.create when :async is true. If you have
43
46
  just created a document, status_id defaults to the last status_id received from DocRaptor.
@@ -57,8 +60,11 @@ for the failure to generate your document.
57
60
  To download an async document, you can visit the URL (download_url) provided via the status
58
61
  function or you can call:
59
62
 
60
- DocRaptor.download # uses the key of the most recently checked async job which is complete
61
- DocRaptor.download(download_key) # use some other complete doc's download key
63
+ # uses the key of the most recently checked async job which is complete
64
+ DocRaptor.download
65
+ # use some other complete doc's download key
66
+ DocRaptor.download(download_key)
67
+
62
68
 
63
69
  download_key is the value from the status hash of a call to DocRaptor.status of a
64
70
  completed job. If you have just checked the status of a document and it is completed,
data/lib/doc_raptor.rb CHANGED
@@ -28,8 +28,15 @@ class DocRaptor
28
28
  if options[:async]
29
29
  query[:output => 'json']
30
30
  end
31
-
32
-
31
+
32
+ # HOTFIX
33
+ # convert safebuffers to plain old strings so the gsub'ing that has to occur
34
+ # for url encoding works
35
+ # Broken by: https://github.com/rails/rails/commit/1300c034775a5d52ad9141fdf5bbdbb9159df96a#activesupport/lib/active_support/core_ext/string/output_safety.rb
36
+ # Discussion: https://github.com/rails/rails/issues/1555
37
+ options.map{|k,v| options[k] = options[k].to_str if options[k].is_a?(ActiveSupport::SafeBuffer)}
38
+ # /HOTFIX
39
+
33
40
  response = post("/docs", :body => {:doc => options}, :basic_auth => { :username => api_key }, :query => query)
34
41
 
35
42
  if block_given?
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doc_raptor
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Kuehl
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-06-24 00:00:00 -04:00
20
+ date: 2011-08-29 00:00:00 -04:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency