renee 0.3.11 → 0.4.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +17 -0
- data/Gemfile-renee +8 -0
- data/Gemfile-renee-core +8 -0
- data/Gemfile-renee-render +9 -0
- data/Gemfile-renee-session +9 -0
- data/Gemfile-renee-url-generation +8 -0
- data/MIT-LICENSE.txt +7 -0
- data/README-renee-core.md +242 -0
- data/README-renee-render.md +38 -0
- data/README-renee-session.md +3 -0
- data/README-renee-url-generation.md +3 -0
- data/README.md +131 -6
- data/Rakefile +109 -9
- data/TODO.txt +45 -0
- data/config.ru +26 -0
- data/examples/blog/blog.rb +3 -1
- data/examples/blog/config.ru +24 -19
- data/examples/blog/views/edit.erb +10 -1
- data/examples/blog/views/show.erb +5 -0
- data/lib/renee.rb +11 -4
- data/lib/renee/core.rb +98 -0
- data/lib/renee/core/chaining.rb +66 -0
- data/lib/renee/core/env_accessors.rb +72 -0
- data/lib/renee/core/exceptions.rb +15 -0
- data/lib/renee/core/matcher.rb +61 -0
- data/lib/renee/core/plugins.rb +31 -0
- data/lib/renee/core/rack_interaction.rb +50 -0
- data/lib/renee/core/request_context.rb +56 -0
- data/lib/renee/core/responding.rb +112 -0
- data/lib/renee/core/response.rb +78 -0
- data/lib/renee/core/routing.rb +319 -0
- data/lib/renee/core/transform.rb +18 -0
- data/lib/renee/render.rb +221 -0
- data/lib/renee/session.rb +50 -0
- data/lib/renee/url_generation.rb +117 -0
- data/lib/renee/util.rb +7 -0
- data/lib/renee/version.rb +2 -4
- data/plan.txt +19 -0
- data/renee-core.gemspec +26 -0
- data/renee-render.gemspec +30 -0
- data/renee-session.gemspec +28 -0
- data/renee-url-generation.gemspec +24 -0
- data/renee.gemspec +5 -6
- data/site/MIT-LICENSE.txt +7 -0
- data/site/public/css/app.css +75 -0
- data/site/public/docs/renee-core/Renee.html +208 -0
- data/site/public/docs/renee-core/Renee/Core.html +366 -0
- data/site/public/docs/renee-core/Renee/Core/Chaining.html +192 -0
- data/site/public/docs/renee-core/Renee/Core/ClassMethods.html +725 -0
- data/site/public/docs/renee-core/Renee/Core/ClientError.html +317 -0
- data/site/public/docs/renee-core/Renee/Core/EnvAccessors.html +152 -0
- data/site/public/docs/renee-core/Renee/Core/EnvAccessors/ClassMethods.html +354 -0
- data/site/public/docs/renee-core/Renee/Core/Matcher.html +675 -0
- data/site/public/docs/renee-core/Renee/Core/Plugins.html +475 -0
- data/site/public/docs/renee-core/Renee/Core/RackInteraction.html +488 -0
- data/site/public/docs/renee-core/Renee/Core/RequestContext.html +511 -0
- data/site/public/docs/renee-core/Renee/Core/Responding.html +877 -0
- data/site/public/docs/renee-core/Renee/Core/Response.html +691 -0
- data/site/public/docs/renee-core/Renee/Core/Routing.html +1589 -0
- data/site/public/docs/renee-core/Renee/Core/Transform.html +249 -0
- data/site/public/docs/renee-core/Renee/Core/URLGeneration.html +597 -0
- data/site/public/docs/renee-core/_index.html +244 -0
- data/site/public/docs/renee-core/class_list.html +47 -0
- data/site/public/docs/renee-core/css/common.css +1 -0
- data/site/public/docs/renee-core/css/full_list.css +55 -0
- data/site/public/docs/renee-core/css/style.css +322 -0
- data/site/public/docs/renee-core/file.README-renee-core.html +341 -0
- data/site/public/docs/renee-core/file.README.html +212 -0
- data/site/public/docs/renee-core/file_list.html +49 -0
- data/site/public/docs/renee-core/frames.html +13 -0
- data/site/public/docs/renee-core/index.html +341 -0
- data/site/public/docs/renee-core/js/app.js +205 -0
- data/site/public/docs/renee-core/js/full_list.js +167 -0
- data/site/public/docs/renee-core/js/jquery.js +16 -0
- data/site/public/docs/renee-core/method_list.html +590 -0
- data/site/public/docs/renee-core/top-level-namespace.html +103 -0
- data/site/public/docs/renee-render/Renee.html +116 -0
- data/site/public/docs/renee-render/Renee/Core.html +346 -0
- data/site/public/docs/renee-render/Renee/Core/Chaining.html +125 -0
- data/site/public/docs/renee-render/Renee/Core/ClassMethods.html +620 -0
- data/site/public/docs/renee-render/Renee/Core/ClientError.html +317 -0
- data/site/public/docs/renee-render/Renee/Core/EnvAccessors.html +152 -0
- data/site/public/docs/renee-render/Renee/Core/EnvAccessors/ClassMethods.html +354 -0
- data/site/public/docs/renee-render/Renee/Core/Matcher.html +675 -0
- data/site/public/docs/renee-render/Renee/Core/RackInteraction.html +488 -0
- data/site/public/docs/renee-render/Renee/Core/RequestContext.html +421 -0
- data/site/public/docs/renee-render/Renee/Core/Responding.html +873 -0
- data/site/public/docs/renee-render/Renee/Core/Response.html +691 -0
- data/site/public/docs/renee-render/Renee/Core/Routing.html +1682 -0
- data/site/public/docs/renee-render/Renee/Core/Transform.html +249 -0
- data/site/public/docs/renee-render/Renee/Core/URLGeneration.html +597 -0
- data/site/public/docs/renee-render/Renee/Render.html +873 -0
- data/site/public/docs/renee-render/Renee/Render/ClassMethods.html +382 -0
- data/site/public/docs/renee-render/Renee/Render/TemplateNotFound.html +126 -0
- data/site/public/docs/renee-render/_index.html +143 -0
- data/site/public/docs/renee-render/class_list.html +47 -0
- data/site/public/docs/renee-render/css/common.css +1 -0
- data/site/public/docs/renee-render/css/full_list.css +55 -0
- data/site/public/docs/renee-render/css/style.css +322 -0
- data/site/public/docs/renee-render/file.README-renee-render.html +104 -0
- data/site/public/docs/renee-render/file.README.html +212 -0
- data/site/public/docs/renee-render/file_list.html +49 -0
- data/site/public/docs/renee-render/frames.html +13 -0
- data/site/public/docs/renee-render/index.html +104 -0
- data/site/public/docs/renee-render/js/app.js +205 -0
- data/site/public/docs/renee-render/js/full_list.js +167 -0
- data/site/public/docs/renee-render/js/jquery.js +16 -0
- data/site/public/docs/renee-render/method_list.html +110 -0
- data/site/public/docs/renee-render/top-level-namespace.html +103 -0
- data/site/public/docs/renee-session/Renee.html +106 -0
- data/site/public/docs/renee-session/Renee/Session.html +173 -0
- data/site/public/docs/renee-session/Renee/Session/ClassMethods.html +470 -0
- data/site/public/docs/renee-session/_index.html +136 -0
- data/site/public/docs/renee-session/class_list.html +47 -0
- data/site/public/docs/renee-session/css/common.css +1 -0
- data/site/public/docs/renee-session/css/full_list.css +55 -0
- data/site/public/docs/renee-session/css/style.css +322 -0
- data/site/public/docs/renee-session/file.README-renee-core.html +341 -0
- data/site/public/docs/renee-session/file.README-renee-session.html +69 -0
- data/site/public/docs/renee-session/file_list.html +49 -0
- data/site/public/docs/renee-session/frames.html +13 -0
- data/site/public/docs/renee-session/index.html +69 -0
- data/site/public/docs/renee-session/js/app.js +205 -0
- data/site/public/docs/renee-session/js/full_list.js +167 -0
- data/site/public/docs/renee-session/js/jquery.js +16 -0
- data/site/public/docs/renee-session/method_list.html +102 -0
- data/site/public/docs/renee-session/top-level-namespace.html +103 -0
- data/site/public/docs/renee-url-generation/Renee.html +208 -0
- data/site/public/docs/renee-url-generation/Renee/Core.html +366 -0
- data/site/public/docs/renee-url-generation/Renee/Core/Chaining.html +192 -0
- data/site/public/docs/renee-url-generation/Renee/Core/ClassMethods.html +725 -0
- data/site/public/docs/renee-url-generation/Renee/Core/ClientError.html +317 -0
- data/site/public/docs/renee-url-generation/Renee/Core/EnvAccessors.html +152 -0
- data/site/public/docs/renee-url-generation/Renee/Core/EnvAccessors/ClassMethods.html +354 -0
- data/site/public/docs/renee-url-generation/Renee/Core/Matcher.html +675 -0
- data/site/public/docs/renee-url-generation/Renee/Core/Plugins.html +475 -0
- data/site/public/docs/renee-url-generation/Renee/Core/RackInteraction.html +488 -0
- data/site/public/docs/renee-url-generation/Renee/Core/RequestContext.html +511 -0
- data/site/public/docs/renee-url-generation/Renee/Core/Responding.html +877 -0
- data/site/public/docs/renee-url-generation/Renee/Core/Response.html +691 -0
- data/site/public/docs/renee-url-generation/Renee/Core/Routing.html +1589 -0
- data/site/public/docs/renee-url-generation/Renee/Core/Transform.html +249 -0
- data/site/public/docs/renee-url-generation/_index.html +244 -0
- data/site/public/docs/renee-url-generation/class_list.html +47 -0
- data/site/public/docs/renee-url-generation/css/common.css +1 -0
- data/site/public/docs/renee-url-generation/css/full_list.css +55 -0
- data/site/public/docs/renee-url-generation/css/style.css +322 -0
- data/site/public/docs/renee-url-generation/file.README-renee-url-generation.html +69 -0
- data/site/public/docs/renee-url-generation/file_list.html +49 -0
- data/site/public/docs/renee-url-generation/frames.html +13 -0
- data/site/public/docs/renee-url-generation/index.html +69 -0
- data/site/public/docs/renee-url-generation/js/app.js +205 -0
- data/site/public/docs/renee-url-generation/js/full_list.js +167 -0
- data/site/public/docs/renee-url-generation/js/jquery.js +16 -0
- data/site/public/docs/renee-url-generation/method_list.html +590 -0
- data/site/public/docs/renee-url-generation/top-level-namespace.html +103 -0
- data/site/public/docs/renee/Renee.html +232 -0
- data/site/public/docs/renee/Renee/Application.html +367 -0
- data/site/public/docs/renee/Renee/Core.html +370 -0
- data/site/public/docs/renee/Renee/Core/Chaining.html +192 -0
- data/site/public/docs/renee/Renee/Core/ClassMethods.html +725 -0
- data/site/public/docs/renee/Renee/Core/ClientError.html +317 -0
- data/site/public/docs/renee/Renee/Core/EnvAccessors.html +152 -0
- data/site/public/docs/renee/Renee/Core/EnvAccessors/ClassMethods.html +354 -0
- data/site/public/docs/renee/Renee/Core/Matcher.html +675 -0
- data/site/public/docs/renee/Renee/Core/Plugins.html +475 -0
- data/site/public/docs/renee/Renee/Core/RackInteraction.html +488 -0
- data/site/public/docs/renee/Renee/Core/RequestContext.html +511 -0
- data/site/public/docs/renee/Renee/Core/Responding.html +877 -0
- data/site/public/docs/renee/Renee/Core/Response.html +691 -0
- data/site/public/docs/renee/Renee/Core/Routing.html +1589 -0
- data/site/public/docs/renee/Renee/Core/Transform.html +249 -0
- data/site/public/docs/renee/Renee/Core/URLGeneration.html +597 -0
- data/site/public/docs/renee/Renee/Render.html +877 -0
- data/site/public/docs/renee/Renee/Render/ClassMethods.html +382 -0
- data/site/public/docs/renee/Renee/Render/TemplateNotFound.html +126 -0
- data/site/public/docs/renee/Renee/Session.html +177 -0
- data/site/public/docs/renee/Renee/Session/ClassMethods.html +470 -0
- data/site/public/docs/renee/Renee/URLGeneration.html +142 -0
- data/site/public/docs/renee/Renee/URLGeneration/ClassMethods.html +593 -0
- data/site/public/docs/renee/Renee/Util.html +163 -0
- data/site/public/docs/renee/_index.html +336 -0
- data/site/public/docs/renee/class_list.html +47 -0
- data/site/public/docs/renee/css/common.css +1 -0
- data/site/public/docs/renee/css/full_list.css +55 -0
- data/site/public/docs/renee/css/style.css +322 -0
- data/site/public/docs/renee/file.README.html +212 -0
- data/site/public/docs/renee/file_list.html +49 -0
- data/site/public/docs/renee/frames.html +13 -0
- data/site/public/docs/renee/index.html +212 -0
- data/site/public/docs/renee/js/app.js +205 -0
- data/site/public/docs/renee/js/full_list.js +167 -0
- data/site/public/docs/renee/js/jquery.js +16 -0
- data/site/public/docs/renee/method_list.html +758 -0
- data/site/public/docs/renee/top-level-namespace.html +202 -0
- data/site/public/img/favicon.ico +0 -0
- data/site/public/img/reneeclean.png +0 -0
- data/site/public/img/russiangithub.png +0 -0
- data/site/public/img/stoneposter.png +0 -0
- data/site/public/img/vospit.jpeg +0 -0
- data/site/views/chaining.md +32 -0
- data/site/views/index.md +219 -0
- data/site/views/layouts/app.haml +16 -0
- data/site/views/rack-integration.md +51 -0
- data/site/views/responding.md +103 -0
- data/site/views/route-generation.md +82 -0
- data/site/views/routing.md +261 -0
- data/site/views/settings.md +19 -0
- data/site/views/team-renee.md +13 -0
- data/site/views/tutorial.md +57 -0
- data/site/views/variable-types.md +57 -0
- data/test.watchr +61 -0
- data/test/renee-core/chaining_test.rb +33 -0
- data/test/renee-core/env_accessors_test.rb +43 -0
- data/test/renee-core/include_test.rb +14 -0
- data/test/renee-core/request_context_test.rb +70 -0
- data/test/renee-core/responding_test.rb +128 -0
- data/test/renee-core/routing_test.rb +443 -0
- data/test/renee-core/test_helper.rb +4 -0
- data/test/renee-core/variable_type_test.rb +57 -0
- data/test/renee-render/render_test.rb +162 -0
- data/test/renee-render/test_helper.rb +9 -0
- data/test/renee-session/session_test.rb +31 -0
- data/test/renee-session/test_helper.rb +9 -0
- data/test/renee-url-generation/test_helper.rb +10 -0
- data/test/renee-url-generation/url_generation_test.rb +63 -0
- data/test/{blog_test.rb → renee/blog_test.rb} +10 -5
- data/test/renee/test_helper.rb +56 -0
- data/test/test_helper.rb +23 -10
- metadata +333 -156
- data/.yardopts +0 -6
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'renee/util'
|
2
|
+
require 'renee/version'
|
3
|
+
|
4
|
+
module Renee
|
5
|
+
module Session
|
6
|
+
module ClassMethods
|
7
|
+
attr_reader :store_type
|
8
|
+
|
9
|
+
def add_session_type(type, cls)
|
10
|
+
session_stores[type] = cls
|
11
|
+
end
|
12
|
+
|
13
|
+
def session(type, *args, &blk)
|
14
|
+
if session_stores.key?(type)
|
15
|
+
@store_type = [session_stores[type], args, blk]
|
16
|
+
else
|
17
|
+
raise "Store type #{type} is unknown, choose from #{session_stores.keys.map(&:inspect).join(', ')}"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def disable_session
|
22
|
+
@store_type = nil
|
23
|
+
end
|
24
|
+
|
25
|
+
def session_enabled?
|
26
|
+
!@store_type.nil?
|
27
|
+
end
|
28
|
+
|
29
|
+
def session_stores
|
30
|
+
@session_stores ||= {}
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.included(o)
|
35
|
+
o.extend(ClassMethods)
|
36
|
+
o.add_session_type :cookie, 'Rack::Session::Cookie'
|
37
|
+
o.add_session_type :pool, 'Rack::Session::Pool'
|
38
|
+
o.add_session_type :memcache, 'Rack::Session::Memcache'
|
39
|
+
o.on_init do
|
40
|
+
session_constant = Renee::Util.lookup_constant(store_type[0])
|
41
|
+
use session_constant, *store_type[1], &store_type[2]
|
42
|
+
define_method(:session) { env[Rack::Session::Abstract::ENV_SESSION_KEY] }
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def session
|
47
|
+
raise "Session not enabled"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,117 @@
|
|
1
|
+
require 'uri'
|
2
|
+
|
3
|
+
require 'renee/version'
|
4
|
+
|
5
|
+
module Renee
|
6
|
+
# URL generator for creating paths and URLs within your application.
|
7
|
+
module URLGeneration
|
8
|
+
# Current version of Renee::URLGeneration
|
9
|
+
VERSION = Renee::VERSION
|
10
|
+
|
11
|
+
def self.included(o)
|
12
|
+
o.extend(ClassMethods)
|
13
|
+
end
|
14
|
+
|
15
|
+
# Class-methods included by this module.
|
16
|
+
module ClassMethods
|
17
|
+
# Registers new paths for generation.
|
18
|
+
# @param [Symbol] name The name of the path
|
19
|
+
# @param [String] pattern The pattern used for generation.
|
20
|
+
# @param [Hash, nil] defaults Any default values used for generation.
|
21
|
+
#
|
22
|
+
# @example
|
23
|
+
# renee.register(:path, "/my/:var/path")
|
24
|
+
# renee.path(:path, 123) # => "/my/123/path"
|
25
|
+
# renee.path(:path, :var => 'hey you') # => "/my/hey%20you/path"
|
26
|
+
def register(name, pattern, defaults = nil)
|
27
|
+
url_generators[name] = Generator.new("#{@generation_prefix}#{pattern}", defaults_for_generation(defaults))
|
28
|
+
end
|
29
|
+
|
30
|
+
# Allows the creation of generation contexts.
|
31
|
+
# @param [String] prefix The prefix to add to subsequent calls to #register.
|
32
|
+
# @param [Hash, nil] defaults The defaults to add to subsequent calls to #register.
|
33
|
+
# @see #register
|
34
|
+
#
|
35
|
+
# @example
|
36
|
+
# renee.prefix("/prefix") {
|
37
|
+
# renee.register(:prefix_path, "/path") # would register /prefix/path
|
38
|
+
# }
|
39
|
+
def prefix(prefix, defaults = nil, &blk)
|
40
|
+
generator = self
|
41
|
+
subgenerator = Class.new {
|
42
|
+
include URLGeneration::ClassMethods
|
43
|
+
define_method(:url_generators) { generator.send(:url_generators) }
|
44
|
+
}.new
|
45
|
+
subgenerator.instance_variable_set(:@generation_prefix, "#{@generation_prefix}#{prefix}")
|
46
|
+
subgenerator.instance_variable_set(:@generation_defaults, defaults_for_generation(defaults))
|
47
|
+
if block_given?
|
48
|
+
old_prefix, old_defaults = @generation_prefix, @generation_defaults
|
49
|
+
@generation_prefix, @generation_defaults = "#{@generation_prefix}#{prefix}", defaults_for_generation(defaults)
|
50
|
+
subgenerator.instance_eval(&blk)
|
51
|
+
@generation_prefix, @generation_defaults = old_prefix, old_defaults
|
52
|
+
end
|
53
|
+
subgenerator
|
54
|
+
end
|
55
|
+
|
56
|
+
# Generates a path for a given name.
|
57
|
+
# @param [Symbol] name The name of the path
|
58
|
+
# @param [Object] args The values used to generate the path. Can be named with using :name => "value" or supplied
|
59
|
+
# in the order for which the variables were decalared in #register.
|
60
|
+
#
|
61
|
+
# @see #register
|
62
|
+
def path(name, *args)
|
63
|
+
generator = url_generators[name]
|
64
|
+
generator ? generator.path(*args) : raise("Generator for #{name} doesn't exist")
|
65
|
+
end
|
66
|
+
|
67
|
+
# Generates a url for a given name.
|
68
|
+
# @param (see #path)
|
69
|
+
# @see #path
|
70
|
+
def url(name, *args)
|
71
|
+
generator = url_generators[name]
|
72
|
+
generator ? generator.url(*args) : raise("Generator for #{name} doesn't exist")
|
73
|
+
end
|
74
|
+
|
75
|
+
private
|
76
|
+
def url_generators
|
77
|
+
@url_generators ||= {}
|
78
|
+
end
|
79
|
+
|
80
|
+
def defaults_for_generation(defaults)
|
81
|
+
@generation_defaults && defaults ? @generation_defaults.merge(defaults) : (defaults || @generation_defaults)
|
82
|
+
end
|
83
|
+
|
84
|
+
# @private
|
85
|
+
class Generator
|
86
|
+
attr_reader :defaults
|
87
|
+
|
88
|
+
def initialize(template, defaults = nil)
|
89
|
+
@defaults = defaults
|
90
|
+
parsed_template = URI.parse(template)
|
91
|
+
@host = parsed_template.host
|
92
|
+
@template = parsed_template.path
|
93
|
+
@scheme = parsed_template.scheme
|
94
|
+
port = parsed_template.port
|
95
|
+
if !port.nil? and (@scheme.nil? or @scheme == "http" && port != '80' or @scheme == "https" && port != '443')
|
96
|
+
@port_part = ":#{port}"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
def path(*args)
|
101
|
+
opts = args.last.is_a?(Hash) ? args.pop : nil
|
102
|
+
opts = opts ? defaults.merge(opts) : defaults.dup if defaults
|
103
|
+
path = @template.gsub(/:([a-zA-Z0-9_]+)/) { |name|
|
104
|
+
name = name[1, name.size - 1].to_sym
|
105
|
+
(opts && opts.delete(name)) || (defaults && defaults[name]) || args.shift || raise("variable #{name.inspect} not found")
|
106
|
+
}
|
107
|
+
URI.encode(opts.nil? || opts.empty? ? path : "#{path}?#{Rack::Utils.build_query(opts)}")
|
108
|
+
end
|
109
|
+
|
110
|
+
def url(*args)
|
111
|
+
raise "This URL cannot be generated as no host has been defined." if @host.nil?
|
112
|
+
"#{@scheme}://#{@host}#{@port_part}#{path(*args)}"
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
data/lib/renee/util.rb
ADDED
data/lib/renee/version.rb
CHANGED
data/plan.txt
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
things to do to make renee more complete
|
2
|
+
|
3
|
+
- sessions
|
4
|
+
- cookie interaction
|
5
|
+
- authentication
|
6
|
+
- admin
|
7
|
+
|
8
|
+
things to do to make renee faster
|
9
|
+
|
10
|
+
- shorten the callstack in routing, it can get long
|
11
|
+
|
12
|
+
things to do to make renee easier to deal with
|
13
|
+
|
14
|
+
- fenerators (a la padrino)
|
15
|
+
|
16
|
+
things to do to explain it better
|
17
|
+
|
18
|
+
- redo marking site per yehuda
|
19
|
+
- tutorials out the wazoo
|
data/renee-core.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "renee/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "renee-core"
|
7
|
+
s.version = Renee::VERSION
|
8
|
+
s.authors = ["Josh Hull", "Nathan Esquenazi", "Arthur Chiu"]
|
9
|
+
s.email = ["joshbuddy@gmail.com", "nesquena@gmail.com", "mr.arthur.chiu@gmail.com"]
|
10
|
+
s.homepage = "http://reneerb.com"
|
11
|
+
s.summary = %q{The super-friendly rack helpers}
|
12
|
+
s.description = %q{The super-friendly rack helpers.}
|
13
|
+
|
14
|
+
s.rubyforge_project = "renee-core"
|
15
|
+
|
16
|
+
s.files = `git ls-files -- lib/renee/core*`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- test/renee-core/*`.split("\n") + ["test/test_helper.rb"]
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
|
20
|
+
s.add_runtime_dependency 'rack', "~> 1.3.0"
|
21
|
+
|
22
|
+
s.add_development_dependency 'minitest', "~> 2.6.1"
|
23
|
+
s.add_development_dependency 'bundler'
|
24
|
+
s.add_development_dependency "rack-test", ">= 0.5.0"
|
25
|
+
s.add_development_dependency "rake"
|
26
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "renee/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "renee-render"
|
7
|
+
s.version = Renee::VERSION
|
8
|
+
s.authors = ["Josh Hull", "Nathan Esquenazi", "Arthur Chiu"]
|
9
|
+
s.email = ["joshbuddy@gmail.com", "nesquena@gmail.com", "mr.arthur.chiu@gmail.com"]
|
10
|
+
s.homepage = "http://reneerb.com"
|
11
|
+
s.summary = %q{The super-friendly web framework rendering component}
|
12
|
+
s.description = %q{The super-friendly web framework rendering component.}
|
13
|
+
|
14
|
+
s.rubyforge_project = "renee-render"
|
15
|
+
|
16
|
+
s.files = `git ls-files -- lib/renee/render*`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- test/renee-render/*`.split("\n") + ["test/test_helper.rb"]
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
|
20
|
+
s.add_runtime_dependency 'rack', "~> 1.3.0"
|
21
|
+
s.add_runtime_dependency 'tilt', "~> 1.3.3"
|
22
|
+
s.add_runtime_dependency 'callsite', '~> 0.0.6'
|
23
|
+
s.add_runtime_dependency 'renee-core', "#{Renee::VERSION}"
|
24
|
+
|
25
|
+
s.add_development_dependency 'minitest', "~> 2.6.1"
|
26
|
+
s.add_development_dependency 'rake'
|
27
|
+
s.add_development_dependency 'bundler'
|
28
|
+
s.add_development_dependency "rack-test", ">= 0.5.0"
|
29
|
+
s.add_development_dependency "haml", ">= 2.2.0"
|
30
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "renee/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "renee-session"
|
7
|
+
s.version = Renee::VERSION
|
8
|
+
s.authors = ["Josh Hull"]
|
9
|
+
s.email = ["joshbuddy@gmail.com"]
|
10
|
+
s.homepage = "http://reneerb.com"
|
11
|
+
s.summary = %q{The super-friendly web framework session component}
|
12
|
+
s.description = %q{The super-friendly web framework session component.}
|
13
|
+
|
14
|
+
s.rubyforge_project = "renee-session"
|
15
|
+
|
16
|
+
s.files = `git ls-files -- lib/renee/session*`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- test/renee-session/*`.split("\n") + ["test/test_helper.rb"]
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
|
20
|
+
s.add_runtime_dependency 'rack', "~> 1.3.0"
|
21
|
+
s.add_runtime_dependency 'renee-core', "#{Renee::VERSION}"
|
22
|
+
|
23
|
+
s.add_development_dependency 'minitest', "~> 2.6.1"
|
24
|
+
s.add_development_dependency 'rake'
|
25
|
+
s.add_development_dependency 'bundler'
|
26
|
+
s.add_development_dependency "rack-test", ">= 0.5.0"
|
27
|
+
s.add_development_dependency "haml", ">= 2.2.0"
|
28
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "renee/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "renee-url-generation"
|
7
|
+
s.version = Renee::VERSION
|
8
|
+
s.authors = ["Josh Hull", "Nathan Esquenazi", "Arthur Chiu"]
|
9
|
+
s.email = ["joshbuddy@gmail.com", "nesquena@gmail.com", "mr.arthur.chiu@gmail.com"]
|
10
|
+
s.homepage = "http://reneerb.com"
|
11
|
+
s.summary = %q{The super-friendly rack helpers -- URL generation}
|
12
|
+
s.description = %q{The super-friendly rack helpers -- URL generation.}
|
13
|
+
|
14
|
+
s.rubyforge_project = "renee-url-generation"
|
15
|
+
|
16
|
+
s.files = `git ls-files -- lib/renee/core*`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- test/renee-core/*`.split("\n") + ["test/test_helper.rb"]
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
|
20
|
+
s.add_development_dependency 'minitest', "~> 2.6.1"
|
21
|
+
s.add_development_dependency 'bundler'
|
22
|
+
s.add_development_dependency "rack-test", ">= 0.5.0"
|
23
|
+
s.add_development_dependency "rake"
|
24
|
+
end
|
data/renee.gemspec
CHANGED
@@ -14,21 +14,20 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.rubyforge_project = "renee"
|
16
16
|
|
17
|
-
s.files = `git ls-files
|
17
|
+
s.files = `git ls-files --exclude-per-directory=.gitignore -- *`.split("\n")
|
18
18
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
s.add_runtime_dependency 'rack', "~> 1.3.0"
|
23
|
+
s.add_runtime_dependency 'tilt', "~> 1.3.3"
|
24
|
+
s.add_runtime_dependency 'callsite', '~> 0.0.6'
|
25
|
+
|
26
26
|
s.add_development_dependency 'minitest', "~> 2.6.1"
|
27
27
|
s.add_development_dependency 'rake'
|
28
28
|
s.add_development_dependency 'bundler'
|
29
29
|
s.add_development_dependency "rack-test", ">= 0.5.0"
|
30
30
|
s.add_development_dependency "haml", ">= 2.2.0"
|
31
31
|
s.add_development_dependency "json"
|
32
|
-
s.add_development_dependency "yard"
|
33
32
|
s.add_development_dependency "shotgun"
|
34
33
|
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Copyright (c) 2011 Joshua Hull, Nathan Esquenazi, Arthur Chiu
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,75 @@
|
|
1
|
+
body {
|
2
|
+
margin-left: 20%;
|
3
|
+
margin-right: 20%;
|
4
|
+
background-image: url('/img/stoneposter.png');
|
5
|
+
font-family: Arial, Verdana;
|
6
|
+
}
|
7
|
+
|
8
|
+
body .container {
|
9
|
+
min-width: 500px;
|
10
|
+
background: #FCEA97;
|
11
|
+
border-style: solid;
|
12
|
+
border-width: 5px;
|
13
|
+
border-color: #FFC003;
|
14
|
+
border-radius: 15px;
|
15
|
+
padding: 2em;
|
16
|
+
margin-top: 1.2em;
|
17
|
+
}
|
18
|
+
|
19
|
+
h1 {
|
20
|
+
color: #1C1C19;
|
21
|
+
}
|
22
|
+
|
23
|
+
h2 {
|
24
|
+
color: #FFA000;
|
25
|
+
}
|
26
|
+
|
27
|
+
a {
|
28
|
+
text-decoration: none;
|
29
|
+
color: #A60202;
|
30
|
+
}
|
31
|
+
|
32
|
+
pre.CodeRay {
|
33
|
+
border: 1px black solid;
|
34
|
+
background-color: #1C1C19;
|
35
|
+
color: white;
|
36
|
+
padding: 5px;
|
37
|
+
-webkit-border-radius: 4px;
|
38
|
+
-moz-border-radius: 4px;
|
39
|
+
}
|
40
|
+
|
41
|
+
pre.CodeRay .string {
|
42
|
+
color: #FFC003;
|
43
|
+
}
|
44
|
+
|
45
|
+
pre.CodeRay .constant {
|
46
|
+
color: #A60202;
|
47
|
+
}
|
48
|
+
|
49
|
+
pre.CodeRay .instance-variable {
|
50
|
+
color: #FCEA97;
|
51
|
+
}
|
52
|
+
|
53
|
+
pre.CodeRay .keyword {
|
54
|
+
color: #dd7;
|
55
|
+
}
|
56
|
+
|
57
|
+
pre.CodeRay .symbol {
|
58
|
+
color: #f77;
|
59
|
+
}
|
60
|
+
|
61
|
+
pre.CodeRay .integer {
|
62
|
+
color: #f77;
|
63
|
+
}
|
64
|
+
|
65
|
+
pre.CodeRay .comment {
|
66
|
+
color: #BC9358;
|
67
|
+
}
|
68
|
+
|
69
|
+
pre.CodeRay .regexp {
|
70
|
+
color: #a33;
|
71
|
+
}
|
72
|
+
|
73
|
+
div.logo {
|
74
|
+
text-align: center;
|
75
|
+
}
|
@@ -0,0 +1,208 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Module: Renee
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.4
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
relpath = '';
|
19
|
+
if (relpath != '') relpath += '/';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
25
|
+
|
26
|
+
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
+
</script>
|
32
|
+
|
33
|
+
<div id="header">
|
34
|
+
<div id="menu">
|
35
|
+
|
36
|
+
<a href="_index.html">Index (R)</a> »
|
37
|
+
|
38
|
+
|
39
|
+
<span class="title">Renee</span>
|
40
|
+
|
41
|
+
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div id="search">
|
46
|
+
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
48
|
+
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
50
|
+
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
<div class="clear"></div>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<iframe id="search_frame"></iframe>
|
58
|
+
|
59
|
+
<div id="content"><h1>Module: Renee
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
</h1>
|
64
|
+
|
65
|
+
<dl class="box">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
<dt class="r1 last">Defined in:</dt>
|
75
|
+
<dd class="r1 last">lib/renee/core.rb<span class="defines">,<br />
|
76
|
+
lib/renee/core/matcher.rb,<br /> lib/renee/core/routing.rb,<br /> lib/renee/core/plugins.rb,<br /> lib/renee/core/chaining.rb,<br /> lib/renee/core/response.rb,<br /> lib/renee/core/transform.rb,<br /> lib/renee/core/exceptions.rb,<br /> lib/renee/core/responding.rb,<br /> lib/renee/core/env_accessors.rb,<br /> lib/renee/core/request_context.rb,<br /> lib/renee/core/rack_interaction.rb</span>
|
77
|
+
</dd>
|
78
|
+
|
79
|
+
</dl>
|
80
|
+
<div class="clear"></div>
|
81
|
+
|
82
|
+
<h2>Overview</h2><div class="docstring">
|
83
|
+
<div class="discussion">
|
84
|
+
<p>Top-level Renee constant</p>
|
85
|
+
|
86
|
+
|
87
|
+
</div>
|
88
|
+
</div>
|
89
|
+
<div class="tags">
|
90
|
+
|
91
|
+
|
92
|
+
</div><h2>Defined Under Namespace</h2>
|
93
|
+
<p class="children">
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Renee/Core.html" title="Renee::Core (class)">Core</a></span>
|
99
|
+
|
100
|
+
|
101
|
+
</p>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<h2>
|
109
|
+
Class Method Summary
|
110
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
111
|
+
</h2>
|
112
|
+
|
113
|
+
<ul class="summary">
|
114
|
+
|
115
|
+
<li class="public ">
|
116
|
+
<span class="summary_signature">
|
117
|
+
|
118
|
+
<a href="#core-class_method" title="core (class method)">+ (Object) <strong>core</strong>(&blk) </a>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
</span>
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<span class="summary_desc"><div class='inline'>
|
132
|
+
</div></span>
|
133
|
+
|
134
|
+
</li>
|
135
|
+
|
136
|
+
|
137
|
+
</ul>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<div id="class_method_details" class="method_details_list">
|
143
|
+
<h2>Class Method Details</h2>
|
144
|
+
|
145
|
+
|
146
|
+
<div class="method_details first">
|
147
|
+
<p class="signature first" id="core-class_method">
|
148
|
+
|
149
|
+
+ (<tt>Object</tt>) <strong>core</strong>(&blk)
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
</p><div class="docstring">
|
154
|
+
<div class="discussion">
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
<div class="tags">
|
161
|
+
|
162
|
+
<div class="examples">
|
163
|
+
<h3>Examples:</h3>
|
164
|
+
|
165
|
+
<h4><div class='inline'>
|
166
|
+
</div></h4>
|
167
|
+
<pre class="example code"><span class='const'>Renee</span><span class='period'>.</span><span class='id identifier rubyid_core'>core</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_path'>path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/hello</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_halt'>halt</span> <span class='symbol'>:ok</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span></pre>
|
168
|
+
|
169
|
+
</div>
|
170
|
+
|
171
|
+
|
172
|
+
</div><table class="source_code">
|
173
|
+
<tr>
|
174
|
+
<td>
|
175
|
+
<pre class="lines">
|
176
|
+
|
177
|
+
|
178
|
+
20
|
179
|
+
21
|
180
|
+
22
|
181
|
+
23
|
182
|
+
24</pre>
|
183
|
+
</td>
|
184
|
+
<td>
|
185
|
+
<pre class="code"><span class="info file"># File 'lib/renee/core.rb', line 20</span>
|
186
|
+
|
187
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_core'>core</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
|
188
|
+
<span class='id identifier rubyid_cls'>cls</span> <span class='op'>=</span> <span class='const'>Class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Renee</span><span class='op'>::</span><span class='const'>Core</span><span class='rparen'>)</span>
|
189
|
+
<span class='id identifier rubyid_cls'>cls</span><span class='period'>.</span><span class='id identifier rubyid_app'>app</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_blk'>blk</span>
|
190
|
+
<span class='id identifier rubyid_cls'>cls</span>
|
191
|
+
<span class='kw'>end</span></pre>
|
192
|
+
</td>
|
193
|
+
</tr>
|
194
|
+
</table>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
</div>
|
198
|
+
|
199
|
+
</div>
|
200
|
+
|
201
|
+
<div id="footer">
|
202
|
+
Generated on Mon Jan 23 11:10:30 2012 by
|
203
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
204
|
+
0.7.4 (ruby-1.9.2).
|
205
|
+
</div>
|
206
|
+
|
207
|
+
</body>
|
208
|
+
</html>
|