sinatra-contrib 1.3.2 → 1.4.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.
- data/README.md +9 -8
- data/lib/sinatra/capture.rb +87 -5
- data/lib/sinatra/config_file.rb +19 -3
- data/lib/sinatra/content_for.rb +2 -2
- data/lib/sinatra/contrib/setup.rb +2 -2
- data/lib/sinatra/cookies.rb +4 -4
- data/lib/sinatra/decompile.rb +13 -5
- data/lib/sinatra/extension.rb +5 -5
- data/lib/sinatra/json.rb +26 -30
- data/lib/sinatra/link_header.rb +2 -2
- data/lib/sinatra/multi_route.rb +6 -0
- data/lib/sinatra/namespace.rb +9 -6
- data/lib/sinatra/reloader.rb +7 -7
- data/lib/sinatra/respond_with.rb +18 -14
- data/lib/sinatra/streaming.rb +6 -6
- data/lib/sinatra/test_helpers.rb +1 -1
- data/sinatra-contrib.gemspec +5 -22
- data/spec/capture_spec.rb +14 -1
- data/spec/config_file/key_value.yml.erb +6 -0
- data/spec/config_file_spec.rb +10 -0
- data/spec/content_for_spec.rb +3 -3
- data/spec/cookies_spec.rb +26 -6
- data/spec/json_spec.rb +5 -3
- data/spec/multi_route_spec.rb +28 -13
- data/spec/namespace_spec.rb +294 -283
- data/spec/respond_with_spec.rb +10 -0
- data/spec/spec_helper.rb +1 -0
- metadata +8 -25
- data/spec/content_for/footer.erb +0 -3
- data/spec/content_for/footer.erubis +0 -3
- data/spec/content_for/footer.haml +0 -2
- data/spec/content_for/footer.slim +0 -2
data/spec/respond_with_spec.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'backports'
|
2
|
+
require 'multi_json'
|
3
|
+
|
2
4
|
require_relative 'spec_helper'
|
3
5
|
require_relative 'okjson'
|
4
6
|
|
@@ -226,6 +228,14 @@ describe Sinatra::RespondWith do
|
|
226
228
|
req(:pdf).should be_ok
|
227
229
|
body.should == "hi"
|
228
230
|
end
|
231
|
+
|
232
|
+
unless defined? JRUBY_VERSION
|
233
|
+
it 'uses yajl for json' do
|
234
|
+
respond_with :baz
|
235
|
+
req(:json).should be_ok
|
236
|
+
body.should == "\"yajl!\""
|
237
|
+
end
|
238
|
+
end
|
229
239
|
end
|
230
240
|
|
231
241
|
describe 'customizing' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,28 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-contrib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Konstantin Haase
|
9
9
|
- Gabriel Andretta
|
10
|
-
- Trevor Bramble
|
11
10
|
- Nicolas Sanguinetti
|
12
|
-
- Ilya Shindyapin
|
13
|
-
- Masahiro Fujiwara
|
14
|
-
- Adrian Pacała
|
15
|
-
- Andrew Crump
|
16
11
|
- Eliot Shepard
|
17
|
-
-
|
18
|
-
- Gray Manley
|
12
|
+
- Andrew Crump
|
19
13
|
- Matt Lyon
|
20
|
-
- lest
|
21
14
|
- undr
|
22
15
|
autorequire:
|
23
16
|
bindir: bin
|
24
17
|
cert_chain: []
|
25
|
-
date:
|
18
|
+
date: 2013-04-07 00:00:00.000000000 Z
|
26
19
|
dependencies:
|
27
20
|
- !ruby/object:Gem::Dependency
|
28
21
|
name: sinatra
|
@@ -31,7 +24,7 @@ dependencies:
|
|
31
24
|
requirements:
|
32
25
|
- - ~>
|
33
26
|
- !ruby/object:Gem::Version
|
34
|
-
version: 1.
|
27
|
+
version: 1.4.2
|
35
28
|
type: :runtime
|
36
29
|
prerelease: false
|
37
30
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -39,7 +32,7 @@ dependencies:
|
|
39
32
|
requirements:
|
40
33
|
- - ~>
|
41
34
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.
|
35
|
+
version: 1.4.2
|
43
36
|
- !ruby/object:Gem::Dependency
|
44
37
|
name: backports
|
45
38
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,17 +197,10 @@ description: Collection of useful Sinatra extensions
|
|
204
197
|
email:
|
205
198
|
- konstantin.mailinglists@googlemail.com
|
206
199
|
- ohhgabriel@gmail.com
|
207
|
-
- inbox@trevorbramble.com
|
208
200
|
- contacto@nicolassanguinetti.info
|
209
|
-
- ilya@shindyapin.com
|
210
|
-
- m-fujiwara@axsh.net
|
211
|
-
- altpacala@gmail.com
|
212
|
-
- andrew.crump@ieee.org
|
213
201
|
- eshepard@slower.net
|
214
|
-
-
|
215
|
-
- g.manley@tukaiz.com
|
202
|
+
- andrew.crump@ieee.org
|
216
203
|
- matt@flowerpowered.com
|
217
|
-
- just.lest@gmail.com
|
218
204
|
- undr@yandex.ru
|
219
205
|
executables: []
|
220
206
|
extensions: []
|
@@ -246,6 +232,7 @@ files:
|
|
246
232
|
- sinatra-contrib.gemspec
|
247
233
|
- spec/capture_spec.rb
|
248
234
|
- spec/config_file/key_value.yml
|
235
|
+
- spec/config_file/key_value.yml.erb
|
249
236
|
- spec/config_file/key_value_override.yml
|
250
237
|
- spec/config_file/missing_env.yml
|
251
238
|
- spec/config_file/with_envs.yml
|
@@ -255,10 +242,6 @@ files:
|
|
255
242
|
- spec/content_for/different_key.erubis
|
256
243
|
- spec/content_for/different_key.haml
|
257
244
|
- spec/content_for/different_key.slim
|
258
|
-
- spec/content_for/footer.erb
|
259
|
-
- spec/content_for/footer.erubis
|
260
|
-
- spec/content_for/footer.haml
|
261
|
-
- spec/content_for/footer.slim
|
262
245
|
- spec/content_for/layout.erb
|
263
246
|
- spec/content_for/layout.erubis
|
264
247
|
- spec/content_for/layout.haml
|
@@ -323,7 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
323
306
|
version: '0'
|
324
307
|
requirements: []
|
325
308
|
rubyforge_project:
|
326
|
-
rubygems_version: 1.8.
|
309
|
+
rubygems_version: 1.8.25
|
327
310
|
signing_key:
|
328
311
|
specification_version: 3
|
329
312
|
summary: Collection of useful Sinatra extensions
|
data/spec/content_for/footer.erb
DELETED