Skip to content

Commit

Permalink
#38: Update legacy versions (#40)
Browse files Browse the repository at this point in the history
* Update legacy versions

* Consider v2.6 and 3.0 legacy
* Update documentation to indicate new legacy versions
* Update documentation use the most recent version in examples
* Add note to documentation regarding maintenance of version 2.7 as the
default
* Update CHANGELOG

* Fix test exit code error

* Use past tense in CHANGELOG
  • Loading branch information
christopher-b authored Oct 16, 2024
1 parent ee1be20 commit 65b402a
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 115 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})
* Consider v2.6 and 3.0 legacy
* Updated documentation to indicate new legacy versions
* Updated documentation to use the most recent version in examples
* Added note to documentation regarding maintenance of version 2.7 as the default
* Removed legacy tests

## v1.2.1 - [April 9, 2024](https://github.com/lando/ruby/releases/tag/v1.2.1)
* Added newline to config.mjs to pass linting.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Add a `ruby` service to your Landofile
```yaml
services:
myservice:
type: ruby:2.5
type: ruby:3.3
```
For more info you should check out the [docs](https://docs.lando.dev/ruby):
Expand Down
2 changes: 1 addition & 1 deletion builders/ruby.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ module.exports = {
version: '2.7',
supported: ['3.3', '3.2', '3.1', '3.0', '2.7', '2.6', '2.5', '2.4', '2.3', '1.9'],
patchesSupported: true,
legacy: ['1.9', '2.5', '2.4', '2.3'],
command: 'tail -f /dev/null',
legacy: ['3.0', '2.6', '2.5', '2.4', '2.3', '1.9'],
moreHttpPorts: [],
path: [
'/usr/local/sbin',
Expand Down
2 changes: 1 addition & 1 deletion docs/caveats.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Caveats
description: Learn about caveats and known issues with the Lando PHP service.
description: Learn about caveats and known issues with the Lando Ruby service.
---

# Caveats
Expand Down
2 changes: 1 addition & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Also note that the options, in addition to the [build steps](https://docs.lando.
```yaml
services:
myservice:
type: ruby:2.5
type: ruby:3.3
port: 80
command: tail -f /dev/null
```
Expand Down
8 changes: 5 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,22 @@ You can easily add it to your Lando app by adding an entry to the [services](htt
* [3.3](https://hub.docker.com/_/ruby)
* [3.2](https://hub.docker.com/_/ruby)
* [3.1](https://hub.docker.com/_/ruby)
* [3.0](https://hub.docker.com/_/ruby)
* **[2.7](https://hub.docker.com/_/ruby)** **(default)**
* [2.6](https://hub.docker.com/_/ruby)
* [custom](https://docs.lando.dev/core/v3/services/lando.html#overrides)

## Legacy versions

You can still run these versions with Lando but for all intents and purposes they should be considered deprecated (e.g. YMMV and do not expect a ton of support if you have an issue).

* [3.0](https://hub.docker.com/_/ruby)
* [2.6](https://hub.docker.com/_/ruby)
* [2.5](https://hub.docker.com/_/ruby)
* [2.4](https://hub.docker.com/_/ruby)
* [2.3](https://hub.docker.com/_/ruby)
* [1.9](https://hub.docker.com/_/ruby)

Version 2.7 should be considered legacy, but as it has been the default version, we are maintaining support to not break installs where the version is not specified. We recommend specifying a more recent version.

## Patch versions

::: warning Not officially supported!
Expand All @@ -40,7 +42,7 @@ To use a patch version, you can do something as shown below:
```yaml
services:
myservice:
type: ruby:3.1.2
type: ruby:3.3.5
```
But make sure you use one of the available [patch tags](https://hub.docker.com/_/ruby/tags) for the underlying image we are using.
Expand Down
9 changes: 0 additions & 9 deletions examples/1.x/.lando.yml

This file was deleted.

38 changes: 0 additions & 38 deletions examples/1.x/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions examples/1.x/server-custom.rb

This file was deleted.

14 changes: 0 additions & 14 deletions examples/1.x/server.rb

This file was deleted.

8 changes: 2 additions & 6 deletions examples/2.x/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@ services:
defaults:
type: ruby
command: ruby /app/server.rb
custom:
type: ruby:2.6
port: 8080
command: ruby /app/server-custom.rb
patch:
type: ruby:2.5.3
type: ruby:2.7.7
cli:
type: ruby

# This is important because it lets lando know to test against the plugin in this repo
# DO NOT REMOVE THIS!
plugins:
"@lando/ruby": ./../../
"@lando/ruby": ./../../
12 changes: 3 additions & 9 deletions examples/2.x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,17 @@ Verification commands
Run the following commands to validate things are rolling as they should.

```bash
# Should use 2.5.x as the default version
# Should use 2.7.x as the default version
lando ssh -s defaults -c "ruby --version | grep 2.7."

# Should use the user specified version when set
lando ssh -s custom -c "ruby --version | grep 2.6."

# Should use the user specified patch version when set
lando ssh -s patch -c "ruby --version | grep 2.5.3"

# Should run on the custom port when specified
lando ssh -s custom -c "curl http://localhost:8080 | grep OHNO"
lando ssh -s patch -c "ruby --version | grep 2.7.7"

# Should run on port 80 by default
lando ssh -s defaults -c "curl http://localhost | grep TROUBLE"

# Should not serve port 80 for cli
lando ssh -s cli -c "curl http://localhost" || echo $? | grep 1
lando ssh -s cli -c "curl http://localhost" || echo $? | grep 7
```

Destroy tests
Expand Down
14 changes: 0 additions & 14 deletions examples/2.x/server-custom.rb

This file was deleted.

2 changes: 1 addition & 1 deletion examples/3.x/.lando.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: lando-ruby-3
services:
defaults:
type: ruby:3.0
type: ruby:3.3
command: ruby /app/server.rb
custom:
type: ruby:3.1
Expand Down
6 changes: 3 additions & 3 deletions examples/3.x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Verification commands
Run the following commands to validate things are rolling as they should.

```bash
# Should use 3.0.x as the defined version
lando ssh -s defaults -c "ruby --version | grep 3.0."
# Should use 3.3.x as the defined version
lando ssh -s defaults -c "ruby --version | grep 3.3."

# Should use 3.1.x as the defined version
lando ssh -s custom -c "ruby --version | grep 3.1."
Expand All @@ -38,7 +38,7 @@ lando ssh -s custom -c "curl http://localhost:8080 | grep OHNO"
lando ssh -s defaults -c "curl http://localhost | grep TROUBLE"

# Should not serve port 80 for cli
lando ssh -s cli -c "curl http://localhost" || echo $? | grep 1
lando ssh -s cli -c "curl http://localhost" || echo $? | grep 7

# Should run Ruby v3.2
lando ssh -s v3_2 -c "ruby --version | grep 3.2."
Expand Down

0 comments on commit 65b402a

Please sign in to comment.