archival 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c44af9438c108896c1e5c3f6577708a150525305045a5e0bd183700b49f20234
4
- data.tar.gz: 4033a7f2b80d88eab1d4071552398716f1592b6c07ec34acc00d36613d30f49b
3
+ metadata.gz: 42d89221cb0631429658fbc280543138b92405efdfdc0f2b85147b9257fdc74a
4
+ data.tar.gz: b20b8458a7200984c511d6c3def55598e7157932b1c0039230f584b6c4a99c2f
5
5
  SHA512:
6
- metadata.gz: ddad0158c303b58e247f6e974dc22ef0967936c113afa7f090a9302cd4cd890512f58b2136b0aabecec6ddfc8ae29c242a0f8ee7a2842734241c783942820792
7
- data.tar.gz: ef1663df39febc76cf51af9eedfcf106db95712bf8f96d51e76e94e8daa4bd0a5d9133e0e2971e696a74add29bb4f3214da3a13d400b0711e64861678c753571
6
+ metadata.gz: dff3560896d691c518ec63af55c41a9430717f57dd6bb9234811d86e8aee9d3a42b11a20ea27a0fe436415617dc1a5cdf5134be2b53f683c98ef5d58d96ecd3f
7
+ data.tar.gz: bf23c900d3971e85bb6d89eae95d8aa055ef38aefe8ebefdc9d6ecbe8b023bca5f594acf44460d6e01c1ccf9e08e89f8be4e66c0242316d10908d786ec9bad50
@@ -150,9 +150,14 @@ module Archival
150
150
  end
151
151
 
152
152
  def serve_static(client, path, base = @build_dir)
153
- buffer = File.open(File.join(base, path)).read
154
- buffer.sub! '$PORT', @port.to_s
155
- client.print buffer
153
+ full_path = File.join(base, path)
154
+ if File.file? full_path
155
+ buffer = File.open(full_path).read
156
+ buffer.sub! '$PORT', @port.to_s
157
+ client.print buffer
158
+ else
159
+ client.print 'Unknown File'
160
+ end
156
161
  end
157
162
 
158
163
  def http_response(client, config)
@@ -23,7 +23,7 @@ title=\"#{title}\" alt=\"#{alt_text}\"/>"
23
23
  def rewrite_link(link)
24
24
  if link.start_with?('http') || link.start_with?('mailto') ||
25
25
  link.start_with?('www') || link.start_with?('/')
26
- link
26
+ return link
27
27
  end
28
28
  template_dir = File.dirname(@options[:template_file])
29
29
  resolved_link = Pathname.new(File.join(@options[:pages_root], link))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Archival
4
- VERSION = '0.0.11'
4
+ VERSION = '0.0.12'
5
5
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archival",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "An incredibly simple CMS for durable websites",
5
5
  "bin": "build.rb",
6
6
  "directories": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: archival
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Ditson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-28 00:00:00.000000000 Z
11
+ date: 2022-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -83,7 +83,6 @@ files:
83
83
  - README.md
84
84
  - Rakefile
85
85
  - action.yml
86
- - archival.gemspec
87
86
  - bin/archival
88
87
  - bin/bundle
89
88
  - bin/htmldiff
@@ -132,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
131
  - !ruby/object:Gem::Version
133
132
  version: '0'
134
133
  requirements: []
135
- rubygems_version: 3.3.3
134
+ rubygems_version: 3.3.7
136
135
  signing_key:
137
136
  specification_version: 4
138
137
  summary: An incredibly simple CMS for durable websites
data/archival.gemspec DELETED
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Gem::Specification.new do |s|
4
- s.name = 'archival'
5
- s.version = '0.0.11'
6
- s.summary = 'An incredibly simple CMS for durable websites'
7
- s.description = 'https://jesseditson.com/the-simplest-cms-part-1'
8
- s.authors = ['Jesse Ditson']
9
- s.email = 'jesse.ditson@gmail.com'
10
- s.homepage = 'https://archival.dev'
11
- s.license = 'Unlicense'
12
- s.required_ruby_version = '>= 2.5'
13
-
14
- # Specify which files should be added to the gem when it is released.
15
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
16
- s.files = Dir.chdir(File.expand_path(__dir__)) do
17
- `git ls-files -z`.split("\x0").reject do |f|
18
- (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
19
- end
20
- end
21
- s.bindir = 'exe'
22
- s.executables = 'archival'
23
- s.require_paths = ['lib']
24
-
25
- s.add_dependency 'liquid', '~> 5.1.0'
26
- s.add_dependency 'listen', '~> 3.7.0'
27
- s.add_dependency 'redcarpet', '~> 3.5.1'
28
- s.add_dependency 'tomlrb', '~> 2.0.1'
29
-
30
- s.metadata = {
31
- 'rubygems_mfa_required' => 'true'
32
- }
33
- end