sinatra-hexacta 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra/handlers/cross_origin.rb +22 -0
- data/lib/sinatra/handlers/init.rb +1 -0
- data/lib/sinatra/helpers/user_configurations.rb +0 -1
- data/lib/sinatra/hexacta.rb +1 -0
- metadata +16 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22856830fec4131abdb9b5038fc1e6862c053e11e1e0e47a90d238340512a678
|
4
|
+
data.tar.gz: 02adea101a40283d74e4f557b813db101e971fb02331e59d802bcfe2775164ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a62841ea84938b005e46aa7fe7b78900f525cf09a00f3c33b9cb000406401a6b85ff8f2a0c5acab54880b05f27f7d75a473cc9c36f8ae12ad5e3939645537489
|
7
|
+
data.tar.gz: c5af975ac9d455609eca202196decc3dd5efa9e703e9a5f8cec16ac6491e3adb6b7bfaab9226953cb3ec19de964c3b3ae34495edd7e4643987f5eb5bde24df96
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Sinatra
|
3
|
+
module CrossOriginHandler
|
4
|
+
extend Hexacta
|
5
|
+
|
6
|
+
def enable_cross_origin
|
7
|
+
p "Enabling cross origin..."
|
8
|
+
|
9
|
+
configure do
|
10
|
+
enable :cross_origin
|
11
|
+
end
|
12
|
+
|
13
|
+
before do
|
14
|
+
response.headers['Access-Control-Allow-Origin'] = 'http://*.hexacta.com https://*.hexacta.com'
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
register CrossOriginHandler
|
21
|
+
end
|
22
|
+
|
@@ -14,7 +14,6 @@ module Sinatra
|
|
14
14
|
p "Setting up user configurations directory..."
|
15
15
|
setup_dir("/app/views/#{Hexacta::GEM_FILE_DIR}/user_configurations")
|
16
16
|
copy_all_files("/lib/sinatra/views/user_configurations","/app/views/#{Hexacta::GEM_FILE_DIR}/user_configurations")
|
17
|
-
|
18
17
|
end
|
19
18
|
|
20
19
|
helpers UserConfigurationHelper
|
data/lib/sinatra/hexacta.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-hexacta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Zanger
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.0.4
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: sinatra-cross_origin
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.3.1
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.3.1
|
69
83
|
description: A gem to support general functionality accross all apps
|
70
84
|
email: mzanger@hexacta.com
|
71
85
|
executables: []
|
@@ -84,6 +98,7 @@ files:
|
|
84
98
|
- lib/sinatra/extensions/notification.rb
|
85
99
|
- lib/sinatra/extensions/processmanager.rb
|
86
100
|
- lib/sinatra/handlers/constants.rb
|
101
|
+
- lib/sinatra/handlers/cross_origin.rb
|
87
102
|
- lib/sinatra/handlers/errors.rb
|
88
103
|
- lib/sinatra/handlers/init.rb
|
89
104
|
- lib/sinatra/handlers/notifications.rb
|