sinatra-contrib 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. data/LICENSE +20 -0
  2. data/README.md +135 -0
  3. data/Rakefile +75 -0
  4. data/ideas.md +29 -0
  5. data/lib/sinatra/capture.rb +42 -0
  6. data/lib/sinatra/config_file.rb +151 -0
  7. data/lib/sinatra/content_for.rb +111 -0
  8. data/lib/sinatra/contrib.rb +39 -0
  9. data/lib/sinatra/contrib/all.rb +2 -0
  10. data/lib/sinatra/contrib/setup.rb +53 -0
  11. data/lib/sinatra/contrib/version.rb +45 -0
  12. data/lib/sinatra/cookies.rb +331 -0
  13. data/lib/sinatra/decompile.rb +113 -0
  14. data/lib/sinatra/engine_tracking.rb +96 -0
  15. data/lib/sinatra/extension.rb +95 -0
  16. data/lib/sinatra/json.rb +134 -0
  17. data/lib/sinatra/link_header.rb +132 -0
  18. data/lib/sinatra/multi_route.rb +81 -0
  19. data/lib/sinatra/namespace.rb +282 -0
  20. data/lib/sinatra/reloader.rb +384 -0
  21. data/lib/sinatra/respond_with.rb +245 -0
  22. data/lib/sinatra/streaming.rb +267 -0
  23. data/lib/sinatra/test_helpers.rb +87 -0
  24. data/sinatra-contrib.gemspec +125 -0
  25. data/spec/capture_spec.rb +80 -0
  26. data/spec/config_file/key_value.yml +6 -0
  27. data/spec/config_file/missing_env.yml +4 -0
  28. data/spec/config_file/with_envs.yml +7 -0
  29. data/spec/config_file/with_nested_envs.yml +11 -0
  30. data/spec/config_file_spec.rb +44 -0
  31. data/spec/content_for/different_key.erb +1 -0
  32. data/spec/content_for/different_key.erubis +1 -0
  33. data/spec/content_for/different_key.haml +2 -0
  34. data/spec/content_for/different_key.slim +2 -0
  35. data/spec/content_for/layout.erb +1 -0
  36. data/spec/content_for/layout.erubis +1 -0
  37. data/spec/content_for/layout.haml +1 -0
  38. data/spec/content_for/layout.slim +1 -0
  39. data/spec/content_for/multiple_blocks.erb +4 -0
  40. data/spec/content_for/multiple_blocks.erubis +4 -0
  41. data/spec/content_for/multiple_blocks.haml +8 -0
  42. data/spec/content_for/multiple_blocks.slim +8 -0
  43. data/spec/content_for/multiple_yields.erb +3 -0
  44. data/spec/content_for/multiple_yields.erubis +3 -0
  45. data/spec/content_for/multiple_yields.haml +3 -0
  46. data/spec/content_for/multiple_yields.slim +3 -0
  47. data/spec/content_for/passes_values.erb +1 -0
  48. data/spec/content_for/passes_values.erubis +1 -0
  49. data/spec/content_for/passes_values.haml +1 -0
  50. data/spec/content_for/passes_values.slim +1 -0
  51. data/spec/content_for/same_key.erb +1 -0
  52. data/spec/content_for/same_key.erubis +1 -0
  53. data/spec/content_for/same_key.haml +2 -0
  54. data/spec/content_for/same_key.slim +2 -0
  55. data/spec/content_for/takes_values.erb +1 -0
  56. data/spec/content_for/takes_values.erubis +1 -0
  57. data/spec/content_for/takes_values.haml +3 -0
  58. data/spec/content_for/takes_values.slim +3 -0
  59. data/spec/content_for_spec.rb +201 -0
  60. data/spec/cookies_spec.rb +782 -0
  61. data/spec/decompile_spec.rb +44 -0
  62. data/spec/extension_spec.rb +33 -0
  63. data/spec/json_spec.rb +115 -0
  64. data/spec/link_header_spec.rb +100 -0
  65. data/spec/multi_route_spec.rb +45 -0
  66. data/spec/namespace/foo.erb +1 -0
  67. data/spec/namespace/nested/foo.erb +1 -0
  68. data/spec/namespace_spec.rb +623 -0
  69. data/spec/okjson.rb +581 -0
  70. data/spec/reloader/app.rb.erb +40 -0
  71. data/spec/reloader_spec.rb +441 -0
  72. data/spec/respond_with/bar.erb +1 -0
  73. data/spec/respond_with/bar.json.erb +1 -0
  74. data/spec/respond_with/foo.html.erb +1 -0
  75. data/spec/respond_with/not_html.sass +2 -0
  76. data/spec/respond_with_spec.rb +289 -0
  77. data/spec/spec_helper.rb +6 -0
  78. data/spec/streaming_spec.rb +436 -0
  79. metadata +256 -0
metadata ADDED
@@ -0,0 +1,256 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sinatra-contrib
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Konstantin Haase
9
+ - Gabriel Andretta
10
+ - Nicolas Sanguinetti
11
+ - Eliot Shepard
12
+ - Andrew Crump
13
+ - Matt Lyon
14
+ - undr
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+ date: 2011-10-01 00:00:00.000000000Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: sinatra
22
+ requirement: &2153294180 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: 1.3.0
28
+ type: :runtime
29
+ prerelease: false
30
+ version_requirements: *2153294180
31
+ - !ruby/object:Gem::Dependency
32
+ name: backports
33
+ requirement: &2153293160 !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '2.0'
39
+ type: :runtime
40
+ prerelease: false
41
+ version_requirements: *2153293160
42
+ - !ruby/object:Gem::Dependency
43
+ name: tilt
44
+ requirement: &2153292040 !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ~>
48
+ - !ruby/object:Gem::Version
49
+ version: '1.3'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: *2153292040
53
+ - !ruby/object:Gem::Dependency
54
+ name: rack-test
55
+ requirement: &2153290380 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: *2153290380
64
+ - !ruby/object:Gem::Dependency
65
+ name: rack-protection
66
+ requirement: &2153270140 !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ type: :runtime
73
+ prerelease: false
74
+ version_requirements: *2153270140
75
+ - !ruby/object:Gem::Dependency
76
+ name: eventmachine
77
+ requirement: &2153269580 !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: *2153269580
86
+ - !ruby/object:Gem::Dependency
87
+ name: rspec
88
+ requirement: &2153268720 !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '2.3'
94
+ type: :development
95
+ prerelease: false
96
+ version_requirements: *2153268720
97
+ - !ruby/object:Gem::Dependency
98
+ name: haml
99
+ requirement: &2153268300 !ruby/object:Gem::Requirement
100
+ none: false
101
+ requirements:
102
+ - - ! '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: *2153268300
108
+ - !ruby/object:Gem::Dependency
109
+ name: erubis
110
+ requirement: &2153267840 !ruby/object:Gem::Requirement
111
+ none: false
112
+ requirements:
113
+ - - ! '>='
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: *2153267840
119
+ - !ruby/object:Gem::Dependency
120
+ name: slim
121
+ requirement: &2153267240 !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ type: :development
128
+ prerelease: false
129
+ version_requirements: *2153267240
130
+ - !ruby/object:Gem::Dependency
131
+ name: rake
132
+ requirement: &2153266600 !ruby/object:Gem::Requirement
133
+ none: false
134
+ requirements:
135
+ - - ! '>='
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: *2153266600
141
+ description: Collection of useful Sinatra extensions
142
+ email:
143
+ - konstantin.mailinglists@googlemail.com
144
+ - ohhgabriel@gmail.com
145
+ - contacto@nicolassanguinetti.info
146
+ - eshepard@slower.net
147
+ - andrew.crump@ieee.org
148
+ - matt@flowerpowered.com
149
+ - undr@yandex.ru
150
+ executables: []
151
+ extensions: []
152
+ extra_rdoc_files: []
153
+ files:
154
+ - LICENSE
155
+ - README.md
156
+ - Rakefile
157
+ - ideas.md
158
+ - lib/sinatra/capture.rb
159
+ - lib/sinatra/config_file.rb
160
+ - lib/sinatra/content_for.rb
161
+ - lib/sinatra/contrib.rb
162
+ - lib/sinatra/contrib/all.rb
163
+ - lib/sinatra/contrib/setup.rb
164
+ - lib/sinatra/contrib/version.rb
165
+ - lib/sinatra/cookies.rb
166
+ - lib/sinatra/decompile.rb
167
+ - lib/sinatra/engine_tracking.rb
168
+ - lib/sinatra/extension.rb
169
+ - lib/sinatra/json.rb
170
+ - lib/sinatra/link_header.rb
171
+ - lib/sinatra/multi_route.rb
172
+ - lib/sinatra/namespace.rb
173
+ - lib/sinatra/reloader.rb
174
+ - lib/sinatra/respond_with.rb
175
+ - lib/sinatra/streaming.rb
176
+ - lib/sinatra/test_helpers.rb
177
+ - sinatra-contrib.gemspec
178
+ - spec/capture_spec.rb
179
+ - spec/config_file/key_value.yml
180
+ - spec/config_file/missing_env.yml
181
+ - spec/config_file/with_envs.yml
182
+ - spec/config_file/with_nested_envs.yml
183
+ - spec/config_file_spec.rb
184
+ - spec/content_for/different_key.erb
185
+ - spec/content_for/different_key.erubis
186
+ - spec/content_for/different_key.haml
187
+ - spec/content_for/different_key.slim
188
+ - spec/content_for/layout.erb
189
+ - spec/content_for/layout.erubis
190
+ - spec/content_for/layout.haml
191
+ - spec/content_for/layout.slim
192
+ - spec/content_for/multiple_blocks.erb
193
+ - spec/content_for/multiple_blocks.erubis
194
+ - spec/content_for/multiple_blocks.haml
195
+ - spec/content_for/multiple_blocks.slim
196
+ - spec/content_for/multiple_yields.erb
197
+ - spec/content_for/multiple_yields.erubis
198
+ - spec/content_for/multiple_yields.haml
199
+ - spec/content_for/multiple_yields.slim
200
+ - spec/content_for/passes_values.erb
201
+ - spec/content_for/passes_values.erubis
202
+ - spec/content_for/passes_values.haml
203
+ - spec/content_for/passes_values.slim
204
+ - spec/content_for/same_key.erb
205
+ - spec/content_for/same_key.erubis
206
+ - spec/content_for/same_key.haml
207
+ - spec/content_for/same_key.slim
208
+ - spec/content_for/takes_values.erb
209
+ - spec/content_for/takes_values.erubis
210
+ - spec/content_for/takes_values.haml
211
+ - spec/content_for/takes_values.slim
212
+ - spec/content_for_spec.rb
213
+ - spec/cookies_spec.rb
214
+ - spec/decompile_spec.rb
215
+ - spec/extension_spec.rb
216
+ - spec/json_spec.rb
217
+ - spec/link_header_spec.rb
218
+ - spec/multi_route_spec.rb
219
+ - spec/namespace/foo.erb
220
+ - spec/namespace/nested/foo.erb
221
+ - spec/namespace_spec.rb
222
+ - spec/okjson.rb
223
+ - spec/reloader/app.rb.erb
224
+ - spec/reloader_spec.rb
225
+ - spec/respond_with/bar.erb
226
+ - spec/respond_with/bar.json.erb
227
+ - spec/respond_with/foo.html.erb
228
+ - spec/respond_with/not_html.sass
229
+ - spec/respond_with_spec.rb
230
+ - spec/spec_helper.rb
231
+ - spec/streaming_spec.rb
232
+ homepage: http://github.com/sinatra/sinatra-contrib
233
+ licenses: []
234
+ post_install_message:
235
+ rdoc_options: []
236
+ require_paths:
237
+ - lib
238
+ required_ruby_version: !ruby/object:Gem::Requirement
239
+ none: false
240
+ requirements:
241
+ - - ! '>='
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ required_rubygems_version: !ruby/object:Gem::Requirement
245
+ none: false
246
+ requirements:
247
+ - - ! '>='
248
+ - !ruby/object:Gem::Version
249
+ version: '0'
250
+ requirements: []
251
+ rubyforge_project:
252
+ rubygems_version: 1.8.10
253
+ signing_key:
254
+ specification_version: 3
255
+ summary: Collection of useful Sinatra extensions
256
+ test_files: []