Skip to content

Commit

Permalink
updated readme, gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
cyu committed Jun 8, 2010
1 parent aeb9d80 commit a50a932
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
10 changes: 7 additions & 3 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ Install the gem:

You configure Rack::Cors by passing a block to the <tt>use</tt> command:

use Rack::Cors do |config|
config.allow do |allow|
use Rack::Cors do |cfg|
cfg.allow do |allow|
allow.origins 'localhost:3000', '127.0.0.1:3000'

allow.resource '/file/list_all/', :headers => 'x-domain-token'

allow.resource '/file/at/*',
:methods => [:get, :post, :put, :delete],
:headers => 'x-domain-token'
end

cfg.allow do |allow|
allow.origins '*'
allow.resource '/public/*', :headers => :any, :methods => :get
end
end
11 changes: 8 additions & 3 deletions rack-cors.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

Gem::Specification.new do |s|
s.name = %q{rack-cors}
s.version = "0.1.1"
s.version = "0.2.0"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Calvin Yu"]
s.date = %q{2010-06-02}
s.date = %q{2010-06-07}
s.email = %q{[email protected]}
s.extra_rdoc_files = [
"README.rdoc"
Expand All @@ -20,13 +20,18 @@ Gem::Specification.new do |s|
"Rakefile",
"VERSION",
"lib/rack/cors.rb",
"rack-cors.gemspec"
"rack-cors.gemspec",
"test/cors_test.rb",
"test/test.ru"
]
s.homepage = %q{http://github.com/cyu/rack-cors}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.7}
s.summary = %q{Middleware for enabling Cross-Origin Resource Sharing in Rack apps}
s.test_files = [
"test/cors_test.rb"
]

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
Expand Down

0 comments on commit a50a932

Please sign in to comment.