diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fcd622..14239c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/README.md b/README.md index 7ff3eef..c311cf8 100644 --- a/README.md +++ b/README.md @@ -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): diff --git a/builders/ruby.js b/builders/ruby.js index 213b63b..149699b 100644 --- a/builders/ruby.js +++ b/builders/ruby.js @@ -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', diff --git a/docs/caveats.md b/docs/caveats.md index 1de8423..26747ca 100644 --- a/docs/caveats.md +++ b/docs/caveats.md @@ -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 diff --git a/docs/config.md b/docs/config.md index 9fb8f3c..3208a18 100644 --- a/docs/config.md +++ b/docs/config.md @@ -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 ``` diff --git a/docs/index.md b/docs/index.md index aa310dd..81a41d2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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! @@ -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. diff --git a/examples/1.x/.lando.yml b/examples/1.x/.lando.yml deleted file mode 100644 index 7a8d05c..0000000 --- a/examples/1.x/.lando.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: lando-ruby-1 -services: - defaults: - type: ruby:1.9 - -# This is important because it lets lando know to test against the plugin in this repo -# DO NOT REMOVE THIS! -plugins: - "@lando/ruby": ./../../ \ No newline at end of file diff --git a/examples/1.x/README.md b/examples/1.x/README.md deleted file mode 100644 index 6155965..0000000 --- a/examples/1.x/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Ruby Example -============ - -This example exists primarily to test the following documentation: - -* [Ruby Service](https://docs.devwithlando.io/tutorials/ruby.html) - -Start up tests --------------- - -Run the following commands to get up and running with this example. - -```bash -# Should start up successfully -lando poweroff -lando start -``` - -Verification commands ---------------------- - -Run the following commands to validate things are rolling as they should. - -```bash -# Should use 1.9.x as the default version -lando ssh -s defaults -c "ruby --version | grep 1.9." -``` - -Destroy tests -------------- - -Run the following commands to trash this app like nothing ever happened. - -```bash -# Should be destroyed with success -lando destroy -y -lando poweroff -``` diff --git a/examples/1.x/server-custom.rb b/examples/1.x/server-custom.rb deleted file mode 100644 index 87e4d5a..0000000 --- a/examples/1.x/server-custom.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'socket' -server = TCPServer.new 8080 - -while session = server.accept - request = session.gets - puts request - - session.print "HTTP/1.1 200\r\n" # 1 - session.print "Content-Type: text/html\r\n" # 2 - session.print "\r\n" # 3 - session.print "OHNO The time is #{Time.now}" #4 - - session.close -end diff --git a/examples/1.x/server.rb b/examples/1.x/server.rb deleted file mode 100644 index 9ba0214..0000000 --- a/examples/1.x/server.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'socket' -server = TCPServer.new 80 - -while session = server.accept - request = session.gets - puts request - - session.print "HTTP/1.1 200\r\n" # 1 - session.print "Content-Type: text/html\r\n" # 2 - session.print "\r\n" # 3 - session.print "TROUBLETROUBLETROUBLE The time is #{Time.now}" #4 - - session.close -end diff --git a/examples/2.x/.lando.yml b/examples/2.x/.lando.yml index a333d77..6f39163 100644 --- a/examples/2.x/.lando.yml +++ b/examples/2.x/.lando.yml @@ -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": ./../../ \ No newline at end of file + "@lando/ruby": ./../../ diff --git a/examples/2.x/README.md b/examples/2.x/README.md index c5c5cc1..0d0e6e2 100644 --- a/examples/2.x/README.md +++ b/examples/2.x/README.md @@ -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 diff --git a/examples/2.x/server-custom.rb b/examples/2.x/server-custom.rb deleted file mode 100644 index 87e4d5a..0000000 --- a/examples/2.x/server-custom.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'socket' -server = TCPServer.new 8080 - -while session = server.accept - request = session.gets - puts request - - session.print "HTTP/1.1 200\r\n" # 1 - session.print "Content-Type: text/html\r\n" # 2 - session.print "\r\n" # 3 - session.print "OHNO The time is #{Time.now}" #4 - - session.close -end diff --git a/examples/3.x/.lando.yml b/examples/3.x/.lando.yml index 855cf5f..f2342be 100644 --- a/examples/3.x/.lando.yml +++ b/examples/3.x/.lando.yml @@ -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 diff --git a/examples/3.x/README.md b/examples/3.x/README.md index facef92..cb30a72 100644 --- a/examples/3.x/README.md +++ b/examples/3.x/README.md @@ -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." @@ -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."