utopia 2.16.2 → 2.17.0
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/lib/utopia/command/server.rb +2 -1
- data/lib/utopia/command/site.rb +11 -1
- data/lib/utopia/path.rb +13 -19
- data/lib/utopia/version.rb +1 -1
- data/setup/server/git/hooks/post-receive +1 -1
- data/setup/site/{Gemfile → gems.rb} +0 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5549c06603672129f49f5d8c7f00b9cc706786460ba6597c3459be007d508c5c
|
4
|
+
data.tar.gz: 7ee6b130a7a671944ec64c7a98cc8b01e7f579e64e978e3733462c2f60ead135
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae1d066e702f89c544236458d8753bcc01ab07aade2eb9b7e89755d88d9ddce520e3f1453ee9c8535f5f2788ae1cd5f5d34d412b4fdd8ee0ef00008d476debfc
|
7
|
+
data.tar.gz: bba30364281ce80ff9c25597c7181a903579fe6fe28cf128e53ab730c768a216a3632e999a3c1f7a4ee249debe43c3e4afcfe59e1b4fee2a3f1df6c9f04f3f0e
|
@@ -68,7 +68,8 @@ module Utopia
|
|
68
68
|
system("git", "config", "receive.denyCurrentBranch", "ignore") or fail "could not set configuration"
|
69
69
|
system("git", "config", "core.worktree", destination_root) or fail "could not set configuration"
|
70
70
|
|
71
|
-
|
71
|
+
# Doing this invokes a lot of behaviour that isn't always ideal...
|
72
|
+
# system("bundle", "config", "set", "--local", "deployment", "true")
|
72
73
|
system("bundle", "config", "set", "--local", "without", "development")
|
73
74
|
|
74
75
|
# In theory, to convert from non-shared to shared:
|
data/lib/utopia/command/site.rb
CHANGED
@@ -33,7 +33,7 @@ module Utopia
|
|
33
33
|
# Local site setup commands.
|
34
34
|
class Site < Samovar::Command
|
35
35
|
# Configuration files which should be installed/updated:
|
36
|
-
CONFIGURATION_FILES = ['.gitignore', 'config.ru', 'config/environment.rb', 'falcon.rb', '
|
36
|
+
CONFIGURATION_FILES = ['.gitignore', 'config.ru', 'config/environment.rb', 'falcon.rb', 'gems.rb', 'Guardfile', 'bake.rb', 'spec/spec_helper.rb', 'spec/website_context.rb', 'spec/website_spec.rb']
|
37
37
|
|
38
38
|
# Directories that should exist:
|
39
39
|
DIRECTORIES = ["config", "lib", "pages", "public", "tasks", "spec"]
|
@@ -142,6 +142,15 @@ module Utopia
|
|
142
142
|
end
|
143
143
|
end
|
144
144
|
|
145
|
+
# Move `Gemfile` to `gems.rb`.
|
146
|
+
def update_gemfile!
|
147
|
+
# If `Gemfile` doens't exist, we are done:
|
148
|
+
return unless File.exist?('Gemfile')
|
149
|
+
|
150
|
+
system("git", "mv", "Gemfile", "gems.rb")
|
151
|
+
system("git", "mv", "Gemfile.lock", "gems.locked")
|
152
|
+
end
|
153
|
+
|
145
154
|
def call
|
146
155
|
destination_root = parent.root
|
147
156
|
branch_name = "utopia-upgrade-#{Utopia::VERSION}"
|
@@ -184,6 +193,7 @@ module Utopia
|
|
184
193
|
system("git", "add", *Site::CONFIGURATION_FILES) or fail "could not add files"
|
185
194
|
|
186
195
|
move_static!
|
196
|
+
update_gemfile!
|
187
197
|
|
188
198
|
# Commit all changes:
|
189
199
|
system("git", "commit", "-m", "Upgrade to utopia #{Utopia::VERSION}.") or fail "could not commit changes"
|
data/lib/utopia/path.rb
CHANGED
@@ -25,7 +25,7 @@ module Utopia
|
|
25
25
|
class Path
|
26
26
|
include Comparable
|
27
27
|
|
28
|
-
SEPARATOR = '/'
|
28
|
+
SEPARATOR = '/'
|
29
29
|
|
30
30
|
def initialize(components = [])
|
31
31
|
@components = components
|
@@ -34,6 +34,8 @@ module Utopia
|
|
34
34
|
attr_accessor :components
|
35
35
|
|
36
36
|
def freeze
|
37
|
+
return self if frozen?
|
38
|
+
|
37
39
|
@components.freeze
|
38
40
|
|
39
41
|
super
|
@@ -235,14 +237,22 @@ module Utopia
|
|
235
237
|
return self.class.new(result)
|
236
238
|
end
|
237
239
|
|
238
|
-
def
|
239
|
-
|
240
|
+
def first
|
241
|
+
if absolute?
|
242
|
+
@components[1]
|
243
|
+
else
|
244
|
+
@components[0]
|
245
|
+
end
|
240
246
|
end
|
241
247
|
|
242
248
|
def last
|
243
249
|
@components.last
|
244
250
|
end
|
245
251
|
|
252
|
+
def pop
|
253
|
+
@components.pop
|
254
|
+
end
|
255
|
+
|
246
256
|
# @return [String] the last path component without any file extension.
|
247
257
|
def basename
|
248
258
|
basename, _ = @components.last.split('.', 2)
|
@@ -350,22 +360,6 @@ module Utopia
|
|
350
360
|
@components.delete_at(component_offset(index))
|
351
361
|
end
|
352
362
|
|
353
|
-
def first
|
354
|
-
if absolute?
|
355
|
-
@components[1]
|
356
|
-
else
|
357
|
-
@components[0]
|
358
|
-
end
|
359
|
-
end
|
360
|
-
|
361
|
-
def last
|
362
|
-
if directory?
|
363
|
-
@components[-2]
|
364
|
-
else
|
365
|
-
@components[-1]
|
366
|
-
end
|
367
|
-
end
|
368
|
-
|
369
363
|
private
|
370
364
|
|
371
365
|
# We adjust the index slightly so that indices reference path components rather than the directory markers at the start and end of the path components array.
|
data/lib/utopia/version.rb
CHANGED
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: 2.
|
4
|
+
version: 2.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -290,8 +290,8 @@ dependencies:
|
|
290
290
|
- - ">="
|
291
291
|
- !ruby/object:Gem::Version
|
292
292
|
version: '0'
|
293
|
-
description:
|
294
|
-
email:
|
293
|
+
description:
|
294
|
+
email:
|
295
295
|
executables:
|
296
296
|
- utopia
|
297
297
|
extensions: []
|
@@ -350,7 +350,6 @@ files:
|
|
350
350
|
- setup/server/git/hooks/post-receive
|
351
351
|
- setup/site/.gitignore
|
352
352
|
- setup/site/.rspec
|
353
|
-
- setup/site/Gemfile
|
354
353
|
- setup/site/Guardfile
|
355
354
|
- setup/site/README.md
|
356
355
|
- setup/site/bake.rb
|
@@ -358,6 +357,7 @@ files:
|
|
358
357
|
- setup/site/config/README.md
|
359
358
|
- setup/site/config/environment.rb
|
360
359
|
- setup/site/falcon.rb
|
360
|
+
- setup/site/gems.rb
|
361
361
|
- setup/site/lib/readme.txt
|
362
362
|
- setup/site/pages/_heading.xnode
|
363
363
|
- setup/site/pages/_page.xnode
|
@@ -378,7 +378,7 @@ licenses:
|
|
378
378
|
- MIT
|
379
379
|
metadata:
|
380
380
|
funding_uri: https://github.com/sponsors/ioquatix/
|
381
|
-
post_install_message:
|
381
|
+
post_install_message:
|
382
382
|
rdoc_options: []
|
383
383
|
require_paths:
|
384
384
|
- lib
|
@@ -394,7 +394,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
394
394
|
version: '0'
|
395
395
|
requirements: []
|
396
396
|
rubygems_version: 3.1.2
|
397
|
-
signing_key:
|
397
|
+
signing_key:
|
398
398
|
specification_version: 4
|
399
399
|
summary: Utopia is a framework for building dynamic content-driven websites.
|
400
400
|
test_files: []
|