parklife 0.8.0 → 0.8.1

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: c83a66e0d3fcb43a7687e99ed43267ac8998df9c6cb36cc066bdbce3128538ff
4
- data.tar.gz: 0f2e982d4fc88b1389c26ae5335c5922744f3a86f100a3e0fe40a8883dcd06e7
3
+ metadata.gz: b76fbfd9c4d1a56c6b2498e1e5470e5ac43bd06fc68ef5e944ed2f2c5b0ab81c
4
+ data.tar.gz: '0808d1e25b27429f521002f7e28d41c254dcee31e2ea4b76a639f1bbd61d15b0'
5
5
  SHA512:
6
- metadata.gz: b7537ae0c2cf63a37d3710f2a70db51302c21f8ce117521f695165e4dd2874bff65d9522baacbe7b6f49397594aa4f889f2dab6a9b36415bffcee490f84dab1b
7
- data.tar.gz: 71c26e2e286af0d8653b1e2166b2d00abbb52f16d4d3d582c3c7f799b9d5e92676d955877dd885df30f2e661063a53bf81dcddf0ef12d374daac78e2aa070b0b
6
+ metadata.gz: 950ab97e849c11e69181093a0dd110f51fcafbc22ab869dbff07dd1ce79f69cb78dfbd9ffe5311b0b1d34fbd770f531042d5a646f349ab387b00b44fe6c0cc97
7
+ data.tar.gz: 23d920c50159706d18f20c958abb98f59e320b841a7ab00cde022c57ef8fb9b4b9e14486965ae55f538d0820c378f4c0b41c3bc30a37d8eee5250101ab5cee5a
@@ -32,18 +32,3 @@ jobs:
32
32
  working-directory: examples/roda
33
33
  - run: test -f build/index.html
34
34
  working-directory: examples/roda
35
-
36
- sinatra:
37
- runs-on: ubuntu-latest
38
- name: Sinatra example
39
- steps:
40
- - uses: actions/checkout@v3
41
- - uses: ruby/setup-ruby@v1
42
- with:
43
- bundler-cache: true
44
- ruby-version: '3.4'
45
- working-directory: examples/sinatra
46
- - run: bin/static-build
47
- working-directory: examples/sinatra
48
- - run: test -f build/index.html
49
- working-directory: examples/sinatra
@@ -22,7 +22,7 @@ jobs:
22
22
  with:
23
23
  bundler-cache: true
24
24
  ruby-version: ${{ matrix.ruby }}
25
- - run: bundle exec rspec --exclude-pattern "spec/**/*sinatra*"
25
+ - run: bundle exec rspec
26
26
 
27
27
  rubocop:
28
28
  runs-on: ubuntu-latest
@@ -34,30 +34,3 @@ jobs:
34
34
  bundler-cache: true
35
35
  ruby-version: '3.2'
36
36
  - run: bundle exec rubocop
37
-
38
- sinatra:
39
- runs-on: ubuntu-latest
40
- strategy:
41
- fail-fast: false
42
- matrix:
43
- ruby:
44
- - '2.7'
45
- - '3.0'
46
- - '3.1'
47
- - '3.2'
48
- - '3.3'
49
- - '3.4'
50
- sinatra:
51
- - '3.x'
52
- - '4.0'
53
- - '4.1'
54
- env:
55
- BUNDLE_GEMFILE: gemfiles/sinatra_${{ matrix.sinatra }}.gemfile
56
- name: Ruby ${{ matrix.ruby }} / Sinatra ${{ matrix.sinatra }}
57
- steps:
58
- - uses: actions/checkout@v4
59
- - uses: ruby/setup-ruby@v1
60
- with:
61
- bundler-cache: true
62
- ruby-version: ${{ matrix.ruby }}
63
- - run: bundle exec rspec --pattern "spec/**/*sinatra*"
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Unreleased
2
2
 
3
+ ## Version 0.8.1 - 2025-12-21
4
+
5
+ - Move out-of-the-box Sinatra integration into a separate [`parklife-sinatra`](https://github.com/benpickles/parklife-sinatra) gem. <https://github.com/benpickles/parklife/pull/133>
6
+
3
7
  ## Version 0.8.0 - 2025-09-08
4
8
 
5
9
  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).
data/Gemfile CHANGED
@@ -7,7 +7,6 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
7
7
  # Specify your gem's dependencies in parklife.gemspec
8
8
  gemspec
9
9
 
10
- gem 'appraisal'
11
10
  gem 'bundler'
12
11
  gem 'rake'
13
12
  gem 'rspec'
data/README.md CHANGED
@@ -23,7 +23,7 @@ $ bundle exec parklife init
23
23
  > [!NOTE]
24
24
  > See the [`parklife-rails` repository](https://github.com/benpickles/parklife-rails) for how to use Parklife with Rails.
25
25
 
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:
26
+ Parklife is configured with a file called `Parkfile` in the root of your project, here's an example `Parkfile` for an imaginary Rack app:
27
27
 
28
28
  ```ruby
29
29
  # Assuming your Rack app lives in ./app.rb:
@@ -78,7 +78,7 @@ Parklife doesn't know about assets (images, CSS, etc) so you likely also need to
78
78
 
79
79
  ## More examples
80
80
 
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.
81
+ Take a look at the [`parklife-rails` example app](https://github.com/benpickles/parklife-rails/tree/main/example-app), the [`parklife-sinatra` example app](https://github.com/benpickles/parklife-sinatra/tree/main/example-app), and the [Rack](examples/rack/Parkfile) example in this repository.
82
82
 
83
83
  ## Configuration
84
84
 
data/lib/parklife/cli.rb CHANGED
@@ -26,7 +26,7 @@ module Parklife
26
26
  ['nested_index', application.config.nested_index],
27
27
  ['on_404', application.config.on_404.inspect],
28
28
  ['parklife-rails', defined?(::Parklife::Rails) ? 'enabled' : '-'],
29
- ['parklife/sinatra', defined?(::Parklife::Sinatra) ? 'enabled' : '-'],
29
+ ['parklife-sinatra', defined?(::Parklife::Sinatra) ? 'enabled' : '-'],
30
30
  ['reporter', reporter == $stdout ? '$stdout' : reporter],
31
31
  ])
32
32
  end
@@ -4,7 +4,7 @@
4
4
  require_relative 'config/environment'
5
5
  <% else -%>
6
6
  <% if options[:sinatra] -%>
7
- require 'parklife/sinatra'
7
+ require 'parklife-sinatra'
8
8
 
9
9
  <% end -%>
10
10
  # Assuming your <%= options[:sinatra] ? 'Sinatra' : 'Rack' %> app lives in ./app.rb:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parklife
4
- VERSION = '0.8.0'
4
+ VERSION = '0.8.1'
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
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Pickles
@@ -64,7 +64,6 @@ files:
64
64
  - ".gitignore"
65
65
  - ".rspec"
66
66
  - ".rubocop.yml"
67
- - Appraisals
68
67
  - CHANGELOG.md
69
68
  - CODE_OF_CONDUCT.md
70
69
  - Gemfile
@@ -74,9 +73,6 @@ files:
74
73
  - bin/console
75
74
  - bin/setup
76
75
  - exe/parklife
77
- - gemfiles/sinatra_3.x.gemfile
78
- - gemfiles/sinatra_4.0.gemfile
79
- - gemfiles/sinatra_4.1.gemfile
80
76
  - lib/parklife.rb
81
77
  - lib/parklife/application.rb
82
78
  - lib/parklife/browser.rb
@@ -86,7 +82,6 @@ files:
86
82
  - lib/parklife/errors.rb
87
83
  - lib/parklife/route.rb
88
84
  - lib/parklife/route_set.rb
89
- - lib/parklife/sinatra.rb
90
85
  - lib/parklife/templates/Parkfile.erb
91
86
  - lib/parklife/templates/github_pages.yml
92
87
  - lib/parklife/templates/static_build.erb
@@ -115,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
110
  - !ruby/object:Gem::Version
116
111
  version: '0'
117
112
  requirements: []
118
- rubygems_version: 3.7.1
113
+ rubygems_version: 3.6.9
119
114
  specification_version: 4
120
115
  summary: Convert a Rack app into a static HTML site.
121
116
  test_files: []
data/Appraisals DELETED
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- appraise 'sinatra_3.x' do
4
- gem 'sinatra', '~> 3.0'
5
- end
6
-
7
- appraise 'sinatra_4.0' do
8
- gem 'sinatra', '~> 4.0.0'
9
- end
10
-
11
- appraise 'sinatra_4.1' do
12
- gem 'sinatra', '~> 4.1.0'
13
- end
@@ -1,12 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal"
6
- gem "bundler"
7
- gem "rake"
8
- gem "rspec"
9
- gem "rubocop"
10
- gem "sinatra", "~> 3.0"
11
-
12
- gemspec path: "../"
@@ -1,12 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal"
6
- gem "bundler"
7
- gem "rake"
8
- gem "rspec"
9
- gem "rubocop"
10
- gem "sinatra", "~> 4.0.0"
11
-
12
- gemspec path: "../"
@@ -1,12 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal"
6
- gem "bundler"
7
- gem "rake"
8
- gem "rspec"
9
- gem "rubocop"
10
- gem "sinatra", "~> 4.1.0"
11
-
12
- gemspec path: "../"
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'sinatra/base'
4
-
5
- module Parklife
6
- module Sinatra
7
- def self.registered(app)
8
- # Disable Rack::Protection::HostAuthorization middleware so that fetching
9
- # a page with Parklife works in development. It's safe to do here because
10
- # it will only be executed when this file is explicitly required in a
11
- # Parkfile and not in general when the app is running in a web server.
12
- if app.settings.respond_to?(:host_authorization)
13
- app.set(:host_authorization, permitted_hosts: [])
14
- end
15
- end
16
- end
17
- end
18
-
19
- Sinatra.register Parklife::Sinatra