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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ddf6d6dba186c13a1a9184344dc67e93065cbd3
4
- data.tar.gz: 224a89451cc38d776bb4bbd1f8068a303f126222
3
+ metadata.gz: ef0c43dfae0fce8f9706fcc3135952f4c4c8e1c1
4
+ data.tar.gz: 1a39f101d0fe888ef661e84c04a7d84ac4175c4a
5
5
  SHA512:
6
- metadata.gz: cd3cbcb584a841b675c42d0a73744c93ee225332236775d7c5b072e6ef459a80408432f5158a94557101dde4ef4067b06ddb995393b79dff2958ccc7804a8b1e
7
- data.tar.gz: b0fbf73d2dd702bdde26e6bbcebd2e87978ae2f81954c8b6f0a8e34ab955948ab440bb4b393c1a98af52039a4f85c0cdc6eee08720e239e5215f2edc37541bb5
6
+ metadata.gz: 3e03dc08260093192b81fb81dfae6df988f3ca8e92d38f17851df018783d02bdb1bebdd1ecf0362fe4c32c0434af26655152c45acc1f011d6cf27885b2a24e83
7
+ data.tar.gz: 97247809a96b58c7f47a6ed5a6526159012f052b21eb6ec35089caed48967b82a2183ae11538cfb7b9d924d9ac8194147f2a746f057a8aa326f8a53474d40b9e
@@ -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
 
@@ -10,6 +10,7 @@ require "cyborg/assets"
10
10
  module Cyborg
11
11
  extend self
12
12
  attr_accessor :plugin
13
+ autoload :Application, "cyborg/middleware"
13
14
 
14
15
  def production?
15
16
  ENV['CI'] || ENV['RAILS_ENV'] == 'production' || Command.production?
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Cyborg
2
- VERSION = "0.4.10"
2
+ VERSION = "0.4.11"
3
3
  end
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.10
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-20 00:00:00.000000000 Z
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