utopia 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/documentation/config.ru +1 -2
- data/documentation/pages/_page.xnode +2 -0
- data/documentation/pages/wiki/content.md +11 -2
- data/documentation/pages/wiki/middleware/localization/content.md +1 -2
- data/lib/utopia/version.rb +1 -1
- data/setup/site/Gemfile +2 -2
- data/setup/site/config.ru +1 -2
- data/setup/site/pages/_page.xnode +2 -0
- data/spec/utopia/performance_spec/config.ru +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3edea952597f73ffb5180c4789f03d505a267222
|
|
4
|
+
data.tar.gz: 7b08d38ff18ed3df40197eceb31b00440cbde42f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 217995d95e9b626e5a2de7e82d1851ebfe8fe51331d5ed4c44723471748cbd2ba385b30daa7c171213304d8aa087c1ce9e5e01500c1b844e052c703344edcf39
|
|
7
|
+
data.tar.gz: 93588f40fc942e6f64409936e97954af37010cb582d94fd261f222335469c6e0e12711cff3385fd3eaa999c9cb1a2e8ce5afdb5be4bb2963529dc320fb70c498
|
data/documentation/config.ru
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
<title>Utopia</title>
|
|
10
10
|
<?r end ?>
|
|
11
11
|
|
|
12
|
+
<base href="#{first.node.uri_path}"/>
|
|
13
|
+
|
|
12
14
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous" />
|
|
13
15
|
|
|
14
16
|
<link rel="icon" type="image/png" href="/_static/icon.png" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Utopia Documentation Wiki
|
|
2
2
|
|
|
3
|
-
This wiki includes documentation and examples showing how to use Utopia. You can also browse the [code documentation](/code/index.html) for more detail.
|
|
3
|
+
This wiki includes documentation and examples showing how to use Utopia. You can also browse the [code documentation](/code/index.html) for more detail. Feel free to [edit](edit) any part of this documentation and submit a PR.
|
|
4
4
|
|
|
5
5
|
## Introduction Guide
|
|
6
6
|
|
|
@@ -15,6 +15,8 @@ Reading these pages in order will give you an overview of the design of Utopia,
|
|
|
15
15
|
|
|
16
16
|
## Middleware
|
|
17
17
|
|
|
18
|
+
The following are Rack Middleware which provide the core of Utopia.
|
|
19
|
+
|
|
18
20
|
- [Static](middleware/static/) — Serve static files efficiently.
|
|
19
21
|
- [Redirection](middleware/redirection/) — Redirect URL patterns and status codes.
|
|
20
22
|
- [Localization](middleware/localization/) — Non-intrusive localization of resources.
|
|
@@ -22,4 +24,11 @@ Reading these pages in order will give you an overview of the design of Utopia,
|
|
|
22
24
|
- [Controller Actions](middleware/controller/actions/) — Invoke named actions.
|
|
23
25
|
- [Controller Rewrite](middleware/controller/rewrite/) — Pattern match requests.
|
|
24
26
|
- [Content](middleware/content/) — XML-style template engine with dynamic markup.
|
|
25
|
-
- [Session](middleware/session/) — Session storage using encrypted client-side cookies.
|
|
27
|
+
- [Session](middleware/session/) — Session storage using encrypted client-side cookies.
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
Here are some open-source sites built on Utopia.
|
|
32
|
+
|
|
33
|
+
- [www.codeotaku.com](http://www.codeotaku.com) ([source](https://github.com/ioquatix/www.codeotaku.com)) — Personal website, blog.
|
|
34
|
+
- Financier ([source](https://github.com/ioquatix/financier)) — Small business management platform, invoicing.
|
|
@@ -5,8 +5,7 @@ The localization middleware uses the `Accept-Language` header to guess the prefe
|
|
|
5
5
|
```ruby
|
|
6
6
|
use Utopia::Localization,
|
|
7
7
|
:default_locale => 'en',
|
|
8
|
-
:locales => ['en', 'de', 'ja', 'zh']
|
|
9
|
-
:nonlocalized => ['/_static/', '/_cache/']
|
|
8
|
+
:locales => ['en', 'de', 'ja', 'zh']
|
|
10
9
|
```
|
|
11
10
|
|
|
12
11
|
Somewhere further down the chain, you can localize a resource:
|
data/lib/utopia/version.rb
CHANGED
data/setup/site/Gemfile
CHANGED
data/setup/site/config.ru
CHANGED
|
@@ -30,8 +30,7 @@ use Utopia::Redirection::Errors,
|
|
|
30
30
|
|
|
31
31
|
use Utopia::Localization,
|
|
32
32
|
:default_locale => 'en',
|
|
33
|
-
:locales => ['en', 'de', 'ja', 'zh']
|
|
34
|
-
:ignore => ['/_static/', '/_cache/', '/_components/']
|
|
33
|
+
:locales => ['en', 'de', 'ja', 'zh']
|
|
35
34
|
|
|
36
35
|
require 'utopia/session'
|
|
37
36
|
use Utopia::Session,
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
<title>Utopia</title>
|
|
11
11
|
<?r end ?>
|
|
12
12
|
|
|
13
|
+
<base href="#{first.node.uri_path}"/>
|
|
14
|
+
|
|
13
15
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous" />
|
|
14
16
|
|
|
15
17
|
<link rel="icon" type="image/png" href="/_static/icon.png" />
|
|
@@ -17,8 +17,7 @@ use Utopia::Redirection::Errors,
|
|
|
17
17
|
|
|
18
18
|
# use Utopia::Localization,
|
|
19
19
|
# :default_locale => 'en',
|
|
20
|
-
# :locales => ['en', 'de', 'ja', 'zh']
|
|
21
|
-
# :ignore => ['/_static/', '/_cache/']
|
|
20
|
+
# :locales => ['en', 'de', 'ja', 'zh']
|
|
22
21
|
|
|
23
22
|
use Utopia::Controller,
|
|
24
23
|
root: File.expand_path('pages', __dir__)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: utopia
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-03-
|
|
11
|
+
date: 2017-03-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: trenni
|