tshield 0.11.10.0 → 0.11.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/tshield/server.rb +17 -0
- data/lib/tshield/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d529a1c1f05cdb1b55bf3c98e2f27734e4c4c0e629c42c5aaa47b47fbb915cbf
|
4
|
+
data.tar.gz: bed2c5eef5de6b373872a68726a18c1b9f6e2fcb7398000aa8166e9f30886693
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffd115c92396a127a7433ace24ac29057f28510dc60e1f2fb547cb4f421355acbab994a6ba2f54fa19a8ac2e7eaf3df6f353fc7aaae29e16bf9249046166fcd9
|
7
|
+
data.tar.gz: 2ac272848b9a0594a6969a0582ecd05f1d214a1061e855ea9144f8d1c17fce7fadf61cb2fe5c2cce91ce73e31e1f5e80f6b726e76bdb5eb21846eb66352040cd
|
data/Gemfile
CHANGED
data/lib/tshield/server.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: false
|
2
2
|
|
3
3
|
require 'sinatra'
|
4
|
+
require 'sinatra/cross_origin'
|
4
5
|
|
5
6
|
require 'tshield/options'
|
6
7
|
require 'tshield/controllers/requests'
|
@@ -17,6 +18,22 @@ module TShield
|
|
17
18
|
set :bind, '0.0.0.0'
|
18
19
|
set :port, TShield::Options.instance.port
|
19
20
|
|
21
|
+
configure do
|
22
|
+
enable :cross_origin
|
23
|
+
end
|
24
|
+
|
25
|
+
before do
|
26
|
+
response.headers['Access-Control-Allow-Origin'] = '*'
|
27
|
+
end
|
28
|
+
|
29
|
+
options '*' do
|
30
|
+
response.headers['Allow'] = 'GET, PUT, POST, DELETE, OPTIONS'
|
31
|
+
response.headers['Access-Control-Allow-Headers'] = 'Authorization, Content-Type,
|
32
|
+
Accept, X-User-Email, X-Auth-Token'
|
33
|
+
response.headers['Access-Control-Allow-Origin'] = '*'
|
34
|
+
200
|
35
|
+
end
|
36
|
+
|
20
37
|
def self.register_resources
|
21
38
|
load_controllers
|
22
39
|
register TShield::Controllers::Sessions
|
data/lib/tshield/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tshield
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diego Rubin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-02-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: byebug
|
@@ -394,12 +394,12 @@ specification_version: 4
|
|
394
394
|
summary: Proxy for mocks API responses
|
395
395
|
test_files:
|
396
396
|
- spec/spec_helper.rb
|
397
|
+
- spec/tshield/request_matching_spec.rb
|
397
398
|
- spec/tshield/options_spec.rb
|
398
|
-
- spec/tshield/configuration_spec.rb
|
399
|
-
- spec/tshield/request_vcr_spec.rb
|
400
399
|
- spec/tshield/controllers/requests_spec.rb
|
401
|
-
- spec/tshield/
|
400
|
+
- spec/tshield/request_vcr_spec.rb
|
402
401
|
- spec/tshield/fixtures/config/tshield.yml
|
403
402
|
- spec/tshield/fixtures/matching/example.json
|
404
403
|
- spec/tshield/fixtures/filters/example_filter.rb
|
405
|
-
- spec/tshield/
|
404
|
+
- spec/tshield/configuration_spec.rb
|
405
|
+
- spec/tshield/after_filter_spec.rb
|