utopia 0.9.26 → 0.9.27
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/utopia.rb +16 -2
- data/lib/utopia/etanni.rb +3 -14
- data/lib/utopia/extensions.rb +17 -14
- data/lib/utopia/link.rb +3 -14
- data/lib/utopia/middleware.rb +3 -14
- data/lib/utopia/middleware/all.rb +3 -14
- data/lib/utopia/middleware/benchmark.rb +3 -14
- data/lib/utopia/middleware/content.rb +3 -14
- data/lib/utopia/middleware/content/node.rb +3 -14
- data/lib/utopia/middleware/controller.rb +3 -14
- data/lib/utopia/middleware/directory_index.rb +3 -14
- data/lib/utopia/middleware/localization.rb +3 -14
- data/lib/utopia/middleware/localization/name.rb +3 -14
- data/lib/utopia/middleware/logger.rb +3 -14
- data/lib/utopia/middleware/redirector.rb +33 -42
- data/lib/utopia/middleware/requester.rb +3 -14
- data/lib/utopia/middleware/static.rb +3 -15
- data/lib/utopia/path.rb +3 -14
- data/lib/utopia/response_helper.rb +3 -14
- data/lib/utopia/session/encrypted_cookie.rb +3 -14
- data/lib/utopia/tag.rb +3 -14
- data/lib/utopia/tags.rb +3 -14
- data/lib/utopia/tags/all.rb +3 -14
- data/lib/utopia/tags/env.rb +3 -14
- data/lib/utopia/tags/fortune.rb +3 -14
- data/lib/utopia/tags/gallery.rb +3 -14
- data/lib/utopia/tags/google_analytics.rb +3 -14
- data/lib/utopia/tags/node.rb +3 -14
- data/lib/utopia/tags/override.rb +3 -14
- data/lib/utopia/time_store.rb +3 -14
- data/lib/utopia/version.rb +4 -15
- data/lib/utopia/xnode.rb +3 -14
- data/lib/utopia/xnode/processor.rb +3 -14
- data/lib/utopia/xnode/scanner.rb +3 -14
- metadata +3 -3
data/lib/utopia.rb
CHANGED
@@ -1,2 +1,16 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
#
|
3
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
4
|
+
#
|
5
|
+
# For more information, please see http://www.oriontransfer.co.nz/software/utopia
|
6
|
+
#
|
7
|
+
# This program is free software: you can redistribute it and/or modify it under the terms
|
8
|
+
# of the GNU Affero General Public License as published by the Free Software Foundation,
|
9
|
+
# either version 3 of the License, or (at your option) any later version.
|
10
|
+
#
|
11
|
+
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
12
|
+
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
13
|
+
# See the GNU General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Affero General Public License along with this
|
16
|
+
# program. If not, see <http://www.gnu.org/licenses/>.
|
data/lib/utopia/etanni.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
# [Etanni] Copyright (c) 2008 Michael Fellinger <m.fellinger@gmail.com>
|
17
6
|
#
|
data/lib/utopia/extensions.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'active_support'
|
17
6
|
|
@@ -30,6 +19,20 @@ class Date
|
|
30
19
|
end
|
31
20
|
end
|
32
21
|
|
22
|
+
class Regexp
|
23
|
+
def self.starts_with(string)
|
24
|
+
return /^#{Regexp.escape(string)}/
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.ends_with(string)
|
28
|
+
return /#{Regexp.escape(string)}$/
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.contains(string)
|
32
|
+
return Regexp.new(string)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
33
36
|
class String
|
34
37
|
HTML_ESCAPE = {"&" => "&", "<" => "<", ">" => ">", "\"" => """}
|
35
38
|
HTML_ESCAPE_PATTERN = Regexp.new("[" + Regexp.quote(HTML_ESCAPE.keys.join) + "]")
|
data/lib/utopia/link.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/extensions'
|
17
6
|
|
data/lib/utopia/middleware.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'pathname'
|
17
6
|
require 'logger'
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'pathname'
|
17
6
|
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/middleware'
|
17
6
|
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/middleware'
|
17
6
|
require 'utopia/link'
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'set'
|
17
6
|
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/middleware'
|
17
6
|
require 'utopia/path'
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/middleware'
|
17
6
|
require 'utopia/path'
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/middleware'
|
17
6
|
require 'utopia/response_helper'
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
module Utopia
|
17
6
|
module Middleware
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/middleware'
|
17
6
|
require 'utopia/time_store'
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/middleware'
|
17
6
|
|
@@ -43,17 +32,11 @@ module Utopia
|
|
43
32
|
body = StringIO.new
|
44
33
|
|
45
34
|
body.puts "<!DOCTYPE html><html><head><title>Fatal Error</title></head><body>"
|
46
|
-
|
47
35
|
body.puts "<h1>Fatal Error</h1>"
|
48
|
-
|
49
36
|
body.puts "<p>While requesting resource #{env['PATH_INFO'].to_html}, a fatal error occurred.</p>"
|
50
|
-
|
51
37
|
body.puts "<blockquote><strong>#{ex.class.name.to_html}</strong>: #{ex.to_s.to_html}</blockquote>"
|
52
|
-
|
53
38
|
body.puts "<p>There is nothing more we can do to fix the problem at this point.</p>"
|
54
|
-
|
55
39
|
body.puts "<p>We apologize for the inconvenience.</p>"
|
56
|
-
|
57
40
|
body.puts "</body></html>"
|
58
41
|
body.rewind
|
59
42
|
|
@@ -89,38 +72,43 @@ module Utopia
|
|
89
72
|
|
90
73
|
class Redirector
|
91
74
|
private
|
92
|
-
def
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
result = @strings
|
99
|
-
when Regexp
|
100
|
-
result = @patterns
|
75
|
+
def normalize_strings(strings)
|
76
|
+
normalized = {}
|
77
|
+
|
78
|
+
strings.each_pair do |key, value|
|
79
|
+
if Array === key
|
80
|
+
key.each { |s| normalized[s] = value }
|
101
81
|
else
|
102
|
-
|
103
|
-
next
|
82
|
+
normalized[key] = value
|
104
83
|
end
|
84
|
+
end
|
85
|
+
|
86
|
+
return normalized
|
87
|
+
end
|
105
88
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
89
|
+
def normalize_patterns(patterns)
|
90
|
+
normalized = []
|
91
|
+
|
92
|
+
patterns.each do |pattern|
|
93
|
+
uri = pattern.pop
|
94
|
+
|
95
|
+
pattern.each do |key|
|
96
|
+
normalized.push([key, uri])
|
112
97
|
end
|
113
98
|
end
|
99
|
+
|
100
|
+
return normalized
|
114
101
|
end
|
115
102
|
|
116
103
|
public
|
117
104
|
def initialize(app, options = {})
|
118
105
|
@app = app
|
119
106
|
|
120
|
-
@strings = {}
|
121
|
-
@patterns = {}
|
107
|
+
@strings = options[:strings] || {}
|
108
|
+
@patterns = options[:patterns] || {}
|
122
109
|
|
123
|
-
|
110
|
+
@strings = normalize_strings(@strings)
|
111
|
+
@patterns = normalize_patterns(@patterns)
|
124
112
|
|
125
113
|
@errors = options[:errors]
|
126
114
|
|
@@ -143,8 +131,11 @@ module Utopia
|
|
143
131
|
end
|
144
132
|
|
145
133
|
@patterns.each do |pattern, uri|
|
146
|
-
|
147
|
-
|
134
|
+
$stderr.puts "Trying #{pattern} for #{base_path}"
|
135
|
+
if match_data = pattern.match(base_path)
|
136
|
+
result = redirect(uri, match_data)
|
137
|
+
|
138
|
+
return result if result != nil
|
148
139
|
end
|
149
140
|
end
|
150
141
|
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/middleware'
|
17
6
|
|
@@ -1,18 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
15
|
-
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
16
4
|
require 'utopia/middleware'
|
17
5
|
require 'utopia/path'
|
18
6
|
|
data/lib/utopia/path.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'rack/utils'
|
17
6
|
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
module Rack
|
17
6
|
class Response
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'openssl'
|
17
6
|
require 'digest/sha2'
|
data/lib/utopia/tag.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
module Utopia
|
17
6
|
|
data/lib/utopia/tags.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
module Utopia
|
17
6
|
module Tags
|
data/lib/utopia/tags/all.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'pathname'
|
17
6
|
|
data/lib/utopia/tags/env.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/tags'
|
17
6
|
|
data/lib/utopia/tags/fortune.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/tags'
|
17
6
|
|
data/lib/utopia/tags/gallery.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/tags'
|
17
6
|
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/tags'
|
17
6
|
|
data/lib/utopia/tags/node.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/tags'
|
17
6
|
|
data/lib/utopia/tags/override.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/tags'
|
17
6
|
|
data/lib/utopia/time_store.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'set'
|
17
6
|
require 'csv'
|
data/lib/utopia/version.rb
CHANGED
@@ -1,23 +1,12 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
module Utopia
|
17
6
|
module VERSION #:nodoc:
|
18
7
|
MAJOR = 0
|
19
8
|
MINOR = 9
|
20
|
-
TINY =
|
9
|
+
TINY = 27
|
21
10
|
|
22
11
|
STRING = [MAJOR, MINOR, TINY].join('.')
|
23
12
|
end
|
data/lib/utopia/xnode.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/xnode/scanner'
|
17
6
|
require 'utopia/xnode/processor'
|
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'utopia/tag'
|
17
6
|
|
data/lib/utopia/xnode/scanner.rb
CHANGED
@@ -1,17 +1,6 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1
|
+
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3.
|
2
|
+
# Copyright 2010 Samuel Williams. All rights reserved.
|
3
|
+
# See <utopia.rb> for licensing details.
|
15
4
|
|
16
5
|
require 'strscan'
|
17
6
|
require 'tempfile'
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 9
|
8
|
-
-
|
9
|
-
version: 0.9.
|
8
|
+
- 27
|
9
|
+
version: 0.9.27
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Samuel Williams
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-20 00:00:00 +12:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|