grape-cors 0.9.0 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/grape-cors.rb +9 -6
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4898cbab42330fac9c5d80657c4d580ba2a89fb
4
- data.tar.gz: c5ff8422c68ac3c098b5138b091ba95fe90168fa
3
+ metadata.gz: 93c2a19d884e75a912f3f9249c16149517aadf00
4
+ data.tar.gz: 02f8f96fbb922843f3691d80bd8ec68fc99a62c7
5
5
  SHA512:
6
- metadata.gz: 4f109120eb769eb5bbe39d6f08d666f4fdc27729229411b706082d68154a39ccb10b2f9081c05684126b4a0955cdaabc7c158cae9fdc943294e491f546d5a9f7
7
- data.tar.gz: 85879f46952a144aa25721978871ea11fffa3ff324670e2fb8b984d69053b50b8e3d8eaac396ad15feac9f0726c5359b2c4f0a94453cf260fe9e1a323bf92967
6
+ metadata.gz: 2c63ddf0053af39f3bab61ec4f244047f3512fb8ef18ef4463df4a27cf458a7350fa3dac1d3c2b064d9b0a18dae4a8d74601acd42daa2a1f8a8c07a39cf54632
7
+ data.tar.gz: 0dfb981ec388a8ce759f9065daa0bc5027f29949158e0126240623e5792a2299e2feaa4dbb9ec7778ba4f7f4d7a6b8b2143835a60ca0ae9f62702c2b38b8ad53
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0
1
+ 0.9.2
@@ -19,17 +19,20 @@ module Grape
19
19
  @acah ||= 'Access-Control-Allow-Headers'
20
20
  @acao ||= 'Access-Control-Allow-Origin'
21
21
  @acam ||= 'Access-Control-Allow-Methods'
22
+ @extra_headers ||= {}
22
23
  class << self
23
24
 
24
25
  attr_reader :headers,:origin,:methods,
25
- :acah,:acao,:acam
26
+ :acah,:acao,:acam,:extra_headers
26
27
 
27
28
  def object
28
- {
29
- Config.acah => Config.headers,
30
- Config.acao => Config.origin,
31
- Config.acam => Config.methods
32
- }
29
+ Config.extra_headers.merge(
30
+ {
31
+ Config.acah => Config.headers,
32
+ Config.acao => Config.origin,
33
+ Config.acam => Config.methods
34
+ }
35
+ )
33
36
  end;alias obj object
34
37
 
35
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-cors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-03 00:00:00.000000000 Z
11
+ date: 2014-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler