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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5fee28b7e4a5dd221a56dc23db922173062e06b22888b2daf3a8bc05136525e2
4
- data.tar.gz: '02408d7f687ea75db42814178c9ae168595f43d16e287ce30e558baa0abb5d9a'
3
+ metadata.gz: c83a66e0d3fcb43a7687e99ed43267ac8998df9c6cb36cc066bdbce3128538ff
4
+ data.tar.gz: 0f2e982d4fc88b1389c26ae5335c5922744f3a86f100a3e0fe40a8883dcd06e7
5
5
  SHA512:
6
- metadata.gz: c6d913ec8bb296a0ad792b75dd4460a65cb94bf07a47d02db3f0db5c4ec5070de63033a8c4333eda08dfa1655c743f67bc615eef89ee5804d08502df75524ddb
7
- data.tar.gz: 10fd0665002537622e0229dd0c366cd3ff32ad6234f18a0da80a8fda4cfc64c296d106346193e3ec1ef4aad1c0bd66eff17373a0a402dcffa33842a19d459ec5
6
+ metadata.gz: b7537ae0c2cf63a37d3710f2a70db51302c21f8ce117521f695165e4dd2874bff65d9522baacbe7b6f49397594aa4f889f2dab6a9b36415bffcee490f84dab1b
7
+ data.tar.gz: 71c26e2e286af0d8653b1e2166b2d00abbb52f16d4d3d582c3c7f799b9d5e92676d955877dd885df30f2e661063a53bf81dcddf0ef12d374daac78e2aa070b0b
@@ -0,0 +1,3 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: benpickles
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 push it to GitHub Pages by passing `--github-pages`.
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 with Rails
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
- # Load Parklife's Rails-specific integration which, among other things, allows
27
- # you to use URL helpers within the `routes` block below.
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 feed_path(format: :atom)
40
- get sitemap_path(format: :xml)
37
+ get '/feed.atom'
38
+ get '/sitemap.xml'
41
39
 
42
40
  # A couple more hidden pages.
43
- get easter_egg_path, crawl: true
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, see the [Rails example's full build script](examples/rails/bin/static-build) for how you might do this.
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 [Rails](examples/rails/Parkfile), [Rack](examples/rack/Parkfile) and [Sinatra](examples/sinatra/Parkfile) working examples within this repository.
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/rails', defined?(::Parklife::Railtie) ? 'enabled' : '-'],
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
- require 'parklife/rails'
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 etc.
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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parklife
4
- VERSION = '0.8.0.beta1'
4
+ VERSION = '0.8.0'
5
5
  end
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.beta1
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"