sinatra-scopes 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +8 -6
- data/VERSION +1 -1
- data/example_app.rb +1 -1
- data/lib/sinatra/scopes.rb +6 -6
- data/sinatra-scopes.gemspec +2 -2
- metadata +2 -2
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
task :default => :examples
|
2
|
+
|
1
3
|
begin
|
2
4
|
require 'jeweler'
|
3
5
|
Jeweler::Tasks.new do |s|
|
@@ -16,10 +18,10 @@ rescue LoadError
|
|
16
18
|
puts "Install jeweler to build gem"
|
17
19
|
end
|
18
20
|
|
19
|
-
task
|
20
|
-
|
21
|
-
task :examples do
|
22
|
-
ruby "examples.rb"
|
23
|
-
end
|
21
|
+
task(:examples) { ruby "examples.rb" }
|
22
|
+
task :test => :examples
|
24
23
|
|
25
|
-
task :
|
24
|
+
task :tag_version do
|
25
|
+
version = File.read('VERSION')
|
26
|
+
system "git tag -a v#{version} -m v#{version}"
|
27
|
+
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
1.0.0
|
data/example_app.rb
CHANGED
data/lib/sinatra/scopes.rb
CHANGED
@@ -32,15 +32,15 @@ module Sinatra
|
|
32
32
|
|
33
33
|
module ScopeBuilder
|
34
34
|
|
35
|
-
def
|
35
|
+
def scopes
|
36
36
|
@scopes ||= {}
|
37
|
-
@scopes[name] = Scope.new Sinatra::Application, pattern, &blk
|
38
37
|
end
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
def scope(name, pattern = nil, &blk)
|
40
|
+
scopes[name] = Scope.new self, pattern, &blk
|
41
|
+
mod = Module.new
|
42
|
+
mod.module_eval %{def #{name}; scopes[:#{name}] end}
|
43
|
+
register mod
|
44
44
|
end
|
45
45
|
|
46
46
|
end
|
data/sinatra-scopes.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sinatra-scopes}
|
8
|
-
s.version = "
|
8
|
+
s.version = "1.0.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Myles Byrne"]
|
12
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-12-08}
|
13
13
|
s.email = %q{myles@myles.id.au}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.md"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-scopes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Myles Byrne
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-08 00:00:00 +11:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|