rspec_api_documentation 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,218 +1,17 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
|
4
|
-
module DSL
|
5
|
-
extend ActiveSupport::Concern
|
6
|
-
|
7
|
-
delegate :response_headers, :status, :response_body, :to => :client
|
8
|
-
delegate :request_method, :request_headers, :request_body, :to => :destination
|
9
|
-
|
10
|
-
module ClassMethods
|
11
|
-
def self.define_action(method)
|
12
|
-
define_method method do |*args, &block|
|
13
|
-
options = if args.last.is_a?(Hash) then args.pop else {} end
|
14
|
-
options[:method] = method
|
15
|
-
options[:route] = args.first
|
16
|
-
args.push(options)
|
17
|
-
args[0] = "#{method.to_s.upcase} #{args[0]}"
|
18
|
-
context(*args, &block)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
define_action :get
|
23
|
-
define_action :post
|
24
|
-
define_action :put
|
25
|
-
define_action :delete
|
26
|
-
|
27
|
-
def parameter(name, description, options = {})
|
28
|
-
parameters.push(options.merge(:name => name.to_s, :description => description))
|
29
|
-
end
|
30
|
-
|
31
|
-
def required_parameters(*names)
|
32
|
-
names.each do |name|
|
33
|
-
param = parameters.find { |param| param[:name] == name.to_s }
|
34
|
-
raise "Undefined parameters can not be required." unless param
|
35
|
-
param[:required] = true
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def callback(description, &block)
|
40
|
-
require 'webmock'
|
41
|
-
self.send(:include, WebMock::API)
|
42
|
-
context(description, &block)
|
43
|
-
end
|
44
|
-
|
45
|
-
def trigger_callback(&block)
|
46
|
-
define_method(:do_callback) do
|
47
|
-
require 'rack'
|
48
|
-
stub_request(:any, callback_url).to_rack(destination)
|
49
|
-
instance_eval &block
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
def scope_parameters(scope, keys)
|
54
|
-
return unless metadata[:parameters]
|
55
|
-
|
56
|
-
if keys == :all
|
57
|
-
keys = parameter_keys.map(&:to_s)
|
58
|
-
else
|
59
|
-
keys = keys.map(&:to_s)
|
60
|
-
end
|
61
|
-
|
62
|
-
keys.each do |key|
|
63
|
-
param = parameters.detect { |param| param[:name] == key }
|
64
|
-
param[:scope] = scope if param
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
def example_request(description, params = {}, &block)
|
69
|
-
file_path = caller.first[0, caller.first =~ /:/]
|
70
|
-
|
71
|
-
location = caller.first[0, caller.first =~ /(:in|$)/]
|
72
|
-
location = RSpec::Core::Formatters::BaseFormatter::relative_path(location)
|
73
|
-
|
74
|
-
example description, :location => location, :file_path => file_path do
|
75
|
-
do_request(params)
|
76
|
-
instance_eval &block if block_given?
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
private
|
81
|
-
def parameters
|
82
|
-
metadata[:parameters] ||= []
|
83
|
-
if superclass_metadata && metadata[:parameters].equal?(superclass_metadata[:parameters])
|
84
|
-
metadata[:parameters] = Marshal.load(Marshal.dump(superclass_metadata[:parameters]))
|
85
|
-
end
|
86
|
-
metadata[:parameters]
|
87
|
-
end
|
88
|
-
|
89
|
-
def parameter_keys
|
90
|
-
parameters.map { |param| param[:name] }
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
def client
|
95
|
-
@client ||= RackTestClient.new(self)
|
96
|
-
end
|
97
|
-
|
98
|
-
def destination
|
99
|
-
@destination ||= TestServer.new(self)
|
100
|
-
end
|
101
|
-
|
102
|
-
def callback_url
|
103
|
-
raise "You must define callback_url"
|
104
|
-
end
|
105
|
-
|
106
|
-
def do_request(extra_params = {})
|
107
|
-
@extra_params = extra_params
|
108
|
-
|
109
|
-
params_or_body = nil
|
110
|
-
path_or_query = path
|
111
|
-
|
112
|
-
if method == :get && !query_string.blank?
|
113
|
-
path_or_query = path + "?#{query_string}"
|
114
|
-
else
|
115
|
-
params_or_body = respond_to?(:raw_post) ? raw_post : params
|
116
|
-
end
|
117
|
-
|
118
|
-
client.send(method, path_or_query, params_or_body)
|
119
|
-
end
|
120
|
-
|
121
|
-
def no_doc(&block)
|
122
|
-
requests = example.metadata[:requests]
|
123
|
-
example.metadata[:requests] = []
|
124
|
-
|
125
|
-
instance_eval &block
|
126
|
-
|
127
|
-
example.metadata[:requests] = requests
|
128
|
-
end
|
129
|
-
|
130
|
-
def query_string
|
131
|
-
query = params.to_a.map do |param|
|
132
|
-
param.map! { |a| CGI.escape(a.to_s) }
|
133
|
-
param.join("=")
|
134
|
-
end
|
135
|
-
query.join("&")
|
136
|
-
end
|
137
|
-
|
138
|
-
def params
|
139
|
-
return unless example.metadata[:parameters]
|
140
|
-
parameters = example.metadata[:parameters].inject({}) do |hash, param|
|
141
|
-
set_param(hash, param)
|
142
|
-
end
|
143
|
-
parameters.merge!(extra_params)
|
144
|
-
parameters
|
145
|
-
end
|
146
|
-
|
147
|
-
def method
|
148
|
-
example.metadata[:method]
|
149
|
-
end
|
150
|
-
|
151
|
-
def in_path?(param)
|
152
|
-
path_params.include?(param)
|
153
|
-
end
|
154
|
-
|
155
|
-
def path_params
|
156
|
-
example.metadata[:route].scan(/:(\w+)/).flatten
|
157
|
-
end
|
158
|
-
|
159
|
-
def path
|
160
|
-
example.metadata[:route].gsub(/:(\w+)/) do |match|
|
161
|
-
if extra_params.keys.include?($1)
|
162
|
-
delete_extra_param($1)
|
163
|
-
elsif respond_to?($1)
|
164
|
-
send($1)
|
165
|
-
else
|
166
|
-
match
|
167
|
-
end
|
168
|
-
end
|
169
|
-
end
|
170
|
-
|
171
|
-
def app
|
172
|
-
RspecApiDocumentation.configuration.app
|
173
|
-
end
|
174
|
-
|
175
|
-
def explanation(text)
|
176
|
-
example.metadata[:explanation] = text
|
177
|
-
end
|
178
|
-
|
179
|
-
private
|
180
|
-
def extra_params
|
181
|
-
return {} if @extra_params.nil?
|
182
|
-
@extra_params.inject({}) do |h, (k, v)|
|
183
|
-
h[k.to_s] = v
|
184
|
-
h
|
185
|
-
end
|
186
|
-
end
|
187
|
-
|
188
|
-
def delete_extra_param(key)
|
189
|
-
@extra_params.delete(key.to_sym) || @extra_params.delete(key.to_s)
|
190
|
-
end
|
191
|
-
|
192
|
-
def set_param(hash, param)
|
193
|
-
key = param[:name]
|
194
|
-
return hash if !respond_to?(key) || in_path?(key)
|
195
|
-
|
196
|
-
if param[:scope]
|
197
|
-
hash[param[:scope].to_s] ||= {}
|
198
|
-
hash[param[:scope].to_s][key] = send(key)
|
199
|
-
else
|
200
|
-
hash[key] = send(key)
|
201
|
-
end
|
202
|
-
|
203
|
-
hash
|
204
|
-
end
|
205
|
-
end
|
206
|
-
end
|
1
|
+
require "rspec_api_documentation/dsl/resource"
|
2
|
+
require "rspec_api_documentation/dsl/endpoint"
|
3
|
+
require "rspec_api_documentation/dsl/callback"
|
207
4
|
|
208
5
|
def self.resource(*args, &block)
|
209
6
|
options = if args.last.is_a?(Hash) then args.pop else {} end
|
210
|
-
options[:
|
7
|
+
options[:api_doc_dsl] = :resource
|
211
8
|
options[:resource_name] = args.first
|
212
9
|
options[:document] ||= :all
|
213
10
|
args.push(options)
|
214
11
|
describe(*args, &block)
|
215
12
|
end
|
216
13
|
|
217
|
-
RSpec.configuration.include RspecApiDocumentation::DSL, :
|
14
|
+
RSpec.configuration.include RspecApiDocumentation::DSL::Resource, :api_doc_dsl => :resource
|
15
|
+
RSpec.configuration.include RspecApiDocumentation::DSL::Endpoint, :api_doc_dsl => :endpoint
|
16
|
+
RSpec.configuration.include RspecApiDocumentation::DSL::Callback, :api_doc_dsl => :callback
|
218
17
|
RSpec.configuration.backtrace_clean_patterns << %r{lib/rspec_api_documentation/dsl\.rb}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module RspecApiDocumentation::DSL
|
2
|
+
module Callback
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
delegate :request_method, :request_headers, :request_body, :to => :destination
|
6
|
+
|
7
|
+
module ClassMethods
|
8
|
+
def trigger_callback(&block)
|
9
|
+
define_method(:do_callback) do
|
10
|
+
require 'rack'
|
11
|
+
stub_request(:any, callback_url).to_rack(destination)
|
12
|
+
instance_eval &block
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def destination
|
18
|
+
@destination ||= RspecApiDocumentation::TestServer.new(self)
|
19
|
+
end
|
20
|
+
|
21
|
+
def callback_url
|
22
|
+
raise "You must define callback_url"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
require 'rspec/core/formatters/base_formatter'
|
2
|
+
|
3
|
+
module RspecApiDocumentation::DSL
|
4
|
+
module Endpoint
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
delegate :response_headers, :status, :response_body, :to => :client
|
8
|
+
|
9
|
+
module ClassMethods
|
10
|
+
def example_request(description, params = {}, &block)
|
11
|
+
file_path = caller.first[0, caller.first =~ /:/]
|
12
|
+
|
13
|
+
location = caller.first[0, caller.first =~ /(:in|$)/]
|
14
|
+
location = relative_path(location)
|
15
|
+
|
16
|
+
example description, :location => location, :file_path => file_path do
|
17
|
+
do_request(params)
|
18
|
+
instance_eval &block if block_given?
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
# from rspec-core
|
24
|
+
def relative_path(line)
|
25
|
+
line = line.sub(File.expand_path("."), ".")
|
26
|
+
line = line.sub(/\A([^:]+:\d+)$/, '\\1')
|
27
|
+
return nil if line == '-e:1'
|
28
|
+
line
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def do_request(extra_params = {})
|
33
|
+
@extra_params = extra_params
|
34
|
+
|
35
|
+
params_or_body = nil
|
36
|
+
path_or_query = path
|
37
|
+
|
38
|
+
if method == :get && !query_string.blank?
|
39
|
+
path_or_query = path + "?#{query_string}"
|
40
|
+
else
|
41
|
+
params_or_body = respond_to?(:raw_post) ? raw_post : params
|
42
|
+
end
|
43
|
+
|
44
|
+
client.send(method, path_or_query, params_or_body)
|
45
|
+
end
|
46
|
+
|
47
|
+
def query_string
|
48
|
+
query = params.to_a.map do |param|
|
49
|
+
param.map! { |a| CGI.escape(a.to_s) }
|
50
|
+
param.join("=")
|
51
|
+
end
|
52
|
+
query.join("&")
|
53
|
+
end
|
54
|
+
|
55
|
+
def params
|
56
|
+
return unless example.metadata[:parameters]
|
57
|
+
parameters = example.metadata[:parameters].inject({}) do |hash, param|
|
58
|
+
set_param(hash, param)
|
59
|
+
end
|
60
|
+
parameters.merge!(extra_params)
|
61
|
+
parameters
|
62
|
+
end
|
63
|
+
|
64
|
+
def method
|
65
|
+
example.metadata[:method]
|
66
|
+
end
|
67
|
+
|
68
|
+
def in_path?(param)
|
69
|
+
path_params.include?(param)
|
70
|
+
end
|
71
|
+
|
72
|
+
def path_params
|
73
|
+
example.metadata[:route].scan(/:(\w+)/).flatten
|
74
|
+
end
|
75
|
+
|
76
|
+
def path
|
77
|
+
example.metadata[:route].gsub(/:(\w+)/) do |match|
|
78
|
+
if extra_params.keys.include?($1)
|
79
|
+
delete_extra_param($1)
|
80
|
+
elsif respond_to?($1)
|
81
|
+
send($1)
|
82
|
+
else
|
83
|
+
match
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def explanation(text)
|
89
|
+
example.metadata[:explanation] = text
|
90
|
+
end
|
91
|
+
|
92
|
+
private
|
93
|
+
def extra_params
|
94
|
+
return {} if @extra_params.nil?
|
95
|
+
@extra_params.inject({}) do |h, (k, v)|
|
96
|
+
h[k.to_s] = v
|
97
|
+
h
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
def delete_extra_param(key)
|
102
|
+
@extra_params.delete(key.to_sym) || @extra_params.delete(key.to_s)
|
103
|
+
end
|
104
|
+
|
105
|
+
def set_param(hash, param)
|
106
|
+
key = param[:name]
|
107
|
+
return hash if !respond_to?(key) || in_path?(key)
|
108
|
+
|
109
|
+
if param[:scope]
|
110
|
+
hash[param[:scope].to_s] ||= {}
|
111
|
+
hash[param[:scope].to_s][key] = send(key)
|
112
|
+
else
|
113
|
+
hash[key] = send(key)
|
114
|
+
end
|
115
|
+
|
116
|
+
hash
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
module RspecApiDocumentation::DSL
|
2
|
+
module Resource
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
module ClassMethods
|
6
|
+
def self.define_action(method)
|
7
|
+
define_method method do |*args, &block|
|
8
|
+
options = if args.last.is_a?(Hash) then args.pop else {} end
|
9
|
+
options[:method] = method
|
10
|
+
options[:route] = args.first
|
11
|
+
options[:api_doc_dsl] = :endpoint
|
12
|
+
args.push(options)
|
13
|
+
args[0] = "#{method.to_s.upcase} #{args[0]}"
|
14
|
+
context(*args, &block)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
define_action :get
|
19
|
+
define_action :post
|
20
|
+
define_action :put
|
21
|
+
define_action :delete
|
22
|
+
|
23
|
+
def callback(*args, &block)
|
24
|
+
require 'webmock'
|
25
|
+
self.send(:include, WebMock::API)
|
26
|
+
|
27
|
+
options = if args.last.is_a?(Hash) then args.pop else {} end
|
28
|
+
options[:api_doc_dsl] = :callback
|
29
|
+
args.push(options)
|
30
|
+
|
31
|
+
context(*args, &block)
|
32
|
+
end
|
33
|
+
|
34
|
+
def parameter(name, description, options = {})
|
35
|
+
parameters.push(options.merge(:name => name.to_s, :description => description))
|
36
|
+
end
|
37
|
+
|
38
|
+
def required_parameters(*names)
|
39
|
+
names.each do |name|
|
40
|
+
param = parameters.find { |param| param[:name] == name.to_s }
|
41
|
+
raise "Undefined parameters can not be required." unless param
|
42
|
+
param[:required] = true
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def scope_parameters(scope, keys)
|
47
|
+
return unless metadata[:parameters]
|
48
|
+
|
49
|
+
if keys == :all
|
50
|
+
keys = parameter_keys.map(&:to_s)
|
51
|
+
else
|
52
|
+
keys = keys.map(&:to_s)
|
53
|
+
end
|
54
|
+
|
55
|
+
keys.each do |key|
|
56
|
+
param = parameters.detect { |param| param[:name] == key }
|
57
|
+
param[:scope] = scope if param
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
private
|
62
|
+
def parameters
|
63
|
+
metadata[:parameters] ||= []
|
64
|
+
if superclass_metadata && metadata[:parameters].equal?(superclass_metadata[:parameters])
|
65
|
+
metadata[:parameters] = Marshal.load(Marshal.dump(superclass_metadata[:parameters]))
|
66
|
+
end
|
67
|
+
metadata[:parameters]
|
68
|
+
end
|
69
|
+
|
70
|
+
def parameter_keys
|
71
|
+
parameters.map { |param| param[:name] }
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def app
|
76
|
+
RspecApiDocumentation.configuration.app
|
77
|
+
end
|
78
|
+
|
79
|
+
def client
|
80
|
+
@client ||= RspecApiDocumentation::RackTestClient.new(self)
|
81
|
+
end
|
82
|
+
|
83
|
+
def no_doc(&block)
|
84
|
+
requests = example.metadata[:requests]
|
85
|
+
example.metadata[:requests] = []
|
86
|
+
|
87
|
+
instance_eval &block
|
88
|
+
|
89
|
+
example.metadata[:requests] = requests
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_api_documentation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-05-14 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rspec
|
18
|
-
requirement:
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ! '>='
|
@@ -23,10 +23,15 @@ dependencies:
|
|
23
23
|
version: 2.6.0
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements:
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ! '>='
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 2.6.0
|
27
32
|
- !ruby/object:Gem::Dependency
|
28
33
|
name: activesupport
|
29
|
-
requirement:
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
30
35
|
none: false
|
31
36
|
requirements:
|
32
37
|
- - ! '>='
|
@@ -34,10 +39,15 @@ dependencies:
|
|
34
39
|
version: 3.0.0
|
35
40
|
type: :runtime
|
36
41
|
prerelease: false
|
37
|
-
version_requirements:
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.0.0
|
38
48
|
- !ruby/object:Gem::Dependency
|
39
49
|
name: i18n
|
40
|
-
requirement:
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
41
51
|
none: false
|
42
52
|
requirements:
|
43
53
|
- - ! '>='
|
@@ -45,10 +55,15 @@ dependencies:
|
|
45
55
|
version: 0.1.0
|
46
56
|
type: :runtime
|
47
57
|
prerelease: false
|
48
|
-
version_requirements:
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ! '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 0.1.0
|
49
64
|
- !ruby/object:Gem::Dependency
|
50
65
|
name: mustache
|
51
|
-
requirement:
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
52
67
|
none: false
|
53
68
|
requirements:
|
54
69
|
- - ! '>='
|
@@ -56,10 +71,15 @@ dependencies:
|
|
56
71
|
version: 0.99.4
|
57
72
|
type: :runtime
|
58
73
|
prerelease: false
|
59
|
-
version_requirements:
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 0.99.4
|
60
80
|
- !ruby/object:Gem::Dependency
|
61
81
|
name: webmock
|
62
|
-
requirement:
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
63
83
|
none: false
|
64
84
|
requirements:
|
65
85
|
- - ! '>='
|
@@ -67,10 +87,15 @@ dependencies:
|
|
67
87
|
version: 1.7.0
|
68
88
|
type: :runtime
|
69
89
|
prerelease: false
|
70
|
-
version_requirements:
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 1.7.0
|
71
96
|
- !ruby/object:Gem::Dependency
|
72
97
|
name: json
|
73
|
-
requirement:
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
74
99
|
none: false
|
75
100
|
requirements:
|
76
101
|
- - ! '>='
|
@@ -78,10 +103,15 @@ dependencies:
|
|
78
103
|
version: 1.4.6
|
79
104
|
type: :runtime
|
80
105
|
prerelease: false
|
81
|
-
version_requirements:
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ! '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 1.4.6
|
82
112
|
- !ruby/object:Gem::Dependency
|
83
113
|
name: coderay
|
84
|
-
requirement:
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
85
115
|
none: false
|
86
116
|
requirements:
|
87
117
|
- - ! '>='
|
@@ -89,10 +119,15 @@ dependencies:
|
|
89
119
|
version: 1.0.7.rc1
|
90
120
|
type: :runtime
|
91
121
|
prerelease: false
|
92
|
-
version_requirements:
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ! '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: 1.0.7.rc1
|
93
128
|
- !ruby/object:Gem::Dependency
|
94
129
|
name: fakefs
|
95
|
-
requirement:
|
130
|
+
requirement: !ruby/object:Gem::Requirement
|
96
131
|
none: false
|
97
132
|
requirements:
|
98
133
|
- - ! '>='
|
@@ -100,10 +135,15 @@ dependencies:
|
|
100
135
|
version: '0'
|
101
136
|
type: :development
|
102
137
|
prerelease: false
|
103
|
-
version_requirements:
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
139
|
+
none: false
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
104
144
|
- !ruby/object:Gem::Dependency
|
105
145
|
name: sinatra
|
106
|
-
requirement:
|
146
|
+
requirement: !ruby/object:Gem::Requirement
|
107
147
|
none: false
|
108
148
|
requirements:
|
109
149
|
- - ! '>='
|
@@ -111,10 +151,15 @@ dependencies:
|
|
111
151
|
version: '0'
|
112
152
|
type: :development
|
113
153
|
prerelease: false
|
114
|
-
version_requirements:
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
none: false
|
156
|
+
requirements:
|
157
|
+
- - ! '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
115
160
|
- !ruby/object:Gem::Dependency
|
116
161
|
name: aruba
|
117
|
-
requirement:
|
162
|
+
requirement: !ruby/object:Gem::Requirement
|
118
163
|
none: false
|
119
164
|
requirements:
|
120
165
|
- - ! '>='
|
@@ -122,10 +167,15 @@ dependencies:
|
|
122
167
|
version: '0'
|
123
168
|
type: :development
|
124
169
|
prerelease: false
|
125
|
-
version_requirements:
|
170
|
+
version_requirements: !ruby/object:Gem::Requirement
|
171
|
+
none: false
|
172
|
+
requirements:
|
173
|
+
- - ! '>='
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: '0'
|
126
176
|
- !ruby/object:Gem::Dependency
|
127
177
|
name: capybara
|
128
|
-
requirement:
|
178
|
+
requirement: !ruby/object:Gem::Requirement
|
129
179
|
none: false
|
130
180
|
requirements:
|
131
181
|
- - ! '>='
|
@@ -133,10 +183,15 @@ dependencies:
|
|
133
183
|
version: '0'
|
134
184
|
type: :development
|
135
185
|
prerelease: false
|
136
|
-
version_requirements:
|
186
|
+
version_requirements: !ruby/object:Gem::Requirement
|
187
|
+
none: false
|
188
|
+
requirements:
|
189
|
+
- - ! '>='
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
137
192
|
- !ruby/object:Gem::Dependency
|
138
193
|
name: rake
|
139
|
-
requirement:
|
194
|
+
requirement: !ruby/object:Gem::Requirement
|
140
195
|
none: false
|
141
196
|
requirements:
|
142
197
|
- - ! '>='
|
@@ -144,10 +199,15 @@ dependencies:
|
|
144
199
|
version: '0'
|
145
200
|
type: :development
|
146
201
|
prerelease: false
|
147
|
-
version_requirements:
|
202
|
+
version_requirements: !ruby/object:Gem::Requirement
|
203
|
+
none: false
|
204
|
+
requirements:
|
205
|
+
- - ! '>='
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
148
208
|
- !ruby/object:Gem::Dependency
|
149
209
|
name: rack-test
|
150
|
-
requirement:
|
210
|
+
requirement: !ruby/object:Gem::Requirement
|
151
211
|
none: false
|
152
212
|
requirements:
|
153
213
|
- - ! '>='
|
@@ -155,10 +215,15 @@ dependencies:
|
|
155
215
|
version: 0.5.5
|
156
216
|
type: :development
|
157
217
|
prerelease: false
|
158
|
-
version_requirements:
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
none: false
|
220
|
+
requirements:
|
221
|
+
- - ! '>='
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
version: 0.5.5
|
159
224
|
- !ruby/object:Gem::Dependency
|
160
225
|
name: rack-oauth2
|
161
|
-
requirement:
|
226
|
+
requirement: !ruby/object:Gem::Requirement
|
162
227
|
none: false
|
163
228
|
requirements:
|
164
229
|
- - ! '>='
|
@@ -166,7 +231,12 @@ dependencies:
|
|
166
231
|
version: 0.14.4
|
167
232
|
type: :development
|
168
233
|
prerelease: false
|
169
|
-
version_requirements:
|
234
|
+
version_requirements: !ruby/object:Gem::Requirement
|
235
|
+
none: false
|
236
|
+
requirements:
|
237
|
+
- - ! '>='
|
238
|
+
- !ruby/object:Gem::Version
|
239
|
+
version: 0.14.4
|
170
240
|
description: Generate API docs from your test suite
|
171
241
|
email:
|
172
242
|
- chris@smartlogicsolutions.com
|
@@ -181,6 +251,9 @@ files:
|
|
181
251
|
- lib/rspec_api_documentation/client_base.rb
|
182
252
|
- lib/rspec_api_documentation/configuration.rb
|
183
253
|
- lib/rspec_api_documentation/curl.rb
|
254
|
+
- lib/rspec_api_documentation/dsl/callback.rb
|
255
|
+
- lib/rspec_api_documentation/dsl/endpoint.rb
|
256
|
+
- lib/rspec_api_documentation/dsl/resource.rb
|
184
257
|
- lib/rspec_api_documentation/dsl.rb
|
185
258
|
- lib/rspec_api_documentation/example.rb
|
186
259
|
- lib/rspec_api_documentation/headers.rb
|
@@ -219,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
292
|
version: 1.3.6
|
220
293
|
requirements: []
|
221
294
|
rubyforge_project:
|
222
|
-
rubygems_version: 1.8.
|
295
|
+
rubygems_version: 1.8.22
|
223
296
|
signing_key:
|
224
297
|
specification_version: 3
|
225
298
|
summary: A double black belt for your docs
|