cryx-sinatra-additional-routes 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Cyril Rohr
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,19 @@
1
+ = sinatra-additional-routes
2
+
3
+ Adds some of the missing HTTP methods to the Sinatra router. Currently, adds only the OPTIONS method.
4
+
5
+ = Usage
6
+
7
+ require 'sinatra/additional_routes'
8
+
9
+ class MyAPP < Sinatra::Base
10
+ register Sinatra::AdditionalRoutes
11
+
12
+ options '/path' do
13
+ "response for: OPTIONS /path"
14
+ end
15
+ end
16
+
17
+ = Copyright
18
+
19
+ Copyright (c) 2009 Cyril Rohr. See LICENSE for details.
@@ -0,0 +1,59 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'jeweler'
4
+
5
+ begin
6
+ require 'jeweler'
7
+ Jeweler::Tasks.new do |gem|
8
+ gem.name = "sinatra-additional-routes"
9
+ gem.summary = %Q{Adds some of the missing HTTP methods to the Sinatra router.}
10
+ gem.description = %Q{Adds some of the missing HTTP methods (e.g. OPTIONS) to the Sinatra router.}
11
+ gem.email = "cyril.rohr@gmail.com"
12
+ gem.homepage = "http://github.com/cryx/sinatra-additional-routes"
13
+ gem.authors = ["Cyril Rohr"]
14
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
+ end
16
+
17
+ rescue LoadError
18
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
19
+ end
20
+
21
+ # TODO Adds specs
22
+ # require 'rake/testtask'
23
+ # Rake::TestTask.new(:test) do |test|
24
+ # test.libs << 'lib' << 'test'
25
+ # test.pattern = 'test/**/*_test.rb'
26
+ # test.verbose = true
27
+ # end
28
+ #
29
+ # begin
30
+ # require 'rcov/rcovtask'
31
+ # Rcov::RcovTask.new do |test|
32
+ # test.libs << 'test'
33
+ # test.pattern = 'test/**/*_test.rb'
34
+ # test.verbose = true
35
+ # end
36
+ # rescue LoadError
37
+ # task :rcov do
38
+ # abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
39
+ # end
40
+ # end
41
+
42
+
43
+
44
+
45
+ task :default => :test
46
+
47
+ require 'rake/rdoctask'
48
+ Rake::RDocTask.new do |rdoc|
49
+ if File.exist?('VERSION')
50
+ version = File.read('VERSION')
51
+ else
52
+ version = ""
53
+ end
54
+
55
+ rdoc.rdoc_dir = 'rdoc'
56
+ rdoc.title = "sinatra-additional-routes #{version}"
57
+ rdoc.rdoc_files.include('README*')
58
+ rdoc.rdoc_files.include('lib/**/*.rb')
59
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
@@ -0,0 +1,8 @@
1
+
2
+ module Sinatra
3
+ module AdditionalRoutes
4
+ def options(path, opts={}, &bk); route 'OPTIONS', path, opts, &bk end
5
+ end
6
+
7
+ register AdditionalRoutes
8
+ end
@@ -0,0 +1,45 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{sinatra-additional-routes}
8
+ s.version = "1.0.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Cyril Rohr"]
12
+ s.date = %q{2009-08-06}
13
+ s.description = %q{Adds some of the missing HTTP methods (e.g. OPTIONS) to the Sinatra router.}
14
+ s.email = %q{cyril.rohr@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "lib/sinatra/additional_routes.rb",
27
+ "sinatra-additional-routes.gemspec"
28
+ ]
29
+ s.has_rdoc = true
30
+ s.homepage = %q{http://github.com/cryx/sinatra-additional-routes}
31
+ s.rdoc_options = ["--charset=UTF-8"]
32
+ s.require_paths = ["lib"]
33
+ s.rubygems_version = %q{1.3.2}
34
+ s.summary = %q{Adds some of the missing HTTP methods to the Sinatra router.}
35
+
36
+ if s.respond_to? :specification_version then
37
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
38
+ s.specification_version = 3
39
+
40
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
41
+ else
42
+ end
43
+ else
44
+ end
45
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cryx-sinatra-additional-routes
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Cyril Rohr
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-08-06 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Adds some of the missing HTTP methods (e.g. OPTIONS) to the Sinatra router.
17
+ email: cyril.rohr@gmail.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - LICENSE
24
+ - README.rdoc
25
+ files:
26
+ - .document
27
+ - .gitignore
28
+ - LICENSE
29
+ - README.rdoc
30
+ - Rakefile
31
+ - VERSION
32
+ - lib/sinatra/additional_routes.rb
33
+ - sinatra-additional-routes.gemspec
34
+ has_rdoc: true
35
+ homepage: http://github.com/cryx/sinatra-additional-routes
36
+ licenses:
37
+ post_install_message:
38
+ rdoc_options:
39
+ - --charset=UTF-8
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ version:
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: "0"
53
+ version:
54
+ requirements: []
55
+
56
+ rubyforge_project:
57
+ rubygems_version: 1.3.5
58
+ signing_key:
59
+ specification_version: 3
60
+ summary: Adds some of the missing HTTP methods to the Sinatra router.
61
+ test_files: []
62
+