rack-jsonp-middleware 0.0.9 → 0.0.10
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.
- checksums.yaml +7 -0
- data/README.md +2 -2
- data/lib/rack/jsonp.rb +1 -1
- metadata +27 -22
- data.tar.gz.asc +0 -11
- metadata.gz.asc +0 -11
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 25e66dfd5ccd3fd2e113cc5d1b3c750638d315e0
|
|
4
|
+
data.tar.gz: 2551e38633896d0f7bc7b8c5162e6881c9c5a551
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 15a302bfdfa5a8d269a9c9158ad419ee8e2c120e987ebea80736ad26206efcc5733ee4fea2779e4edcc15177ac786de27fd650f0cfa3d1759be7c246ff82e434
|
|
7
|
+
data.tar.gz: 97b2fcce1438bd11bcf25de1e9d994c0522992f824b118b767a8d4dadd8ef19559c039fafc6e49d3cd74a8e278258cb661db60b18e5869f4e48add3080e66795
|
data/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# rack-jsonp-middleware
|
|
2
|
-

|
|
2
|
+
[](http://badge.fury.io/rb/rack-jsonp-middleware) [](https://travis-ci.org/robertodecurnex/rack-jsonp-middleware) [](https://gemnasium.com/robertodecurnex/rack-jsonp-middleware) [](https://codeclimate.com/github/robertodecurnex/rack-jsonp-middleware) [](https://coveralls.io/r/robertodecurnex/rack-jsonp-middleware)
|
|
3
3
|
|
|
4
4
|
Rack middleware that turns all .jsonp requests into a jsonp response.
|
|
5
5
|
|
|
@@ -43,7 +43,7 @@ And, within the config block:
|
|
|
43
43
|
|
|
44
44
|
config.middleware.use Rack::JSONP
|
|
45
45
|
|
|
46
|
-
Here is an
|
|
46
|
+
Here is an excellent example of this - [Rails 3 Configuration Example](https://github.com/rwilcox/rack_jsonp_example/commit/809c2e3d4470b694ba1a98c09f2aa07115f433e5 "Rails 3 Configuration Example")
|
|
47
47
|
|
|
48
48
|
Thank you [rwilcox](https://github.com/rwilcox "rwilcox profile")!
|
|
49
49
|
|
data/lib/rack/jsonp.rb
CHANGED
|
@@ -26,7 +26,7 @@ module Rack
|
|
|
26
26
|
if requesting_jsonp && self.json_response?(headers['Content-Type'])
|
|
27
27
|
json = ""
|
|
28
28
|
body.each { |s| json << s }
|
|
29
|
-
body = ["
|
|
29
|
+
body = ["/**/#{callback}(#{json});"]
|
|
30
30
|
headers['Content-Length'] = Rack::Utils.bytesize(body[0]).to_s
|
|
31
31
|
headers['Content-Type'] = headers['Content-Type'].sub(/^[^;]+(;?)/, "#{MIME_TYPE}\\1")
|
|
32
32
|
end
|
metadata
CHANGED
|
@@ -1,62 +1,69 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rack-jsonp-middleware
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 0.0.10
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Roberto Decurnex
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 2014-08-04 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: rack
|
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
16
|
requirements:
|
|
19
|
-
- -
|
|
17
|
+
- - ">="
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
21
19
|
version: '0'
|
|
22
20
|
type: :runtime
|
|
23
21
|
prerelease: false
|
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
-
none: false
|
|
26
23
|
requirements:
|
|
27
|
-
- -
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: coveralls
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
28
39
|
- !ruby/object:Gem::Version
|
|
29
40
|
version: '0'
|
|
30
41
|
- !ruby/object:Gem::Dependency
|
|
31
42
|
name: rspec
|
|
32
43
|
requirement: !ruby/object:Gem::Requirement
|
|
33
|
-
none: false
|
|
34
44
|
requirements:
|
|
35
|
-
- -
|
|
45
|
+
- - ">="
|
|
36
46
|
- !ruby/object:Gem::Version
|
|
37
47
|
version: 1.3.0
|
|
38
48
|
type: :development
|
|
39
49
|
prerelease: false
|
|
40
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
-
none: false
|
|
42
51
|
requirements:
|
|
43
|
-
- -
|
|
52
|
+
- - ">="
|
|
44
53
|
- !ruby/object:Gem::Version
|
|
45
54
|
version: 1.3.0
|
|
46
55
|
- !ruby/object:Gem::Dependency
|
|
47
56
|
name: rake
|
|
48
57
|
requirement: !ruby/object:Gem::Requirement
|
|
49
|
-
none: false
|
|
50
58
|
requirements:
|
|
51
|
-
- -
|
|
59
|
+
- - ">="
|
|
52
60
|
- !ruby/object:Gem::Version
|
|
53
61
|
version: '0'
|
|
54
62
|
type: :development
|
|
55
63
|
prerelease: false
|
|
56
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
-
none: false
|
|
58
65
|
requirements:
|
|
59
|
-
- -
|
|
66
|
+
- - ">="
|
|
60
67
|
- !ruby/object:Gem::Version
|
|
61
68
|
version: '0'
|
|
62
69
|
description: A Rack JSONP middleware
|
|
@@ -69,27 +76,25 @@ files:
|
|
|
69
76
|
- lib/rack/jsonp.rb
|
|
70
77
|
homepage: http://robertodecurnex.github.com/rack-jsonp-middleware
|
|
71
78
|
licenses: []
|
|
79
|
+
metadata: {}
|
|
72
80
|
post_install_message:
|
|
73
81
|
rdoc_options: []
|
|
74
82
|
require_paths:
|
|
75
83
|
- lib
|
|
76
84
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
77
|
-
none: false
|
|
78
85
|
requirements:
|
|
79
|
-
- -
|
|
86
|
+
- - ">="
|
|
80
87
|
- !ruby/object:Gem::Version
|
|
81
88
|
version: '0'
|
|
82
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
|
-
none: false
|
|
84
90
|
requirements:
|
|
85
|
-
- -
|
|
91
|
+
- - ">="
|
|
86
92
|
- !ruby/object:Gem::Version
|
|
87
93
|
version: '0'
|
|
88
94
|
requirements: []
|
|
89
95
|
rubyforge_project:
|
|
90
|
-
rubygems_version:
|
|
96
|
+
rubygems_version: 2.4.1
|
|
91
97
|
signing_key:
|
|
92
|
-
specification_version:
|
|
98
|
+
specification_version: 4
|
|
93
99
|
summary: rack-jsonp-middleware-0.0.5
|
|
94
100
|
test_files: []
|
|
95
|
-
has_rdoc:
|
data.tar.gz.asc
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
-----BEGIN PGP SIGNATURE-----
|
|
2
|
-
Version: GnuPG v1.4.11 (GNU/Linux)
|
|
3
|
-
|
|
4
|
-
iQEcBAABAgAGBQJRP2k3AAoJEHEygQkPTV7SLkQH/j+jWidptEnizu9o6o95JtpQ
|
|
5
|
-
M5bWNFW57XTNSX/maYQDuoNpbOo1ivtXksDJw9UxVkMacsod0OgpKu0khVrlWMfQ
|
|
6
|
-
/yzqvzm4sfIRhE7rgGO+3m+GKyTPmnQZGX5tXfzmZt+SsAuLkXECqWXa7Y4d/Ra0
|
|
7
|
-
HXMjXqb+BsQm3JTOymQkvDIXEwQANCVtT4qv/80buDKM5LicT2qeP0+ilaoTQvic
|
|
8
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