parklife 0.8.0.beta1 → 0.8.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/.github/FUNDING.yml +3 -0
- data/CHANGELOG.md +4 -0
- data/README.md +13 -15
- data/lib/parklife/cli.rb +1 -1
- data/lib/parklife/templates/Parkfile.erb +2 -1
- data/lib/parklife/templates/static_build.erb +7 -1
- data/lib/parklife/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c83a66e0d3fcb43a7687e99ed43267ac8998df9c6cb36cc066bdbce3128538ff
|
4
|
+
data.tar.gz: 0f2e982d4fc88b1389c26ae5335c5922744f3a86f100a3e0fe40a8883dcd06e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7537ae0c2cf63a37d3710f2a70db51302c21f8ce117521f695165e4dd2874bff65d9522baacbe7b6f49397594aa4f889f2dab6a9b36415bffcee490f84dab1b
|
7
|
+
data.tar.gz: 71c26e2e286af0d8653b1e2166b2d00abbb52f16d4d3d582c3c7f799b9d5e92676d955877dd885df30f2e661063a53bf81dcddf0ef12d374daac78e2aa070b0b
|
data/.github/FUNDING.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
## Version 0.8.0 - 2025-09-08
|
4
|
+
|
5
|
+
Note that **Parklife's Rails integration has been moved into a separate gem** with some additional functionality, [see the `parklife-rails` repo for more information](https://github.com/benpickles/parklife-rails).
|
6
|
+
|
3
7
|
## Version 0.8.0.beta1 - 2025-08-10
|
4
8
|
|
5
9
|
- Remove out-of-the-box Rails integration in preparation for a separate gem. <https://github.com/benpickles/parklife/pull/131>
|
data/README.md
CHANGED
@@ -12,38 +12,36 @@ Add Parklife to your application's Gemfile and run bundle install.
|
|
12
12
|
gem 'parklife'
|
13
13
|
```
|
14
14
|
|
15
|
-
Now generate a Parkfile configuration file and build script. Include some Rails- or Sinatra-specific settings by passing `--rails` or `--sinatra`, create a GitHub Actions workflow to generate your Parklife build and
|
15
|
+
Now generate a Parkfile configuration file and build script. Include some Rails- or Sinatra-specific settings by passing `--rails` or `--sinatra`, create a GitHub Actions workflow to generate your Parklife build and deploy it to GitHub Pages by passing `--github-pages`.
|
16
16
|
|
17
17
|
```
|
18
18
|
$ bundle exec parklife init
|
19
19
|
```
|
20
20
|
|
21
|
-
## How to use Parklife
|
21
|
+
## How to use Parklife
|
22
|
+
|
23
|
+
> [!NOTE]
|
24
|
+
> See the [`parklife-rails` repository](https://github.com/benpickles/parklife-rails) for how to use Parklife with Rails.
|
22
25
|
|
23
26
|
Parklife is configured with a file called `Parkfile` in the root of your project, here's an example `Parkfile` for an imaginary Rails app:
|
24
27
|
|
25
28
|
```ruby
|
26
|
-
#
|
27
|
-
|
28
|
-
require 'parklife/rails'
|
29
|
-
|
30
|
-
# Load the Rails application, this gives you full access to the application's
|
31
|
-
# environment from this file - using models for example.
|
32
|
-
require_relative 'config/environment'
|
29
|
+
# Assuming your Rack app lives in ./app.rb:
|
30
|
+
require_relative 'app'
|
33
31
|
|
34
32
|
Parkfile.application.routes do
|
35
33
|
# Start from the homepage and crawl all links.
|
36
34
|
root crawl: true
|
37
35
|
|
38
36
|
# Some extra paths that aren't discovered while crawling.
|
39
|
-
get
|
40
|
-
get
|
37
|
+
get '/feed.atom'
|
38
|
+
get '/sitemap.xml'
|
41
39
|
|
42
40
|
# A couple more hidden pages.
|
43
|
-
get
|
41
|
+
get '/easter_egg', crawl: true
|
44
42
|
|
45
43
|
# Services typically allow a custom 404 page.
|
46
|
-
get '404.html'
|
44
|
+
get '/404.html'
|
47
45
|
end
|
48
46
|
```
|
49
47
|
|
@@ -76,11 +74,11 @@ build/feed.atom
|
|
76
74
|
build/sitemap.xml
|
77
75
|
```
|
78
76
|
|
79
|
-
Parklife doesn't know about assets (images, CSS, etc) so you likely also need to generate those and copy them to the build directory
|
77
|
+
Parklife doesn't know about assets (images, CSS, etc) so you likely also need to generate those and copy them to the build directory.
|
80
78
|
|
81
79
|
## More examples
|
82
80
|
|
83
|
-
Take a look at the [
|
81
|
+
Take a look at the [`parklife-rails` example app](https://github.com/benpickles/parklife-rails/tree/main/example-app), and the [Rack](examples/rack/Parkfile) and [Sinatra](examples/sinatra/Parkfile) working examples within this repository.
|
84
82
|
|
85
83
|
## Configuration
|
86
84
|
|
data/lib/parklife/cli.rb
CHANGED
@@ -25,7 +25,7 @@ module Parklife
|
|
25
25
|
['build_dir', application.config.build_dir],
|
26
26
|
['nested_index', application.config.nested_index],
|
27
27
|
['on_404', application.config.on_404.inspect],
|
28
|
-
['parklife
|
28
|
+
['parklife-rails', defined?(::Parklife::Rails) ? 'enabled' : '-'],
|
29
29
|
['parklife/sinatra', defined?(::Parklife::Sinatra) ? 'enabled' : '-'],
|
30
30
|
['reporter', reporter == $stdout ? '$stdout' : reporter],
|
31
31
|
])
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<% if options[:rails] -%>
|
2
|
-
|
2
|
+
# Load your application, this activates the Parklife/Rails integration and gives
|
3
|
+
# you access to route helpers and models in this file.
|
3
4
|
require_relative 'config/environment'
|
4
5
|
<% else -%>
|
5
6
|
<% if options[:sinatra] -%>
|
@@ -3,9 +3,15 @@
|
|
3
3
|
set -eu
|
4
4
|
|
5
5
|
<% if options[:rails] -%>
|
6
|
-
# Run the app in production mode to ensure correct asset URLs are generated
|
6
|
+
# Run the app in production mode to ensure correct asset URLs are generated.
|
7
7
|
export RAILS_ENV=production
|
8
|
+
|
9
|
+
# Prevent most logs from outputting to stdout during a build.
|
10
|
+
export RAILS_LOG_LEVEL=warn
|
11
|
+
|
12
|
+
# Enable precompiling assets.
|
8
13
|
export SECRET_KEY_BASE=dummy
|
14
|
+
export SECRET_KEY_BASE_DUMMY=1
|
9
15
|
|
10
16
|
# If your Rails app uses ActiveRecord then this is a good point to create and
|
11
17
|
# seed the database from db/seeds.rb.
|
data/lib/parklife/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parklife
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.0
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Pickles
|
@@ -58,6 +58,7 @@ executables:
|
|
58
58
|
extensions: []
|
59
59
|
extra_rdoc_files: []
|
60
60
|
files:
|
61
|
+
- ".github/FUNDING.yml"
|
61
62
|
- ".github/workflows/examples.yml"
|
62
63
|
- ".github/workflows/tests.yml"
|
63
64
|
- ".gitignore"
|