rspec_api_documentation 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,3 @@
1
- require 'rack/test'
2
- require 'webmock'
3
1
  require 'rspec/core/formatters/base_formatter'
4
2
 
5
3
  module RspecApiDocumentation
@@ -39,12 +37,14 @@ module RspecApiDocumentation
39
37
  end
40
38
 
41
39
  def callback(description, &block)
40
+ require 'webmock'
42
41
  self.send(:include, WebMock::API)
43
42
  context(description, &block)
44
43
  end
45
44
 
46
45
  def trigger_callback(&block)
47
46
  define_method(:do_callback) do
47
+ require 'rack'
48
48
  stub_request(:any, callback_url).to_rack(destination)
49
49
  instance_eval &block
50
50
  end
@@ -1,3 +1,11 @@
1
+ begin
2
+ require "active_support/secure_random"
3
+ rescue LoadError
4
+ # ActiveSupport::SecureRandom not provided in activesupport >= 3.2
5
+ end
6
+ require "webmock"
7
+ require "rack/oauth2"
8
+
1
9
  module RspecApiDocumentation
2
10
  class OAuth2MACClient < ClientBase
3
11
  include WebMock::API
@@ -1,5 +1,3 @@
1
- require "coderay"
2
-
3
1
  module RspecApiDocumentation
4
2
  class RackTestClient < ClientBase
5
3
 
@@ -41,6 +39,7 @@ module RspecApiDocumentation
41
39
  def rack_test_session
42
40
  @rack_test_session ||= Struct.new(:app) do
43
41
  begin
42
+ require "rack/test"
44
43
  include Rack::Test::Methods
45
44
  rescue LoadError
46
45
  raise "#{self.class.name} requires Rack::Test >= 0.5.5. Please add it to your test dependencies."
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.0
4
+ version: 0.5.1
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-04-24 00:00:00.000000000Z
14
+ date: 2012-04-25 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec
18
- requirement: &70224876720480 !ruby/object:Gem::Requirement
18
+ requirement: &70231343311200 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 2.6.0
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *70224876720480
26
+ version_requirements: *70231343311200
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
- requirement: &70224876719900 !ruby/object:Gem::Requirement
29
+ requirement: &70231343308540 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: 3.0.0
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *70224876719900
37
+ version_requirements: *70231343308540
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: i18n
40
- requirement: &70224876719320 !ruby/object:Gem::Requirement
40
+ requirement: &70231343307960 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,21 +45,21 @@ dependencies:
45
45
  version: 0.1.0
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *70224876719320
48
+ version_requirements: *70231343307960
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: mustache
51
- requirement: &70224876718740 !ruby/object:Gem::Requirement
51
+ requirement: &70231343307180 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.99.0
56
+ version: 0.99.4
57
57
  type: :runtime
58
58
  prerelease: false
59
- version_requirements: *70224876718740
59
+ version_requirements: *70231343307180
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: webmock
62
- requirement: &70224876718160 !ruby/object:Gem::Requirement
62
+ requirement: &70231343306160 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,21 +67,21 @@ dependencies:
67
67
  version: 1.7.0
68
68
  type: :runtime
69
69
  prerelease: false
70
- version_requirements: *70224876718160
70
+ version_requirements: *70231343306160
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: json
73
- requirement: &70224876717600 !ruby/object:Gem::Requirement
73
+ requirement: &70231343305120 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
77
77
  - !ruby/object:Gem::Version
78
- version: 1.4.0
78
+ version: 1.4.6
79
79
  type: :runtime
80
80
  prerelease: false
81
- version_requirements: *70224876717600
81
+ version_requirements: *70231343305120
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: coderay
84
- requirement: &70224876715300 !ruby/object:Gem::Requirement
84
+ requirement: &70231343303560 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ! '>='
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: 1.0.7.rc1
90
90
  type: :runtime
91
91
  prerelease: false
92
- version_requirements: *70224876715300
92
+ version_requirements: *70231343303560
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: fakefs
95
- requirement: &70224876714800 !ruby/object:Gem::Requirement
95
+ requirement: &70231343302400 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ! '>='
@@ -100,10 +100,10 @@ dependencies:
100
100
  version: '0'
101
101
  type: :development
102
102
  prerelease: false
103
- version_requirements: *70224876714800
103
+ version_requirements: *70231343302400
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: sinatra
106
- requirement: &70224876714220 !ruby/object:Gem::Requirement
106
+ requirement: &70231343301140 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
109
  - - ! '>='
@@ -111,10 +111,10 @@ dependencies:
111
111
  version: '0'
112
112
  type: :development
113
113
  prerelease: false
114
- version_requirements: *70224876714220
114
+ version_requirements: *70231343301140
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: aruba
117
- requirement: &70224876713680 !ruby/object:Gem::Requirement
117
+ requirement: &70231343300100 !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
120
120
  - - ! '>='
@@ -122,10 +122,10 @@ dependencies:
122
122
  version: '0'
123
123
  type: :development
124
124
  prerelease: false
125
- version_requirements: *70224876713680
125
+ version_requirements: *70231343300100
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: capybara
128
- requirement: &70224876713140 !ruby/object:Gem::Requirement
128
+ requirement: &70231343299600 !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
131
  - - ! '>='
@@ -133,10 +133,10 @@ dependencies:
133
133
  version: '0'
134
134
  type: :development
135
135
  prerelease: false
136
- version_requirements: *70224876713140
136
+ version_requirements: *70231343299600
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: rake
139
- requirement: &70224876712660 !ruby/object:Gem::Requirement
139
+ requirement: &70231343299140 !ruby/object:Gem::Requirement
140
140
  none: false
141
141
  requirements:
142
142
  - - ! '>='
@@ -144,18 +144,29 @@ dependencies:
144
144
  version: '0'
145
145
  type: :development
146
146
  prerelease: false
147
- version_requirements: *70224876712660
147
+ version_requirements: *70231343299140
148
+ - !ruby/object:Gem::Dependency
149
+ name: rack-test
150
+ requirement: &70231343298220 !ruby/object:Gem::Requirement
151
+ none: false
152
+ requirements:
153
+ - - ! '>='
154
+ - !ruby/object:Gem::Version
155
+ version: 0.5.5
156
+ type: :development
157
+ prerelease: false
158
+ version_requirements: *70231343298220
148
159
  - !ruby/object:Gem::Dependency
149
160
  name: rack-oauth2
150
- requirement: &70224876712240 !ruby/object:Gem::Requirement
161
+ requirement: &70231343297460 !ruby/object:Gem::Requirement
151
162
  none: false
152
163
  requirements:
153
164
  - - ! '>='
154
165
  - !ruby/object:Gem::Version
155
- version: '0'
166
+ version: 0.14.4
156
167
  type: :development
157
168
  prerelease: false
158
- version_requirements: *70224876712240
169
+ version_requirements: *70231343297460
159
170
  description: Generate API docs from your test suite
160
171
  email:
161
172
  - chris@smartlogicsolutions.com