charcoal 0.3.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fda5dfba100b8fcd078a883a677592325a604fe7
4
- data.tar.gz: 269dce65316a9da4bbd1b6422d1b4bb4e8e04e41
3
+ metadata.gz: 9e8998af772ef41fcf01ce20bdfba50310f77cae
4
+ data.tar.gz: 25019fe15c3c29209b2f084ac052788817a58077
5
5
  SHA512:
6
- metadata.gz: 0837c0cb9c6d537909ad952506f72d953644e3c3a6fbb82f66207f3e89f807df07b35e38087802d7fa988646e34de46e7d496e16786291c12f0f008f7d48a60c
7
- data.tar.gz: 12743fae3e6df84e2ec3ce4f3ecd88d37a62a1d484b5d287da3c424e3cf7e399e81d4239e0dda1f0276f340a5b7a8f3d4d249f82f80f3a1d3dc1a451a176e4f9
6
+ metadata.gz: 2d8541b0db4bb762e5bc81c3429a472e2fc2462f9e7eea023246286921213b3bad94fe9f7a8d1a2b85ad22d8a2f7a7e36375cc83fca0b835aa195ce2a72051b9
7
+ data.tar.gz: ab75aa0690fd0ee5155c291261a8c2609803b52978b75f254d7664df8fe4db2ceabdb77b9bd68695059a84dbd44a73f61ed009b7662d090c47f3e5ed8e8df5f9
data/README.md CHANGED
@@ -23,19 +23,19 @@ will have the response body wrapped in that callback and the content type change
23
23
 
24
24
  Please familiarize yourself with the [documentation](https://developer.mozilla.org/En/HTTP_access_control) ([wikipedia](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)) before proceeding.
25
25
 
26
- Include the module `Charcoal::CORS` in the controller you'd like to allow CORS.
26
+ Include the module `Charcoal::CrossOrigin` in the controller you'd like to allow CORS.
27
27
  `allow_cors` accepts the same arguments as `allow_jsonp`
28
28
 
29
29
  Included is a CORS pre-flight controller that must be hooked up to the Rails router:
30
30
 
31
31
  Rails 2:
32
32
  ```ruby
33
- map.connect "*path.:format", :conditions => { :method => :options }, :action => "preflight", :controller => "CORS", :namespace => "charcoal/"
33
+ map.connect "*path.:format", :conditions => { :method => :options }, :action => "preflight", :controller => "cross_origin", :namespace => "charcoal/"
34
34
  ```
35
35
 
36
36
  Rails 3 / 4:
37
37
  ```ruby
38
- match '*path.:format' => 'charcoal/cors#preflight', :via => :options
38
+ match '*path.:format' => 'charcoal/cross_origin#preflight', :via => :options
39
39
  ```
40
40
 
41
41
  #### Configuration
@@ -1,7 +1,7 @@
1
1
  require 'charcoal/controller_filter'
2
2
 
3
3
  module Charcoal
4
- module CORS
4
+ module CrossOrigin
5
5
  def self.included(klass)
6
6
  klass.extend(ClassMethods)
7
7
  klass.after_filter :set_cors_headers, :if => :cors_allowed?
@@ -4,10 +4,8 @@
4
4
  require 'action_controller'
5
5
  require 'active_support/version'
6
6
 
7
- require 'charcoal/cors_helper'
8
-
9
- class Charcoal::CORSController < ActionController::Base
10
- include Charcoal::CORS
7
+ class Charcoal::CrossOriginController < ActionController::Base
8
+ include Charcoal::CrossOrigin
11
9
 
12
10
  Routing = defined?(ActionDispatch) ? ActionDispatch::Routing : ActionController::Routing
13
11
 
@@ -1,3 +1,3 @@
1
1
  module Charcoal
2
- VERSION = "0.3.0"
2
+ VERSION = "1.0.0"
3
3
  end
data/lib/charcoal.rb CHANGED
@@ -10,10 +10,9 @@ module Charcoal
10
10
  end
11
11
 
12
12
  autoload :ControllerFilter, 'charcoal/controller_filter'
13
- autoload :CORS, 'charcoal/cors'
13
+ autoload :CrossOrigin, 'charcoal/cross_origin'
14
14
  autoload :JSONP, 'charcoal/jsonp'
15
15
 
16
- autoload :CORSController, 'charcoal/cors_controller'
17
- # autoload :ParameterWhitelist, "charcoal/parameter_whitelist"
16
+ autoload :CrossOriginController, 'charcoal/cross_origin_controller'
18
17
  end
19
18
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: charcoal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Davidovitz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-02 00:00:00.000000000 Z
11
+ date: 2014-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -62,9 +62,8 @@ files:
62
62
  - README.md
63
63
  - lib/charcoal.rb
64
64
  - lib/charcoal/controller_filter.rb
65
- - lib/charcoal/cors.rb
66
- - lib/charcoal/cors_controller.rb
67
- - lib/charcoal/cors_helper.rb
65
+ - lib/charcoal/cross_origin.rb
66
+ - lib/charcoal/cross_origin_controller.rb
68
67
  - lib/charcoal/jsonp.rb
69
68
  - lib/charcoal/version.rb
70
69
  homepage: https://github.com/steved555/charcoal
@@ -1,3 +0,0 @@
1
- # Rails tries to load this by default
2
- # and blows up if it can't find it
3
- module Charcoal::CorsHelper; end