avocado-docs 3.0.7 → 3.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: eeb2f794e1ca0237563abf1b0f94b69e1ef2d418
4
- data.tar.gz: db5b60a7492c7a5a9e5369e9e09230ce5514e5e6
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NDc3NTIxZWM2OGUwMzViOTdiNGUzZDhjMzkyNzI3NjAyMjQ4NDVlMw==
5
+ data.tar.gz: !binary |-
6
+ ZTNkZWQwMTcxZGE0OTRiNDg5ZmNmYjAwMzhhNTUxNDI4Y2U5ZmY2NA==
5
7
  SHA512:
6
- metadata.gz: aad3444334b370241ff8a158a92ec50563d78d4c02f038ec12b96c272f792ff2fb3c4b795f9e4bd468715ce5337e2ae3be9656dc21335c50eb0f5b496f00c43f
7
- data.tar.gz: 079c5d9541ae4dc1f28244bcf214ab18bc2111cbf902fe6a565ff1348e94df454eb769406eb625f1318687f34b183b39674d4f711382b9a8bbd13c8d2c4485aa
8
+ metadata.gz: !binary |-
9
+ NDk5YzFlZmFiZDI0MGQzMmQ0ZDAzN2QxZGEwODZiNTY2NDhkODgwMDlmZjkx
10
+ ZDM5NmFlMmU3YWM1OWE2MGEzNmJmNDg5NTlkNzc3MThiODRjYWFkNmNiOTU1
11
+ MGRkNTI5M2NmODI4MTNlZmMxZjI4M2NiYzAwM2ZhOWIyOTZlYWM=
12
+ data.tar.gz: !binary |-
13
+ ZmI5MGI0NDAyZjllNzg0YzJkZTY2ZjRmMDUzZDhjZDMyNDIxZGExOTdiNDQy
14
+ OTEwZDRjMmFjZmE3MzExZjA2YWNkNWQ0YmU5YjFmMTY1M2YwYWUwMDgwMzhj
15
+ OTAyMzM2ZGUwZDA1ZjVjNDcxYmIzNjE0ZTgxYmY2YWNlMzllNmQ=
@@ -2,7 +2,7 @@ module Avocado
2
2
  class AvocadoController < ActionController::Base
3
3
 
4
4
  def create
5
- File.open(json, 'wb+') { |f| f.write params[:file].read }
5
+ File.open(json, 'a+:UTF-8') { |f| f.write params[:file].read }
6
6
  head :ok
7
7
  end
8
8
 
@@ -6,7 +6,7 @@ module Avocado
6
6
  extend ActiveSupport::Concern
7
7
 
8
8
  included do
9
- around_action :store_request_and_response_in_avocado
9
+ prepend_around_action :store_request_and_response_in_avocado
10
10
  end
11
11
 
12
12
  def documentable?
@@ -23,4 +23,4 @@ module Avocado
23
23
  end
24
24
 
25
25
  end
26
- end
26
+ end
@@ -34,14 +34,15 @@ module Avocado
34
34
 
35
35
  def deep_replace_file_uploads_with_text(hash)
36
36
  hash.each do |k, v|
37
- case v
38
- when Hash
37
+ if v.is_a? Hash
39
38
  deep_replace_file_uploads_with_text(v)
40
- when Rack::Test::UploadedFile
39
+ elsif v.is_a? Array
40
+ v.each { |element| deep_replace_file_uploads_with_text(_: element) }
41
+ elsif v.respond_to? :eof
41
42
  hash[k] = '<Multipart File Upload>'
42
43
  end
43
44
  end
44
45
  end
45
46
 
46
47
  end
47
- end
48
+ end
@@ -34,9 +34,9 @@ module Avocado
34
34
  private
35
35
 
36
36
  def write_payload_to_json_file(&block)
37
- File.write 'avocado.json', JSON[payload]
38
- file = File.open 'avocado.json'
39
- yield(file)
37
+ file = File.open 'avocado.json', 'w+:UTF-8'
38
+ file.write JSON[payload]
39
+ yield file
40
40
  ensure
41
41
  file.close
42
42
  File.delete file.path
@@ -1,3 +1,3 @@
1
1
  module Avocado
2
- VERSION = '3.0.7'
2
+ VERSION = '3.0.8'
3
3
  end
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avocado-docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.7
4
+ version: 3.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logan Serman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-19 00:00:00.000000000 Z
11
+ date: 2015-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: multipart-post
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sqlite3
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec-rails
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '2.14'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2.14'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: combustion
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.5'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.5'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: webmock
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.15'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.15'
97
97
  description: Avocado listens for JSON responses in the test environment and generates
@@ -157,17 +157,17 @@ require_paths:
157
157
  - lib
158
158
  required_ruby_version: !ruby/object:Gem::Requirement
159
159
  requirements:
160
- - - ">="
160
+ - - ! '>='
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  requirements:
165
- - - ">="
165
+ - - ! '>='
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
168
  requirements: []
169
169
  rubyforge_project:
170
- rubygems_version: 2.2.2
170
+ rubygems_version: 2.4.5
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: Automatic API documentation from RSpec tests