mimas-bridgetown 0.1.0 → 0.2.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: b50f042aec9ed40b035f7f06c6b8c052cd92005065e421cb813e23c5853f74c7
4
- data.tar.gz: da54be33b3b1ea5d7eaf6d470344c2686fb18612c60be23dbbd0d1be932bd4fa
3
+ metadata.gz: 4332be55415019a035723f461b2d107c0fa6804cbf1bd4a9ab63697d73628f3f
4
+ data.tar.gz: 34937c7d4a6bc702b75207fb481180f89ed7db66f2baaa618c912f4f0e237053
5
5
  SHA512:
6
- metadata.gz: fa1c0f65fa6a295f178fc606220c910816cbfb79eb00a0f37dad4526134b477a6f7326ca878623c702bfa53149d0bd6f7f09a0dbdf6802d6c7e71e8582c208bb
7
- data.tar.gz: 46891f14c006e82dd53ffc2128fa41e7522ec1de0995248a2225d25fc48a37d7d7c8f69699d97a225406297c85b984e8faa5f3539d6b761b95ff5277d11d133e
6
+ metadata.gz: b14a2fa955a032bb4373e5bbae40f945018aa771338b970424e14b18ea0bd88c8b0d92b03ddf34eda53ae9be57533882a2c2b063a34c749226d175d1b4cc8ae9
7
+ data.tar.gz: 5b142e8e1267f18e2623a8e1a069c8fcb74f1c7ef53b7323d9f99cbf629d392bb920a0f381db75886c2b7371dda1beda90a4ef66257299211507b4e8b4380c94
@@ -29,8 +29,7 @@ module Mimas
29
29
 
30
30
  destination_dir = File.join(Dir.pwd, Mimas::Config::DEFAULT_DIRECTORY)
31
31
 
32
- config_dir = File.join(__dir__, "..", "templates")
33
- configrb = template("config.rb", dir: config_dir, ip: ip, domain: domain, site_type: site_type, app_server: app_server)
32
+ configrb = template("config.rb", ip: ip, domain: domain, site_type: site_type, app_server: app_server)
34
33
  File.write(File.join(destination_dir, "mimas.rb"), configrb)
35
34
 
36
35
  if site_type == :hybrid
@@ -0,0 +1,29 @@
1
+ <%= domain %> {
2
+ root <%= site_root %>/current/root
3
+ encode
4
+ file_server
5
+
6
+ handle_errors {
7
+ rewrite /404.html
8
+ file_server
9
+ }
10
+
11
+ header {
12
+ ?strict-transport-security "max-age=31536000; includeSubDomains"
13
+ ?x-frame-options "DENY"
14
+ ?x-xss-protection "1; mode=block"
15
+ ?x-content-type-options "nosniff"
16
+ ?referrer-policy "no-referrer-when-downgrade"
17
+ ?cache-control "public, max-age=604800, s-maxage=86400"
18
+ }
19
+
20
+ @stamped-assets path /_bridgetown/*
21
+ header @stamped-assets {
22
+ cache-control "public, max-age=31536000, immutable"
23
+ }
24
+
25
+ log {
26
+ format console
27
+ output file <%= site_root %>/logs/caddy.log
28
+ }
29
+ }
@@ -1,7 +1,7 @@
1
1
  module Mimas
2
2
  module Plugins
3
3
  module Bridgetown
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.1"
5
5
  end
6
6
  end
7
7
  end
@@ -11,11 +11,15 @@ module Mimas
11
11
  hooks = Mimas::Hooks.new
12
12
 
13
13
  hooks.before_push do
14
- `bin/bt deploy`
14
+ `BRIDGETOWN_ENV=production bin/bt deploy`
15
15
  end
16
16
 
17
17
  hooks
18
18
  end
19
+
20
+ def templates_dir
21
+ Pathname.new(__dir__).join("bridgetown", "templates")
22
+ end
19
23
  end
20
24
  end
21
25
  end
metadata CHANGED
@@ -1,45 +1,40 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mimas-bridgetown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ayush Newatia
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-07-22 00:00:00.000000000 Z
10
+ date: 2026-07-23 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: mimas
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - ">="
16
+ - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '0'
18
+ version: '0.2'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
- - - ">="
23
+ - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '0'
25
+ version: '0.2'
26
26
  email: ayush@hey.com
27
27
  executables: []
28
28
  extensions: []
29
29
  extra_rdoc_files: []
30
30
  files:
31
- - Gemfile
32
- - Gemfile.lock
33
- - LICENSE.txt
34
- - README.md
35
- - Rakefile
36
31
  - lib/mimas-bridgetown.rb
37
32
  - lib/mimas/plugins/bridgetown.rb
38
33
  - lib/mimas/plugins/bridgetown/commands/init.rb
34
+ - lib/mimas/plugins/bridgetown/templates/Caddyfile.static.erb
39
35
  - lib/mimas/plugins/bridgetown/templates/config.rb.erb
40
36
  - lib/mimas/plugins/bridgetown/version.rb
41
- - mimas-bridgetown.gemspec
42
- - scripts/release
37
+ homepage: https://codeberg.org/ayushn21/mimas-bridgetown
43
38
  licenses:
44
39
  - MIT
45
40
  metadata:
data/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- gemspec
6
-
7
- gem "rake"
data/Gemfile.lock DELETED
@@ -1,46 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- mimas-bridgetown (0.1.0)
5
- mimas
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- bcrypt_pbkdf (1.1.2)
11
- dry-cli (1.4.1)
12
- ed25519 (1.4.0)
13
- logger (1.7.0)
14
- mimas (0.1.0)
15
- bcrypt_pbkdf (~> 1.0)
16
- dry-cli (~> 1.4)
17
- ed25519 (~> 1.2)
18
- logger (~> 1.7)
19
- net-scp (~> 4.1)
20
- net-ssh (~> 7.3)
21
- net-scp (4.1.0)
22
- net-ssh (>= 2.6.5, < 8.0.0)
23
- net-ssh (7.3.3)
24
- rake (13.4.2)
25
-
26
- PLATFORMS
27
- arm64-darwin-23
28
- ruby
29
-
30
- DEPENDENCIES
31
- mimas-bridgetown!
32
- rake
33
-
34
- CHECKSUMS
35
- bcrypt_pbkdf (1.1.2) sha256=c2414c23ce66869b3eb9f643d6a3374d8322dfb5078125c82792304c10b94cf6
36
- dry-cli (1.4.1) sha256=b8015bb76c708aa8705a36faf694973e75eeeffca39b89c8e172dc6f66a7d874
37
- ed25519 (1.4.0) sha256=16e97f5198689a154247169f3453ef4cfd3f7a47481fde0ae33206cdfdcac506
38
- logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
39
- mimas (0.1.0) sha256=2b7edf531824e6f1cd6938f081692ab8118882e89bf0e9f4a4113eb5852f83f2
40
- mimas-bridgetown (0.1.0)
41
- net-scp (4.1.0) sha256=a99b0b92a1e5d360b0de4ffbf2dc0c91531502d3d4f56c28b0139a7c093d1a5d
42
- net-ssh (7.3.3) sha256=831def58b2c51dcef66ec00d29397d4f210de89c19fe78f95873ca30f386e86a
43
- rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
44
-
45
- BUNDLED WITH
46
- 4.0.10
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2026-present Ayush Newatia
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md DELETED
@@ -1,47 +0,0 @@
1
- # Bridgetown Plugin for Mimas
2
-
3
- Mimas is a CLI tool to orchestrate server provisioning and zero-downtime deploys for static sites and Ruby apps.
4
-
5
- This plugin helps setup Mimas for Bridgetown projects.
6
-
7
- ## Installing
8
-
9
- Install Mimas and this plugin:
10
-
11
- ```shell
12
- $ bundle add mimas-bridgetown
13
- $ bundle binstub mimas
14
- ```
15
-
16
- ## Create Deployment Files
17
-
18
- Run the `init` command to setup the config files needed by Mimas:
19
-
20
- ```shell
21
- $ bin/mimas init
22
- ```
23
-
24
- You'll be prompted for details about your domain and server. The plugin provides configurations for static sites as well as hybrid apps that contain a Ruby service as well.
25
-
26
- A pre-deploy hook to build you Bridgetown site will also be set up.
27
-
28
- ## Deploying
29
-
30
- Provision your server if you haven't already:
31
-
32
- ```shell
33
- $ bin/mimas provision production
34
- ```
35
-
36
- Push your site to your server:
37
-
38
- ```shell
39
- # Push a static site only
40
- $ bin/mimas push production
41
-
42
- # Push a hybrid app
43
- $ bin/mimas push static production
44
- $ bin/mimas push api production
45
- ```
46
-
47
- See the [Mimas Readme](https://codeberg.org/ayushn21/mimas) for complete usage and configuration details.
data/Rakefile DELETED
@@ -1 +0,0 @@
1
- require "bundler/gem_tasks"
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/mimas/plugins/bridgetown/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "mimas-bridgetown"
7
- spec.version = Mimas::Plugins::Bridgetown::VERSION
8
- spec.author = "Ayush Newatia"
9
- spec.email = "ayush@hey.com"
10
- spec.summary = "Simplify Bridgetown deployment using Mimas"
11
- spec.license = "MIT"
12
-
13
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test)/!) }
14
- spec.test_files = spec.files.grep(%r!^test/!)
15
-
16
- spec.metadata["mimas_plugin"] = "true"
17
-
18
- spec.require_paths = ["lib"]
19
-
20
- spec.required_ruby_version = ">= 3.4.0"
21
-
22
- spec.add_dependency "mimas"
23
- end
data/scripts/release DELETED
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Tag and push a release to Rubygems
4
-
5
- set -e
6
-
7
- bundle exec rake release