utopia 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +73 -38
- data/bin/utopia +88 -49
- data/lib/utopia/version.rb +1 -1
- data/setup/server/git/hooks/post-receive +67 -0
- data/setup/{Gemfile → site/Gemfile} +0 -0
- data/setup/site/Rakefile +9 -0
- data/setup/{cache → site/cache}/head/readme.txt +0 -0
- data/setup/{cache → site/cache}/meta/readme.txt +0 -0
- data/setup/{config.ru → site/config.ru} +0 -0
- data/setup/{lib → site/lib}/readme.txt +0 -0
- data/setup/{pages → site/pages}/_heading.xnode +0 -0
- data/setup/{pages → site/pages}/_page.xnode +0 -0
- data/setup/{pages → site/pages}/_static/icon.png +0 -0
- data/setup/{pages → site/pages}/_static/site.css +0 -0
- data/setup/{pages → site/pages}/errors/exception.xnode +0 -0
- data/setup/{pages → site/pages}/errors/file-not-found.xnode +0 -0
- data/setup/{pages → site/pages}/links.yaml +0 -0
- data/setup/{pages → site/pages}/welcome/index.xnode +0 -0
- data/setup/{public → site/public}/readme.txt +0 -0
- data/setup/{tmp → site/tmp}/readme.txt +0 -0
- metadata +19 -18
- data/setup/Rakefile +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc5e0658eefc0372da3d7efd4ee1b0ff65747db4
|
4
|
+
data.tar.gz: 46b821103c885f1724c5a4d05704721a7f87adfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11b0669ed76fa442c7b62505315e19c3d6617e221f6ffe48f1f4018a10f310cb3faa8a92f5231ed19f5d29b50e56fcbad512c4e85153623eb36400dcac9b01c5
|
7
|
+
data.tar.gz: 86679c8aba508781eeb1a76d76fa19dd11497482aa2c7f4b3c3544b253831ea1c40b4a2dec246f81f574fd2bd1dc431245942a176f64234968548ca4fa4562c8
|
data/README.md
CHANGED
@@ -5,25 +5,86 @@ to build highly complex dynamic websites. It uses the filesystem heavily for
|
|
5
5
|
content and provides functions for interacting with files and directories as
|
6
6
|
structure representing the website.
|
7
7
|
|
8
|
+
[![Build Status](https://secure.travis-ci.org/ioquatix/utopia.png)](http://travis-ci.org/ioquatix/utopia)
|
9
|
+
[![Code Climate](https://codeclimate.com/github/ioquatix/utopia.png)](https://codeclimate.com/github/ioquatix/utopia)
|
10
|
+
[![Coverage Status](https://coveralls.io/repos/ioquatix/utopia/badge.svg)](https://coveralls.io/r/ioquatix/utopia)
|
11
|
+
|
12
|
+
## Installation
|
13
|
+
|
14
|
+
### Local Setup
|
15
|
+
|
16
|
+
Install utopia:
|
17
|
+
|
18
|
+
$ gem install utopia
|
19
|
+
|
20
|
+
Create a new site:
|
21
|
+
|
22
|
+
$ utopia create www.example.com
|
23
|
+
$ cd www.example.com
|
24
|
+
$ rake server
|
25
|
+
|
26
|
+
#### Bower Integration
|
27
|
+
|
28
|
+
If you create a site using the utopia generator, it includes a `.bowerrc` configuration which installs components into `public/_static/components`. To install jquery, for example:
|
29
|
+
|
30
|
+
$ bower install jquery
|
31
|
+
|
32
|
+
Then add the appropriate `<script>` tags to `pages/_page.xnode`:
|
33
|
+
|
34
|
+
<script src="/_static/components/jquery/dist/jquery.min.js" type="text/javascript"></script>
|
35
|
+
|
36
|
+
### Server Setup
|
37
|
+
|
38
|
+
Utopia can be used to set up remote sites quickly and easily.
|
39
|
+
|
40
|
+
Firstly log into your remote site using `ssh` and install utopia:
|
41
|
+
|
42
|
+
$ ssh remote
|
43
|
+
$ sudo gem install utopia
|
44
|
+
|
45
|
+
Then use the utopia command to generate a new remote site:
|
46
|
+
|
47
|
+
$ sudo -u http utopia server:create /srv/http/www.example.com
|
48
|
+
|
49
|
+
On the local site, you can set up a git remote:
|
50
|
+
|
51
|
+
$ git remote add production ssh://remote/srv/http/www.example.com
|
52
|
+
$ git push --set-upstream production master
|
53
|
+
|
54
|
+
### Passenger+Nginx Setup
|
55
|
+
|
56
|
+
Utopia works well with Passenger+Nginx. Installing Passenger+Nginx is easy:
|
57
|
+
|
58
|
+
$ ssh remote
|
59
|
+
$ sudo gem install passenger
|
60
|
+
$ passenger-install-nginx-module
|
61
|
+
|
62
|
+
Then, Nginx is configured like so:
|
63
|
+
|
64
|
+
server {
|
65
|
+
listen 80;
|
66
|
+
server_name www.example.com;
|
67
|
+
root /srv/http/www.example.com/public;
|
68
|
+
passenger_enabled on;
|
69
|
+
}
|
70
|
+
|
71
|
+
server {
|
72
|
+
listen 80;
|
73
|
+
server_name example.com;
|
74
|
+
rewrite ^ http://www.example.com$uri permanent;
|
75
|
+
}
|
76
|
+
|
77
|
+
## Usage
|
78
|
+
|
8
79
|
Utopia builds on top of Rack with the following middleware:
|
9
80
|
|
10
|
-
- `Utopia::Static`: Serve static files
|
81
|
+
- `Utopia::Static`: Serve static files efficiently.
|
11
82
|
- `Utopia::Redirector`: Redirect URL patterns and status codes.
|
12
83
|
- `Utopia::Localization`: Non-intrusive localization of resources.
|
13
84
|
- `Utopia::Controller`: Dynamic behaviour with recursive execution.
|
14
85
|
- `Utopia::Content`: XML-style template engine with powerful tag behaviours.
|
15
86
|
- `Utopia::Session::EncryptedCookie`: Session storage using an encrypted cookie.
|
16
87
|
|
17
|
-
For more details please see the main [project page][1].
|
18
|
-
|
19
|
-
[1]: http://www.oriontransfer.co.nz/gems/utopia
|
20
|
-
|
21
|
-
[![Build Status](https://secure.travis-ci.org/ioquatix/utopia.png)](http://travis-ci.org/ioquatix/utopia)
|
22
|
-
[![Code Climate](https://codeclimate.com/github/ioquatix/utopia.png)](https://codeclimate.com/github/ioquatix/utopia)
|
23
|
-
[![Coverage Status](https://coveralls.io/repos/ioquatix/utopia/badge.svg)](https://coveralls.io/r/ioquatix/utopia)
|
24
|
-
|
25
|
-
## Middleware
|
26
|
-
|
27
88
|
### Static
|
28
89
|
|
29
90
|
This middleware serves static files using the `mime-types` library. By default, it works with `Rack::Sendfile` and `Rack::Cache` and supports `ETag` based caching.
|
@@ -48,32 +109,6 @@ A tag based content generation system which integrates nicely with HTML5. Suppor
|
|
48
109
|
|
49
110
|
The encrypted cookie session management uses symmetric private key encryption to store data on the client and avoid tampering.
|
50
111
|
|
51
|
-
## Installation
|
52
|
-
|
53
|
-
Install utopia:
|
54
|
-
|
55
|
-
$ gem install utopia
|
56
|
-
|
57
|
-
Create a new site:
|
58
|
-
|
59
|
-
$ utopia create www.example.com
|
60
|
-
$ cd www.example.com
|
61
|
-
$ rake server
|
62
|
-
|
63
|
-
### Bower Integration
|
64
|
-
|
65
|
-
If you create a site using the utopia generator, it includes a `.bowerrc` configuration which installs components into `public/_static/components`. To install jquery, for example:
|
66
|
-
|
67
|
-
bower install jquery
|
68
|
-
|
69
|
-
Then add the appropriate `<script>` tags to `pages/_page.xnode`:
|
70
|
-
|
71
|
-
<script src="/_static/components/jquery/dist/jquery.min.js" type="text/javascript"></script>
|
72
|
-
|
73
|
-
## Usage
|
74
|
-
|
75
|
-
The default site includes documentation and examples.
|
76
|
-
|
77
112
|
## Contributing
|
78
113
|
|
79
114
|
1. Fork it
|
@@ -104,4 +139,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
104
139
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
105
140
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
106
141
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
107
|
-
THE SOFTWARE.
|
142
|
+
THE SOFTWARE.
|
data/bin/utopia
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
# Copyright,
|
3
|
+
# Copyright, 2015, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -30,82 +30,101 @@ require 'find'
|
|
30
30
|
require 'rake'
|
31
31
|
|
32
32
|
$app = Rake.application = Rake::Application.new
|
33
|
-
$app.init(
|
33
|
+
$app.init(File.basename($0))
|
34
|
+
|
35
|
+
Rake::TaskManager.record_task_metadata = true
|
36
|
+
|
37
|
+
verbose(false)
|
34
38
|
|
35
39
|
module Setup
|
36
|
-
|
37
|
-
SYMLINKS = {"public/_static" => "../pages/_static"}
|
40
|
+
BASE = File.expand_path("../../setup", __FILE__)
|
38
41
|
|
39
|
-
|
42
|
+
module Site
|
43
|
+
CONFIGURATION_FILES = ['config.ru', 'Gemfile', 'Rakefile']
|
44
|
+
|
45
|
+
DIRECTORIES = ["cache", "cache/meta", "cache/body", "lib", "pages", "public", "tmp"]
|
46
|
+
SYMLINKS = {"public/_static" => "../pages/_static"}
|
47
|
+
|
48
|
+
# Removed during upgrade process
|
49
|
+
OLD_DIRECTORIES = ["access_log"]
|
50
|
+
|
51
|
+
ROOT = File.join(BASE, 'site')
|
52
|
+
end
|
40
53
|
|
41
|
-
|
42
|
-
|
54
|
+
module Server
|
55
|
+
ROOT = File.join(BASE, 'server')
|
56
|
+
end
|
43
57
|
end
|
44
58
|
|
59
|
+
desc "Create a local utopia instance which includes a basic website template.\n" +
|
60
|
+
"Uses current working directory or path argument if provided."
|
45
61
|
task :create do
|
46
|
-
|
47
|
-
|
48
|
-
destination_root = File.expand_path(ARGV.last, Dir.getwd)
|
49
|
-
setup_root = File.expand_path("../../setup", __FILE__)
|
62
|
+
destination_root = File.expand_path(ARGV.last || '.', Dir.getwd)
|
50
63
|
|
51
|
-
$stderr.puts "
|
64
|
+
$stderr.puts "Setting up initial site in #{destination_root}..."
|
52
65
|
|
53
|
-
Setup::DIRECTORIES.each do |directory|
|
66
|
+
Setup::Site::DIRECTORIES.each do |directory|
|
54
67
|
FileUtils.mkdir_p(File.join(destination_root, directory))
|
55
68
|
end
|
56
69
|
|
57
|
-
Find.find(
|
70
|
+
Find.find(Setup::Site::ROOT) do |source_path|
|
58
71
|
# What is this doing?
|
59
|
-
destination_path = File.join(destination_root, source_path[
|
72
|
+
destination_path = File.join(destination_root, source_path[Setup::Site::ROOT.size..-1])
|
60
73
|
|
61
74
|
if File.directory?(source_path)
|
62
75
|
FileUtils.mkdir_p(destination_path)
|
63
76
|
else
|
64
|
-
|
65
|
-
$stderr.puts "\tFile already exists: #{destination_path}!"
|
66
|
-
else
|
67
|
-
$stderr.puts "\tCopying #{source_path} to #{destination_path}..."
|
77
|
+
unless File.exist? destination_path
|
68
78
|
FileUtils.copy_entry(source_path, destination_path)
|
69
79
|
end
|
70
80
|
end
|
71
81
|
end
|
72
82
|
|
73
|
-
Setup::SYMLINKS.each do |path, target|
|
74
|
-
FileUtils.ln_s(target, File.join(destination_root, path))
|
83
|
+
Setup::Site::SYMLINKS.each do |path, target|
|
84
|
+
FileUtils.ln_s(target, File.join(destination_root, path), force: true)
|
75
85
|
end
|
76
86
|
|
77
|
-
Setup::CONFIGURATION_FILES.each do |configuration_file|
|
87
|
+
Setup::Site::CONFIGURATION_FILES.each do |configuration_file|
|
78
88
|
destination_path = File.join(destination_root, configuration_file)
|
79
89
|
|
80
|
-
$stderr.puts "Updating #{destination_path}..."
|
81
|
-
|
82
90
|
buffer = File.read(destination_path).gsub('$UTOPIA_VERSION', Utopia::VERSION)
|
91
|
+
|
83
92
|
File.open(destination_path, "w") { |file| file.write(buffer) }
|
84
93
|
end
|
85
|
-
|
86
|
-
if `which git`.strip == ""
|
87
|
-
$stderr.puts "Now is a good time to learn about git : http://git-scm.com/"
|
88
|
-
end
|
89
94
|
|
90
95
|
Dir.chdir(destination_root) do
|
91
|
-
|
96
|
+
if `which bundle`.strip != ''
|
97
|
+
puts "Generating initial package list with bundle..."
|
98
|
+
sh("bundle", "install", "--quiet")
|
99
|
+
end
|
100
|
+
|
101
|
+
if `which git`.strip == ""
|
102
|
+
$stderr.puts "Now is a good time to learn about git : http://git-scm.com/"
|
103
|
+
elsif !File.exist?('.git')
|
104
|
+
puts "Setting up git repository..."
|
92
105
|
sh("git", "init")
|
93
106
|
sh("git", "add", ".")
|
94
|
-
sh("git", "commit", "-m", "Initial
|
107
|
+
sh("git", "commit", "-q", "-m", "Initial Utopia v#{Utopia::VERSION} site.")
|
95
108
|
end
|
96
109
|
end
|
97
110
|
|
98
|
-
|
99
|
-
|
111
|
+
name = `git config user.name || whoami`.chomp
|
112
|
+
|
113
|
+
puts
|
114
|
+
puts " #{name},".ljust(78)
|
115
|
+
puts "Thank you for using Utopia!".center(78)
|
116
|
+
puts "We sincerely hope that Utopia helps to".center(78)
|
117
|
+
puts "make your life easier and more enjoyable.".center(78)
|
118
|
+
puts ""
|
119
|
+
puts "For extreme productivity, please consult the online documentation".center(78)
|
120
|
+
puts "https://github.com/ioquatix/utopia".center(78)
|
121
|
+
puts " ~ Samuel. ".rjust(78)
|
100
122
|
end
|
101
123
|
|
124
|
+
desc "Upgrade an existing site to use the latest configuration files from the template.\n" +
|
125
|
+
"Uses current working directory or path argument if provided."
|
102
126
|
task :upgrade do
|
103
|
-
$stderr.puts("Usage: #{File.basename $0} upgrade $path") & exit if ARGV.size != 2
|
104
|
-
|
105
127
|
destination_root = File.expand_path(ARGV.last || '.', Dir.getwd)
|
106
|
-
setup_root = File.expand_path("../../setup", __FILE__)
|
107
|
-
directories = ["cache", "cache/meta", "cache/body", "lib", "pages", "public"]
|
108
|
-
symlinks = {"public/_static" => "../pages/_static"}
|
109
128
|
branch_name = "utopia-upgrade-#{Utopia::VERSION}"
|
110
129
|
|
111
130
|
$stderr.puts "Upgrading #{destination_root}..."
|
@@ -114,22 +133,22 @@ task :upgrade do
|
|
114
133
|
sh('git', 'checkout', '-b', branch_name)
|
115
134
|
end
|
116
135
|
|
117
|
-
Setup::DIRECTORIES.each do |directory|
|
136
|
+
Setup::Site::DIRECTORIES.each do |directory|
|
118
137
|
FileUtils.mkdir_p(File.join(destination_root, directory))
|
119
138
|
end
|
120
139
|
|
121
|
-
Setup::OLD_DIRECTORIES.each do |directory|
|
140
|
+
Setup::Site::OLD_DIRECTORIES.each do |directory|
|
122
141
|
path = File.join(destination_root, directory)
|
123
142
|
$stderr.puts "\tRemoving #{path}..."
|
124
143
|
FileUtils.rm_rf(path)
|
125
144
|
end
|
126
145
|
|
127
|
-
Setup::SYMLINKS.each do |path, target|
|
146
|
+
Setup::Site::SYMLINKS.each do |path, target|
|
128
147
|
FileUtils.ln_s(target, File.join(destination_root, path), force: true)
|
129
148
|
end
|
130
149
|
|
131
|
-
Setup::CONFIGURATION_FILES.each do |configuration_file|
|
132
|
-
source_path = File.join(
|
150
|
+
Setup::Site::CONFIGURATION_FILES.each do |configuration_file|
|
151
|
+
source_path = File.join(Setup::Site::ROOT, configuration_file)
|
133
152
|
destination_path = File.join(destination_root, configuration_file)
|
134
153
|
|
135
154
|
$stderr.puts "Updating #{destination_path}..."
|
@@ -162,16 +181,36 @@ task :upgrade do
|
|
162
181
|
sh("git", "checkout", "master")
|
163
182
|
sh("git", "branch", "-d", branch_name)
|
164
183
|
end
|
165
|
-
|
166
|
-
|
184
|
+
end
|
185
|
+
|
186
|
+
namespace :server do
|
187
|
+
desc "Create a remote utopia instance suitable for deployment using git.\n" +
|
188
|
+
"Uses current working directory or path argument if provided."
|
189
|
+
task :create do
|
190
|
+
destination_root = File.expand_path(ARGV.last || '.', Dir.getwd)
|
191
|
+
|
192
|
+
FileUtils.mkdir_p File.join(destination_root, "public")
|
193
|
+
FileUtils.mkdir_p File.join(destination_root, "tmp")
|
194
|
+
|
195
|
+
Dir.chdir(destination_root) do
|
196
|
+
# Shared allows multiple users to access the site with the same group:
|
197
|
+
sh("git", "init", "--shared")
|
198
|
+
sh("git", "config", "receive.denyCurrentBranch", "ignore")
|
199
|
+
sh("git", "config", "core.worktree", destination_root)
|
200
|
+
|
201
|
+
sh("cp", "-r", File.join(Setup::Server::ROOT, 'git', 'hooks'), File.join(destination_root, '.git'))
|
202
|
+
end
|
203
|
+
|
204
|
+
hostname = `hostname`.chomp
|
205
|
+
puts "Now add the git remote to your local repository:\n\tgit remote add production ssh://#{hostname}#{destination_root}"
|
206
|
+
puts "Then push to it:\n\tgit push --set-upstream production master"
|
207
|
+
end
|
167
208
|
end
|
168
209
|
|
169
210
|
task :help do
|
170
|
-
$
|
171
|
-
$
|
172
|
-
|
173
|
-
$stderr.puts "To upgrade an existing site, use the upgrade task:"
|
174
|
-
$stderr.puts "\t#{File.basename($0)} upgrade path/to/www.example.com"
|
211
|
+
$app.options.show_tasks = :describe
|
212
|
+
$app.options.show_task_pattern = Regexp.new('')
|
213
|
+
$app.display_tasks_and_comments
|
175
214
|
end
|
176
215
|
|
177
216
|
task :default => :help
|
data/lib/utopia/version.rb
CHANGED
@@ -0,0 +1,67 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Copyright, 2015, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
10
|
+
# furnished to do so, subject to the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be included in
|
13
|
+
# all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
# THE SOFTWARE.
|
22
|
+
|
23
|
+
require 'etc'
|
24
|
+
|
25
|
+
# Add the following into sudoers for this to work correctly:
|
26
|
+
# Users in group wheel can execute all commands as user http with no password.
|
27
|
+
# %wheel ALL=(http) NOPASSWD: ALL
|
28
|
+
|
29
|
+
def sh(*args)
|
30
|
+
puts args.join(' ')
|
31
|
+
system(*args)
|
32
|
+
end
|
33
|
+
|
34
|
+
working_tree = `git config core.worktree`.chomp
|
35
|
+
|
36
|
+
puts "Updating Site #{working_tree}..."
|
37
|
+
|
38
|
+
# Figure out the user and group of the working tree:
|
39
|
+
working_tree_stat = File.stat(working_tree)
|
40
|
+
deploy_user = Etc.getpwuid(working_tree_stat.uid).name
|
41
|
+
deploy_group = Etc.getgrgid(working_tree_stat.gid).name
|
42
|
+
|
43
|
+
puts "Updating permissions..."
|
44
|
+
|
45
|
+
Dir.chdir(working_tree) do
|
46
|
+
sh("chmod -Rf ug+rwX .")
|
47
|
+
sh("chown -Rf #{deploy_user}:#{deploy_group} .")
|
48
|
+
|
49
|
+
puts "Updating site #{Dir.pwd} as #{deploy_user}:#{deploy_group}..."
|
50
|
+
|
51
|
+
sh("sudo -u #{deploy_user} git checkout -f")
|
52
|
+
sh("sudo -u #{deploy_user} git submodule update -i")
|
53
|
+
|
54
|
+
if File.exist? 'Gemfile'
|
55
|
+
sh("sudo -u #{deploy_user} bundle install --deployment") or abort("Could not setup bundle!")
|
56
|
+
end
|
57
|
+
|
58
|
+
ENV['DEPLOY_USER'] = deploy_user
|
59
|
+
ENV['DEPLOY_GROUP'] = deploy_group
|
60
|
+
|
61
|
+
if File.exist? 'Rakefile'
|
62
|
+
sh("rake deploy") or abort("Deploy task failed!")
|
63
|
+
end
|
64
|
+
|
65
|
+
puts "Restarting server..."
|
66
|
+
sh("sudo -u #{deploy_user} mkdir -p tmp && touch tmp/restart.txt")
|
67
|
+
end
|
File without changes
|
data/setup/site/Rakefile
ADDED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
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: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03
|
11
|
+
date: 2015-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trenni
|
@@ -185,22 +185,23 @@ files:
|
|
185
185
|
- lib/utopia/tags/override.rb
|
186
186
|
- lib/utopia/version.rb
|
187
187
|
- setup/.bowerrc
|
188
|
-
- setup/
|
189
|
-
- setup/
|
190
|
-
- setup/
|
191
|
-
- setup/cache/
|
192
|
-
- setup/
|
193
|
-
- setup/
|
194
|
-
- setup/
|
195
|
-
- setup/pages/
|
196
|
-
- setup/pages/
|
197
|
-
- setup/pages/_static/
|
198
|
-
- setup/pages/
|
199
|
-
- setup/pages/errors/
|
200
|
-
- setup/pages/
|
201
|
-
- setup/pages/
|
202
|
-
- setup/
|
203
|
-
- setup/
|
188
|
+
- setup/server/git/hooks/post-receive
|
189
|
+
- setup/site/Gemfile
|
190
|
+
- setup/site/Rakefile
|
191
|
+
- setup/site/cache/head/readme.txt
|
192
|
+
- setup/site/cache/meta/readme.txt
|
193
|
+
- setup/site/config.ru
|
194
|
+
- setup/site/lib/readme.txt
|
195
|
+
- setup/site/pages/_heading.xnode
|
196
|
+
- setup/site/pages/_page.xnode
|
197
|
+
- setup/site/pages/_static/icon.png
|
198
|
+
- setup/site/pages/_static/site.css
|
199
|
+
- setup/site/pages/errors/exception.xnode
|
200
|
+
- setup/site/pages/errors/file-not-found.xnode
|
201
|
+
- setup/site/pages/links.yaml
|
202
|
+
- setup/site/pages/welcome/index.xnode
|
203
|
+
- setup/site/public/readme.txt
|
204
|
+
- setup/site/tmp/readme.txt
|
204
205
|
- spec/utopia/content/link_spec.rb
|
205
206
|
- spec/utopia/content/links/foo/index.xnode
|
206
207
|
- spec/utopia/content/links/foo/links.yaml
|
data/setup/Rakefile
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
|
2
|
-
task :server do
|
3
|
-
system('puma')
|
4
|
-
end
|
5
|
-
|
6
|
-
task :deploy do
|
7
|
-
$stderr.puts "Updating permissions..."
|
8
|
-
sh("chmod -Rf ug+rwX .")
|
9
|
-
sh("chown -Rf http:http .")
|
10
|
-
|
11
|
-
$stderr.puts "Updating site #{Dir.pwd} as #{`whoami`.chomp}..."
|
12
|
-
sh("sudo -u http git checkout -f")
|
13
|
-
sh("sudo -u http git submodule update -i")
|
14
|
-
sh("sudo -u http bundle install --deployment")
|
15
|
-
|
16
|
-
$stderr.puts "Restarting server..."
|
17
|
-
sh("sudo -u http touch tmp/restart.txt")
|
18
|
-
end
|