cyborg 0.4.10 → 0.4.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cyborg.gemspec +1 -0
- data/lib/cyborg.rb +1 -0
- data/lib/cyborg/middleware.rb +18 -0
- data/lib/cyborg/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef0c43dfae0fce8f9706fcc3135952f4c4c8e1c1
|
4
|
+
data.tar.gz: 1a39f101d0fe888ef661e84c04a7d84ac4175c4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e03dc08260093192b81fb81dfae6df988f3ca8e92d38f17851df018783d02bdb1bebdd1ecf0362fe4c32c0434af26655152c45acc1f011d6cf27885b2a24e83
|
7
|
+
data.tar.gz: 97247809a96b58c7f47a6ed5a6526159012f052b21eb6ec35089caed48967b82a2183ae11538cfb7b9d924d9ac8194147f2a746f057a8aa326f8a53474d40b9e
|
data/cyborg.gemspec
CHANGED
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_runtime_dependency 'colorize', "~> 0.8"
|
26
26
|
spec.add_runtime_dependency "bundler", "~> 1.11"
|
27
27
|
spec.add_runtime_dependency "autoprefixer-rails", "~> 6.4"
|
28
|
+
spec.add_runtime_dependency 'rack-cors', "~> 0.4"
|
28
29
|
|
29
30
|
spec.add_runtime_dependency "rails", ">= 4.2", "< 6"
|
30
31
|
|
data/lib/cyborg.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rack/cors'
|
2
|
+
|
3
|
+
module Cyborg
|
4
|
+
class Application < Rails::Application
|
5
|
+
config.middleware.insert_before ActionDispatch::Static, Rack::Deflater
|
6
|
+
|
7
|
+
config.middleware.insert_before 0, "Rack::Cors", :debug => true, :logger => (-> { Rails.logger }) do
|
8
|
+
allow do
|
9
|
+
origins "*"
|
10
|
+
resource "*", {
|
11
|
+
:headers => :any,
|
12
|
+
:expose => ["Location"],
|
13
|
+
:methods => [:get, :post, :put, :patch, :delete, :options]
|
14
|
+
}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/cyborg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyborg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '6.4'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rack-cors
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.4'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.4'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rails
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,6 +195,7 @@ files:
|
|
181
195
|
- lib/cyborg/command/scaffold.rb
|
182
196
|
- lib/cyborg/helpers/asset_helpers.rb
|
183
197
|
- lib/cyborg/helpers/layout_helpers.rb
|
198
|
+
- lib/cyborg/middleware.rb
|
184
199
|
- lib/cyborg/plugin.rb
|
185
200
|
- lib/cyborg/plugin/assets/asset.rb
|
186
201
|
- lib/cyborg/plugin/assets/javascripts.rb
|