respect-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. data/FAQ.md +98 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +291 -0
  4. data/RELATED_WORK.md +47 -0
  5. data/RELEASE_NOTES.md +20 -0
  6. data/Rakefile +32 -0
  7. data/app/assets/javascripts/respect/rails/schemas.js +32 -0
  8. data/app/assets/stylesheets/respect/rails/schemas.css +160 -0
  9. data/app/controllers/respect/rails/schemas_controller.rb +36 -0
  10. data/app/helpers/respect/rails/schemas_helper.rb +78 -0
  11. data/app/views/layouts/respect/rails/schemas.html.erb +14 -0
  12. data/app/views/respect/rails/request_validation_exception.html.erb +38 -0
  13. data/app/views/respect/rails/schemas/doc.html.erb +158 -0
  14. data/app/views/respect/rails/schemas/index.html.erb +4 -0
  15. data/config/routes.rb +4 -0
  16. data/lib/respect/rails/action_def.rb +37 -0
  17. data/lib/respect/rails/action_schema.rb +41 -0
  18. data/lib/respect/rails/application_info.rb +26 -0
  19. data/lib/respect/rails/controller_helper.rb +107 -0
  20. data/lib/respect/rails/engine.rb +63 -0
  21. data/lib/respect/rails/engine_info.rb +27 -0
  22. data/lib/respect/rails/headers_helper.rb +11 -0
  23. data/lib/respect/rails/headers_simplifier.rb +31 -0
  24. data/lib/respect/rails/info.rb +72 -0
  25. data/lib/respect/rails/request_def.rb +38 -0
  26. data/lib/respect/rails/request_helper.rb +101 -0
  27. data/lib/respect/rails/request_schema.rb +102 -0
  28. data/lib/respect/rails/response_def.rb +43 -0
  29. data/lib/respect/rails/response_helper.rb +67 -0
  30. data/lib/respect/rails/response_schema.rb +84 -0
  31. data/lib/respect/rails/response_schema_set.rb +60 -0
  32. data/lib/respect/rails/route_info.rb +101 -0
  33. data/lib/respect/rails/version.rb +5 -0
  34. data/lib/respect/rails.rb +74 -0
  35. data/lib/tasks/respect_tasks.rake +4 -0
  36. data/test/dummy/README.rdoc +261 -0
  37. data/test/dummy/Rakefile +7 -0
  38. data/test/dummy/app/assets/javascripts/application.js +15 -0
  39. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  40. data/test/dummy/app/controllers/application_controller.rb +3 -0
  41. data/test/dummy/app/controllers/automatic_validation_controller.rb +300 -0
  42. data/test/dummy/app/controllers/caught_exception_controller.rb +58 -0
  43. data/test/dummy/app/controllers/disabled_controller.rb +37 -0
  44. data/test/dummy/app/controllers/manual_validation_controller.rb +63 -0
  45. data/test/dummy/app/controllers/no_schema_controller.rb +17 -0
  46. data/test/dummy/app/controllers/skipped_automatic_validation_controller.rb +35 -0
  47. data/test/dummy/app/helpers/application_helper.rb +2 -0
  48. data/test/dummy/app/helpers/respect/application_macros.rb +10 -0
  49. data/test/dummy/app/helpers/respect/circle_schema.rb +16 -0
  50. data/test/dummy/app/helpers/respect/point_schema.rb +19 -0
  51. data/test/dummy/app/helpers/respect/rgba_schema.rb +18 -0
  52. data/test/dummy/app/views/automatic_validation/request_format.html.erb +1 -0
  53. data/test/dummy/app/views/automatic_validation/request_format.pdf.erb +1 -0
  54. data/test/dummy/app/views/caught_exception/response_validator.html.erb +1 -0
  55. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  56. data/test/dummy/config/application.rb +58 -0
  57. data/test/dummy/config/boot.rb +10 -0
  58. data/test/dummy/config/database.yml +25 -0
  59. data/test/dummy/config/environment.rb +5 -0
  60. data/test/dummy/config/environments/development.rb +37 -0
  61. data/test/dummy/config/environments/production.rb +67 -0
  62. data/test/dummy/config/environments/test.rb +37 -0
  63. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  64. data/test/dummy/config/initializers/inflections.rb +15 -0
  65. data/test/dummy/config/initializers/mime_types.rb +5 -0
  66. data/test/dummy/config/initializers/respect.rb +9 -0
  67. data/test/dummy/config/initializers/secret_token.rb +7 -0
  68. data/test/dummy/config/initializers/session_store.rb +8 -0
  69. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  70. data/test/dummy/config/locales/en.yml +5 -0
  71. data/test/dummy/config/routes.rb +38 -0
  72. data/test/dummy/config.ru +4 -0
  73. data/test/dummy/db/development.sqlite3 +0 -0
  74. data/test/dummy/db/schema.rb +16 -0
  75. data/test/dummy/db/test.sqlite3 +0 -0
  76. data/test/dummy/lib/exts/Rgba.rb +11 -0
  77. data/test/dummy/lib/exts/circle.rb +11 -0
  78. data/test/dummy/lib/exts/point.rb +11 -0
  79. data/test/dummy/log/development.log +6 -0
  80. data/test/dummy/log/test.log +851 -0
  81. data/test/dummy/public/404.html +26 -0
  82. data/test/dummy/public/422.html +26 -0
  83. data/test/dummy/public/500.html +25 -0
  84. data/test/dummy/public/favicon.ico +0 -0
  85. data/test/dummy/script/rails +6 -0
  86. data/test/functional/automatic_validation_controller_test.rb +131 -0
  87. data/test/functional/caught_exception_controller_test.rb +50 -0
  88. data/test/functional/disabled_controller_test.rb +16 -0
  89. data/test/functional/manual_validation_controller_test.rb +24 -0
  90. data/test/functional/no_schema_controller_test.rb +12 -0
  91. data/test/functional/respect/rails/schemas_controller_test.rb +18 -0
  92. data/test/functional/skipped_automatic_validation_controller_test.rb +12 -0
  93. data/test/headers_can_dumped_in_json.sh +33 -0
  94. data/test/integration/navigation_test.rb +38 -0
  95. data/test/request_headers_validation_in_dev_mode.sh +33 -0
  96. data/test/test_helper.rb +17 -0
  97. data/test/unit/action_schema_test.rb +21 -0
  98. data/test/unit/application_info_test.rb +11 -0
  99. data/test/unit/controller_helper_test.rb +4 -0
  100. data/test/unit/engine_info_test.rb +11 -0
  101. data/test/unit/engine_test.rb +7 -0
  102. data/test/unit/info_test.rb +42 -0
  103. data/test/unit/request_def_test.rb +22 -0
  104. data/test/unit/request_helper_test.rb +67 -0
  105. data/test/unit/request_schema_test.rb +164 -0
  106. data/test/unit/response_def_test.rb +9 -0
  107. data/test/unit/response_helper_test.rb +73 -0
  108. data/test/unit/response_schema_set_test.rb +18 -0
  109. data/test/unit/response_schema_test.rb +147 -0
  110. metadata +334 -0
metadata ADDED
@@ -0,0 +1,334 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: respect-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Nicolas Despres
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-05-20 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.13
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 3.2.13
30
+ - !ruby/object:Gem::Dependency
31
+ name: respect
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 0.1.0
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.1.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: sqlite3
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: yard
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 0.8.5.2
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 0.8.5.2
78
+ - !ruby/object:Gem::Dependency
79
+ name: redcarpet
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 2.2.2
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 2.2.2
94
+ - !ruby/object:Gem::Dependency
95
+ name: mocha
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 0.14.0
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 0.14.0
110
+ description: Respect for Rails let's you write the documentation of your REST API
111
+ using Ruby code. Documentation is published using a Rails engine to stay synchronized.
112
+ Filter is available to validate requests and responses. Parameters are sanitized
113
+ so you get URI object instead of string object containing an URI.
114
+ email:
115
+ - nicolas.despres@gmail.com
116
+ executables: []
117
+ extensions: []
118
+ extra_rdoc_files: []
119
+ files:
120
+ - app/assets/javascripts/respect/rails/schemas.js
121
+ - app/assets/stylesheets/respect/rails/schemas.css
122
+ - app/controllers/respect/rails/schemas_controller.rb
123
+ - app/helpers/respect/rails/schemas_helper.rb
124
+ - app/views/layouts/respect/rails/schemas.html.erb
125
+ - app/views/respect/rails/request_validation_exception.html.erb
126
+ - app/views/respect/rails/schemas/doc.html.erb
127
+ - app/views/respect/rails/schemas/index.html.erb
128
+ - config/routes.rb
129
+ - lib/respect/rails/action_def.rb
130
+ - lib/respect/rails/action_schema.rb
131
+ - lib/respect/rails/application_info.rb
132
+ - lib/respect/rails/controller_helper.rb
133
+ - lib/respect/rails/engine.rb
134
+ - lib/respect/rails/engine_info.rb
135
+ - lib/respect/rails/headers_helper.rb
136
+ - lib/respect/rails/headers_simplifier.rb
137
+ - lib/respect/rails/info.rb
138
+ - lib/respect/rails/request_def.rb
139
+ - lib/respect/rails/request_helper.rb
140
+ - lib/respect/rails/request_schema.rb
141
+ - lib/respect/rails/response_def.rb
142
+ - lib/respect/rails/response_helper.rb
143
+ - lib/respect/rails/response_schema.rb
144
+ - lib/respect/rails/response_schema_set.rb
145
+ - lib/respect/rails/route_info.rb
146
+ - lib/respect/rails/version.rb
147
+ - lib/respect/rails.rb
148
+ - lib/tasks/respect_tasks.rake
149
+ - MIT-LICENSE
150
+ - Rakefile
151
+ - README.md
152
+ - FAQ.md
153
+ - RELEASE_NOTES.md
154
+ - RELATED_WORK.md
155
+ - test/dummy/app/assets/javascripts/application.js
156
+ - test/dummy/app/assets/stylesheets/application.css
157
+ - test/dummy/app/controllers/application_controller.rb
158
+ - test/dummy/app/controllers/automatic_validation_controller.rb
159
+ - test/dummy/app/controllers/caught_exception_controller.rb
160
+ - test/dummy/app/controllers/disabled_controller.rb
161
+ - test/dummy/app/controllers/manual_validation_controller.rb
162
+ - test/dummy/app/controllers/no_schema_controller.rb
163
+ - test/dummy/app/controllers/skipped_automatic_validation_controller.rb
164
+ - test/dummy/app/helpers/application_helper.rb
165
+ - test/dummy/app/helpers/respect/application_macros.rb
166
+ - test/dummy/app/helpers/respect/circle_schema.rb
167
+ - test/dummy/app/helpers/respect/point_schema.rb
168
+ - test/dummy/app/helpers/respect/rgba_schema.rb
169
+ - test/dummy/app/views/automatic_validation/request_format.html.erb
170
+ - test/dummy/app/views/automatic_validation/request_format.pdf.erb
171
+ - test/dummy/app/views/caught_exception/response_validator.html.erb
172
+ - test/dummy/app/views/layouts/application.html.erb
173
+ - test/dummy/config/application.rb
174
+ - test/dummy/config/boot.rb
175
+ - test/dummy/config/database.yml
176
+ - test/dummy/config/environment.rb
177
+ - test/dummy/config/environments/development.rb
178
+ - test/dummy/config/environments/production.rb
179
+ - test/dummy/config/environments/test.rb
180
+ - test/dummy/config/initializers/backtrace_silencers.rb
181
+ - test/dummy/config/initializers/inflections.rb
182
+ - test/dummy/config/initializers/mime_types.rb
183
+ - test/dummy/config/initializers/respect.rb
184
+ - test/dummy/config/initializers/secret_token.rb
185
+ - test/dummy/config/initializers/session_store.rb
186
+ - test/dummy/config/initializers/wrap_parameters.rb
187
+ - test/dummy/config/locales/en.yml
188
+ - test/dummy/config/routes.rb
189
+ - test/dummy/config.ru
190
+ - test/dummy/db/development.sqlite3
191
+ - test/dummy/db/schema.rb
192
+ - test/dummy/db/test.sqlite3
193
+ - test/dummy/lib/exts/circle.rb
194
+ - test/dummy/lib/exts/point.rb
195
+ - test/dummy/lib/exts/Rgba.rb
196
+ - test/dummy/log/development.log
197
+ - test/dummy/log/test.log
198
+ - test/dummy/public/404.html
199
+ - test/dummy/public/422.html
200
+ - test/dummy/public/500.html
201
+ - test/dummy/public/favicon.ico
202
+ - test/dummy/Rakefile
203
+ - test/dummy/README.rdoc
204
+ - test/dummy/script/rails
205
+ - test/functional/automatic_validation_controller_test.rb
206
+ - test/functional/caught_exception_controller_test.rb
207
+ - test/functional/disabled_controller_test.rb
208
+ - test/functional/manual_validation_controller_test.rb
209
+ - test/functional/no_schema_controller_test.rb
210
+ - test/functional/respect/rails/schemas_controller_test.rb
211
+ - test/functional/skipped_automatic_validation_controller_test.rb
212
+ - test/headers_can_dumped_in_json.sh
213
+ - test/integration/navigation_test.rb
214
+ - test/request_headers_validation_in_dev_mode.sh
215
+ - test/test_helper.rb
216
+ - test/unit/action_schema_test.rb
217
+ - test/unit/application_info_test.rb
218
+ - test/unit/controller_helper_test.rb
219
+ - test/unit/engine_info_test.rb
220
+ - test/unit/engine_test.rb
221
+ - test/unit/info_test.rb
222
+ - test/unit/request_def_test.rb
223
+ - test/unit/request_helper_test.rb
224
+ - test/unit/request_schema_test.rb
225
+ - test/unit/response_def_test.rb
226
+ - test/unit/response_helper_test.rb
227
+ - test/unit/response_schema_set_test.rb
228
+ - test/unit/response_schema_test.rb
229
+ homepage: http://nicolasdespres.github.io/respect-rails
230
+ licenses: []
231
+ post_install_message:
232
+ rdoc_options: []
233
+ require_paths:
234
+ - lib
235
+ required_ruby_version: !ruby/object:Gem::Requirement
236
+ none: false
237
+ requirements:
238
+ - - ! '>='
239
+ - !ruby/object:Gem::Version
240
+ version: '0'
241
+ segments:
242
+ - 0
243
+ hash: -2043891340029381641
244
+ required_rubygems_version: !ruby/object:Gem::Requirement
245
+ none: false
246
+ requirements:
247
+ - - ! '>='
248
+ - !ruby/object:Gem::Version
249
+ version: '0'
250
+ segments:
251
+ - 0
252
+ hash: -2043891340029381641
253
+ requirements: []
254
+ rubyforge_project:
255
+ rubygems_version: 1.8.23
256
+ signing_key:
257
+ specification_version: 3
258
+ summary: REST API specification/documentation tool for Rails.
259
+ test_files:
260
+ - test/dummy/app/assets/javascripts/application.js
261
+ - test/dummy/app/assets/stylesheets/application.css
262
+ - test/dummy/app/controllers/application_controller.rb
263
+ - test/dummy/app/controllers/automatic_validation_controller.rb
264
+ - test/dummy/app/controllers/caught_exception_controller.rb
265
+ - test/dummy/app/controllers/disabled_controller.rb
266
+ - test/dummy/app/controllers/manual_validation_controller.rb
267
+ - test/dummy/app/controllers/no_schema_controller.rb
268
+ - test/dummy/app/controllers/skipped_automatic_validation_controller.rb
269
+ - test/dummy/app/helpers/application_helper.rb
270
+ - test/dummy/app/helpers/respect/application_macros.rb
271
+ - test/dummy/app/helpers/respect/circle_schema.rb
272
+ - test/dummy/app/helpers/respect/point_schema.rb
273
+ - test/dummy/app/helpers/respect/rgba_schema.rb
274
+ - test/dummy/app/views/automatic_validation/request_format.html.erb
275
+ - test/dummy/app/views/automatic_validation/request_format.pdf.erb
276
+ - test/dummy/app/views/caught_exception/response_validator.html.erb
277
+ - test/dummy/app/views/layouts/application.html.erb
278
+ - test/dummy/config/application.rb
279
+ - test/dummy/config/boot.rb
280
+ - test/dummy/config/database.yml
281
+ - test/dummy/config/environment.rb
282
+ - test/dummy/config/environments/development.rb
283
+ - test/dummy/config/environments/production.rb
284
+ - test/dummy/config/environments/test.rb
285
+ - test/dummy/config/initializers/backtrace_silencers.rb
286
+ - test/dummy/config/initializers/inflections.rb
287
+ - test/dummy/config/initializers/mime_types.rb
288
+ - test/dummy/config/initializers/respect.rb
289
+ - test/dummy/config/initializers/secret_token.rb
290
+ - test/dummy/config/initializers/session_store.rb
291
+ - test/dummy/config/initializers/wrap_parameters.rb
292
+ - test/dummy/config/locales/en.yml
293
+ - test/dummy/config/routes.rb
294
+ - test/dummy/config.ru
295
+ - test/dummy/db/development.sqlite3
296
+ - test/dummy/db/schema.rb
297
+ - test/dummy/db/test.sqlite3
298
+ - test/dummy/lib/exts/circle.rb
299
+ - test/dummy/lib/exts/point.rb
300
+ - test/dummy/lib/exts/Rgba.rb
301
+ - test/dummy/log/development.log
302
+ - test/dummy/log/test.log
303
+ - test/dummy/public/404.html
304
+ - test/dummy/public/422.html
305
+ - test/dummy/public/500.html
306
+ - test/dummy/public/favicon.ico
307
+ - test/dummy/Rakefile
308
+ - test/dummy/README.rdoc
309
+ - test/dummy/script/rails
310
+ - test/functional/automatic_validation_controller_test.rb
311
+ - test/functional/caught_exception_controller_test.rb
312
+ - test/functional/disabled_controller_test.rb
313
+ - test/functional/manual_validation_controller_test.rb
314
+ - test/functional/no_schema_controller_test.rb
315
+ - test/functional/respect/rails/schemas_controller_test.rb
316
+ - test/functional/skipped_automatic_validation_controller_test.rb
317
+ - test/headers_can_dumped_in_json.sh
318
+ - test/integration/navigation_test.rb
319
+ - test/request_headers_validation_in_dev_mode.sh
320
+ - test/test_helper.rb
321
+ - test/unit/action_schema_test.rb
322
+ - test/unit/application_info_test.rb
323
+ - test/unit/controller_helper_test.rb
324
+ - test/unit/engine_info_test.rb
325
+ - test/unit/engine_test.rb
326
+ - test/unit/info_test.rb
327
+ - test/unit/request_def_test.rb
328
+ - test/unit/request_helper_test.rb
329
+ - test/unit/request_schema_test.rb
330
+ - test/unit/response_def_test.rb
331
+ - test/unit/response_helper_test.rb
332
+ - test/unit/response_schema_set_test.rb
333
+ - test/unit/response_schema_test.rb
334
+ has_rdoc: