utopia 2.20.1 → 2.22.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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/bake/utopia/environment.rb +90 -0
  4. data/bake/utopia/node.rb +3 -1
  5. data/bake/utopia/server.rb +61 -0
  6. data/bake/utopia/shell.rb +3 -1
  7. data/bake/utopia/site.rb +188 -0
  8. data/bake/utopia/static.rb +3 -2
  9. data/bake/utopia.rb +3 -1
  10. data/lib/utopia/content/document.rb +2 -19
  11. data/lib/utopia/content/link.rb +4 -19
  12. data/lib/utopia/content/links.rb +2 -19
  13. data/lib/utopia/content/markup.rb +2 -19
  14. data/lib/utopia/content/namespace.rb +2 -19
  15. data/lib/utopia/content/node.rb +4 -20
  16. data/lib/utopia/content/response.rb +2 -19
  17. data/lib/utopia/content/tags.rb +2 -19
  18. data/lib/utopia/content.rb +2 -19
  19. data/lib/utopia/content_length.rb +2 -19
  20. data/lib/utopia/controller/actions.rb +2 -19
  21. data/lib/utopia/controller/base.rb +2 -19
  22. data/lib/utopia/controller/respond.rb +2 -19
  23. data/lib/utopia/controller/rewrite.rb +2 -19
  24. data/lib/utopia/controller/variables.rb +2 -19
  25. data/lib/utopia/controller.rb +2 -19
  26. data/lib/utopia/exceptions/handler.rb +2 -19
  27. data/lib/utopia/exceptions/mailer.rb +2 -19
  28. data/lib/utopia/exceptions.rb +2 -19
  29. data/lib/utopia/extensions/array_split.rb +3 -20
  30. data/lib/utopia/extensions/date_comparisons.rb +3 -20
  31. data/lib/utopia/http.rb +2 -19
  32. data/lib/utopia/locale.rb +2 -19
  33. data/lib/utopia/localization.rb +2 -19
  34. data/lib/utopia/logger.rb +2 -19
  35. data/lib/utopia/middleware.rb +2 -19
  36. data/lib/utopia/path/matcher.rb +2 -19
  37. data/lib/utopia/path.rb +2 -19
  38. data/lib/utopia/redirection.rb +2 -19
  39. data/lib/utopia/responder.rb +2 -19
  40. data/lib/utopia/session/lazy_hash.rb +2 -19
  41. data/lib/utopia/session/serialization.rb +2 -19
  42. data/lib/utopia/session.rb +3 -19
  43. data/lib/utopia/setup.rb +2 -19
  44. data/lib/utopia/shell.rb +2 -19
  45. data/lib/utopia/static/local_file.rb +2 -19
  46. data/lib/utopia/static/mime_types.rb +2 -19
  47. data/lib/utopia/static.rb +2 -19
  48. data/lib/utopia/version.rb +3 -20
  49. data/lib/utopia.rb +3 -20
  50. data/license.md +25 -0
  51. data/readme.md +44 -0
  52. data/setup/site/.gitignore +0 -1
  53. data/setup/site/Guardfile +13 -13
  54. data/setup/site/bake.rb +3 -1
  55. data/setup/site/config/environment.rb +3 -0
  56. data/setup/site/config/{README.md → readme.md} +0 -0
  57. data/setup/site/config/sus.rb +10 -0
  58. data/setup/site/falcon.rb +3 -0
  59. data/setup/site/fixtures/website.rb +39 -0
  60. data/setup/site/gems.rb +8 -7
  61. data/setup/site/{README.md → readme.md} +0 -0
  62. data/setup/site/test/website.rb +28 -0
  63. data.tar.gz.sig +0 -0
  64. metadata +59 -62
  65. metadata.gz.sig +0 -0
  66. data/bake/utopia/test.rb +0 -10
  67. data/bin/utopia +0 -25
  68. data/lib/utopia/command/environment.rb +0 -93
  69. data/lib/utopia/command/server.rb +0 -113
  70. data/lib/utopia/command/site.rb +0 -233
  71. data/lib/utopia/command.rb +0 -67
  72. data/setup/site/.rspec +0 -4
  73. data/setup/site/spec/spec_helper.rb +0 -16
  74. data/setup/site/spec/website_context.rb +0 -54
  75. data/setup/site/spec/website_spec.rb +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98a414341752cd45376ffac50a8ebd4b5e3ee49eb2868ce87dc41f3696c07d76
4
- data.tar.gz: 989e031a0c3f3680d52f28540f94712f32e00cb95af7c5575a81ef7f7b8ed6d6
3
+ metadata.gz: 64d6cd31c0780c6d2071157034b6d125da0b4e6c3649affafb9338208b0467b7
4
+ data.tar.gz: 9092ab79ee6fb441051e1114fefbe41761aa5339d2eee574d588729e7ea5c479
5
5
  SHA512:
6
- metadata.gz: 5d8ff1cf0d72eabbef7550ef1c049f6af84c9cd110403cff6999c506ac8200697fa8930cc2db29cc666b23dd13b144a81c45301d669c43bff618719254247293
7
- data.tar.gz: dbd8e4c9379ad5d539a8e099402630a23b9c7a5422d369a2f5cdcea1426d07b1bffb2532b1694dad71b8966dcdb8a8084d4270af809ce3ef23e3b0dfddd48883
6
+ metadata.gz: cd49ec085295dded939c0da489dfc6bb64a97207032bd3cf177b39cf84f131f00b935c96173c2c6196c50032a07f4786b2312144b776cbadd4c05840b96f9f70
7
+ data.tar.gz: 5fc0e4c878dfa11693481cbaf560d9024f69c66c48db29cc5722a56757d216449c4026e59f534578a784f6484a94ee0bd894831e93bcddeb26830dcadf17be2b
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2018-2022, by Samuel Williams.
5
+
6
+ # Update environment variables in config/environment.yaml
7
+ def initialize(...)
8
+ super
9
+
10
+ require 'securerandom'
11
+ require 'yaml/store'
12
+ require 'console'
13
+ end
14
+
15
+ # Setup default environemnts "testing" and "development".
16
+ # @parameter root [String] The root directory of the project.
17
+ def setup(root: context.root)
18
+ defaults(name: "testing", root: root)
19
+ defaults(name: "development", root: root)
20
+ end
21
+
22
+ # Setup the defaults for a specific environment.
23
+ # @parameter name [String] The name of the environment to setup.
24
+ # @parameter root [String] The root directory of the project.
25
+ def defaults(name, root: context.root)
26
+ update_environment(root, name) do |store|
27
+ # Set some useful defaults for the environment.
28
+ store['UTOPIA_SESSION_SECRET'] ||= SecureRandom.hex(40)
29
+ end
30
+ end
31
+
32
+ # Update the specified environment.
33
+ # @parameter name [String] The name of the environment to update.
34
+ # @parameter variables [Hash(String, String)] A list of environment KEY=VALUE pairs to set.
35
+ def update(name, root: context.root, **variables)
36
+ update_environment(root, name) do |store|
37
+ variables&.each do |variable|
38
+ key, value = variable.split('=', 2)
39
+
40
+ if value
41
+ puts "ENV[#{key.inspect}] will default to #{value.inspect} unless otherwise specified."
42
+ store[key] = value
43
+ else
44
+ puts "ENV[#{key.inspect}] will be unset unless otherwise specified."
45
+ store.delete(key)
46
+ end
47
+ end
48
+
49
+ yield store if block_given?
50
+
51
+ Console.logger.debug(self) do |buffer|
52
+ buffer.puts "Environment #{name} (#{path}):"
53
+ store.roots.each do |key|
54
+ value = store[key]
55
+
56
+ buffer.puts "#{key}=#{value.inspect}"
57
+ end
58
+ end
59
+ end
60
+ end
61
+
62
+ def read(name, root: context.root)
63
+ environment_path = self.environment_path(root, name)
64
+
65
+ if File.exist?(environment_path)
66
+ Console.logger.debug(self) {"Loading environment #{name} from #{environment_path}..."}
67
+ YAML.load_file(environment_path)
68
+ else
69
+ Console.logger.debug(self) {"No environment #{name} found at #{environment_path}."}
70
+ {}
71
+ end
72
+ end
73
+
74
+ private
75
+
76
+ def environment_path(root, name)
77
+ File.join(root, "config", "#{name}.yaml")
78
+ end
79
+
80
+ # Setup `config/environment.yaml` according to specified options.
81
+ def update_environment(root, name)
82
+ environment_path = self.environment_path(root, name)
83
+ FileUtils.mkpath File.dirname(environment_path)
84
+
85
+ store = YAML::Store.new(environment_path)
86
+
87
+ store.transaction do
88
+ yield store, name, environment_path
89
+ end
90
+ end
data/bake/utopia/node.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copy all installed JavaScript components to the public root.
3
+ # Released under the MIT License.
4
+ # Copyright, 2016-2022, by Samuel Williams.
5
+
4
6
  def update
5
7
  require 'fileutils'
6
8
  require 'utopia/path'
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2017-2022, by Samuel Williams.
5
+
6
+ def initialize(...)
7
+ super
8
+
9
+ require 'fileutils'
10
+ require 'socket'
11
+ end
12
+
13
+ # Create a remote Utopia website suitable for deployment using git.
14
+ def create(root: context.root)
15
+ FileUtils.mkdir_p File.join(root, "public")
16
+
17
+ update(root: root)
18
+
19
+ # Print out helpful git remote add message:
20
+ puts "Now add the git remote to your local repository:\n\tgit remote add production ssh://#{Socket.gethostname}#{root}"
21
+ puts "Then push to it:\n\tgit push --set-upstream production main"
22
+ end
23
+
24
+ # The path to the setup directory in the gem:
25
+ SETUP_ROOT = File.expand_path("../../setup", __dir__)
26
+
27
+ # The root directory of the template server deployment:
28
+ SERVER_ROOT = File.join(SETUP_ROOT, 'server')
29
+
30
+ # Update the git hooks in an existing server repository.
31
+ def update(root: context.root)
32
+ # It's okay to call this on an existing repo, it will only update config as required to enable --shared.
33
+ # --shared allows multiple users to access the site with the same group.
34
+ system("git", "init", "--shared", chdir: root) or fail "could not initialize repository"
35
+
36
+ system("git", "config", "receive.denyCurrentBranch", "ignore", chdir: root) or fail "could not set configuration"
37
+ system("git", "config", "core.worktree", root, chdir: root) or fail "could not set configuration"
38
+
39
+ # Doing this invokes a lot of behaviour that isn't always ideal...
40
+ # system("bundle", "config", "set", "--local", "deployment", "true")
41
+ system("bundle", "config", "set", "--local", "without", "development", chdir: root) or fail "could not set bundle configuration"
42
+
43
+ # In theory, to convert from non-shared to shared:
44
+ # chgrp -R <group-name> . # Change files and directories' group
45
+ # chmod -R g+w . # Change permissions
46
+ # chmod g-w .git/objects/pack/* # Git pack files should be immutable
47
+ # chmod g+s `find . -type d` # New files get group id of directory
48
+
49
+ # Set some useful defaults for the environment.
50
+ recipe = context.lookup("utopia:environment:update")
51
+ recipe.instance.update("environment", root: root) do |store|
52
+ store['VARIANT'] ||= 'production'
53
+ store['UTOPIA_SESSION_SECRET'] ||= SecureRandom.hex(40)
54
+ end
55
+
56
+ # Copy git hooks:
57
+ system("cp", "-r", File.join(SERVER_ROOT, 'git', 'hooks'), File.join(root, '.git')) or fail "could not copy git hooks"
58
+ # finally set everything in the .git directory to be group writable
59
+ # This failed for me and I had to do sudo chown http:http .git -R first.
60
+ system("chmod", "-Rf", "g+w", File.join(root, '.git')) or fail "could not update permissions of .git directory"
61
+ end
data/bake/utopia/shell.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Start an interactive console for the web application.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2022, by Samuel Williams.
5
+
4
6
  def shell
5
7
  call 'utopia:environment'
6
8
 
@@ -0,0 +1,188 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2017-2023, by Samuel Williams.
5
+ # Copyright, 2020, by Michael Adams.
6
+
7
+ def initialize(...)
8
+ super
9
+
10
+ require 'fileutils'
11
+ require 'find'
12
+ end
13
+
14
+ # The path to the setup directory in the gem:
15
+ SETUP_ROOT = File.expand_path("../../setup", __dir__)
16
+
17
+ # Configuration files which should be installed/updated:
18
+ CONFIGURATION_FILES = ['.gitignore', 'config.ru', 'config/environment.rb', 'falcon.rb', 'gems.rb', 'Guardfile', 'bake.rb', 'test/website.rb', 'fixtures/website.rb']
19
+
20
+ # Directories that should exist:
21
+ DIRECTORIES = ["config", "lib", "pages", "public", "bake", "test"]
22
+
23
+ # Directories that should be removed during upgrade process:
24
+ OLD_PATHS = ["access_log", "cache", "tmp", "Rakefile", "tasks", ".bowerrc"]
25
+
26
+ # The root directory of the template site:
27
+ SITE_ROOT = File.join(SETUP_ROOT, 'site')
28
+
29
+ # Create a new local Utopia website using the default template.
30
+ def create(root: context.root)
31
+ Console.logger.debug(self) {"Setting up site in #{root} for Utopia v#{Utopia::VERSION}..."}
32
+
33
+ DIRECTORIES.each do |directory|
34
+ FileUtils.mkdir_p(File.join(root, directory))
35
+ end
36
+
37
+ Find.find(SITE_ROOT) do |source_path|
38
+ # Compute the destination path:
39
+ destination_path = File.join(root, source_path[SITE_ROOT.size..-1])
40
+
41
+ if File.directory?(source_path)
42
+ # Create the directory:
43
+ FileUtils.mkdir_p(destination_path)
44
+ else
45
+ # Copy the file, unless it already exists:
46
+ unless File.exist? destination_path
47
+ FileUtils.copy_entry(source_path, destination_path)
48
+ end
49
+ end
50
+ end
51
+
52
+ CONFIGURATION_FILES.each do |configuration_file|
53
+ destination_path = File.join(root, configuration_file)
54
+
55
+ if File.exist?(destination_path)
56
+ buffer = File.read(destination_path).gsub('$UTOPIA_VERSION', Utopia::VERSION)
57
+ File.open(destination_path, "w") { |file| file.write(buffer) }
58
+ else
59
+ Console.logger.warn(self) {"Could not open #{destination_path}, maybe it should be removed from CONFIGURATION_FILES?"}
60
+ end
61
+ end
62
+
63
+ system("bundle", "install", chdir: root) or warn "could not install bundled gems"
64
+
65
+ if !File.exist?('.git')
66
+ Console.logger.info(self) {"Setting up git repository..."}
67
+
68
+ system("git", "init", chdir: root) or warn "could not create git repository"
69
+ system("git", "add", ".", chdir: root) or warn "could not add all files"
70
+ system("git", "commit", "-q", "-m", "Initial Utopia v#{Utopia::VERSION} site.", chdir: root) or warn "could not commit files"
71
+ end
72
+
73
+ context.lookup('utopia:environment:defaults').call(root)
74
+
75
+ name = `git config user.name || whoami`.chomp
76
+
77
+ puts
78
+ puts " #{name},".ljust(78)
79
+ puts "Thank you for using Utopia!".center(78)
80
+ puts "We sincerely hope that Utopia helps to".center(78)
81
+ puts "make your life easier and more enjoyable.".center(78)
82
+ puts ""
83
+ puts "To start the development server, run:".center(78)
84
+ puts "bake utopia:development".center(78)
85
+ puts ""
86
+ puts "For extreme productivity, please consult the online documentation".center(78)
87
+ puts "https://github.com/socketry/utopia".center(78)
88
+ puts " ~ Samuel. ".rjust(78)
89
+ end
90
+
91
+ # Upgrade an existing site to use the latest configuration files from the template.
92
+ def upgrade(root: context.root)
93
+ branch_name = "utopia-upgrade-#{Utopia::VERSION}"
94
+
95
+ $stderr.puts "Upgrading #{destination_root}..."
96
+
97
+ system('git', 'checkout', '-b', branch_name, chdir: root) or fail "could not change branch"
98
+
99
+ DIRECTORIES.each do |directory|
100
+ FileUtils.mkdir_p(File.join(root, directory))
101
+ end
102
+
103
+ OLD_PATHS.each do |path|
104
+ path = File.join(root, path)
105
+ Console.logger.info(self) {"Removing #{path}..."}
106
+ FileUtils.rm_rf(path)
107
+ end
108
+
109
+ CONFIGURATION_FILES.each do |configuration_file|
110
+ source_path = File.join(SITE_ROOT, configuration_file)
111
+ destination_path = File.join(root, configuration_file)
112
+
113
+ Console.logger.info(self) {"Updating #{destination_path}..."}
114
+
115
+ FileUtils.copy_entry(source_path, destination_path)
116
+ buffer = File.read(destination_path).gsub('$UTOPIA_VERSION', Utopia::VERSION)
117
+ File.open(destination_path, "w") { |file| file.write(buffer) }
118
+ end
119
+
120
+ context.lookup('environment:defaults').call(root)
121
+
122
+ begin
123
+ # Stage any files that have been changed or removed:
124
+ system("git", "add", "-u", chdir: root) or fail "could not add files"
125
+
126
+ # Stage any new files that we have explicitly added:
127
+ system("git", "add", *CONFIGURATION_FILES, chdir: root) or fail "could not add files"
128
+
129
+ move_static!(root)
130
+ update_gemfile!(root)
131
+
132
+ # Commit all changes:
133
+ system("git", "commit", "-m", "Upgrade to utopia #{Utopia::VERSION}.", chdir: root) or fail "could not commit changes"
134
+
135
+ # Checkout main..
136
+ system("git", "checkout", "main", chdir: root) or fail "could not checkout main"
137
+
138
+ # and merge:
139
+ system("git", "merge", "--squash", "--no-commit", branch_name, chdir: root) or fail "could not merge changes"
140
+ rescue => error
141
+ Console.logger.error(self, error) {"Upgrade failed."}
142
+
143
+ system("git", "checkout", "master", chdir: root)
144
+ ensure
145
+ system("git", "branch", "-D", branch_name, chdir: root)
146
+ end
147
+ end
148
+
149
+ private
150
+
151
+ # Move legacy `pages/_static` to `public/_static`.
152
+ def move_static!(root)
153
+ old_static_path = File.expand_path('pages/_static', root)
154
+
155
+ # If public/_static doens't exist, we are done.
156
+ return unless File.exist?(old_static_path)
157
+
158
+ new_static_path = File.expand_path('public/_static', root)
159
+
160
+ if File.exist?(new_static_path)
161
+ if File.lstat(new_static_path).symlink?
162
+ FileUtils.rm_f new_static_path
163
+ else
164
+ Console.logger.warn(self) {"Can't move pages/_static to public/_static, destination already exists."}
165
+ return
166
+ end
167
+ end
168
+
169
+ # One more sanity check:
170
+ if File.directory?(old_static_path)
171
+ system("git", "mv", "pages/_static", "public/")
172
+ end
173
+ end
174
+
175
+ # Move `Gemfile` to `gems.rb`.
176
+ def update_gemfile!(root)
177
+ gemfile_path = File.expand_path('Gemfile', root)
178
+
179
+ # If `Gemfile` doens't exist, we are done:
180
+ return unless File.exist?(gemfile_path)
181
+
182
+ # If `gems.rb` already exists, we are done:
183
+ gems_path = File.expand_path('gems.rb', root)
184
+ return if File.exist?(gems_path)
185
+
186
+ system("git", "mv", "Gemfile", "gems.rb", chdir: root)
187
+ system("git", "mv", "Gemfile.lock", "gems.locked", chdir: root)
188
+ end
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Generate a static copy of the site.
4
- # @param output_path [String] the path where the files for the static site will be created.
3
+ # Released under the MIT License.
4
+ # Copyright, 2017-2022, by Samuel Williams.
5
+
5
6
  def generate(output_path: 'static')
6
7
  require 'falcon/server'
7
8
  require 'async/io'
data/bake/utopia.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Set up the environment for the web application.
3
+ # Released under the MIT License.
4
+ # Copyright, 2017-2022, by Samuel Williams.
5
+
4
6
  def environment(name: nil)
5
7
  require_relative '../lib/utopia/logger'
6
8
 
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2012, 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.
3
+ # Released under the MIT License.
4
+ # Copyright, 2015-2022, by Samuel Williams.
22
5
 
23
6
  require_relative 'links'
24
7
  require_relative 'response'
@@ -1,24 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2012, 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.
3
+ # Released under the MIT License.
4
+ # Copyright, 2009-2022, by Samuel Williams.
5
+ # Copyright, 2017, by Huba Nagy.
6
+ # Copyright, 2020, by Michael Adams.
22
7
 
23
8
  require 'yaml'
24
9
  require 'trenni/builder'
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2012, 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.
3
+ # Released under the MIT License.
4
+ # Copyright, 2015-2022, by Samuel Williams.
22
5
 
23
6
  require_relative 'link'
24
7
 
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2012, 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.
3
+ # Released under the MIT License.
4
+ # Copyright, 2009-2022, by Samuel Williams.
22
5
 
23
6
  require 'trenni/parsers'
24
7
  require 'trenni/entities'
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2012, 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.
3
+ # Released under the MIT License.
4
+ # Copyright, 2017-2022, by Samuel Williams.
22
5
 
23
6
  module Utopia
24
7
  class Content
@@ -1,24 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2012, 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.
3
+ # Released under the MIT License.
4
+ # Copyright, 2009-2022, by Samuel Williams.
5
+ # Copyright, 2015, by Huba Nagy.
22
6
 
23
7
  require_relative 'markup'
24
8
  require_relative 'links'
@@ -184,4 +168,4 @@ module Utopia
184
168
  end
185
169
  end
186
170
  end
187
- end
171
+ end
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2012, 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.
3
+ # Released under the MIT License.
4
+ # Copyright, 2010-2022, by Samuel Williams.
22
5
 
23
6
  module Utopia
24
7
  class Content
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2017, 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.
3
+ # Released under the MIT License.
4
+ # Copyright, 2012-2022, by Samuel Williams.
22
5
 
23
6
  require_relative 'namespace'
24
7
 
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2012, 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.
3
+ # Released under the MIT License.
4
+ # Copyright, 2009-2022, by Samuel Williams.
22
5
 
23
6
  require_relative 'middleware'
24
7
  require_relative 'localization'